[gmpi] Re: Topic 6: Time representation

  • From: Tim Hockin <thockin@xxxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Wed, 30 Apr 2003 14:29:37 -0700 (PDT)

> 1.) The host defines a quanta which is the smallest time interval 
> allowed in its timing system. This is communicated to the plugin at the 
> time of instantiation, and cannot change for a particular instance of a 
> plugin. The host communicates this using an int64 quanta per second value.

Mike - it seems that we've entered an area not common for audio, so bear
with me:

1) Can you not just increase the sampling rate?
2) how does quanta/sec relate to samples/sec ?  Audio plugins will want to
generate data at the audio sampling rate.  Can we say then that quanta are
really sub-samples, and are defined as sub-samples per sample, with audio
generated at the sample rate?  Pure-audio hosts will set the subsample rate
to 1, and the sample rate to 44100 or 48000 or whatever.

> 2.) All timestamps used in GMPI are int64 values using the quanta 
> defined by the host.

Yes, I think we all agree on that, now.

> 3.) When an event is timestamped, it contains 2 timestamps: the absolute 
> time since start, and the transport time. For hosts with no transport, 
> these two values are identical.

I don't see the need to timestamp it with transport time - transport time is
potentially non-linear, and may even loop or stop altogether.

> 4.) Musical meter events are timestamped using the same timestamp type. 
> The plugin can request to be passed to it at any integer division of a 
> reference 4/4 bar. So if the plugin ask for a resolution of 16, then it 
> will receive 16 meter events during a 4/4 measure, 5 meter events in a 
> 5/16 bar, 10 in a 5/8 bar, and so on.

useful, perhaps

>   Every meter event contains its metrical position and its duration in 
> quanta to the next event. So if you ask for a resolution of 2 and the 
> meter is 3/8, you will receive two meter events, one at the beginning of 
> the measure with a duration of 2 eighth notes (expressed in quanta), and 
> 1 after 2 eighth notes with a duration of 1 eighth note. Therefore all 
> tempo changes are quantized by the host to the resolution requested by 
> the plugin.

I don't get this.  How does the host know how to quantize like this.
Better, perhaps to just get a BEAT event and subdivide that internally.  But
if plugins start relying on this, then we have to assume we send meter
events when the transport is stopped, which is weird..

----------------------------------------------------------------------
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: