Distortion/Saturation effect

joecanti@yahoo.co.uk's icon

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.

Gregory Taylor's icon

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

joecanti@yahoo.co.uk's icon

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

mzed's icon

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

Anthony Palomba's icon

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

Isjtar's icon

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

joecanti@yahoo.co.uk's icon

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

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

Joe

Anthony Palomba's icon

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?

Max Patch
Copy patch and select New From Clipboard in Max.


mzed's icon

Here's mine, I'll look at your's now...

Max Patch
Copy patch and select New From Clipboard in Max.

mzed's icon

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

mzed

Anthony Palomba's icon

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

Anthony

mzed's icon

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.

mz

Anthony Palomba's icon

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

Peter Castine's icon

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

Roman Thilenius's icon
seejayjames's icon

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

Leafcutter John's icon

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

Anthony Palomba's icon

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

Adam Kendall's icon

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

Roman Thilenius's icon

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)

lexein's icon

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.

flowdesigner's icon

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?

mzed's icon

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

AudioMatt's icon

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

flowdesigner's icon

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

flowdesigner's icon

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

AudioMatt's icon

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.

AudioMatt's icon

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.

Roman Thilenius's icon

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.

brendan mccloskey's icon

@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

Roman Thilenius's icon

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