Wave folding ?

chapelier fou's icon

Hi there,
i was wondering if someone could help me to achieve some very basic wave folding. I don't know the math to 'invert' a part of a waveform aove a threshold.
Thanks !

bkshepard's icon

Check out the [pong~] object. It's quite easy to do that with this object.

chapelier fou's icon

thank you !
i'm still interested in the maths just for fun !

Roman Thilenius's icon

[-~ n] [*~ -1.] [+~ n] for all values above n
[+~ n] [*~ -1.] [-~ n] for all values below -n
use [gate~ 3], [>=~ n], and [

-110

chapelier fou's icon

Many thanks !!

Robert Syrett's icon

How do I send a waveform of varying amplitude through this expression in Max/msp?

2*asin(sin(x*(pi/2)))/pi

Robert Syrett's icon

Is it a stupid question?

Roman Thilenius's icon

if you dont want to use some third party expr~ object, which is recommended, it would be

[*~ 1.57079632679]
[sin~]
[asin~]
[/~ 1.57079632679]

Robert Syrett's icon

@ROMAN THILENIUS what third party expr~ object would you recommend?

Roman Thilenius's icon

if there still is one for max 7 / 64 then it is the one on the percolate package

Robert Syrett's icon

Thanks for the heads up :)

Cptnfantasy's icon

gen~ to the rescue; no third party objects needed.

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