[gmpi] Re: Topic 6: Time representation

  • From: Mike Berry <mberry@xxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Wed, 30 Apr 2003 14:58:36 -0600

OK, I'm going to try again, since there is some confusion when I use the word "ticks." So I won't.

My proposal is:

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.

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

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.

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



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