[gmpi] Re: Topic 6: Time representation
- From: Chris Grigg <gmpi-public@xxxxxxxxxxxxxx>
- To: gmpi@xxxxxxxxxxxxx
- Date: Wed, 30 Apr 2003 10:53:10 -0700
>> 5. Musical clock in ticks and fractions of ticks
no fractions of ticks. the tick is the "atomic" unit of musical
time. there is no smaller unit. if you want to be more precise than
that, you use samples or nanoseconds.
Eh? This confuses linear time and musical time. Ticks are scaled by
tempo. Samples or nanoseconds are not. Why limit musical time
resolution to sprockets?
I'm still thinking about Todor's MIDI processing plug-in case. What
if -- to take the complete opposite position from the previous
paragraph for a minute -- we were to say that all event times
arriving at the plug-in are expressed in linear time -- both musical
and non-musical events, so the host has to convert musical time to
linear time before the plug ever sees the event -- but we also
provide a reference ID in the event structure, which the plug could
query the host on to get the sequencer's original musical time for
that event? So in timeslice X I get a MIDI event arriving at sample
index 18345, with note 37 and velocity 118 and event ID 3773. I
decide to do something musical with it, so I say mySourceEvent =
gmpiHost::getSourceEvent( 3773 ), which returns a struct with the
musical time that I can monkey with and then (somehow) post back into
the event queue.
Something along these lines could clean up the event times arriving
at the plug-in, whittling it down to just one time format which would
be a kind of optimization for process(), but still leave a way to
access an event's musical time, for those plugs that need to. As
opposed to the single time union idea.
-- Chris
----------------------------------------------------------------------
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: