Unfortunately (or not) for linux newbies, if you want to try things out, you'll need to be comfortable with compiling stuff, terminal commands, but it should not be such a big hassle. Anyway, fear not, you're dealing with linux and we like to have our hands dirty that's how we learn, and knowledge is power, isn't it ?
So, a few prerequisites:
- you have a stable and good system (RT kernel, good jack stability in RT mode, etc)
- you are part of a local network, gigabit would be best
- you have an extra PC running linux or winXP, that is RT and jack enabled if running linux
Goal: transform your normal DAW into a master netjack server, your extra PC into a netjack client communicating with the master server via the network. The idea is that we can decouple some of the DSP, so we share the load between the server and client, instead of having one single monolithic DAW that does everything.
Use cases:
- VSTs running on the winXP client, audio coming from the master, processed by the client and returned to the master. Of course, this implies some latency so this is not meant as a live setup
- VSTis running on the master server (thanks to wine), MIDI sequencer running on client, streaming out MIDI events to master server, triggering the VSTis.
- etc, you can think of others
Let's get to it. I will first describe the linux-2-linux case. I'll get to the windows client later.
I - Building and installing jack2 svn: LINUX server and client
Get the latest jack2 code from svn (make sure you have subversion, and build-essential installed on debian based systems) and you have a directory where you can check out source code from the net. I will call the latter 'src' and located in the home directory for the sake of the post):
Code: Select all
cd
mkdir src
cd src
svn co http://subversion.jackaudio.org/jack/jack2/trunk/jackmp jack2_svn
cd jack2_svn
./waf configure --prefix=/usr
./waf build
Code: Select all
sudo rm -fr /usr/lib/jack/*
sudo rm -fr /usr/lib/libjack*.so.*
sudo rm /usr/bin/jack*
So, why am I doing this in such a brute way ? because if you try to uninstall jack (in particular libjack) via apt-get or whatever package manager you normally use, it may want to remove most of your jack apps (ardour, rosegarden, etc ..., and we don't want that, do we ? )
Well, there may be some clever options to 'apt-get remove' but I don't know them. And anyway, if the newly compiled jack does not fulfill your needs, you can always reinstall jackd, libjack, etc (e.g. 'sudo apt-get install --reinstall jackd').
OK, so your packaged jack is out of the way, so we can install jack2_svn:
Code: Select all
sudo ./waf install
II Run the stuff on the master server
1- from the command line
Let's be a bit conservative (not low latency). Note: replace with options that make sense to you (sample rate, hw and backend driver). E.g.:
Code: Select all
/usr/bin/jackd -S -R -P70 -dalsa -dhw:1 -r96000 -p1024 -n2 -s -Xseq
If it goes well and starts up fine, we will do another thing. Open another terminal and type:
Code: Select all
jack_load netmanager
2- from qjackctl
In my qjackctl config, I have this in-process client call in the setup Options under the field "Execute script after startup". So when I launch jackd through the GUI, it executes this post-command. In fact I have a little more than this under this option:
Code: Select all
jack_load netmanager; a2jmidid&
As you understand by now, you can easily stuff the qjackctl config with all this. In the setup window, make sure that the "Server path" contains 'jackd -S', not 'jackd' only.
For a2jmidid, you can always get it and compile / install it:
Code: Select all
cd; cd src
svn co svn://svn.gna.org/svn/a2jmidid/code a2jmidid
cd a2jmidid
./waf configure --prefix=/usr # you can have it in /usr/local as well if you want
./waf build
sudo ./waf install
So you compiled and installed jack2_svn on the client as well, and now comes the moment of truth. Open a terminal and type:
Code: Select all
jackd -R -P 70 -S -d net -t -i 1 -o 1 -m slow
-R = RT mode
-P 70 = RT priority level of the jackd RT thread
-d net = using the net backend
-t = synchronize transport with master (aka jack1 transport slave mode)
-i 1 = declaring one MIDI capture port
-o 2= declaring one MIDI playback port
-m slow = slow mode (most safe). You can read about supported modes here: http://trac.jackaudio.org/wiki/WalkThro ... r/NetJack2.
You should see something going on in the master message window in qjackctl. Assuming all is cool and dandy, fire up qjackctl on the netjack client. Hopefully, you won't have the automatic startup option turned on as we already have jackd running from the terminal by now. We use qjackctl here for the connection window. You should see some stuff in the audio and MIDI tab.
On the server side, look at the client ports in the connection window, now you see the client name, and the audio ports, but also in the MIDI tab.
IV Quick test that things are running fine
Say you have your EL guitar plugged to the master server, and it shows up at system:capture_1 in the qjackctl connection window. In case you have hardware monitoring, disable it. Connect system:capture_1 to netjackclient:playback_1 and netjackclient:playback_2.
On the client, connect system:capture_1 and 2 directly to system:playback_1 and 2.
back on the server, connect netjackclient:capture_1 and 2 to system:playback_1 and 2 (assuming your studio speakers are connected to system:playback_1 and 2 on the master server).
Now play
Enable hardware monitoring on the master server, and play again with the connections still on. You will hear the latency introduced, like a simple delay line effect.
So, can you visualize the journey of the audio signal ?
V Running something cool from there
OK, now, on the master, let's say you open up a soft synth (VST or native), that has a MIDI playback port exposed in the MIDI tab in qjackctl (right hand side window). Connect that port to the client MIDI capture port (located on the left hand side window).
Now, on the client, open up a MIDI sequencer like qtractor or rosegarden, import some MIDI file or open a current project of yours. In the MIDI tab of qjackctl, connect the MIDI capture port of your sequencer to the system MIDI playback port (you have created one when you launched jackd from the terminal, remember ?). Now start the sequencer. It will send MIDI events to the system playback port, which is in fact the netjack backend. The latter will stream the MIDI events through the network to the master server. The in-process netmanager will redirect it to the netjack client MIDI capture port visible in the MIDI tab, which is in turn connect to the soft synth MIDI playback port. If all went well, you should hear something. So the netjack client is doing the sequencing, while the master is doing the audio. Isn't that neat ? :D
Next episode: windows client!!
Teaser: I could sequence a drum VSTi from the sequencer Mixcraft 4.5 (by Acoustica, 14 days free trial, it was just a proof of concept so I don't care too much but it looks like a cool app, a bit like OSX Garage-Band) and send the audio of the VSTi to the linux master sever running ardour and jamin.