Statistical Math Question

    Mar 17 2006 | 12:08 am
    I am using the last outlet of fiddle~ to get out freq/amp pairs of
    individual sinusoidal components in this case of saxophone
    multiphonics. I would like to get an 'average frequency and amplitude'
    for each component over an adjustable period of time say 15 seconds or
    2 minutes. However, my rudimentary math skills are leaving me quite
    baffled. I know it's not as simple as sticking a mean object on each
    component as high-frequency jumps skew the results and I am looking for
    some waiting of each frequency reported based on its amplitude.
    Basically, if I were to play a single multiphonic for 20 seconds, I
    would like to know what were the, say 7, strongest frequency areas and
    their relative amplitudes. Like an averaged sonogram but in numbers.
    Thanks in advance,
    Justin Yang

    • Mar 17 2006 | 12:19 am
      Here's part of the patch.
      max v2;
    • Mar 17 2006 | 1:06 am
      I'm not quite sure this answers your problem but one statistical formula
      you might find useful is the running average. Now, I'm not sure exactly
      what you mean by high frequency jumps skewing results and weighting
      based on amplitude so the formula below doesn't address that.
      Running average = x * alpha + ((1 - alpha) * previous running average)
      As you can see, it's a form of simple feedback algorithm where you plug
      the result of the equation back in. Alpha is a value between 0 and 1.
      Lower values mean longer averaging times. If alpha = 1, no averaging is
      done. This is also useful for smoothing data -- i.e. getting rid of
      spikes. See patch below.
    • Mar 17 2006 | 1:20 am
      Btw, the slide object in MaxMSP 4.5 does this with user settable
      constants for positive and negative deltas (rise and fall).
    • Mar 17 2006 | 2:54 am
      this should be simple.
      i usualy make fiddle~s output a signal first.
      to flatten the intonation line you can now use
      lowpassfilters, or slide~, or rampsmooth~.
      to control what happens just connect a cycle~
      and listen to it.
    • Mar 17 2006 | 10:04 am
      On 17-Mar-2006, at 2:06, Jean-Marc Pelletier wrote:
      > Running average = x * alpha + ((1 - alpha) * previous running average)
      lp.stacey does this automatically. Give her an initialization
      argument specifying how wide your window is (10 data points, 20 data
      points, whatever) and she'll do the math. Follow the URI below to the
      Litter Starter Pack for more information.
      I'd give you an example but I don't have fiddle~ installed on this
      machine yet.
      -- Peter
      -------------- -------------
      Peter Castine | +--> Litter Power & Litter Bundle for Jitter
      |.................................................... | iCE: Sequencing, Recording, and Interface Building | for Max/MSP | Extremely cool |....................................................
      | home|chez nous|wir|i nostri