Ahhhh! Now I think I understand. Perhaps you want a "debounce", so that
your key can only be triggered once within a certain amount of time?
This is normally handled in the dataflow of your patch, rather than by
the [hid] the object itself. See the attached patch for one method of
debouncing an input.

If this isn't what you need, have a look at the part with the "greater
than or equal to" object [>=]. This gives a "0" or a "1" as output which
can be used to open and close a [spigot].

For example, [>= 100] and [<= 200] would both give "1" if the number
from your counter was between 100 and 200.
Then, [==] could compare the outputs of both and if they are the same,
it would give a "1", and otherwise a "0".

It really pays to learn a bit more about the dataflow within PD, rather
than expecting high level objects to do all the work for you! ;-)

best,
d.


Carlos Caires wrote:
No, not at all...I have no problems with the amount of information.
The problem is that, for a certain purpose, a need the "element 10" open for a period of time and "close" for another period. That is to say, I want to create limits to some key events. Let say that I have a [metro 1000] plus a [counter 360], between 100 and 200 the element 10 is opened, otherwise it is closed. Do you see any way to make this work within the HID object?
C.C.

--
derek holzer ::: http://www.umatic.nl ::: http://blog.myspace.com/macumbista
---Oblique Strategy # 34:
"Consider different fading systems"

#N canvas 219 53 691 541 10;
#X obj 246 296 + 1;
#X obj 202 296 f;
#X obj 202 371 >=;
#X obj 202 264 metro 1;
#X obj 202 232 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0
1;
#X text 283 296 Standard counter construction;
#X obj 169 415 spigot;
#X obj 142 107 random 128;
#X obj 142 87 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1
-1;
#X floatatom 169 466 5 0 0 0 - - -;
#X obj 142 146 t b f;
#X msg 142 175 0;
#X text 222 106 Let's simulate some input!;
#X obj 247 329 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
-262144 -1 -1 0 256;
#X text 310 328 Debounce time in ms;
#X text 231 370 Is the current time greater than or equal to the debounce
time? If so \, open the spigot. Otherwise \, keep it closed.;
#X text 502 468 [EMAIL PROTECTED];
#X text 51 25 DEBOUNCE.PD;
#X text 201 144 First send the numeric message to the spigot to be
passed or not passed \, then reset the counter with a "0" so that no
more messages can be passed within the debounce time.;
#N canvas 0 22 453 181 more 0;
#X obj 119 60 trigger float bang symbol list pointer anything;
#X text 22 48 "float" = f;
#X text 22 60 "bang" = b;
#X text 21 72 "symbol" = s;
#X text 22 86 "list" = l;
#X text 22 114 "anything" = a;
#X text 22 100 "pointer" = p;
#X text 24 11 So your input isn't just a float? Nao problemo! Use a
different creation argument:;
#X restore 378 217 pd more info on [trigger];
#X connect 0 0 1 1;
#X connect 1 0 0 0;
#X connect 1 0 2 0;
#X connect 2 0 6 1;
#X connect 3 0 1 0;
#X connect 4 0 3 0;
#X connect 6 0 9 0;
#X connect 7 0 10 0;
#X connect 8 0 7 0;
#X connect 10 0 11 0;
#X connect 10 1 6 0;
#X connect 11 0 1 0;
#X connect 13 0 2 1;

_______________________________________________
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to