[linux-audio-dev] XAP and Event Outputs

David Olofson david at olofson.net
Tue Dec 10 16:56:01 UTC 2002


On Tuesday 10 December 2002 20.31, Paul Davis wrote:
> >> I assume that if the host loops, or the user jumps back in
> >> song-position, time does not jump with it, it just keeps on
> >> ticking?
> >
> >Yes. You can't rewind *time*, can you? ;-)
> >
> >Seriously though, the reason to do it this way is that timestamp
> > time is directly related to "audio time" (ie sample count) - and
> > in a real time system, it just keeps running all the time. I
> > don't see a reason to stop time, kill the audio, stop all plugins
> > etc etc, just because you stop the *sequencer*!
>
> no, but there are a *lot* of things that plugins, particularly
> instrument plugins, might want to do that are based on musical time
> or even just transport time.

Yes - I'm not suggesting that there should not be transport and 
musical time; just that stopping musical time does not imply stopping 
audio/event time.


> the free-running sample count time is
> irrelevant for many things. when you ask a plugin to start the
> release phase of a note off at a certain time, its often not based
> on the sample count but on musical time.

That's a sequencer implementation issue. Event timestamps are always 
based on audio time. (Or ticks, if you don't have audio. Doesn't 
matter, as long as all plugins use the same unit.)


> if you stretch the tempo
> while the note sounds, it should still start the release phase when
> it reaches the correct musical time, not some arbitrary sample
> count.

Of course. But since *everything* is processed one buffer at a time - 
events as well as audio, this automatically Just Works(TM). You're 
not allowed to queue ahead, so as long as you can get the musical 
time for any sample frame within the current buffer, there's no 
problem.


//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 -'
.- M A I A -------------------------------------------------.
|    The Multimedia Application Integration Architecture    |
`----------------------------> http://www.linuxdj.com/maia -'
   --- http://olofson.net --- http://www.reologica.se ---



More information about the Linux-audio-dev mailing list