[PD] specifying time

Miller Puckette msp at ucsd.edu
Wed Feb 15 21:07:19 CET 2012


That's an open question; I'm not sure whether computing the length of a blockin msec and then sending it to "delay", for instance, would always round back to
the exact number of Pd ticks in a block.  (A pd tick, internally, is small
enough that one millisecond and one sample both are integer numbers of ticks,
at least provided the SR is one of the "standard" ones.)

There would still be the problem of round-off errors for larger delays -
the only way I can see to manage that is to have the time objects have a
notion of unit.

To respond to another part of the thread, I'd suggest trying to do it the
way Max does (but I haven't cranked up Max in some time and haven't any idea
how that goes), and anyway, there should be a way to specify the units both 
in creation arguments and in incoming messages.

I think "seconds" "milliseconds/msec/ms" "samples" and "blocks" would be
adequate, but someone else might want to be able to sync to external or
cariable clocks - I don't know if that's worth putting in or not. 

cheers
Miller

On Wed, Feb 15, 2012 at 11:48:29AM -0800, Jonathan Wilkes wrote:
> 
> 
> 
> 
> ----- Original Message -----
> > From: Miller Puckette <msp at ucsd.edu>
> > To: Hans-Christoph Steiner <hans at at.or.at>
> > Cc: "pd-list at iem.at" <pd-list at iem.at>
> > Sent: Wednesday, February 15, 2012 1:26 PM
> > Subject: Re: [PD] specifying time
> > 
> > A better way might be to give the line~ (etc) objects optional arguments to
> > specify units.  I think there aren't many of them (line, line~, vline~, 
> > delay,
> > metro, delread~, vd~).  I also think that's how Max dealt with it.
> > 
> > In particular, it would be very useful to be able to specify a delay in
> > samples or "blocks".
> 
> Could you just convert to ms, or would this require changes to the code in 
> order to be sufficiently precise?
> 
> -Jonathan
> 
> > 
> > cheers
> > Miller
> > 
> > On Wed, Feb 15, 2012 at 01:21:25PM -0500, Hans-Christoph Steiner wrote:
> >> 
> >>  Should be easy enough to implement since it would be a symbol, so it would 
> > be clearly separated from the currently arg, which is always a float.
> >> 
> >>  .hc
> >> 
> >>  On Feb 15, 2012, at 1:57 AM, Andy Farnell wrote:
> >> 
> >>  > 
> >>  > Great suggestion. It makes sense.
> >>  > And numerical strings are already parsed for e
> >>  > (exponent) and - (minus) aren't they?
> >>  > 
> >>  > Andy
> >>  > 
> >>  > On Tue, Feb 14, 2012 at 10:10:54PM -0800, Jonathan Wilkes wrote:
> >>  >> [del 4m33s]
> >>  >> 
> >>  >> [1 3s(
> >>  >> |
> >>  >> [line]
> >>  >> 
> >>  >> [metro 1d2h4m3s21ms]
> >>  >> 
> >>  >> That last one is overkill. :)
> >>  >> But sometimes you want to work in something other than ms, and 
> > it's a pain to make convenience abstractions.
> >>  >> Kinda like [f $0]--[set $1-blah( is a pain
> >>  >> 
> >>  >> If a class with a float method that has no symbol method receives 
> > ([0-9]+[wdhms]+)+ 
> >>  >> then couldn't pd just convert it to a millisecond float value?
> >>  >> 
> >>  >> -Jonathan
> >>  >> 
> >>  >> 
> >>  >> _______________________________________________
> >>  >> Pd-list at iem.at mailing list
> >>  >> UNSUBSCRIBE and account-management -> 
> > http://lists.puredata.info/listinfo/pd-list
> >>  > 
> >>  > _______________________________________________
> >>  > Pd-list at iem.at mailing list
> >>  > UNSUBSCRIBE and account-management -> 
> > http://lists.puredata.info/listinfo/pd-list
> >> 
> >> 
> >> 
> >> 
> > ----------------------------------------------------------------------------
> >> 
> >>  I spent 33 years and four months in active military service and during that 
> > period I spent most of my time as a high class muscle man for Big Business, for 
> > Wall Street and the bankers.      - General Smedley Butler
> >> 
> >> 
> >> 
> >>  _______________________________________________
> >>  Pd-list at iem.at mailing list
> >>  UNSUBSCRIBE and account-management -> 
> > http://lists.puredata.info/listinfo/pd-list
> > 
> > _______________________________________________
> > Pd-list at iem.at mailing list
> > UNSUBSCRIBE and account-management -> 
> > http://lists.puredata.info/listinfo/pd-list
> >



More information about the Pd-list mailing list