Forums > MaxMSP

Saturation effect – where to start?

Dec 01 2012 | 1:54 am


How would you go about creating a saturation effect? Any tips welcome.

Dec 01 2012 | 4:51 am

There are a few different patches that can work, but if I understand your question correctly, you could run your signal into a [*~] to amplify it, then run that signal into a [tanh~] which has the effect of making quieter amplitudes louder but keeping louder amplitudes relatively consistent. Other functions will work too.

[tanh~] may be a little expensive, so you may consider using a function that approximates it, or use a lookup table.

Consider looking into wavefolding functions as well. For example, [cosx~] can be used instead of [tanh~] for an interesting wavefolding effect. When a sound’s amplitude goes above the maximum, the signal "folds back" towards 0. If you were to continue to amplify the sound even further, it would bend back towards the maximum again, and so on. It reminds me of either a gain effect or less extreme phase modulation.

Hope this helps, let me know if I’m off with my response.

Dec 01 2012 | 5:30 pm

Thank you for taking the time to answer, this is helpful and should get me started. I guess what I’m actually interested in is waveshaping in order to generate "living" artifacts. I tried the [cosx~] object but somehow it seems less convincing… you just need to feed your amplified signal into it, nothing else right?

Dec 01 2012 | 6:45 pm

Try adding a little DC offset (+~ 0.1 or something) to the signal before going into tanh~. Asymmetrical distortion is a little richer.

Dec 01 2012 | 7:16 pm
Dec 01 2012 | 8:55 pm

Goldmine is right Rodrigo, what an astoundingly good resource.

Dec 01 2012 | 9:50 pm

Cheers guys !

Dec 02 2012 | 9:09 am

Also I can suggest to look at the musicdsp site, there are some examples of waveshaping algorithms:

Viewing 8 posts - 1 through 8 (of 8 total)

Forums > MaxMSP