[linux-audio-dev] XAP: a polemic

Tim Hockin thockin at hockin.org
Mon Dec 16 00:19:00 UTC 2002


> Still, is the tempo 0, or whatever it is supposed to be at the point 
> where the transport is holding?

<My views>

Tempo remains in effect.  Transport time is only meaningful to the
sequencer.  Why should a plugin care what point in the song you are at?  Why
should a plugin care if the play-pointer moves?

Audio time (sample-count) runs endlessly (host can actually stop it if it
can know there is nothing going on at all, perhaps - blocked on user/MIDI
- maybe).  Because the sample-counter is tied to the tick counter directly
via tempo, rate, meter, and ppqn (modulo tempo changes, which can come as 
events or whatnot) plugins don't need to actually track what tick number
they are on, just the passing of ticks.  Edge-dependent plugins, if there is
such a thing, can see when (samples_per_tick*ppq) samples has elapsed and
know a beat has happened.

> still jam on and have tempo and beat sync effects roll, as if you 
> were looping an empty section in the song. As soon as you start the 
> sequencer again, though, beat sync effects will instantly lock to the 
> timeline.

Absolutely essential, IMHO.


Now, I've become very confused.  What is it that we are arguing about?  We
seem to all be talking in circles, so I'm going to describe what I
understand and I want to steer the discussion towards a solution :)

* Host sends buffers of N samples to plugins, with a starting timestamp
* Things send timestamped events to plugins
* Timestamps are measured in whole audio samples
* Host/timeline must export/deliver:
  - SAMPLE RATE (samples/sec - passed at instantiation)
  - TEMPO (sec/tick - event?)
  - PPQN (ticks/qn - host-global? event? fixed?)
  - METER (units? - event?)
* Plugins can track ticks by adding 1/(rate*tempo) to a counter and
observing an integral boundary crossing.

So the questions that remain:

* what am I missing?
* how do external clocks tie in? (I know _nothing_ about them!)
* units for meter (I don't know enough music theory to answer properly)
* can we take any of this tracking work away from the plugins?

This argument is getting tired - lets resolve it..

Tim




More information about the Linux-audio-dev mailing list