I would strongly suggest using a signed 64 bit integer as the basic
tick type. The host can provide the ticks per second that they are
using. Anything smaller than 64 bit ints does not give enough resolution
to provide even-multiple tick counts, particularly when the ticks need
to align with video frame boundaries as well. Floats and doubles have
significant precision problems, particularly when faced with speed
changes and multiple transformations, so I would recommend that stay
away from them.
Martijn Sipkema wrote:
Is time represented as samples or "ticks" or both/neither? How are discontinuities in the timeline expressed?
I'd suggest using samples for time representation, but this will probably not work for MIDI processing plugins, i.e. plugins not handling audio.
My stake in the ground is that we need a way to represent time either in musical units or absolute units. The units should be chosen in such a way to avoid rounding errors when converting from one to the other, and should also support at least 24 hours of time range.
Is musical time really needed apart from using MIDI clock messages to do tempo based effects? You'd also need to enable the plugin to access the tempo map for absolute musical time to be useful (or at least the time of the last tempo change and the tempo).
By way of example, SONAR uses a representation where a 64-bit structure
can
represent either a floating point absolute time, or an integer musical
time
in units of 960*(2^16) PPQN. (The choice of PPQN makes conversions to a user editable 960 PPQN efficient.) Conversions are done via a host
supplied
time converter interface.
Why use a floating point value for absolute time and not use a signed 64 bit integer (with nanosecond resolution)?
--ms
---------------------------------------------------------------------- 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
-- 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