Csound Csound-dev Csound-tekno Search About

Re: 'scheduling' scorefiles?

Date1999-07-16 00:18
FromRichard Dobson
SubjectRe: 'scheduling' scorefiles?
Well, I was not quite correct before - there is still some code which
only accepts audio which complies with the old SoundBlaster standard, so
no quad files, and no 48KHz srate either!   This code is really
unnecessary as any unacceptable formats will be rejected by
waveOutOpen() anyway.

By cutting out the format code bits (long switch blocks) I have Csound
playing a quad stream through the Pulsar card. So it can be done.

It is possible programmatically to open multiple devices, but for
multi-channel streams (for which you want perfect synchronisation) this
is a most unsatisfactory way of doing  things.

Latency is not the same as write speed. It is true that multi-channel
data must be written to a card that much more quickly than a mono or
stereo stream, bt this is hardly an issue on modern machines. Latency
relates to the smallest block size you can send to the card, and is an
issue for real-time audio processing (in and out) and for MIDI control.
If you have a buffer size of 2048 bytes, for example, this means that
you won't hear anything until those bytes have all been sent to the
card. The latency is related to the 'frame rate', where one frame =
 (2048 / wordsize_in_bytes / nchans).

Thus for 16bit stereo the latency is 512 frames, which is some 11.6
msecs at 44100 hz.
A quad stream will fit 256 frames into the same space, so the latency is
a pleasant 5.8 msecs.

The more devious readers of this list, in posession of a multi-channel
card, might conjecture that low latency (notwithstanding other technical
obstacles such as interrrupts) could be achieved even with large block
sizes, by writing their stereo stream packed into an eight-channel one. 


Richard Dobson




Steve Kersten wrote:
> 
> Richard Dobson schrieb:
> > The Windows version doesn't have code to open multiple cards anyway.
> > However, the number of channels is passed directly to the MME driver, so
> > that if a real multi-channel card is available, Csound should be able to
> > use it up to as many channels as they both support. I will be trying
> > this very thing out at home soon, using the Creamware Pulsar.
> 
> I'd be happy if you could post the results. I suppose no source-code
> changes are required to use this feature (on win)? Is it possible at all
> (within MME or DirectX) to open multiple devices?
> 
> > As latency is generally determined by buffer sizes in bytes, it may be
> > somewhat better for quad streams and higher, than it is for mere stereo.
> 
> I don't quite understand. Wouldn't latency double since you would have
> to circulate through the buffers twice as often (stereo <-> quad)?
> 
> Steve.
> ________________________________________________________________________
> K-Labz [a K-Hornz subdivision] - steve-k@gmx.net - http://w3.to/K-Hornz

-- 
Test your DAW with my Soundcard Attrition Page!
http://wkweb5.cableinet.co.uk/rwd (LU: 6th July 1999)