I think the idea of a union containing different time representations is good. I think it should be bars/beats, SMPTE, absolute seconds from beginning of performance, sample frames, MIDI ticks. Representations that naturally are integers should be size_t or long, those that can be fractions should be floating point numbers, preferably double-precision. GMPI itself should contain the conversion routines. But the BASIC time, the low-level representation used for scheduling, should be absolute seconds from beginning of performance. Time should additionally be represented as a series of points, and each point should have a spline for interpolation between the points. GMPI should implement linear, cubic, and Hermite interpolation and allow for user-defined splines. Original Message: ----------------- From: RonKuper@xxxxxxxxxxxx Date: Tue, 29 Apr 2003 08:57:04 -0400 To: gmpi@xxxxxxxxxxxxx Subject: [gmpi] Topic 6: Time representation Is time represented as samples or "ticks" or both/neither? How are discontinuities in the timeline expressed? 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. 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. ---------------------------------------------------------------------- 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 -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . ---------------------------------------------------------------------- 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