Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Billy Biggs <vektor@div8.net>
To: linux-sound@vger.kernel.org
Subject: Sync Issues (was Re: External MIDI Sync using OSS/Free)
Date: Tue, 26 Oct 1999 21:06:01 +0000	[thread overview]
Message-ID: <marc-linux-sound-94097346918347@msgid-missing> (raw)

On Tue, 26 Oct 1999, Paul Barton-Davis wrote:

> >> advice #1: do not use /dev/sequencer, solution, use /dev/midi*
> >
> >  This is pretty useless IMHO.  My sequencer started off writing out
> >/dev/midi, and it was consistently off-sync.  Badly off sync.
> 
> did you open it O_NONBLOCK, and which kernel were you using ?

  I was using O_RDWR | O_NONBLOCK, under a 2.2 kernel.  I was trying to do
drumrolls, 16th notes, at 140bpm or 150bpm.  It was no good.

  Well, I recorded some songs using it, but I had to avoid playing too
many notes in rapid succession on any one track, and damned if I trigger
drums with it.

> personally, most of my current applications are so phase-locked to a
> soundcard DAC that i can get "perfect" sync timing from that. some
> applications (and MIDI-only sequencers are a very good example of
> them) are not like this, however, since they do no audio output :)

  One requirement for ttrk was that it be able to trigger samples on beat,
in sync with incomming MIDI.  This is a pain in the ass, since I have to
know exactly where in the audio output I am in order to do the prediction
correctly.  The clock on (at least the OSS) /dev/dsp is no good, since it
gives you no indication of when underruns occur.

  Damn annoying.

  I currently have ttrk setup to just 'turn on' the sample as soon as it
sees the corresponding MIDI sync tick.  It's no good for drum samples or
loops or anything, but I can trigger cheezy sci-fi samples and they don't
sound _too_ out of place.  Ugh.

> >  What about syncing multiple soundcards?  I've found this to be next to
> >impossible under thud using OSS.
> 
> as has been discussed here a number of times, this is far from
> trivial. clock rates from card to card, even the same brand, and even
> from (warm) day to (cold) day vary, so its not just a matter of
> finding a way to get them to all start at the same time. 

  Yes, it is a pain, but there should be a better hacked job at least of
doing it.  When I still had Windows around, Sonic Foundry ACID had no
trouble at least faking some sync between my two AudioPCI cards.  I can't
get it as good as they did. :/

  There should also be API support for it.  I hope to soon (within the
next year) get a soundcard that has multiple dsps inside it, for
outputting multi-track stuff.  I'm really worried about how much I'm going
to have to code myself though.....

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

             reply	other threads:[~1999-10-26 21:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-26 21:06 Billy Biggs [this message]
1999-10-26 23:21 ` Sync Issues (was Re: External MIDI Sync using OSS/Free) Billy Biggs
1999-10-27  2:16 ` Paul Barton-Davis
1999-10-28  9:22 ` Benno Senoner
1999-10-28 13:47 ` Billy Biggs
1999-10-28 14:45 ` Paul Barton-Davis
1999-10-28 14:59 ` Billy Biggs
1999-10-28 16:13 ` Paul Barton-Davis
1999-10-28 23:46 ` Benno Senoner
1999-10-29  0:06 ` Benno Senoner
1999-10-30 16:06 ` Jaroslav Kysela
1999-10-30 18:05 ` Jaroslav Kysela
1999-10-30 18:12 ` Billy Biggs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-sound-94097346918347@msgid-missing \
    --to=vektor@div8.net \
    --cc=linux-sound@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox