Distortion/Saturation effect

Jan 17, 2006 at 6:42pm

Distortion/Saturation effect

Hi all,

I’ve nearly finished a big FM poly synth and i want to
add a distortion and saturation effect to it.Any ideas
on where to start?

I’m not looking for a lo fi element, simply something
to saturate the signal and then to do distortion eg
tube/transistor with drive and damping controls.

I want to try to get some analogue warmth in there…

Any help would be much appreciated,



Jan 17, 2006 at 7:18pm

Have you had a look at the waveshaping tutorial
in the MSP tutorials? Since you’re doing FM, I’ll
assume that you may be working with just cycle~
objects, so there might be some effort involved
going to wavetable voodoo, but it might be worth


Jan 17, 2006 at 7:52pm

Thanks for the reply…I’ll have a look at the waveshaping tutorial.Some degree of wave shaping is possible with messing around with the overdrive~ object, and i have now created a nice saturation effect.But i’ll still try for some distortion with that tutorial.

The synth has got the 4 main wave shapes driving 6 operators – i just want to add something extra to the sound – to get away from that cold digital FM sound – rather like the NI FM7 has done.

Maybe I’ll try to make a Tape warmth patch, as emulated analogue distortion is a tricky one…

Cheers for your reply,


Jan 17, 2006 at 8:10pm

Creating analogue-esqe distortion is not easy in a digital system. Last time I did this, I started by adding a DC offset to the signal, then amplifying it and running it through tanh~. This got me some nice, warm, asymetrical distortion.

When that wasn’t good enough, I added filters, delays, etc.


Jan 17, 2006 at 8:18pm

I am very interesting topic in this topic as well.
I am always looking for ways of making my compositions
sound better. I have always been envious of Reaktor
sounds because they add processing to make it sound extra

The waveshaper example is a good one, it uses lookup~
to store a waveshaping function that modifies
the incoming signal. I think the Charles Dodge book
gives some good examples of other waveshaping functions
you can use. Is this the technique that is commonly used
for distortion?

How about saturation? How is this commonly done?

Are there ways you can do these effects spectrally?


Jan 17, 2006 at 8:28pm

please tell us if you find something nice, this is an area where msp is
lacking a bit.
i quite like reaktor’s, but that’s about the only thing i like about

Jan 17, 2006 at 10:14pm

Thanks for the interest.

Firstly saturation…I used the overdrive~ similar to the help file example and it sounds quite like the kontakt 2 saturation. Its simple but can add some warmth and punch to the sound. Distortion would be great but yeah its hard.Thanks for that Mz – do you think you could expand a little on that – i dont know how to add a DC offset to the signal – then do you use a *~ to amplify or something with a transfer function like overdrive~?

I’ve looked all over the net for distortion programming but theres not much around.There is a computer music tutorial on programming a simple distortion in C++ but i’m not good on C++:


Anyway,cheers for the replies – if i find anything else interesting i’ll put it up here.


Jan 17, 2006 at 10:55pm

I put together a little example that demonstrates the
technique that mzed describes. I do not hear a lot of
difference though. Is there anything I am missing?

#P window setfont “Sans Serif” 9.;
#P flonum 229 208 35 9 0.01 0 1 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 188 224 27 9109513 *~;
#P comment 266 208 100 9109513 amplify;
#P message 231 101 14 9109513 1;
#P toggle 231 54 15 0;
#P newex 231 76 50 9109513 metro 700;
#P user jsui 227 155 26 26 1 0 0 none;
#P user ezdac~ 173 308 217 341 0;
#P message 135 92 28 9109513 open;
#P toggle 188 92 15 0;
#P newex 187 260 31 9109513 tanh~;
#P newex 187 190 27 9109513 +~;
#N sfplay~ 1 120960 0 ;
#P newobj 188 128 40 9109513 sfplay~;
#P comment 259 159 100 9109513 DC offset;
#P connect 8 0 10 0;
#P connect 9 0 8 0;
#P connect 3 0 6 0;
#P connect 3 0 6 1;
#P connect 13 0 12 1;
#P connect 7 0 2 1;
#P connect 2 0 12 0;
#P connect 10 0 1 0;
#P connect 5 0 1 0;
#P connect 4 0 1 0;
#P connect 12 0 3 0;
#P connect 1 0 2 0;
#P window clipboard copycount 14;

Jan 17, 2006 at 11:05pm

Here’s mine, I’ll look at your’s now…

#P window setfont “Sans Serif” 18.;
#P window linecount 1;
#P comment 297 190 194 196626 < -- click for distortion;
#P window setfont “Sans Serif” 9.;
#P window linecount 2;
#P comment 23 248 100 196617 A wee bit of DC to make it nicer. —->;
#P window linecount 1;
#P message 210 195 86 196617 1. , 1128. 10000;
#B color 7;
#P newex 210 236 40 196617 line 0.;
#B color 7;
#P newex 28 89 57 196617 t b b;
#P newex 28 61 48 196617 loadbang;
#P newex 126 258 40 196617 +~ 0.07;
#B color 14;
#P flonum 151 292 51 9 0 0 0 3 0 0 0 74 156 97 222 222 222 0 0 0;
#P newex 126 314 35 196617 *~ 1.;
#P message 28 121 37 196617 loop 1;
#P toggle 207 134 34 0;
#P message 75 120 80 196617 open jongly.aiff;
#N sfplay~ 1 120960 0 ;
#P newobj 126 228 44 196617 sfplay~;
#P user gain~ 126 365 24 100 158 6 1.071519 7.94321 10.;
#P user ezdac~ 126 504 170 537 0;
#P newex 126 338 35 196617 tanh~;
#P window linecount 2;
#P comment 170 395 100 196617 < --- set a nice listening volume;
#P window setfont “Sans Serif” 18.;
#P window linecount 1;
#P comment 240 139 194 196626 < -- press go;
#P connect 4 0 3 0;
#P fasten 4 0 3 1 131 495 165 495;
#P connect 15 0 14 0;
#P lcolor 8;
#P connect 14 0 10 0;
#P lcolor 8;
#P connect 13 0 8 0;
#P connect 13 1 6 0;
#P connect 12 0 13 0;
#P connect 5 0 11 0;
#P fasten 8 0 5 0 33 182 131 182;
#P connect 7 0 5 0;
#P fasten 6 0 5 0 80 182 131 182;
#P connect 11 0 9 0;
#P connect 10 0 9 1;
#P connect 9 0 2 0;
#P connect 2 0 4 0;
#P window clipboard copycount 18;

Jan 17, 2006 at 11:09pm

I think you didn’t put high enough values into the multiply~ object. You can go really high here — I mean thousands…


Jan 17, 2006 at 11:20pm

I see, I can hear it now. I am curious to know what
tanh~ does to a signal.


Jan 17, 2006 at 11:26pm

The help file explains that it applies a hyperbolic tangent function to the signal. If that sounds like greek to you, look here:


Essentially, it clips smoothly, rather than abruptly.


Jan 17, 2006 at 11:35pm

I may not undersatnd the formulas, but I understand the
pretty pictures.

Jan 18, 2006 at 9:36am

You may also want to look at lp.nn~ (Litter Power Starter Pack) and
lp.scamp~ (Litter Power Pro) for distortion.

Oh, and the next release will contain some examples of unusual ways to
use Litter Power objects. For instance, you can do phase distortion,
producing effects similar to Waveshaping, with lp.scamp~. The screen
shot is a bit big for the mail list, so I’ve posted it here
< http://www.bek.no/~pcastine/Litter/Examples/PhaseDistortion. tiff > for
those interested.

It sounds cute, particularly considering that it’s “only” a sinusoid
that’s being driven.

– Peter

Jan 19, 2006 at 3:06am

Jan 27, 2006 at 10:05pm

Sounds interesting, I’d love to hear what you come up with. I’ve got a synth-type patch too, but no distortion as of yet. Just LFO’s and filters, plus being able to play soundfiles as well as simple waveforms (on any of 8 channels). Plus each channel has an 8-part harmonics-”adder”, rather like organ drawbars, but with totally adjustable settings.

Do you think I could check out your synth sometime? I’m always interested in how people do things in Max. If you’d rather not share, I understand ;)


Jan 28, 2006 at 2:12am

I’m interested to know how your harmonics-”adder” works….

Jan 28, 2006 at 3:11am

Yes I am interested in this too. I have heard many people
speak of an aural exciter (Aphex 204 Aural Exciter). What exactly
does it do? Is it just fancy EQ? Or is there something better out there.
Something that enhances the audio spectra of a sound…
intelligently. Intelligent EQing I guess you can call it.
Artificial Integillent Equing perhaps? Is there anyone out there
who can offer any ideas?


Jan 28, 2006 at 3:23am

I’m not much of an expert on this, but I’m pretty sure “Exciters” do more
than eq. They also generate the right amount of distortion overtones in the
right place.

I was talking to a very experienced mastering engineer about exposing
problems when trying to open up the high-end on a track via eq. He
suggested generating harmonic distortion on the low-mids instead. He
pointed out he can do that with either an off-the-shelf box or with a good


Jan 30, 2006 at 9:24pm

an exciter is basically highpassfiltering, distortion, mixing
to the input.
some analog machines also use various dynamic band selection
before they distort, so that for example only louder parts of
input are processed. (that is also a common techique for stereo
widening fx)

Jan 30, 2006 at 10:26pm

The distortion is designed to generate 2nd order
harmonics on the high-midrange band. This makes the
sound fresher and brighter without changing the eq
balance of the source. It works wonders when remixing
old tape masters.

Jan 18, 2011 at 9:59pm

Why is adding DC offset helpful in getting a analog/vintage sound?
Could I in theory use Max Msp to create something like Crane Song HEDD tape emulation?

Jan 18, 2011 at 11:31pm

I use the DC offset to make clipping-style distortion be asymmetrical . It generates a richer collection of artifacts.

I don’t know the Crane Song device, but real analogue distortion is very complex. Anything is possible, but I think it would be hard to simulate an exact result.


Jan 18, 2011 at 11:32pm

why not send some clicks through the HEDD to see what it does at certain levels? might be interesting.

Jan 18, 2011 at 11:41pm

I dont have HEDD at my studio, I use UA 2192, much better :)

The HEDD algorithm is the same as the Phoenix plugin if youre on Pro Tools

Jan 18, 2011 at 11:45pm

If you send some clicks through something like HEDD, the result is less than 256 samples, so could you then do convolution in Max?
I understand that a reverb tail is out of the question

Jan 19, 2011 at 12:56am

well… it might sound good but I doubt you can do emulations with a single impulse. There was a plugin a few years back that claimed to be able to sample any piece of gear but again, I doubt it was good.

it’ll at least get you on the right track.

Jan 19, 2011 at 1:04am

what I would suggest is fiddling a lot. In my experience, good distortion has very little to do with the actual wave shaping and more to do with what comes before and after it, and also with how many times you do it. Max is well equipped to do good distortion.

Jan 19, 2011 at 1:08pm

and i would not overestimate a linear distortion for making cycle~ beeps sound more analog. ^^

coming back to the original 5 year old question … the most interesting thing to do for
an FM synth is to have free running oscillators with a certain instability – not post processing
of the output.

Jan 19, 2011 at 5:45pm

I’ve been following this thread with interest, and would like to ask (before I try Google etc) in general, how you would implement ‘free-running’ oscillators in Max?

Jan 19, 2011 at 6:01pm

one way would be that you just dont mute them inside poly voices, like
you would normally do when buildings synths.

cycle~ for example normally just runs, isnt it?

that a note on event starts cycle~ in sync with other parts is a feature
you have to implement yourself .. if you dont implement it stuff is “free running”.

in a 2-operator FM it would be enough to not mute one of them, with more operators.

a free running sinewave will produce different klicks and pops and that might be
against some fascist sound brilliance rules, but is half the business of making a
synth sound “analog”.



You must be logged in to reply to this topic.