stop changing level

onlyone1000's icon

hey,
quite a confusing one so bare with me:

Im trying to take a reading from a sensor to control a slider in max, but i want to make it so when i take my hand away from the sensor the slider doesn't go back to its original position. to make it harder the sensor is outputting a number continuously.

can anyone suggest an object or series of objects that can help with this?

Thanks

brendan mccloskey's icon

Hi
this is a fairly common request, and depending on the exact desired functionality, there are several objects which apply; I think you need to examine [change +], [change -] or [past].

HTH
Brendan

onlyone1000's icon

hey thanks,
I'm not too sure they will help, im not too sure what i want to do is possible as im using infrared sensors to control say a volume slider in abelton. this means that i need to be able to adjust the level again once i have set it the first time.
the only way i can see round it is by making something that measures the speed of the hand movement so if you bring you hand in quickly from the side it will take a new reading, but if you raise your hand slowly it will record the movement.
do you know any objects for that?

thanks

brendan mccloskey's icon

[change +] will output a 1 when the number stream is rising, therefore you could keep a [gate] open with it; use [==] to determine the delta of the number stream and close the gate when it's 0; ne c'est pas?

Brendan

onlyone1000's icon

I think i see what you mean, but that still doesn't really help.

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

Iv had another thought though,

This is what i came up with, the only problem I have now is every time the sensors detects the slightest of movements it plays the note again. do you know how i could get round this?

Rex