Re: [linux-audio-user] stupid, basic alsa question

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: A list for linux audio users <linux-audio-user@...>
Date: Thursday, March 17, 2005 - 4:00 pm

Hi Atte,
Actually csound5 IS a jack client, Istvan Varga added that about a month
ago, and it works alright. This is the documentation Istvan posted:
To enable the JACK plugin, use this command line option:
-+rtaudio=jack
Additionally, there are some command line options specific to JACK:
-+jack_client=
The client name used by Csound, defaults to 'csound5'.
-+jack_inportname=
-+jack_outportname=
Name prefix of Csound JACK input/output ports; the default is
'input' and 'output'. The actual port name is the channel number
appended to the name prefix.
Example: with the above default settings, a stereo orchestra will
create these ports in full duplex operation:
csound5:input1 (record left)
csound5:input2 (record right)
csound5:output1 (playback left)
csound5:output2 (playback right)
-+jack_sleep_time=
Amount of time to wait before checking the buffer state again
if it is full (playback) or empty (record). A higher value means
worse latency and timing, but lower CPU usage.
The default is 1000.

Connecting Csound to other JACK clients
---------------------------------------

By default, no connections are made (you need to use jack_connect);
however, the plugin can connect to ports specified as
'-iadc:portname_prefix' or '-odac:portname_prefix'
portname_prefix is the full name of a port without a channel number,
such as 'alsa_pcm:capture_' (for -i adc), or 'alsa_pcm:playback_'
(for -o dac).

Notes on buffer sizes
---------------------

The -b option sets the period time in samples, and should be set to the
same value as the buffer size of JACK. -B is the total length of the
ring buffer. Both options must be power of two, and -b must be less
than -B.
If -iadc is used, ksmps should be set to an integer power of two, and
should be less than or equal to -b.

An example of buffer settings for low latency on a fast system:

jackd -d alsa -P -r 48000 -p 64 -n 4 &
csound -+rtaudio=jack -b 64 -B 256 [...]

with real time scheduling (as root):

jackd -R -d alsa -P -r 48000 -p 64 -n 4 &
csound --sched -+rtaudio=jack -b 64 -B 256 [...]

Note that the -p option for jackd is the same as -b for Csound.
To improve performance, use ksmps values like 32 and 64.

The sample rate of the orchestra must be the same as that of the JACK
server.

Cheers,
Andres

On Thu, 2005-03-17 at 06:15, Atte André Jensen wrote:

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[linux-audio-user] stupid, basic alsa question, Atte André Jensen, (Wed Mar 16, 6:02 pm)
Re: [linux-audio-user] stupid, basic alsa question, Tapio Kelloniemi, (Wed Mar 16, 6:34 pm)
Re: [linux-audio-user] stupid, basic alsa question, Atte André Jensen, (Wed Mar 16, 6:59 pm)
Re: [linux-audio-user] stupid, basic alsa question, Christoph Eckert, (Wed Mar 16, 8:34 pm)
Re: [linux-audio-user] stupid, basic alsa question, Atte André Jensen, (Wed Mar 16, 8:55 pm)
Re: [linux-audio-user] stupid, basic alsa question, Christoph Eckert, (Wed Mar 16, 9:17 pm)
Re: [linux-audio-user] stupid, basic alsa question, Atte André Jensen, (Thu Mar 17, 11:15 am)
Re: [linux-audio-user] stupid, basic alsa question, Andres Cabrera, (Thu Mar 17, 4:00 pm)
Re: [linux-audio-user] stupid, basic alsa question, Atte André Jensen, (Thu Mar 17, 9:59 pm)
Re: [linux-audio-user] stupid, basic alsa question, Tapio Kelloniemi, (Thu Mar 17, 12:01 pm)
Re: [linux-audio-user] stupid, basic alsa question, Kai Vehmanen, (Thu Mar 17, 2:39 pm)