I have this condition, every time my number if bigger than x, I want to output one bang, but everytime I move the slider it generates lots of bangs. help please
-
Conditional question
-
only half an hour ago, i got the hint to use [change] for filtering out repetitive bangs relative to one number.
this seems to work here too!?
check out the modified patch attached... -
Conditional objects in Pd outputs 1 for true, 0 for false. Since every time you feed them with information they constantly produce either 1 or 0 (true or false), you receive bang. What you have to do is:
number
|
[> 30]
|
[sel 1] - or 0 depends on which condition you wantthis will produce a bang ONLY if the number you send is bigger (or if you enter 0 to [sel], smaller) than the argument you entered to condition object.
-
Perfect!! Thanks a lot!!
-
I think the [change] object is more suited for this.. I quite didn't understand the [sel 1] because it still outputs bangs all the time.
-
If you made the connection precisely as it is described above, [sel] must be producing bangs ONLY if the numbers going above the threshold set by conditional object.
-
Probably I didn´t connect it correctly.
Will try again.. thanks -
@tcihan said:
Conditional objects in Pd outputs 1 for true, 0 for false. Since every time you feed them with information they constantly produce either 1 or 0 (true or false), you receive bang. What you have to do is:
number
|
[> 30]
|
[sel 1] - or 0 depends on which condition you wantthis will produce a bang ONLY if the number you send is bigger (or if you enter 0 to [sel], smaller) than the argument you entered to condition object.
right, but when you use [select 1] it will pass ALL bangs through in case the condition is true and will only filter the bangs when the condition is false!
....and viceversain your example, every number-change bigger 30 will produce a bang-event.
-
I think that's the whole point anyway
If you want it to produce only "one bang" every time you go over the threshold, than something like this could work:
number
|
[> 30]
|
[sel 1]
| \ <------- anything other than the argument entered [sel] goes here
| [t b] <-- converts number to bang
| \ <----- to the right inlet of [onebang]
[onebang] <--- will pass the incoming bang(s) only if it receives a bang on its right inlet
|
bangin this example, in order to have a bang whenever the number is above the threshold, the number should go "below" the threshold first.
-
@tcihan this is a much better solution, I have only one bang when the number raises, when it comes down there is no bang...
thanks a lot