[gst-devel] clocking

Andy Wingo wingo at pobox.com
Fri Mar 5 06:49:04 CET 2004


Hi Benjamin,

On Wed, 2004-02-25 at 15:54, Benjamin Otte wrote:
> Quoting Andy Wingo <wingo at pobox.com>:
> 
> > the clock needs to support scrubbing. 
> >
> Can you explain a bit more (or link to an explanation) what scrubbing is?

I'm a bit out of the jack loop, so perhaps things have changed recently.
But anyway I'll try to summarize the interface.

The jack transport system (its clock) has three states: stopped,
rolling, and looping. Note that output is continually processed,
regardless of the transport state. It's the client's responsibility to
output the appropriate data for the transport state. I think the meaning
of the states is fairly self-evident.

One client in the jack network is the clock master. The clock master
sets the transport information for the next engine cycle (iteration)
from within the current iteration, and the transport state that the
clients read was set in the previous iteration.

The transport information has lots of musical information, BPM among
others. It's no problem to provide that information via a subclass or
interface. The tricky thing is that the current time in the pipeline can
change arbitrarily (although it may be only when the transport is
stopped -- I don't know). Usually the current frame increases at the
sample rate, but if the user drags a bar indicating the transport
position, the transport is set to stopped (I think), and the time
changes appropriately.

Sophisticated clients can use this time-change data to output sounds as
if you are scratching a record. Ardour, for instance. Ecasound, maybe.
This effect, called scrubbing, should be possible in gst. You'd need a
special element at the end of the pipeline, I think.

***

Another thing I thought about is Alsaplayer. Their clock can run
backwards! I have no idea how to implement this in GStreamer. Perhaps
you have one. It should be in theory implementable, although of course
the practice would be difficult.

Well, that's it. Unfortunately my internet situation means I can't very
well participate in discussions. But good luck assessing the situation.

ps. I like your new email address :-)
-- 
Andy Wingo <wingo at pobox.com>




More information about the gstreamer-devel mailing list