Building a slew limiter

electrogear's icon

Hello, I'm new to the forum. I have a fairly beginner-ish question about building a slew limiter in max. That is, something that limits how fast a signal can change. Applying a slew limit to a square wave for example would produce something more sine-wave like. I want to be able to apply this to more complex signals also, wav. files for example. I considered use of the line~ object but then realised that's probably not fit for the purpose, unless I have missed something.

Any ideas about this? Thanks in advance for your help.

Mike

jvkr's icon

There's the deltaclip~ object, which is exactly that. There are a few cousins that you could try as well.

_
johan

Holland Hopson's icon

Try slide or slide~ or rampsmooth~.

electrogear's icon

Thanks for your help! deltaclip~ is just what I was after. Sometimes I wish Max would be a bit more sensible with its object names.... sorry for wasting your time!

jvkr's icon

It's not that deltaclip~ doesn't exactly describe what it does, but I understand what you mean. Help lists objects by function, which can speed up finding what you need. I tend to forget names of certain objects all the time, and refer to it quite a bit.

_
johan

Bryan Dodson's icon

the deltaclip~ is pretty awesome, but what about producing an exponential function? like what you mentioned about turning a square wave into something more sine-ish, like (physics 101 suddenly coming rushing back...) a frictional force? suppose if you had a square wave, where the input signal of 1 suddenly switched to -1, so that the output would start out with a certain "delta clip" which would decrease as it got closer to the target amplitude? could you modulate the [deltaclip~]'s min and max with a sidechain that calculated the difference between the input and output?

Tj Shredder's icon

It still wouldn't make a sine, but you probably didn't check the other reply pointing to slide~, which is exactly doing what you describe.
To make a sine out of a square you could also look into filters in general...