Forums > MaxMSP

Distortion/Saturation effect

January 17, 2006 | 6:42 pm

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,

Thanks,

Joe.


January 17, 2006 | 7:18 pm

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
it.

gregory


January 17, 2006 | 7:52 pm

Hi,
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,

Joe


January 17, 2006 | 8:10 pm

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.

mz


January 17, 2006 | 8:18 pm

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
sweet.

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?

Anthony


January 17, 2006 | 8:28 pm

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
it…


January 17, 2006 | 10:14 pm

Hi,
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++:

http://www.computermusic.co.uk/tutorial/diy3/diy3.asp

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

Joe


January 17, 2006 | 10:55 pm

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;


January 17, 2006 | 11:05 pm

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;


January 17, 2006 | 11:09 pm

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

mzed


January 17, 2006 | 11:20 pm

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

Anthony


January 17, 2006 | 11:26 pm

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

http://mathworld.wolfram.com/HyperbolicTangent.html

Essentially, it clips smoothly, rather than abruptly.

mz


January 17, 2006 | 11:35 pm

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


January 18, 2006 | 9:36 am

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


January 19, 2006 | 3:06 am


January 27, 2006 | 10:05 pm

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 ;)

-CJ


January 28, 2006 | 2:12 am

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


January 28, 2006 | 3:11 am

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?

Anthony


January 28, 2006 | 3:23 am

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
transformer.

Adam


January 30, 2006 | 9:24 pm

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)


January 30, 2006 | 10:26 pm

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.


January 18, 2011 | 9:59 pm

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?


January 18, 2011 | 11:31 pm

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.

mz


January 18, 2011 | 11:32 pm

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


January 18, 2011 | 11:41 pm

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


January 18, 2011 | 11:45 pm

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


January 19, 2011 | 12:56 am

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.


January 19, 2011 | 1:04 am

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.


January 19, 2011 | 1:08 pm

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.


January 19, 2011 | 5:45 pm

@Roman
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?
Thanks
Brendan


January 19, 2011 | 6:01 pm

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".

-110


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