So it sounds like ugen_getsortno() is what I need for my idea to have the first executed instance of an [hid] get the data from the OS while the rest just output from an array. But ugen_getsortno() is only declared in d_delay.c. Are there any externals that have used ugen_getsortno() before? Is there any change of this becoming an external function, even in the alpha s_stuff.h sense?
.hc
------------------------------------------------------------------------
The arc of history bends towards justice. - Dr. Martin Luther King, Jr.
On Thu, 22 Jun 2006, Hans-Christoph Steiner wrote:
So it sounds like ugen_getsortno() is what I need for my idea to have the first executed instance of an [hid] get the data from the OS while the rest just output from an array. But ugen_getsortno() is only declared in d_delay.c. Are there any externals that have used ugen_getsortno() before? Is there any change of this becoming an external function, even in the alpha s_stuff.h sense?
I haven't looked at the code, but from the name it seems that ugen_getsortno() only applies to the dsp graph, not to general message objects.
You could implement your idea by having a global flag that shows you which instance has been executed first.
Günter
.hc
The arc of history bends towards justice. - Dr. Martin Luther King, Jr.
PD-dev mailing list PD-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
On Jun 22, 2006, at 11:57 PM, geiger wrote:
On Thu, 22 Jun 2006, Hans-Christoph Steiner wrote:
So it sounds like ugen_getsortno() is what I need for my idea to have the first executed instance of an [hid] get the data from the OS while the rest just output from an array. But ugen_getsortno() is only declared in d_delay.c. Are there any externals that have used ugen_getsortno() before? Is there any change of this becoming an external function, even in the alpha s_stuff.h sense?
I haven't looked at the code, but from the name it seems that ugen_getsortno() only applies to the dsp graph, not to general message objects.
You could implement your idea by having a global flag that shows you which instance has been executed first
How would that flag get reset with each DSP cycle?
.hc
------------------------------------------------------------------------
Man has survived hitherto because he was too ignorant to know how to realize his wishes. Now that he can realize them, he must either change them, or perish. -William Carlos Williams
Zitat von Hans-Christoph Steiner hans@eds.org:
I haven't looked at the code, but from the name it seems that ugen_getsortno() only applies to the dsp graph, not to general message objects.
You could implement your idea by having a global flag that shows you which instance has been executed first
How would that flag get reset with each DSP cycle?
by setting it to zero in the perform routine :-)
honestly, as günther suggest, i don't see any reason to connect [hid] with the dsp graph. this object is a message object (unless i missed [hid~]), and should stay away from signal data as far as it can.
i thought i suggested that once when you first asked for that: why don't you just get the logical time with Pd's API and compare that to the time when one of these objects was last executed? static variables within the function might be the clue...
mfg.asdr. IOhannes
On Jun 23, 2006, at 5:59 AM, zmoelnig@iem.at wrote:
Zitat von Hans-Christoph Steiner hans@eds.org:
I haven't looked at the code, but from the name it seems that ugen_getsortno() only applies to the dsp graph, not to general message objects.
You could implement your idea by having a global flag that shows you which instance has been executed first
How would that flag get reset with each DSP cycle?
by setting it to zero in the perform routine :-)
That would defeat the whole purpose since every instance would then execute the perform routine.
honestly, as günther suggest, i don't see any reason to connect [hid] with the dsp graph. this object is a message object (unless i missed [hid~]), and should stay away from signal data as far as it can.
i thought i suggested that once when you first asked for that: why don't you just get the logical time with Pd's API and compare that to the time when one of these objects was last executed? static variables within the function might be the clue...
Hmm, I tried that and there was a problem which I am now forgetting. I tried ugen_getsortno() on Miller's suggestion:
Subject: getting Pd logical time in C http://lists.puredata.info/pipermail/pd-dev/2006-06/006964.html
Miller also mentioned that logical time wouldn't work for this. But I'll try it again and get some specifics.
.hc
------------------------------------------------------------------------
News is what people want to keep hidden and everything else is publicity. - Bill Moyers
I might have misunderstoof the original problem... I thought Hans-Christophe needed to make one function call per DSP tick. If it's one call per logical time increment, then ugen_getsortno() won't work. I think in this case you have to keep track of the last logical time at which you've called the function, which I previously thought wouldn't work.
cheers Miller
On Fri, Jun 23, 2006 at 11:38:03AM -0700, Hans-Christoph Steiner wrote:
On Jun 23, 2006, at 5:59 AM, zmoelnig@iem.at wrote:
Zitat von Hans-Christoph Steiner hans@eds.org:
I haven't looked at the code, but from the name it seems that ugen_getsortno() only applies to the dsp graph, not to general message objects.
You could implement your idea by having a global flag that shows you which instance has been executed first
How would that flag get reset with each DSP cycle?
by setting it to zero in the perform routine :-)
That would defeat the whole purpose since every instance would then execute the perform routine.
honestly, as g?nther suggest, i don't see any reason to connect [hid] with the dsp graph. this object is a message object (unless i missed [hid~]), and should stay away from signal data as far as it can.
i thought i suggested that once when you first asked for that: why don't you just get the logical time with Pd's API and compare that to the time when one of these objects was last executed? static variables within the function might be the clue...
Hmm, I tried that and there was a problem which I am now forgetting. I tried ugen_getsortno() on Miller's suggestion:
Subject: getting Pd logical time in C http://lists.puredata.info/pipermail/pd-dev/2006-06/006964.html
Miller also mentioned that logical time wouldn't work for this. But I'll try it again and get some specifics.
.hc
News is what people want to keep hidden and everything else is publicity. - Bill Moyers
PD-dev mailing list PD-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
On Thu, 2006-06-22 at 22:46 -0700, Hans-Christoph Steiner wrote:
So it sounds like ugen_getsortno() is what I need for my idea to have the first executed instance of an [hid] get the data from the OS while the rest just output from an array. But ugen_getsortno() is only declared in d_delay.c. Are there any externals that have used ugen_getsortno() before? Is there any change of this becoming an external function, even in the alpha s_stuff.h sense?
not knowing miller's development plans, i guess, it's less work in terms of maintenance, to store the logical time of the last update in a global variable without relying on internal api functions ...
cheers... tim
-- tim@klingt.org ICQ: 96771783 http://www.mokabar.tk
The aim of education is the knowledge, not of facts, but of values William S. Burroughs