[PD] counting elapsed samples

Ian Smith-Heisters heisters at 0x09.com
Sun Feb 6 18:02:44 CET 2005


I did some experimenting with this technique, and it seems it will be 
just fine. I'm not sure where I got the impression timer wouldn't be 
accurate enough, but I was obviously wrong ;)

-Ian


zmoelnig at iem.at wrote:
> Zitiere Ian Smith-Heisters <heisters at 0x09.com>:
> 
> 
>>Hi all,
>>
>>I'm trying to resize an array after doing a tabwrite~ to it, like 
>>soundfiler can automatically. This seems to me to be a trivial thing to
>>
>>do, but I can't figure out how to get the number of elapsed samples. I
>>
>>considered using a [timer], but last time I used that it was extremely
>>
>>innaccurate, especially with high system loads.
> 
> 
> [timer] gets you the logical(!) time between 2 events in pd.
> this is exactly what you want!
> 
> i do not think that there is really an inaccuracy, probably the problem lies
> somewhere else ?
> 
> the only problem i can think of, is when you loose some ticks because of very
> high system load (but then you will get clicks and the time lost might be the
> smallest problem)
> 
> 
> 
>>Would a combination of [realtime] and [samplerate~] be accurate? I guess
> 
> 
> realtime measures the elapsed time viewed from the "world outside" (this is
> becoming relativistic); since you are not interacting with the world outside
> (apart from dac/adc which is ok) [realtime] might not be the way to go.
> 
> 
>>I shy away from deducing the number of elapsed samples, as I'd rather 
>>get the true number somehow--but this is the only way I can figure it 
>>out so far. Any tips?
>>
> 
> 
> you will never get below 64 samples in accuracy anyhow (no matter whether you
> try with [timer], [realtime], [time] or whatever
> 
> 
> mfg.acew.
> IOhannes
> 
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://iem.at/cgi-bin/mailman/listinfo/pd-list


-- 
Ian Smith-Heisters
http://www.0x09.com




More information about the Pd-list mailing list