<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>RingBuffer (Posts about basics:linuxaudio)</title><link>http://ringbuffer.org/</link><description></description><atom:link href="http://ringbuffer.org/categories/cat_basicslinuxaudio.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><lastBuildDate>Mon, 02 Mar 2026 18:01:39 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Raspberry Pi</title><link>http://ringbuffer.org/computer_music_basics/Linux/raspberry-pi/</link><dc:creator>Henrik von Coler</dc:creator><description>&lt;p&gt;The class &lt;a class="reference external" href="https://www.ak.tu-berlin.de/menue/lehre/vergangene_semester/sommersemester_2019/sound_synthesis/"&gt;Sound Synthesis&lt;/a&gt;
at TU Berlin makes use of the Raspberry PI as a development and runtime system for sound synthesis in C++ &lt;a class="reference external" href="https://www.researchgate.net/publication/330359720_Teaching_Sound_Synthesis_in_CC_on_the_Raspberry_Pi"&gt;(von Coler, 2017)&lt;/a&gt;.
Firtly, this is the cheapest way of setting up a computer pool with unified hard- and software.
In addition, the PIs can serve as standalone synthesizers and sonification tools.
All examples can be found in a dedicated &lt;a class="reference external" href="https://github.com/anwaldt/sound_synthesis_pi"&gt;software repository&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The full development system is based on free,
open source software.
The examples are based on the JACK API  for audio input and output,
&lt;code class="docutils literal"&gt;RtAudio&lt;/code&gt; for MIDI,
as well as the &lt;code class="docutils literal"&gt;liblo&lt;/code&gt; for OSC communication and &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;libyaml-cpp&lt;/span&gt;&lt;/code&gt;
for data and configuration files.&lt;/p&gt;
&lt;p&gt;The advantage and disadvantage of this setup is that every element needs
to be implemented from scratch. In this way, synthesis algorithms can be
understood in detail and customized without limitations.
For quick solutions it makes sense to switch to a framework
with more basic elements.
The source code can also be used on any Linux system,
provided the necessary libraries are installed.&lt;/p&gt;
&lt;hr class="docutils"&gt;
&lt;section id="the-gain-example"&gt;
&lt;h2&gt;The Gain Example&lt;/h2&gt;
&lt;p&gt;The gain example is the entry point for coding on the PI system:
&lt;a class="reference external" href="https://github.com/anwaldt/sound_synthesis_pi"&gt;https://github.com/anwaldt/sound_synthesis_pi&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;hr class="docutils"&gt;
&lt;section id="references"&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;div class="publication-list"&gt;
&lt;h4&gt;2017&lt;/h4&gt;
&lt;ul&gt;&lt;li class="publication" style="padding-bottom: 1em;"&gt;Henrik von Coler and David Runge.
&lt;a href="http://ringbuffer.org/papers/voncoler2017teaching.html"&gt;&lt;strong&gt;Teaching sound synthesis in c/c++ on the raspberry pi.&lt;/strong&gt;&lt;/a&gt;
In &lt;em&gt;Proceedings of the Linux Audio Conference&lt;/em&gt;. 2017.&lt;br&gt;[&lt;a href="http://ringbuffer.org/papers/voncoler2017teaching.html"&gt;details&lt;/a&gt;] 
            [&lt;a href="javascript:void(0)" onclick="
            (function(target, id) {
              if ($('#' + $.escapeSelector(id)).css('display') == 'block')
              {
                $('#' + $.escapeSelector(id)).hide('fast');
                $(target).text('BibTeX▼')
              }
              else
              {
                $('#' + $.escapeSelector(id)).show('fast');
                $(target).text('BibTeX▲')
              }
            })(this, 'bibtex-voncoler2017teaching');"&gt;BibTeX▼&lt;/a&gt;]
            &lt;div id="bibtex-voncoler2017teaching" style="display:none"&gt;&lt;pre&gt;@inproceedings{voncoler2017teaching,
    author = "von Coler, Henrik and Runge, David",
    title = "Teaching Sound Synthesis in C/C++ on the Raspberry Pi",
    booktitle = "Proceedings of the Linux Audio Conference",
    year = "2017",
    location = "Saint-Etienne, France"
}
&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/section&gt;</description><guid>http://ringbuffer.org/computer_music_basics/Linux/raspberry-pi/</guid><pubDate>Thu, 05 Nov 2020 11:47:15 GMT</pubDate></item><item><title>Using JACK Audio</title><link>http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/</link><dc:creator>Henrik von Coler</dc:creator><description>&lt;p&gt;The &lt;a class="reference external" href="https://jackaudio.org/"&gt;JACK API&lt;/a&gt; implements
an audio server, allowing the connection of various software clients and
hardware interfaces.
In short, it turns the whole system into a digital audio workstation (DAW).
It is the the standard way of working on Linux (pro) audio systems,
but is also available for Mac and Windows.
JACK needs a back end to connect to the actual audio hardware.
On Linux systems, this is usually &lt;em&gt;ALSA&lt;/em&gt; (Mac uses &lt;em&gt;Core Audio&lt;/em&gt; and Windows &lt;em&gt;ASIO&lt;/em&gt;).&lt;/p&gt;
&lt;hr class="docutils"&gt;
&lt;section id="starting-a-jack-server"&gt;
&lt;h2&gt;Starting a JACK Server&lt;/h2&gt;
&lt;p&gt;A JACK server can be started via various graphical tools,
such as &lt;a class="reference external" href="https://qjackctl.sourceforge.io/"&gt;QjackCtl&lt;/a&gt; or
&lt;a class="reference external" href="https://kx.studio/Applications:Carla"&gt;Carla&lt;/a&gt;.
Many audio programs also boot a JACK server o their own,
if launched.
The recommended way of starting a JACK server in our case is the
terminal, using the command &lt;code class="docutils literal"&gt;jackd&lt;/code&gt;. It takes several arguments.
The following line starts a server (in the background) with the ALSA interface named
&lt;em&gt;PCH&lt;/em&gt;, using a sample rate of 48kHz and a buffer size of 128 samples.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code console"&gt;&lt;a id="rest_code_6ca385baf2fe44189755a9619f1f4efa-1" name="rest_code_6ca385baf2fe44189755a9619f1f4efa-1" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_6ca385baf2fe44189755a9619f1f4efa-1"&gt;&lt;/a&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;jackd&lt;span class="w"&gt; &lt;/span&gt;-d&lt;span class="w"&gt; &lt;/span&gt;alsa&lt;span class="w"&gt; &lt;/span&gt;-d&lt;span class="w"&gt; &lt;/span&gt;hw:Gen&lt;span class="w"&gt; &lt;/span&gt;-r&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;48000&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-p&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;128&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The above example works for the 4th Gen. Scarlett 4i4 interface. TO use a different audio interface, follow the steps below.&lt;/p&gt;
&lt;/section&gt;
&lt;hr class="docutils"&gt;
&lt;section id="finding-alsa-devices"&gt;
&lt;h2&gt;Finding ALSA Devices&lt;/h2&gt;
&lt;p&gt;One way of finding the ALSA name of your interface
is to type the following command:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code console"&gt;&lt;a id="rest_code_b367c8ecfffb4ba1bbbf6d360805ec25-1" name="rest_code_b367c8ecfffb4ba1bbbf6d360805ec25-1" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_b367c8ecfffb4ba1bbbf6d360805ec25-1"&gt;&lt;/a&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;aplay&lt;span class="w"&gt; &lt;/span&gt;-l
&lt;/pre&gt;&lt;/div&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The output shows all ALSA capable devices, their name
listed after the &lt;code class="docutils literal"&gt;card x:&lt;/code&gt;. PCH is usually the default
onboard sound card:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code console"&gt;&lt;a id="rest_code_d8899ef006d14919850b72e2463205f2-1" name="rest_code_d8899ef006d14919850b72e2463205f2-1" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_d8899ef006d14919850b72e2463205f2-1"&gt;&lt;/a&gt;&lt;span class="go"&gt;**** List of PLAYBACK Hardware Devices ****&lt;/span&gt;
&lt;a id="rest_code_d8899ef006d14919850b72e2463205f2-2" name="rest_code_d8899ef006d14919850b72e2463205f2-2" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_d8899ef006d14919850b72e2463205f2-2"&gt;&lt;/a&gt;&lt;span class="go"&gt;card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]&lt;/span&gt;
&lt;a id="rest_code_d8899ef006d14919850b72e2463205f2-3" name="rest_code_d8899ef006d14919850b72e2463205f2-3" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_d8899ef006d14919850b72e2463205f2-3"&gt;&lt;/a&gt;&lt;span class="go"&gt;  Subdevices: 1/1&lt;/span&gt;
&lt;a id="rest_code_d8899ef006d14919850b72e2463205f2-4" name="rest_code_d8899ef006d14919850b72e2463205f2-4" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_d8899ef006d14919850b72e2463205f2-4"&gt;&lt;/a&gt;&lt;span class="go"&gt;  Subdevice #0: subdevice #0&lt;/span&gt;
&lt;a id="rest_code_d8899ef006d14919850b72e2463205f2-5" name="rest_code_d8899ef006d14919850b72e2463205f2-5" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_d8899ef006d14919850b72e2463205f2-5"&gt;&lt;/a&gt;&lt;span class="go"&gt;card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]&lt;/span&gt;
&lt;a id="rest_code_d8899ef006d14919850b72e2463205f2-6" name="rest_code_d8899ef006d14919850b72e2463205f2-6" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_d8899ef006d14919850b72e2463205f2-6"&gt;&lt;/a&gt;&lt;span class="go"&gt;  Subdevices: 1/1&lt;/span&gt;
&lt;a id="rest_code_d8899ef006d14919850b72e2463205f2-7" name="rest_code_d8899ef006d14919850b72e2463205f2-7" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_d8899ef006d14919850b72e2463205f2-7"&gt;&lt;/a&gt;&lt;span class="go"&gt;  Subdevice #0: subdevice #0&lt;/span&gt;
&lt;a id="rest_code_d8899ef006d14919850b72e2463205f2-8" name="rest_code_d8899ef006d14919850b72e2463205f2-8" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_d8899ef006d14919850b72e2463205f2-8"&gt;&lt;/a&gt;&lt;span class="go"&gt;card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]&lt;/span&gt;
&lt;a id="rest_code_d8899ef006d14919850b72e2463205f2-9" name="rest_code_d8899ef006d14919850b72e2463205f2-9" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_d8899ef006d14919850b72e2463205f2-9"&gt;&lt;/a&gt;&lt;span class="go"&gt;  Subdevices: 1/1&lt;/span&gt;
&lt;a id="rest_code_d8899ef006d14919850b72e2463205f2-10" name="rest_code_d8899ef006d14919850b72e2463205f2-10" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_d8899ef006d14919850b72e2463205f2-10"&gt;&lt;/a&gt;&lt;span class="go"&gt;  Subdevice #0: subdevice #0&lt;/span&gt;
&lt;a id="rest_code_d8899ef006d14919850b72e2463205f2-11" name="rest_code_d8899ef006d14919850b72e2463205f2-11" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_d8899ef006d14919850b72e2463205f2-11"&gt;&lt;/a&gt;&lt;span class="go"&gt;card 0: HDMI [HDA Intel HDMI], device 9: HDMI 3 [HDMI 3]&lt;/span&gt;
&lt;a id="rest_code_d8899ef006d14919850b72e2463205f2-12" name="rest_code_d8899ef006d14919850b72e2463205f2-12" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_d8899ef006d14919850b72e2463205f2-12"&gt;&lt;/a&gt;&lt;span class="go"&gt;  Subdevices: 1/1&lt;/span&gt;
&lt;a id="rest_code_d8899ef006d14919850b72e2463205f2-13" name="rest_code_d8899ef006d14919850b72e2463205f2-13" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_d8899ef006d14919850b72e2463205f2-13"&gt;&lt;/a&gt;&lt;span class="go"&gt;  Subdevice #0: subdevice #0&lt;/span&gt;
&lt;a id="rest_code_d8899ef006d14919850b72e2463205f2-14" name="rest_code_d8899ef006d14919850b72e2463205f2-14" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_d8899ef006d14919850b72e2463205f2-14"&gt;&lt;/a&gt;&lt;span class="go"&gt;card 0: HDMI [HDA Intel HDMI], device 10: HDMI 4 [HDMI 4]&lt;/span&gt;
&lt;a id="rest_code_d8899ef006d14919850b72e2463205f2-15" name="rest_code_d8899ef006d14919850b72e2463205f2-15" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_d8899ef006d14919850b72e2463205f2-15"&gt;&lt;/a&gt;&lt;span class="go"&gt;  Subdevices: 1/1&lt;/span&gt;
&lt;a id="rest_code_d8899ef006d14919850b72e2463205f2-16" name="rest_code_d8899ef006d14919850b72e2463205f2-16" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_d8899ef006d14919850b72e2463205f2-16"&gt;&lt;/a&gt;&lt;span class="go"&gt;  Subdevice #0: subdevice #0&lt;/span&gt;
&lt;a id="rest_code_d8899ef006d14919850b72e2463205f2-17" name="rest_code_d8899ef006d14919850b72e2463205f2-17" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_d8899ef006d14919850b72e2463205f2-17"&gt;&lt;/a&gt;&lt;span class="go"&gt;card 1: PCH [HDA Intel PCH], device 0: CX20751/2 Analog [CX20751/2 Analog]&lt;/span&gt;
&lt;a id="rest_code_d8899ef006d14919850b72e2463205f2-18" name="rest_code_d8899ef006d14919850b72e2463205f2-18" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_d8899ef006d14919850b72e2463205f2-18"&gt;&lt;/a&gt;&lt;span class="go"&gt;  Subdevices: 1/1&lt;/span&gt;
&lt;a id="rest_code_d8899ef006d14919850b72e2463205f2-19" name="rest_code_d8899ef006d14919850b72e2463205f2-19" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_d8899ef006d14919850b72e2463205f2-19"&gt;&lt;/a&gt;&lt;span class="go"&gt;  Subdevice #0: subdevice #0&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;hr class="docutils"&gt;
&lt;section id="disable-autoconnect"&gt;
&lt;h2&gt;Disable Autoconnect&lt;/h2&gt;
&lt;p&gt;With default sessings, jackd will automatically connect most new clients with the system inputs and outputs.
In some cases (like in JackTrip network systems with many clients and specific connections) this should not happen.
Adding the arguments '-a a' to the above jackd command (before the devices) will prevent all autoconnect request&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code console"&gt;&lt;a id="rest_code_5e6243241f414754b72266dade06470a-1" name="rest_code_5e6243241f414754b72266dade06470a-1" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_5e6243241f414754b72266dade06470a-1"&gt;&lt;/a&gt;&lt;span class="go"&gt;jackd -a a -d alsa -d hw:Gen -r 48000 -p 128 &amp;amp;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;hr class="docutils"&gt;
&lt;section id="connecting-jack-clients"&gt;
&lt;h2&gt;Connecting JACK Clients&lt;/h2&gt;
&lt;p&gt;With autoconnect disabled, we can still use qjackct or any other GUI tool to connect Jack clients.
As almost everything, JACK connections can be modified from the terminal.
All available JACK ports can be listed with the following command:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code console"&gt;&lt;a id="rest_code_f9b6815634da494da249cc99fe019577-1" name="rest_code_f9b6815634da494da249cc99fe019577-1" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_f9b6815634da494da249cc99fe019577-1"&gt;&lt;/a&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;jack_lsp
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Two ports can be connected with the following command:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code console"&gt;&lt;a id="rest_code_0ca604774bb742788fc26a473656a0cb-1" name="rest_code_0ca604774bb742788fc26a473656a0cb-1" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_0ca604774bb742788fc26a473656a0cb-1"&gt;&lt;/a&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;jack_connect&lt;span class="w"&gt; &lt;/span&gt;client1:output&lt;span class="w"&gt; &lt;/span&gt;client2:input
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Disconnecting two ports is done as follows:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code console"&gt;&lt;a id="rest_code_ca570d0d48b6454eaa859186dc380ac1-1" name="rest_code_ca570d0d48b6454eaa859186dc380ac1-1" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_ca570d0d48b6454eaa859186dc380ac1-1"&gt;&lt;/a&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;jack_disconnect&lt;span class="w"&gt; &lt;/span&gt;client1:output&lt;span class="w"&gt; &lt;/span&gt;client2:input
&lt;/pre&gt;&lt;/div&gt;
&lt;hr class="docutils"&gt;
&lt;p&gt;If possible, a GUI-based tool, such as QjackCtl, can be
more handy for connecting clients. It can be started via
the a Desktop environment or from the command line:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code console"&gt;&lt;a id="rest_code_29c0cf4d77d04431aed84620e3453347-1" name="rest_code_29c0cf4d77d04431aed84620e3453347-1" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_29c0cf4d77d04431aed84620e3453347-1"&gt;&lt;/a&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;qjackctl
&lt;/pre&gt;&lt;/div&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;figure&gt;
&lt;img alt="/images/basics/qjackctl_connect.png" src="http://ringbuffer.org/images/basics/qjackctl_connect.png" width="400"&gt;
&lt;figcaption&gt;
&lt;p&gt;QjackCtl with hardware connections and two clients.&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/section&gt;
&lt;hr class="docutils"&gt;
&lt;section id="storing-restoring-connections"&gt;
&lt;h2&gt;Storing/Restoring Connections&lt;/h2&gt;
&lt;p&gt;Several tools allow to store and restore JACK connections.
Some of them work in a dynamic way, detecting spawned clients
and connecting them accordingly.
Others just allow a single operation for restoring connections.&lt;/p&gt;
&lt;section id="aj-snapshot"&gt;
&lt;h3&gt;aj-snapshot&lt;/h3&gt;
&lt;p&gt;The command line tool
&lt;a class="reference external" href="https://github.com/sreimers/aj-snapshot"&gt;aj-snapshot&lt;/a&gt; is automatically
installed alongside JACK. It can store and restore both JACK
and ALSA connections, which can be handy when working with MIDI
and is the most feature-rich and robust solution.&lt;/p&gt;
&lt;p&gt;Once all connections are set, they can be stored to in an XML
file, specified by a single argument:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code console"&gt;&lt;a id="rest_code_029d03f4d12b4ba89843b1352f84aefc-1" name="rest_code_029d03f4d12b4ba89843b1352f84aefc-1" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_029d03f4d12b4ba89843b1352f84aefc-1"&gt;&lt;/a&gt;&lt;span class="go"&gt;aj-snapshot connections.snap&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The above stored connections can be restored with the flag &lt;code class="docutils literal"&gt;&lt;span class="pre"&gt;-r&lt;/span&gt;&lt;/code&gt;.
An additional &lt;code class="docutils literal"&gt;x&lt;/code&gt; deletes all prior connections, thus restoring the
original state in the file:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code console"&gt;&lt;a id="rest_code_04e3be91dc394c468c4a7108ed3bcdb1-1" name="rest_code_04e3be91dc394c468c4a7108ed3bcdb1-1" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_04e3be91dc394c468c4a7108ed3bcdb1-1"&gt;&lt;/a&gt;&lt;span class="go"&gt;aj-snapshot -xr connections.snap&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The tool can also be started as a demon, looking for new clients
and setting the related connections:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code console"&gt;&lt;a id="rest_code_e2f63bcad47e47c19ce275b047546007-1" name="rest_code_e2f63bcad47e47c19ce275b047546007-1" href="http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/#rest_code_e2f63bcad47e47c19ce275b047546007-1"&gt;&lt;/a&gt;&lt;span class="go"&gt;aj-snapshot -d connections.snap&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;div class="line-block"&gt;
&lt;div class="line"&gt;&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;aside class="admonition note"&gt;
&lt;p class="admonition-title"&gt;Note&lt;/p&gt;
&lt;p&gt;In some spatial audio projects, hardware devices and
clients can have many a large number of ports.
aj-snapshot does not handle that well and takes
an excessive amount of time for deleting existing connections.&lt;/p&gt;
&lt;/aside&gt;
&lt;/section&gt;
&lt;hr class="docutils"&gt;
&lt;section id="jmess"&gt;
&lt;h3&gt;jmess&lt;/h3&gt;
&lt;p&gt;&lt;a class="reference external" href="https://github.com/jacktrip/jmess-jack"&gt;jmess&lt;/a&gt; is another command line tool,
storing and restoring only JACK connections.
It does not come with a demon mode but is a lot faster than aj-snapshot.&lt;/p&gt;
&lt;/section&gt;
&lt;hr class="docutils"&gt;
&lt;section id="jack-matchmaker"&gt;
&lt;h3&gt;jack-matchmaker&lt;/h3&gt;
&lt;p&gt;&lt;a class="reference external" href="https://pypi.org/project/jack-matchmaker/"&gt;jack matchmaker&lt;/a&gt; is a Python-based
command line tool for dynamically restoring previously saved JACK connections.&lt;/p&gt;
&lt;/section&gt;
&lt;hr class="docutils"&gt;
&lt;section id="qjackctl-patchbay"&gt;
&lt;h3&gt;QjackCtl Patchbay&lt;/h3&gt;
&lt;p&gt;The &lt;a class="reference external" href="https://www.rncbc.org/drupal/node/76"&gt;QjackCtl Patchbay&lt;/a&gt; offers a graphical
solution for storing JACK and ALSA connections.
Once activated, it patches new clients dynamically.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;</description><guid>http://ringbuffer.org/computer_music_basics/Linux/using-jack-audio/</guid><pubDate>Thu, 05 Nov 2020 10:47:15 GMT</pubDate></item></channel></rss>