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?

#50658
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.

Brendan

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

#181717
May 31, 2010 at 4:15pm

note to self: first think then post.

#181718
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

#181719
May 31, 2010 at 5:40pm

@ roman

we’ve all done it too sometimes!

#181720
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. –
#181721
May 31, 2010 at 6:38pm

@ MIB
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

#181722
May 31, 2010 at 6:51pm

@brendan

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.

#181723
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!

#181724

You must be logged in to reply to this topic.