Hi again. Here goes another problem!
Ok. So I'm working with Arduino firmata here... To expose to problem in a simple way, I have 2 sensors that are detecting a door crossing. The 2 detectors give an order to the door crossing: coming in or going out. Now I just don't know how I can translate that to bang 2 different [bang( depending on if someone's comming in or going out!
Can you help me with that!? Thanks
Joao Vidigal
what form is this coming into pd in?
If it's a list (such as (door_crossing in) or (door_crossing out))
then you could parse it down with routes
e.g. [route door_crossing] (removes the first item in the list, if it's door_crossing) | [sel in out] (the first two inlets will be a bang if it's in or out respectively)
Not sure how else you might be getting the data into pd
From: jbvidigal@gmail.com Date: Tue, 17 Aug 2010 13:45:53 +0100 To: pd-list@iem.at Subject: [PD] Bang order entry
Hi again. Here goes another problem!
Ok. So I'm working with Arduino firmata here... To expose to problem in a simple way, I have 2 sensors that are detecting a door crossing. The 2 detectors give an order to the door crossing: coming in or going out. Now I just don't know how I can translate that to bang 2 different [bang( depending on if someone's comming in or going out!
Can you help me with that!? Thanks
Joao Vidigal _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
As it is coming from the arduino firmata, the only way I know is that the signal inputs a bang. So I'll have 2 bangs being hit with a delay between them. this delay depends on the speed of the body crossing the sensors and its size! calling them bang1 and bang2, if the order is bang1 then bang2 = coming in, if it is bang2 then bang1 it means coming out. the thing is I think I have to pair the hits to set an order and I just don't know how to pair them and read it to then bang an "in" or an "out".
On 17 Aug 2010, at 14:29, Andrew Faraday wrote:
what form is this coming into pd in?
If it's a list (such as (door_crossing in) or (door_crossing out))
then you could parse it down with routes
e.g. [route door_crossing] (removes the first item in the list, if it's door_crossing) | [sel in out] (the first two inlets will be a bang if it's in or out respectively)
Not sure how else you might be getting the data into pd
From: jbvidigal@gmail.com Date: Tue, 17 Aug 2010 13:45:53 +0100 To: pd-list@iem.at Subject: [PD] Bang order entry
Hi again. Here goes another problem!
Ok. So I'm working with Arduino firmata here... To expose to problem in a simple way, I have 2 sensors that are detecting a door crossing. The 2 detectors give an order to the door crossing: coming in or going out. Now I just don't know how I can translate that to bang 2 different [bang( depending on if someone's comming in or going out!
Can you help me with that!? Thanks
Joao Vidigal _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
I feel like I'm missing a simpler way, but this one should do the trick (see attachment).
The delay amount determines the maximum time that can elapse between the bangs of the two sensors. If a single bang is received from one sensor and the other doesn't arrive within that time, the "orphan" bang will be forgotten.
Is it what you were looking for?
On 08/17/2010 03:51 PM, João de Brito Rocha Reis Vidigal wrote:
As it is coming from the arduino firmata, the only way I know is that the signal inputs a bang. So I'll have 2 bangs being hit with a delay between them. this delay depends on the speed of the body crossing the sensors and its size! calling them bang1 and bang2, if the order is bang1 then bang2 = coming in, if it is bang2 then bang1 it means coming out. the thing is I think I have to pair the hits to set an order and I just don't know how to pair them and read it to then bang an "in" or an "out".
On 17 Aug 2010, at 14:29, Andrew Faraday wrote:
what form is this coming into pd in?
If it's a list (such as (door_crossing in) or (door_crossing out))
then you could parse it down with routes
e.g. [route door_crossing] (removes the first item in the list, if it's door_crossing) | [sel in out] (the first two inlets will be a bang if it's in or out respectively)
Not sure how else you might be getting the data into pd
From: jbvidigal@gmail.com mailto:jbvidigal@gmail.com Date: Tue, 17 Aug 2010 13:45:53 +0100 To: pd-list@iem.at mailto:pd-list@iem.at Subject: [PD] Bang order entry
Hi again. Here goes another problem!
Ok. So I'm working with Arduino firmata here... To expose to problem in a simple way, I have 2 sensors that are
detecting a door crossing.
The 2 detectors give an order to the door crossing: coming in or going
out.
Now I just don't know how I can translate that to bang 2 different
[bang( depending on if someone's comming in or going out!
Can you help me with that!? Thanks
Joao Vidigal _______________________________________________ Pd-list@iem.at mailto:Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
With Firmata, you should either get a 1/0 with a digital input or a
range between 0-1 for an analog value.
.hc
On Aug 17, 2010, at 9:51 AM, João de Brito Rocha Reis Vidigal wrote:
As it is coming from the arduino firmata, the only way I know is
that the signal inputs a bang. So I'll have 2 bangs being hit with a delay between them. this delay
depends on the speed of the body crossing the sensors and its size! calling them bang1 and bang2, if the order is bang1 then bang2 =
coming in, if it is bang2 then bang1 it means coming out. the thing is I think I have to pair the hits to set an order and I
just don't know how to pair them and read it to then bang an "in" or
an "out".On 17 Aug 2010, at 14:29, Andrew Faraday wrote:
what form is this coming into pd in?
If it's a list (such as (door_crossing in) or (door_crossing out))
then you could parse it down with routes
e.g. [route door_crossing] (removes the first item in the list, if it's
door_crossing) | [sel in out] (the first two inlets will be a bang if it's in or out
respectively)Not sure how else you might be getting the data into pd
From: jbvidigal@gmail.com Date: Tue, 17 Aug 2010 13:45:53 +0100 To: pd-list@iem.at Subject: [PD] Bang order entry
Hi again. Here goes another problem!
Ok. So I'm working with Arduino firmata here... To expose to problem in a simple way, I have 2 sensors that are
detecting a door crossing.
The 2 detectors give an order to the door crossing: coming in or
going out.
Now I just don't know how I can translate that to bang 2 different
[bang( depending on if someone's comming in or going out!
Can you help me with that!? Thanks
Joao Vidigal _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Computer science is no more related to the computer than astronomy is
related to the telescope. -Edsger Dykstra
Is there an external object that will do what I'm looking for?
I am creating an ADSR object, and I need to route one [line~] object for each phase of the envelope to [r~ $0-envelope]
I've found out that I can't have more than one [s~ $0-envelope] which makes sense as audio rate objects have constant output and would reset eachother, or explode (I'm not sure which).
So what I'm looking for would essentially be an audio rate multiplexer. I could roll my own, but I hate to reinvent the wheel. I thought there might be something like [gate~], but didn't find anything.
-Johnny
--- On Fri, 8/20/10, Johnny Ferguson hyperflexed@gmail.com wrote:
From: Johnny Ferguson hyperflexed@gmail.com Subject: [PD] selecting 1 output signal from multiple input signals To: pd-list@iem.at Date: Friday, August 20, 2010, 5:37 AM Is there an external object that will do what I'm looking for?
I am creating an ADSR object, and I need to route one [line~] object for each phase of the envelope to [r~ $0-envelope]
Is there a reason you can't just use one [line~] object and a [delay] to time the messages accordingly?
I've found out that I can't have more than one [s~ $0-envelope] which makes sense as audio rate objects have constant output and would reset eachother, or explode (I'm not sure which).
So what I'm looking for would essentially be an audio rate multiplexer. I could roll my own, but I hate to reinvent the wheel. I thought there might be something like [gate~], but didn't find anything.
-Johnny
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
2010/8/20 Jonathan Wilkes jancsika@yahoo.com
--- On Fri, 8/20/10, Johnny Ferguson hyperflexed@gmail.com wrote:
From: Johnny Ferguson hyperflexed@gmail.com Subject: [PD] selecting 1 output signal from multiple input signals To: pd-list@iem.at Date: Friday, August 20, 2010, 5:37 AM Is there an external object that will do what I'm looking for?
I am creating an ADSR object, and I need to route one [line~] object for each phase of the envelope to [r~ $0-envelope]
Is there a reason you can't just use one [line~] object and a [delay] to time the messages accordingly?
isn't that what vline~ is for ?
I've found out that I can't have more than one [s~ $0-envelope] which makes sense as audio rate objects have constant output and would reset eachother, or explode (I'm not sure which).
So what I'm looking for would essentially be an audio rate multiplexer. I could roll my own, but I hate to reinvent the wheel. I thought there might be something like [gate~], but didn't find anything.
-Johnny
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Well, that's part of it, but vline~ can also schedule ramps to begin and end between samples, which makes it more expensive than line~.
-Jonathan
--- On Fri, 8/20/10, tim vets timvets@gmail.com wrote:
From: tim vets timvets@gmail.com Subject: Re: [PD] selecting 1 output signal from multiple input signals To: "Jonathan Wilkes" jancsika@yahoo.com, "pd-list" pd-list@iem.at Date: Friday, August 20, 2010, 8:08 AM
2010/8/20 Jonathan Wilkes jancsika@yahoo.com
--- On Fri, 8/20/10, Johnny Ferguson hyperflexed@gmail.com wrote:
From: Johnny Ferguson hyperflexed@gmail.com
Subject: [PD] selecting 1 output signal from multiple input signals
To: pd-list@iem.at
Date: Friday, August 20, 2010, 5:37 AM
Is there an external object that will
do what I'm looking for?
I am creating an ADSR object, and I need to route one
[line~] object for each phase of the envelope to [r~
$0-envelope]
Is there a reason you can't just use one [line~] object and a [delay] to
time the messages accordingly?
isn't that what vline~ is for ?
I've found out that I can't have more than one [s~
$0-envelope] which makes sense as audio rate objects have
constant output and would reset eachother, or explode (I'm
not sure which).
So what I'm looking for would essentially be an audio rate
multiplexer. I could roll my own, but I hate to reinvent the
wheel. I thought there might be something like [gate~], but
didn't find anything.
-Johnny
Pd-list@iem.at
mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On 08/20/2010 02:00 AM, Jonathan Wilkes wrote:
--- On Fri, 8/20/10, Johnny Fergusonhyperflexed@gmail.com wrote:
From: Johnny Fergusonhyperflexed@gmail.com Subject: [PD] selecting 1 output signal from multiple input signals To: pd-list@iem.at Date: Friday, August 20, 2010, 5:37 AM Is there an external object that will do what I'm looking for?
I am creating an ADSR object, and I need to route one [line~] object for each phase of the envelope to [r~ $0-envelope]
Is there a reason you can't just use one [line~] object and a [delay] to time the messages accordingly?
...actually, that does sound a hell of a lot more elegant.
I've found out that I can't have more than one [s~ $0-envelope] which makes sense as audio rate objects have constant output and would reset eachother, or explode (I'm not sure which).
So what I'm looking for would essentially be an audio rate multiplexer. I could roll my own, but I hate to reinvent the wheel. I thought there might be something like [gate~], but didn't find anything.
Still looking for this though, I could see it being handy in the future.
-Johnny
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Would [throw~] and [catch~] solve this problem for you by allowing several sends to sum at one bus?
a.
On Thu, 19 Aug 2010 23:37:17 -0400 Johnny Ferguson hyperflexed@gmail.com wrote:
Is there an external object that will do what I'm looking for?
I am creating an ADSR object, and I need to route one [line~] object for each phase of the envelope to [r~ $0-envelope]
I've found out that I can't have more than one [s~ $0-envelope] which makes sense as audio rate objects have constant output and would reset eachother, or explode (I'm not sure which).
So what I'm looking for would essentially be an audio rate multiplexer. I could roll my own, but I hate to reinvent the wheel. I thought there might be something like [gate~], but didn't find anything.
-Johnny
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On 08/20/2010 02:36 AM, Andy Farnell wrote:
Would [throw~] and [catch~] solve this problem for you by allowing several sends to sum at one bus?
That will make things a little easier, but I'll still need to turn the line values on and off. I think I'm going to just make an audio multiplexer abstraction, or switch to using delays and one line object as someone suggested.
-Johnny
a.
On Thu, 19 Aug 2010 23:37:17 -0400 Johnny Fergusonhyperflexed@gmail.com wrote:
Is there an external object that will do what I'm looking for?
I am creating an ADSR object, and I need to route one [line~] object for each phase of the envelope to [r~ $0-envelope]
I've found out that I can't have more than one [s~ $0-envelope] which makes sense as audio rate objects have constant output and would reset eachother, or explode (I'm not sure which).
So what I'm looking for would essentially be an audio rate multiplexer. I could roll my own, but I hate to reinvent the wheel. I thought there might be something like [gate~], but didn't find anything.
-Johnny
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Fri, Aug 20, 2010 at 09:36:39AM -0400, Johnny Ferguson wrote:
On 08/20/2010 02:36 AM, Andy Farnell wrote:
Would [throw~] and [catch~] solve this problem for you by allowing several sends to sum at one bus?
That will make things a little easier, but I'll still need to turn the line values on and off. I think I'm going to just make an audio multiplexer abstraction, or switch to using delays and one line object as someone suggested.
The help section has a pretty useful ADSR envlope abstraction build around the latter pricnciple. An audio (de)multiplex abstraction always is handy to have, like the attached one.
Apart from that, iem_mtx has some powerful matrix multiplaction objects for signals (iem_mul~ iirc.) that are great for more advance uses.
Frank
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 08/20/2010 06:01 PM, Frank Barknecht wrote:
Apart from that, iem_mtx has some powerful matrix multiplaction objects for signals (iem_mul~ iirc.) that are great for more advance uses.
iem_mtx has been deprecated for about 5 years now, and has been integrated into iemmatrix. the old library provided a [mtx_mul~] object, which is still in iemmatrix for compat reasons, but it is DEPRECATED and will eventually be removed. the replacement is [mtx_*~] (both objects basically do the same, but the API (iolets) is different)
msdrt IOhannes
On Fri, Aug 20, 2010 at 06:31:24PM +0200, IOhannes m zmölnig wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 08/20/2010 06:01 PM, Frank Barknecht wrote:
Apart from that, iem_mtx has some powerful matrix multiplaction objects for signals (iem_mul~ iirc.) that are great for more advance uses.
iem_mtx has been deprecated for about 5 years now, and has been integrated into iemmatrix. the old library provided a [mtx_mul~] object, which is still in iemmatrix for compat reasons, but it is DEPRECATED and will eventually be removed. the replacement is [mtx_*~] (both objects basically do the same, but the API (iolets) is different)
Thanks for clarifying - I was writing from memory without checking it (there never was a iem_mul~, right? :)
Frank
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 08/20/2010 06:38 PM, Frank Barknecht wrote:
Thanks for clarifying - I was writing from memory without checking it (there never was a iem_mul~, right? :)
not that i know of (which i would interpret as: "correct")
fgmasdr IOhanes
Hi João
If the first bang is triggered, wait some time and if within this time frame the second is triggered as well, then you know the direction. It's actually mostly about timing and to make sure to clear the state after a certain time, if not both bangs are triggered within the time frame.
Check the attached (ugly; done with touchpad) patch.
Roman
On Tue, 2010-08-17 at 13:45 +0100, João de Brito Rocha Reis Vidigal wrote:
Hi again. Here goes another problem!
Ok. So I'm working with Arduino firmata here... To expose to problem in a simple way, I have 2 sensors that are detecting a door crossing. The 2 detectors give an order to the door crossing: coming in or going out. Now I just don't know how I can translate that to bang 2 different [bang( depending on if someone's comming in or going out!
Can you help me with that!? Thanks