[PD] trigger with threshold

pix pix at test.at
Sat Jul 17 02:53:07 CEST 2004


to stop multiple triggers when the value hovers around your trigger
point, you might want to not register the next hit until the value has
fallen below some lower threshhold. i've attached a patch that does
this.

why did i do this? because i misread the question at first ;) .. but
it's still useful.

pix.

On Fri, Jul 16, 2004 at 03:32:35PM -0500, Eric Skogen wrote:
> Hugo Dini wrote:
> 
> >Hi!
> >I want to trigger drum samples with a P5 glove using midi.. My problem
> >is probably simple to resolve but I had no luck for a week so here it
> >is: I want to set a threshold value, let’s say 75, so that greater than
> >75 only bangs once and can be retriggered only if it goes under
> >threshold and back up. Most combination of objects that I tried banged
> >more than once.  Thanks for any hint!
> >
> > 
> >
> hey, does that glove track position as well? personally, i always wanted 
> to try that nintendo powerglove -> PC mod but i never got around to it...
> 
> try using at [> 75] -> [change] -> [sel 1]
> 
> see attached patch.
> 
> e
> 

> #N canvas 223 173 523 356 12;
> #X obj 40 33 osc~ 1;
> #X obj 40 63 expr~ ($v1 + 1) / 2;
> #X obj 41 232 > 75;
> #X obj 41 260 change;
> #X obj 228 266 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144
> -1 -1 0 1;
> #X obj 41 142 * 127;
> #X obj 228 282 hsl 128 8 0 127 0 1 empty empty empty -2 -6 0 8 -233017
> -1 -1 7500 1;
> #X obj 41 290 sel 1;
> #X obj 296 305 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
> -1;
> #X obj 41 120 snapshot~;
> #X obj 52 83 loadbang;
> #X obj 51 101 metro 20;
> #X text 141 98 // this creates a value that oscillates between 0 and
> 127;
> #X text 86 231 // check threshold only when changed;
> #X text 86 291 // trigger;
> #X connect 0 0 1 0;
> #X connect 1 0 9 0;
> #X connect 2 0 3 0;
> #X connect 3 0 7 0;
> #X connect 5 0 2 0;
> #X connect 5 0 4 0;
> #X connect 7 0 8 0;
> #X connect 9 0 5 0;
> #X connect 10 0 11 0;
> #X connect 11 0 9 0;

-------------- next part --------------
#N canvas 0 0 450 300 10;
#X floatatom 73 70 5 0 0 0 - - -;
#X obj 138 133 > 70;
#X obj 98 108 spigot;
#X obj 150 171 sel 1;
#X msg 192 123 0;
#X msg 80 222 1;
#X obj 75 187 sel 1;
#X obj 161 226 print trigger;
#X obj 70 164 < 50;
#X connect 0 0 2 0;
#X connect 0 0 8 0;
#X connect 1 0 3 0;
#X connect 2 0 1 0;
#X connect 3 0 4 0;
#X connect 3 0 7 0;
#X connect 4 0 2 1;
#X connect 5 0 2 1;
#X connect 6 0 5 0;
#X connect 8 0 6 0;


More information about the Pd-list mailing list