Cabbage Logo
Back to Cabbage Site

Linux build of Cabbage 2.0.02 and Projucer for Debian 9.x

Thanks for posting such detailed instructions. I doubt I’ll ever need to set up such a complex environment, but if I did, at least I know where to start :wink:

Here are some further things I set up to create a proper Linux Audio machine. Jack was not installed. I want to understand how to set things up without relying on whatever the Ardour installer does, though I have no reason to doubt that those things are good.

I can install a Debian package for jackd2 1.9.10 which seems to be from August 2015. Instead, I got the Jack2 1.9.12 source from http://jackaudio.org/downloads/ and built it by following the README in the base directory of the tarball. This uses a waf python script which is supplied, so I don’t need to download the Waf build system.

./waf configure 
./waf build 
sudo ./waf install 

There were hundreds of warnings but no errors.

I got qjackctl-0.5.0.tar.gz (2017-12-16) from https://qjackctl.sourceforge.io/ and tried to build it as instructed there. However, before doing so, I found it was necessary to get some dependencies which were not mentioned on this page. The first problem was a missing “qmake”. The second, again with “./configure”, once I installed the qt5-qmake package. was “qmake-qt5 not found in current PATH. Maybe QT development environment isn’t available. (qt5-devel)”. I found several pages referring to this problem, and none of them seemed to have an answer for it: https://askubuntu.com/questions/1012514/how-do-i-install-qjackctl-from-source , http://www.rncbc.org/drupal/node/1804 .

This QT stuff looked too daunting, so I installed from the Debian package system qjackstl 0.4.4-1(2016-11-14). Little has changed since then.

sudo apt-get update
sudo apt-get install qjackctl

The installer presented this "Enable realtime process priority? "option which I accepted:

If you want to run jackd with realtime priorities, the user starting jackd needs 
realtime permissions. Accept this option to create the file 
/etc/security/limits.d/audio.conf, granting realtime priority and memlock
privileges to the audio group.   

User robin is already a member of this group.

The trouble with this installation is that it installed the Debian jackd package (which requires either jackd1 or jackd2), jackd 1.9.10 and jackd-firewire of the same version. I considered uninstalled these:

sudo apt-get --force-yes remove jackd2 jackd2-firewire

but that would remove qjackctl and install jackd1. I did remove jackd2-firewire and some other packages it needed:

sudo apt-get --force-yes remove jackd2-firewire
sudo apt autoremove

I left the situation as it is, assuming that my compiled Jack 1.9.12 installation has been overriden. This dependency business with qjackctl means I can’t use the latest Jack, unless I try the above install script and hope that it does a proper job. Another way of controlling Jack is KXStudio Cadence http://kxstudio.linuxaudio.org/Applications:Cadence#Download , https://sourceforge.net/projects/kxstudio/files/Releases/cadence/ but that is from 2013-07-16.

I rebooted the machine with the RME HDSP 9632 card connected to an 8 channel ASIO ADC/DAC box. In qjackctl Setup > Settings, I selected Interface = hw:DSP,0 RME Hammerfall HDSP 9632 (hw 0:0). and retained the default 48kHz, 1024 frames/period and and 2 periods/buffer. In Display, I selected Bezier curves for patchbay lines. I was able to Start jackd without any obvious problems. Then, via the XDMPC desktop arrangement, I started Cabbage.

In the Audio and MIDI settings I chose Jack, and the only Input and Output option was “System”. This had 12 channels, and I could see from the bargraph beside the Input selector that my input on channels 1 and 2 was getting to Cabbage. qjackctl’s “Connect” connections looked sensible, with Cabbage’s 13 (why not 12?) inputs and outputs being labelled as “JUCEJack” and the RME card’s 12 being labelled as “system”. However, the Test button produced nothing. Nor could I hear any output from .csd files.

In order to get: “hdspconf - GUI program to control the Hammerfall HDSP Alsa Settings. hdspmixer - tool to control the advanced routing features of the RME Hammerfall DSP.”:

sudo apt-get install alsa-tools-gui

I ran hdspmixer and could see the input signals OK. After a few seconds, there was a big click on the output channels and I was able to here the output and test tone of Cabbage! I ran MultiReverb.csd with the Mix set to 0, and a CRT scope on the input and output signals so I could test latency. The Cabbage settings simply reported the Audio buffer size as 1024 samples, and was unable to change it, which makes sense since qjackctl is controling jackd2. In qjackctl Setup > Settings > Parameters I tried reducing “Frames/Period” (the same thing as “Audio buffer size”) to 512, which required stopping and starting jackd via the buttons on the main screen of qjackctl. After that, I could get no signals out of Cabbage. Stopping and starting hdspmixer and the play button of MultiReverb.csd made no difference. I restarted Cabbage, since its Audio and MIDI settings did not look right. “Jack”, “system” and “system” were selected as before, but there was no lists of 12 inputs and outputs. qjackctl’s Connect page showed only the “system” inputs and outputs. I restarted Cabbage, with hdspmixer already running, and all was well.

I repeated the exercise and found the smallest buffer size I could use, without glitches, for this MultiReverb.csd, was 64. With 32 jackd2 would not start. With 64, the total latency (measured with a scope and digital frequency generator) was 6.37ms, which is excellent! 128 samples gave 10.34ms.

Adding two MultiReverbs in series (I had to rename the .csd file, since loading two with the same name did not result in both of them running or appearing together in the patch bay so they could be patched in series) caused the delay to be extended by 32 samples: 0.666ms. With four in series, the latency was 8.35ms.

Even with four running, only 3 of the 7 Cabbage threads (htop, sort on PID, search for Cabbage) used more than 0.0%CPU. One used 0 to 2% and the other two seemed to be sharing the load of the DSP work, with about 22% CPU each, which scaled with how many of the .csd files were playing, to about 5.5% when all were stopped. So this is about 4.25% of CPU, for two cores, per MultiReverb.

The same user cannot start a second instance of Cabbage, but perhaps this could be changed by making two different versions store their config data in separate places. A second user can start a second instance of Cabbage, and this can be controlled on that second user’s desktop via XDMCP. However, I hear no sound while playing a .csd file and when I click the gear icon for Settings, this second instance crashes.

So it seems that my usage of Cabbage on a given server will be limited to one instance, and the DSP effort of that will be limited by its use of two cores for this work. I am not sure how the work is spread over 2 cores, but this is better than it being handled by just one. I haven’t yet tried to get that usage close to 100%. On this basis, for maximum Cabbage performance, it would suffice to have a very fast 4 core i7.

This ability to run multiple Csound .csd files at once, patch them together while they are running, and edit them with a built-in text editor, just stopping and starting to hear the changes, is amazing! The audio quality is perfect and the latency low enough to be of concern at all. It will take me a while to learn all about realtime controls and table editing. Thanks for this extraordinary system!

My pleasure, but the real credit goes to the Csound devs over the decades for continuing to produce such a high end system.