[gmpi] Re: Topic 6: Time representation

  • From: Mike Berry <mberry@xxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Mon, 12 May 2003 15:36:22 -0600



David Olofson wrote:

On Monday 12 May 2003 21.05, Tim Hockin wrote:


Another motivation that has been mentioned before is the ability to deal with multiple frame or sample rates in the same system; such as audio + video. I have one argument for and one against:


        * This allows event processors to return events without
          losing timing accuracy. This matters if you record
          the output from such a plugin back into the sequencer.

        * Audio plugins don't need the added complexity of a
          timestamp time base that is not hardcoded into the API.
          It's much easier (and slightly faster, if that matters)
          to just use sample counts, possibly with a fixed
          (preferably power-of-2) number of fraction bits.


There is one other pro for a host-defined quanta which could be sub-sample but is guaranteed to be audio sample aligned: storing/loading of events across sample rates. If the host chooses a quanta which is a multiple of all of the audio sample rates that it supports, then the time value representing 1 second is identical in all of the audio sample rates. If we simply use audio samples, then you have a different value for 1 second depending upon the sample rate.


Anyway, I could live with times in audio samples, and so far am the only one strongly supporting a host-defined quanta (of course there haven't been mnay other host manufacturers chiming in :). I think it makes some things in the host more complex, but it does make some things in the plugin less complex. What I could not live with are any representations that are not always sample aligned, including floating point and arbitrary fixed point systems tied to seconds. And I think that an arbitrary subsample definition, like 60.4 in samples, provides none of the benefits I am looking for and just adds complexity.


-- Mike Berry Adobe Systems


---------------------------------------------------------------------- Generalized Music Plugin Interface (GMPI) public discussion list Participation in this list is contingent upon your abiding by the following rules: Please stay on topic. You are responsible for your own words. Please respect your fellow subscribers. Please do not redistribute anyone else's words without their permission.

Archive: //www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: