From alsa-devel-owner@alsa.jcu.cz  Thu May  7 07:33:36 1998
Received: from mx1.landsraad.net (chusuk.arrakis.es [195.5.65.35])
	by marvin.jcu.cz (8.8.8/8.8.8) with ESMTP id HAA22264
	for <alsa-devel@jcu.cz>; Thu, 7 May 1998 07:33:26 +0200
Received: from arrakis.es (antonio@ie-125.arrakis.es [195.5.74.125]) by mx1.landsraad.net (8.8.6/8.7.3) with ESMTP id HAA27155 for <alsa-devel@jcu.cz>; Thu, 7 May 1998 07:32:14 +0200 (MET DST)
Message-ID: <355001F3.6C0AC16@arrakis.es>
Date: Wed, 06 May 1998 06:23:47 +0000
From: Antonio Larrosa <antlarr@arrakis.es>
MIME-Version: 1.0
To: alsa-devel@jcu.cz
Subject: Re: New Sequencer core
References: <199804301605.SAA14889@obelix.fvdpol.inter.nl.net> <354CB5B9.53DA6144@arrakis.es> <354ECDA7.446B@bath.ac.uk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

P.J.Leonard wrote:
> 
> Antonio Larrosa wrote:
> >
> > I'm not too sure of this being a good solution . A ms. is a time unit that
> > never changes (not aplying theorical physics :-)), but controlling clock ticks
> > is very tricky when there are several time changes .
> > Suppose this situation :
> >
> > Music starts playing, you place a change tempo event at tick 5000 . Before it
> > is processed, you place another change tempo event at tick 10000 .
> > Now, what is tick 10000 ? , is the 10000 ticks ms. calculated using the
> > current tempo ?, or you are going to run over the list of queued events to
> > take care of that tempo change that is at tick 5000 ?
> >
> > That's why I think that time should be expressed in ms. or us.
> 
>  I am getting a bit confused, I thought the idea was to implement a
> queue with event times expressed in ticks. The queue simply orders
> events.
> You calculate the (real) time of the next event from the tick difference
> between the event
> just played and the next event multiplied by the current
> tempo. The only recalculation for a tempo change is the time to the next
> event.
> This is how I do it in my sequencer and it works fine.

Yes, but I thought that we were going to allow _inserting_ events, to do so,
it's better to have time in ms. than ticks, because the driver doesn't have
to make a substraction and multiplication (as you said), but just compare
two ms. values . Well, this is not too much in favour of milliseconds, but
I think it's easier to manage this way.

Another good point at this is the possibility to synchronize midi music
with wav audio (wav audio doesn't know anything about ticks and even less
about tempo), or with frames of a movie.

Think of it as a common unit to make possible to synchronize everything.

Greetings,

-- 
Antonio Larrosa Jimenez
antlarr@arrakis.es
Personal Homepage : http://www.arrakis.es/~rlarrosa
Klein bottle for rent -- inquire within.



