[PD] if not currently recieving a 1 then send 0

Ben Carney bfcarney at gmail.com
Wed Dec 8 04:07:46 CET 2010


I don't think I am very good at asking pure data related questions.

the 1000 milliseconds is an arbitrary number.

I am just trying to deduce that  a 1 is not being sent or received. for any
amount of time.

so the example I gave was everything that wasn't a 1 in that second would be
spat out as a zero.

is that a bit more clear?

I am doing this as I am receiving data from someone else's processing sketch
that is sending 1s if a certain condition is met. However, In this
processing sketch there are no zeros being sent if this condition is no
longer met, so It is up to me to decipher if whether or not this condition
is true any longer.

It confuses me quite a bit too, which is why i came to the list.


hope I am clear here, and thanks a bunch for taking the time to take a look
at my problem!

On Tue, Dec 7, 2010 at 9:00 PM, Mathieu Bouchard <matju at artengine.ca> wrote:

> On Tue, 7 Dec 2010, Ben Carney wrote:
>
>  lets say I have a metro that sends a bang every one second, for the rest
>> of the 999 miliseconds, could I somehow deduce a zero message?
>> it doesn't need to be that granular(I don't need 999 0s for every 1)
>>
>
> Even though the base unit of [metro]'s time is the millisecond, it doesn't
> mean that a millisecond is somehow any kind of building block of pd's
> concept of time. You can have fractional delays of your choice, within the
> limits of the float32 format and of the manner of writing it (not too many
> decimals...).
>
> Well, actually, [metro] has an artificial lower limit at 1.000000, but if
> you imitate [metro] using [delay] connected to itself, you don't have that
> limitation.
>
> In the light of this, the question doesn't make much practical sense. But
> suppose you still want it. You have to put a [delay 1] so that at the same
> time you set the "1", you set a clock that will set the "0" after 1 ms of
> time.
>
> Alternately, you can have a [metro 1] connected to a counter that loops at
> 1000.
>
>  _______________________________________________________________________
> | Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
>



-- 
benfcarney
www.benfcarney.com
Chicago, IL
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20101207/c3fbc52b/attachment.htm>


More information about the Pd-list mailing list