[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-sound
Subject:    External MIDI Sync using OSS/Free
From:       Billy Biggs <vektor () DIV8 ! NET>
Date:       1999-10-26 15:35:56
[Download RAW message or body]

Hi,

  My sequencer (http://www.div8.net/ttrk) mainly runs off of external MIDI
sync, and drives a mess of synths and stuff.  I use /dev/sequencer for
MIDI input and output.

  Since I'm both reading incomming MIDI, and sending outgoing MIDI, and
since I like to change the tempo on the fly, I have to do annoying
predictions in order to stay in sync.  Blech.

  Anyways, one thing I've found is that the /dev/sequencer clock is
different for incomming and outgoing.  So, in order to do a prediction a
few ticks ahead, I can't just add to the incomming time and blast out
messages.  As well, the outgoing clock seems difficult to predict.

  This is really annoying for song starts.  Every time I get a song start,
I call SNDCTL_SEQ_GETTIME, and take the difference between it and the
timecode on the start message.  I then apply that difference to every
outgoing packet.

  Is there a way that I could do this more efficiently?  Since my app
might not get swapped in until late after the start arrived, and then I
have to call the ioctl.  This error then remains for the entire duration
of the song.

  Any advice?
--
Billy Biggs                         vektor@div8.net
http://www.div8.net/billy       wbiggs@uwaterloo.ca

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic