when and why to use vectral~


    Aug 24 2006 | 5:33 am
    Hi,
    I am studying FFT right now and find that vectral~ sometimes appear in these FFT related patches. I read the manual and help file but could not understand when and why we need to use it.
    Could anybody explain more clearly ?
    Thanks.
    Chien-Wen

    • Aug 24 2006 | 7:16 am
      if I dont remember bad (but too less sleep hours i've got last night
      to tell the truth :-p)
      vectral~ lets you do some operation between succesive buffers and
      create very useful ramps for producing reverbs and delays.
      Technically vectral can act like a smoothing filter that doesn't work
      sample by sample
      but bin by bin: that means that it works with samples, but it doesnt
      act through consecutive samples, but escaping samples.
      Because of this feature you can actually do better things easily in fft.
      i remember once, in Basel (ch) , a great teacher from Cycling, mr
      R.D., tell about vectral... " it was there? was it always there???"
      he wanted it badly :-)
      hope this helps,
      mabe some other can be more specific
      cheers,
      tom
      Il giorno 24/ago/06, alle ore 07:33, Cheng Chien-Wen ha scritto:
      >
      > Hi,
      >
      > I am studying FFT right now and find that vectral~ sometimes appear
      > in these FFT related patches. I read the manual and help file but
      > could not understand when and why we need to use it.
      >
      > Could anybody explain more clearly ?
      >
      > Thanks.
      >
      > Chien-Wen
      >
      >
      >
    • Aug 24 2006 | 7:14 pm
      It's just a bin based envelope follower, so it's useful for anything
      which typical envelope followers are good for, perhaps most common of
      which being dynamics processing like noise gating, compression,
      expansion or visualization purposes like an eq meter. However,
      there's a number of more interesting things which can be done like
      tying them to oscillator bank frequency or vocoder filter maps,
      etc...I think my initial reason for making it was to assist a patch
      that performed FFT based noise reduction/spectral thinning in the
      vein of the old favorite ionizer.
      -Joshua
    • Aug 26 2006 | 8:48 pm
      Thanks for the explanation.
      Are there any example patches or tutorials that can examplify the use of vectral~ ?
      It seems that the output of vectral~ is just like some amplitude info, doesn't it ?
    • Aug 30 2006 | 12:48 am
      I observed that the data from vectral~ output is frequently connected to the fft~ real and imagery ouput as if it is used to scale the amplitude. But I am still confused about how vectral~ works. Since FFT deals with frequency domain, I feel confused about this bin-based envelop follower which seems to be something dealing with time-domain stuff. What exactly is the output of vectral~ ? The overall amplitude data for each consecutive FFT frame in time domain, the amplitude data for each frequency bin in a FFT frame, or something else ?
      Could someone help explain more ?
      Thanks.
    • Aug 30 2006 | 1:35 am
    • Aug 30 2006 | 3:10 am
      Here is my explanation:
      Normally if you used something like rampsmooth in pfft, rampsmooth would interpolate between the values of successive bin indexes.
      i.e. the interpolation all happens within one frame.
      With vectral, the interpolation occurs ACROSS separate frames. So for example if you were running a pfft with a FFT size of 8, you get 8 samples per frame. Each of these samples represents one eigth of the frequency spectrum, and are indexed from 0 to 7.
      You dont want to be interpolating from index 1 to index 2 to index 3 etc.
      You want to interpolate between index 1 of the first frame and index 1 of the second frame.
      When vectral is wired to receive the index values from an fftin object, vectral knows which frequency band is which. This way, when it receives a value from index 1, it holds that value and waits until the next index 1 comes around and then performs its calculations.
      I hope this helps, or at least didn't hurt. :]
    • Aug 30 2006 | 6:28 am
      Thank you very much. I understand it a little better now.
      Tht patch posted above is also very interesting.
      But the patch posted above uses vectral~ differently from what I saw in the following patch. The following patch is part of someone's piece which I am studying. When I take part of it out of the original patch to test it, it does not output any sound from pfft subpatch.
      Could any one see what's wrong with it ?
      I am thinking that the programmer uses "bin shift" (mentioned in MSP reference) to transform the sound. (I have no idea what bin shift is, but I know it does transform the sound.) But I don't know if the lookup table connected to the rightmost output works or not. Perhaps the lookup table is used to scale the FFT output. However, the patch does not output any sound from FFT. Any idea ?
      main patch:
      max v2;
      FFT subpatch (named "fft_test").
      max v2;
    • Aug 30 2006 | 8:21 am
      it should be amplitude for each bin
      maybe joshua can tell us :-)
      Il giorno 30/ago/06, alle ore 02:48, Cheng Chien-Wen ha scritto:
      >
      > I observed that the data from vectral~ output is frequently
      > connected to the fft~ real and imagery ouput as if it is used to
      > scale the amplitude. But I am still confused about how vectral~
      > works. Since FFT deals with frequency domain, I feel confused about
      > this bin-based envelop follower which seems to be something dealing
      > with time-domain stuff. What exactly is the output of vectral~ ?
      > The overall amplitude data for each consecutive FFT frame in time
      > domain, the amplitude data for each frequency bin in a FFT frame,
      > or something else ?
      >
      > Could someone help explain more ?
      >
      > Thanks.
      >
      >
      >
      >
    • Aug 30 2006 | 12:32 pm
    • Aug 30 2006 | 6:42 pm
      On Aug 30, 2006, at 1:27 AM, tommaso perego wrote:
      > it should be amplitude for each bin
      > maybe joshua can tell us :-)
      vectral~ is just a temporal data smoother for framebased data that is
      serialized as an audio signal. What that data is and how or why to
      use it is completely general.
      Perhaps the confusion is over how a frame of information is
      serialized as an audio signal, or what precisely a bin within a frame
      is, but I'll leave it to someone else to take the time to walk
      through those points if there's still confusion.
      -Joshua
    • Sep 05 2006 | 1:29 pm
      Cheng Chien-Wen wrote:
      > I observed that the data from vectral~ output is frequently connected
      > to the fft~ real and imagery ouput as if it is used to scale the
      > amplitude. But I am still confused about how vectral~ works. Since
      > FFT deals with frequency domain, I feel confused about this bin-based
      > envelop follower which seems to be something dealing with time-domain
      > stuff.
      In mathematical land the frequency domain seem disconnected from the
      time domain but then you'd need the whole duration of your piece as
      latency to start processing it...
      In the real fft world there remains a time aspect, you slice the signal
      into short slices (the fft window size) within one slize you have no
      time structure (but you can get that information back with ifft).
      Outside you do have a time structure, the change from slice to slice.
      But each slice is divided and ordered by frequency bins.
      If you want to change the timestructure of a single bin (like for
      example have an envelope follower) then you need tools like vectral,
      frameaccum~, framedelta~.
      If you would split each bin into a seperate signal processing chain, you
      could downsample by the window size and process each bin as if it would
      be a normal signal. But you would have to deal with two parts seperately
      the real and imaginary parts or if you converted it, the amplitude and
      phase. Yes, this is getting complicated, but consistent...
      Stefan
      --
      Stefan Tiedje------------x-------
      --_____-----------|--------------
      --(_|_ ----|-----|-----()-------
      -- _|_)----|-----()--------------
      ----------()--------www.ccmix.com
    • Jul 06 2007 | 5:06 pm
      hi,
      i still have a question on how to use vectral~:
      if i would like to manipulate the way, a sound develops in time,
      across multiple frames, i have apply envelope following on both
      real and imaginary data, or in polar value, magnitude and phase,
      since both carry time information, is this true?
      but as soon as i manipulate time, i seem to affect also frequency or phase?
      i must admit i have some difficulties how to treat those 2 parameters seperately.
      thank you!
      kassian
    • Jul 07 2007 | 10:22 am
      kassian schrieb:
      > if i would like to manipulate the way, a sound develops in time,
      > across multiple frames, i have apply envelope following on both
      > real and imaginary data, or in polar value, magnitude and phase,
      > since both carry time information, is this true?
      Best is to try both (and more) ways and listen...
      You might only want to change the amplitude part. Go experiment and
      listen. I'd try vectral~ only on the magnitude and leave the phase
      untouched as a starting point. Try to understand why it sounds like it
      sounds... If this leads to too much artefacts, try to feed the phase
      into framedelta~/phasewrap~ and after eventual processing into
      frameaccum~...
      Sometimes even randomisation of the phase does miracles... ;-)
      You will also learn from listening to the difference in results for
      varying frame sizes. Do the extremes (very small/very big...) to find
      out what will be appropriate... (watch out the CPU usage though...)
      Stefan
      --
      Stefan Tiedje------------x-------
      --_____-----------|--------------
      --(_|_ ----|-----|-----()-------
      -- _|_)----|-----()--------------
      ----------()--------www.ccmix.com
    • Jul 08 2007 | 4:34 am
      ok thanks!
      that