Forums > MaxMSP

discrete triggers from ramping values?

August 16, 2008 | 2:04 pm

Here’s a problem that has stumped me and my colleagues….

using a linear position sensor i wish to create trigger regions: if value is in one range (attains a low maximum), trigger a discrete bang, if value is in another range (achieves a higher or lower maximum) then trigger a different bang (without triggering the other); the problem is that the value initializes at zero and then ramps to its maximum, passing other ranges on the way. Objects such as ‘past’, ‘peak’ and ‘maximum’ have all been tried without success, in the attached patch i’ve got some success with ‘change’ and ‘gate’ objects….please take a look and offer suggestions; the patch is self-explanatory and annotated

thanks


August 16, 2008 | 2:49 pm

The split object should do what you need.


August 16, 2008 | 5:26 pm

On Aug 16, 2008, at 7:04 AM, brendan mccloskey wrote:

> using a linear position sensor i wish to create trigger regions:

Using the delay object as a retriggerable one-shot:

– Pasted Max Patch, click to expand. –

Chris Muir
cbm@well.com

http://www.xfade.com


August 16, 2008 | 10:38 pm

brendan mccloskey skrev:
> Here’s a problem that has stumped me and my colleagues….
>
> using a linear position sensor i wish to create trigger regions:
This solution allows both jitter and repeated values, yet still switches
regions properly. It uses hysteresis ( I think!) and it’s easily
scalable, zonewise. Not as slick and clever as what Chris posted, but a
bit more useful for me, at least.

Andreas.

– Pasted Max Patch, click to expand. –

August 18, 2008 | 5:05 am

Here’s an abstraction, which I call "flatline," that I use to do some fairly heavy handed filtering on jittery control sources. It uses a combination of averaging, and windowing to try to keep the data stable.

– Pasted Max Patch, click to expand. –

Viewing 5 posts - 1 through 5 (of 5 total)