On Sunday 15 December 2002 16.40, David Gerard Matthews wrote:
Paul Davis wrote:
>We've been talking about 'TEMPO' and 'TRANSPORT' and
'TICKS' and
> 'METER' controls, which (honestly) kind of turns my stomach.
> This is not what controls are meant to be doing. the answer
> strikes me in shadowy details:
>
>Each host struct has a timeline member. Plugins register with
> the host for notification of ceratin things:
>host->register_time_event(plugin, event, function);
>events:
> TIME_TICKS // call me on every tick edge
> TIME_TRANSPORT // call me when a transport happens
> TIME_METER // call me when the meter changes
this is the best suggestion so far. i love callbacks. note that
"meter" includes both tempo and time signature. you knew that,
though. i can't see anyone wanting to use TIME_TICKS.
--p
Callbacks do make sense here, I agree.
I disagree. Callbacks are not sample accurate.
Either way, the only callback I see in that proposal is the host one
to "register" for these events... Did I miss something?
You never know about the
ticks, though. In film scoring, it's not uncommon
to nudge things around a tick or two here or there to enable audio
events to sync up with the picture. I can see wanting
to chase audio on every tick in some very high resolution contexts
like that.
Yes, that's why I don't like anything with function calls. You'd have
to ask for the current musical time for every darn sample in every
block, to be sample accurate.
If you get events from the timeline, you just deal with them like any
other events, and get on with your work. Sample accurate timing for
free.
//David Olofson - Programmer, Composer, Open Source Advocate
.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`--------------------------->
http://olofson.net/audiality -'
---
http://olofson.net ---
http://www.reologica.se ---