[PD-dev] using ugen_getsortno() in an external

Miller Puckette mpuckett at imusic1.ucsd.edu
Wed Jun 28 20:38:26 CEST 2006


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 at iem.at wrote:
> 
> >Zitat von Hans-Christoph Steiner <hans at 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 at iem.at
> http://lists.puredata.info/listinfo/pd-dev




More information about the Pd-dev mailing list