[PD] [++ ] object wont work
Martin Schied
crinimal at gmx.net
Fri Nov 13 14:38:10 CET 2009
Konstantinos Benardis wrote:
> Hi list
>
> I want to trigger a bang when a specific number occurs in a serie of
> running numbers for example from the output of a line object. I use
> the [== ] object to lookup but the object wont work if the numbers are
> running too fast. What could be the problem? Is there another way to
> do the lookup?
>
hi!
this could have several reasons:
- if you are using graphical bangs they don't blink when triggered at
high rates
- possibly be the number doesn't appear in the stream - try to use
"print" and look if the number is actually there. the line object only
outputs some numbers between its start and end. if you want to have all
integer numbers between start and end you could use counters, see
attached patch.
- the value is a float value and doesnt exactly match the value to be
compared with, even when displayed as equal when using a number to
display them. to solve this either use an [int] object before comparing
the numbers or give a range, for example to compare 4 and 4.000000001 to
be "equal" you could use 4 - 4.000000001 <= 0.001
cheers,
martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: line-test.pd
Type: application/puredata
Size: 1132 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20091113/aabda2cd/attachment.bin>
More information about the Pd-list
mailing list