Sinusoidal & Stochastic/noise decomposition

    Jul 09 2010 | 1:02 am
    Hi all,
    I wonder if anyone has an implementation for this? I'd need partial extraction similar to sigmund~ but I would love to get the synthesized sound to be as close to the original as possible.
    Xavier Serra's dissertation ( does partial tracking and synthesis and then subtracts that signal from the original in the frequency domain. If the phase is preserved it can be subtracted in the time domain.
    If I have to implement this myself I would probably use sigmund~ and do the subtraction inside a pfft~ patch. I know that in Serra's paper he smooths out the noise as a smooth frequency contour so the general shape of the stochastic part is preserved and made more conducive to transformation through a simpler representation. I will probably try this out but maybe someone has a better implementation already made?
    I'm only using this so that I can highlight partials and do time streching with the oscillator control data sigmund~ gives but to add a little realism to the signal. It would also be nice to somehow avoid all the craziness sigmund~ produces during more turbulent parts of the signal (attacks), perhaps changing the noise/sinusoidal mix depending on amplitude fluctuations and zero crossing rate(noisiness)?
    Any thoughts are much appreciated. I'm not wedded to using sigmund~ but something that'll give me control data for a collection of oscillators would be ideal while giving me the residual.
    My final question is, how about that phase information on the sinusoidal part? Although I know it doesn't matter perceptually, I would like a way of preserving this because of my project's technical needs (I'm too much of a noob to implement partial tracking myself).

    • Jul 14 2010 | 4:35 pm
      Just wondering if anybody else has tried this or have an implementation of it in max. Today I tried frequency domain subtraction to remove sinusoidal components (from the sigmund partial tracking patch) and I must say it works quite well! You can retain just the attack/noise or add both signals together to reconstruct the original signal roughly.
      Constructing some simple model of the noise component would be nice, in Serra's thesis he used filtered noise with the overall shape of the noise spectrum modeled with a break-point function I think.
    • Aug 07 2010 | 8:21 am
      Hello digiology, I am very interested in this question !
      I found X. Serra's work some month before, and I would really like to be able to test the harmonic/noise separation in Max!
      Do you have an implementation of your work ?
    • Aug 11 2010 | 3:48 pm
      Hey jebb,
      I posted an implementation in this thread: you can ignore the pitch shifting part.
      You'll need the sigmund~ external. Because this doesn't retain the phase the subtraction has to be done in the frequency domain (in a pfft~ object).
      The sine wave model isn't perfect but listening to the noise part on its own is surprisingly good if you're looking for that effect.
    • Aug 11 2010 | 7:02 pm
      Hey digiology, Thanks for the answer . Unfortunately, I cannot do any test because I don't have a Mac, and sigmund~ isn't available for win.
      Do you think you could test your separation tool with the file bourdon8.wav that I've posted on :
      It is normal that the SNR is the low (I choose on purpose this one, from all the samples that I've recorded, because this is one with the lowest SNR!)
      Thanks a lot
    • Dec 29 2012 | 2:40 pm
      sigmund~ is available for Max on Windows, compiled by Rob Clouth. you can find it at
    • Dec 29 2012 | 8:03 pm
      I've used residual noise in non-realtime quite a bit, so I know what you're after. (SPEAR works in non-realtime.)
      I wonder if you could skip sigmund~ and go straight at some kind of statistical analysis of the fft~. Maybe zero out bins that are much louder than the surrounding bins? Or, set some kind of limiter on bin amplitude... perhaps low-passing the amplitude stream in pfft~?