Sensor value hold
Aug 8, 2012 at 12:25am
Sensor value hold
I am fairly new to Max (running 6 + gen) and this is my first post – naturally it’s a question. I have been searching the forum for references to this topic but haven’t come across the right posts although I suspect they are there. I’m not sure I have understood all I have read in any case. Interesting rabbit warren though – some very smart cookies here.
Is there a simple way to ‘remember’ last sensor value or hold position? In particular I am using FSRs and ribbon controllers which automatically ramp down to minimum value when released. I would like to be able to hold the last value when I release my finger. Peak hold is no good because I would like to slide up and down. My initial thoughts for a solution are as follows:
I hope I have been clear … I assume this has been discussed so I am not asking anyone to hold my hand but a nudge in the right direction would be greatly appreciated.
Aug 8, 2012 at 10:12am
Hi and welcome to the forum
[change -], [change +] will help here, they output -1 or +1 depending on the direction of the number stream. I have attached a patch below demonstrating how to gate a number stream dependent on direction. This is designed with FSRs in mind, as for ribbon controllers I’m not sure what they output – are they basically linear potentiometers, returning to zero on release? If so, they will hold the last value in the same way using this patch, but perhaps not as you require (rise and hold OR fall and hold). I’ve also included a little delta-velocity subpatch, which will give you aftertouch data too – even though you didn’t ask for it – always useful with FSRs I find : )
– Pasted Max Patch, click to expand. –
Copy all of the following text.Then, in Max, select New From Clipboard.
Aug 9, 2012 at 12:31pm
Thanks for the quick reply Brendan. I’ve been perusing some of your older posts. Your patch looks very useful to me although not quite what I had in mind initially. I won’t have a chance to try it until Sunday though and will get back to then. BTW the ribbons are pretty much what you describe – linear pots returning to 0 … or 127.
Aug 9, 2012 at 6:03pm
My recent forum activity may well be a little erratic : ) I’m rapidly approaching the end of a PhD here an the aul’ head is pickled, but whenever I see “sensor”, “Arduino” or “parsing” etc in a post topic I always leap in….often too quickly, but the above patch should sort you out.
You must be logged in to reply to this topic.