Slider; separate increase and decrease values

May 31, 2010 at 12:52pm

Slider; separate increase and decrease values

I would like to create a horizontal slider that outputs a different message dependent on the direction it is moved. It will be a 16 step integer slider used to shuffle a step sequencer.
What expression will allow the slider to light either a left or right bang?

May 31, 2010 at 3:46pm

Is this what you want: “if $i1 > $i2 then bang else out2 bang”, $i2 being a slightly delayed version of $i1 slider output; here are two different versions, one using the above method, the other using [t i i] and [>]:

– Pasted Max Patch, click to expand. –

This represent a crude type of ‘hysterisis’, where we are evaluating current output compared to most recent.


it seems the solution on the left is a little erratic if you click in different positions, as opposed to dragging/scrolling

May 31, 2010 at 4:15pm

note to self: first think then post.

May 31, 2010 at 4:19pm

Hey Roman
thanks for the tip – did you look at my solution? Clicking (as opposed to dragging) on the slider on the left causes unpredictable results; it doesn’t always work

May 31, 2010 at 5:40pm

@ roman

we’ve all done it too sometimes!

May 31, 2010 at 5:52pm

maybe I’m not seeing the problem here, but wouldn’t this do the trick?

– Pasted Max Patch, click to expand. –
May 31, 2010 at 6:38pm

i’ve been using [change] and similar for ages; i also always use the helpfiles, and not once did i spot the +/- argument. Nice one

May 31, 2010 at 6:51pm


we are all guilty of that with object we use a lot and think we know… that’s why I love this forum so much. someone is always pointing out some new trick or feature that hasn’t quite made it in ones active repertoire yet.

Jun 1, 2010 at 12:14pm

Brilliant! Thankyou. Whilst the first method didn’t quite work it’s good to see other ways and their shortcomings.
So many objects to learn!


You must be logged in to reply to this topic.