[jsyn] Multiple output channels in Linux

jsyn at music.columbia.edu jsyn at music.columbia.edu
Thu Apr 10 08:38:56 EDT 2008


Hi. I have an M-Audio Fasttrack Pro USB interface which has four output
channels. I would like to be able to write a JSyn program which outputs
sound to all four of these outputs simultaneously to create quadraphonic
sound.

In Linux it appears that JSyn can only use the default audio output in
/dev/dsp. If I hotplug in the USB interface, then the default output is
the laptop onboard audio. And JSyn will only output through the onboard
aaudio.

However, if I boot my laptop with the M-Audio device attached, it becomes
the default audio interface in alsa (and OSS). JSyn will then output
through the M-Audio interface.

I then attempted to use ChannelOut objects to connect to all four outputs
on the USB interface. AudioDevice.getNumDevices() returns 1. This is
suspicious, as in ALSA my M-Audio box is configured as two separate alsa
devices, with one being the first two outputs, and one being the second
two. I can use xmms (and other software) to output to either of these
devices. But JSyn only reports one.

If I create a new SynthContext for the sole device ID (0), then
AudioDevice.getMaxOutputs( 0 ) returns 16. Only the first two work, though
JSyn does not throw any error if I try to connect to channels 2 and 3
(counting 0, 1, 2, 3, ...). I just don't hear anything. Suspiciously, I
also get 16 outputs from my onboard audio, which also definitely does not
have 16 outputs.

I'm presuming that JSyn can only use the default OSS output device
(/dev/dsp). And hence the other device is unreachable --> quadraphonic
output is impossible in Linux with my hardware, and possibly any hardware
if the splitting of multiple output devices into multiple virtual devices
is standard.

Is this true? Is there anything I can do to make this work? Is the 1.44
version of JSyn for Linux available yet? I am running the version that
reports "JSyn using native library JSynV142".

Thanks in anticipation,

Ross Clement.



More information about the JSyn mailing list