morphing from sine to square

admant's icon

Hello all,

I started from this snippet in the [tanh~] help file:

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

but I would like to do the morphing starting from a real sine wave (the cycle~ after the tanh~ leads to harmonics, right? Or at least I can hear it).
How would you do it in a different way?

Thank you

Ant

Roman Thilenius's icon

as for the sonic result, it might be enough to just crossfade between the two.

using tanh distortion is one of many possible approximations, and probably a very musical one.

i would lower the gain for the square state though, to make the loudnesses more equal.

Rodrigo's icon

I think you'll find the gen~.squinewave example in the gen~ examples very handy.

admant's icon

Oh wow! thank you @Rodrigo and @Roman.
Combining your suggestions I think I will get where I want.
gen~ is the answer, and the bunch of examples are such a treasure. Quite complicated but great~!

Thankyou again

Aantonio