Slew limiter

Nov 20, 2009 at 6:40pm

Slew limiter

How can I write a slew limiter in Max/Msp? I have read the tutorials for Max and they don’t seem to help.

Hope that’s OK to ask, thanks.

#46554
Nov 20, 2009 at 8:19pm

The answer depends on whether your want to operate on signals or messages.

Signals are easier– you can just use a lowpass filter. Onepole~ is very useful here.

With messages (probably floating point numbers), you have a bunch of different options. The easiest one to explain, and possibly the most useful conceptually is, turn your number into a signal. Because if you are thinking about concepts like slew it is one anyway, really. So: number in -> sig~ -> onepole~ -> snapshot~ -> number out.

You could also make some combination of Max (as opposed to MSP) objects that will limit the rate of change of a number using the scheduler. The line object may help here. There are probably a hundred ways to do this and, out of those, about five good ones.

-Randy

#167527
Nov 20, 2009 at 10:15pm

Thanks but my patch doesn’t seem to work yet I cannot see why, may I ask you to explain??

Thanks, I’m very new to programming / music and am a little thick anyway.

Edit hangon I’ve just seen that I’ve used line completely wrong, let me change that…

Edit that’s done now…

#167528
Nov 21, 2009 at 8:43pm

A combination of speedlim and line should be work very well for messages.

The nice thing with speedlim is that unused messages are discarded rather than being queued, improving performance.

– Pasted Max Patch, click to expand. –
#167529
Nov 21, 2009 at 8:55pm

You need either the line object or signals but not both. Your connection from line to the onepole~ object doesn’t do anything useful.

The line object help file shows you how do use line to do what you want.

If you are using signals, you need to turn signal processing on. I recommend that you start by reading everything in the MSP tutorials (Help menu / MSP Tutorials) up to and including Tutorial 1.

#167530
Nov 22, 2009 at 4:58am
Randy Jones wrote on Sat, 21 November 2009 13:55
You need either the line object or signals but not both. Your connection from line to the onepole~ object doesn’t do anything useful.

The line object help file shows you how do use line to do what you want.

OK sure, I misunderstood what a slew was: it’s limits changes in frequency not frequency lol!

#167531

You must be logged in to reply to this topic.