Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 5fcfcb7517038d1f44ab4e478e6e61fa > files > 253

csound-doc-6.10.0-1.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Realtime I/O with JACK Connection Kit</title>
    <link rel="stylesheet" type="text/css" href="csound.css" />
    <link rel="stylesheet" type="text/css" href="syntax-highlighting.css" />
    <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" />
    <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" />
    <link rel="up" href="Using.html" title="Using Csound" />
    <link rel="prev" href="RealTimeWindows.html" title="Windows" />
    <link rel="next" href="UsingOptimizing.html" title="Optimizing Audio I/O Latency" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">Realtime I/O with JACK Connection Kit</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="RealTimeWindows.html">Prev</a> </td>
          <th width="60%" align="center">Using Csound</th>
          <td width="20%" align="right"> <a accesskey="n" href="UsingOptimizing.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="section">
      <div class="titlepage">
        <div>
          <div>
            <h2 class="title" style="clear: both"><a id="RealTimeJack"></a>Realtime I/O with JACK Connection Kit</h2>
          </div>
        </div>
      </div>
      <p>
    Under a number of systems the JACK connection kit can be used for both
    audio and MIDI input/output. For more details on this, see
  </p>
      <p><a class="ulink" href="http://jackaudio.org/faq" target="_top">http://jackaudio.org/faq</a>
  </p>
      <h3><a id="idm281472964605368"></a>Using JACK</h3>
      <p>The simplest way to use the JACK plugin enabling input and output is as follows:
  </p>
      <pre class="screen">
  -+rtaudio=jack -i adc -o dac</pre>
      <p>
  Additionally, there are some command line options specific to JACK:
  </p>
      <div class="variablelist">
        <p class="title">
          <strong>JACK Command-line Flags</strong>
        </p>
        <dl class="variablelist">
          <dt>
            <span class="term">-+jack_client=[client_name]</span>
          </dt>
          <dd>
            <p>
          The client name used by Csound, defaults to 'csound6'.
          If multiple instances of Csound connect to the JACK server,
          different client names need to be used to avoid name
          conflicts.
        </p>
          </dd>
          <dt>
            <span class="term">-+jack_inportname=[input port name prefix], -+jack_outportname=[output port name prefix]
      </span>
          </dt>
          <dd>
            <p>
          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:
          </p>
            <pre class="screen">
csound6:input1              (record left)
csound6:input2              (record right)
csound6:output1             (playback left)
csound6:output2             (playback right)</pre>
            <p>
        </p>
          </dd>
        </dl>
      </div>
      <p>
  </p>
      <h3><a id="idm281472964543752"></a>Connecting Csound to other JACK clients</h3>
      <p>
    By default, connections are made to the first ports on the jack port list
    (generally these default to system physical ports).The plugin can connect to
    ports specified as names or numbers.
  </p>
      <p>
    As names: the port name prefix is used, e.g. "system:playback_",
    "system:capture_",   "alsa_pcm:playback_"  or "alsa_pcm:capture_".
    For example: -odac:system:playback_ (for output), -iadc:system:capture_.
    The port name prefix excludes channel names.
  </p>
      <p>
    As numbers: the base port number is given, where the connection
    is made to this and subsequent ports up to the number of channels.
    For a base port number N we will have the connections as N+0, N+1,
    ..., N+nchnls-1. For instance -odac2 with nchnls=1 will connect
    outputs to ports 2 and 3. Ports are listed as in other input/output
    backends.
  </p>
      <p>
    Note that ports can be prevented from autoconnecting by passing
    -odac:null and -iadc:null, for output and input, respectively. Connections
    can also be made manually using jack connection tools.
  </p>
      <h3><a id="idm281472964540712"></a>Notes on buffer sizes</h3>
      <p>
    Audio data is received from and sent to the JACK server by Csound
    using a ring buffer that is controlled by the -b and -B flags.
    -B is the total size of the buffer, while -b is the size of a
    single period. These values are rounded so that the total size is
    an integer multiple of, and greater than the period size.
    The difference of the Csound buffer and period size must be greater
    than or equal to the JACK period size.
  </p>
      <p>
    If both -iadc and -odac are used at the same time, the -b option
    should be set to an integer multiple of ksmps.
  </p>
      <p>
    An example of buffer settings for low latency on a fast Linux system:
    </p>
      <pre class="screen">
      jackd -d alsa -P -r 48000 -p 64 -n 4 -zt &amp;
    csound -+rtaudio=jack -b 64 -B 256 [...]</pre>
      <p>
    with real time scheduling (as root):
    </p>
      <pre class="screen">
      jackd -R -P 90 -d alsa -P -r 48000 -p 64 -n 2 -zt &amp;
    csound --sched=80,90,10 -d -+rtaudio=jack -b 64 -B 192 [...]</pre>
      <p>
    To improve performance, use ksmps values like 32 and 64.
  </p>
      <p>
    The sample rate of the orchestra must be the same as that of the
    JACK server.
  </p>
      <p>
    Jack can also be used for MIDI IO. For this -+rtmidi=jack is
    needed. For input -M followed by the requested jack MIDI port name is
    used to connect directly to an input stream. For output -Q
    followed by the jack port name is used. The options
    -+jack_midi_inportname= and -+jack_midi_outportname= can be
    used to rename Csound's MIDI IO ports.
  </p>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="RealTimeWindows.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="Using.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="UsingOptimizing.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">Windows </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> Optimizing Audio I/O Latency</td>
        </tr>
      </table>
    </div>
  </body>
</html>