hey list,
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)
something like
[metro 1000]
|
|
[1
|
|
[if not currently a 1 then zero]
the above pseudo patch is just not how pd works, I realize, but is there a way to do this otherwise?
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
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@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
something like this? very arbitrary though, it should be better to receive 0 when the condition is false. n
Le 08/12/10 04:07, Ben Carney a écrit :
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@artengine.ca mailto:matju@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 http://www.benfcarney.com Chicago, IL
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Or like this ? ;) ++
Jack
Le mercredi 08 décembre 2010 à 11:09 +0100, Nicolas Montgermont a écrit :
something like this? very arbitrary though, it should be better to receive 0 when the condition is false. n
Le 08/12/10 04:07, Ben Carney a écrit :
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@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
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-- http://nim.on.free.fr _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Tue, Dec 07, 2010 at 09:07:46PM -0600, Ben Carney wrote:
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.
A very useful idiom in Pd is what I'd call an "activity monitor". This is something which will report whenever an activity stops to happen for a certain time.
The attached patch has such a monitor. The basic idea is very simple: Just exploit the fact, that a [delay] object will reset itself whenever it receives a new bang-message, which means, that it will not produce a bang, until banging stops for as long as the delay period is.
With some [change] logic you can turn that into a 0/1 activity monitor.
Frank Barknecht Do You RjDj.me? _ ______footils.org__