Mixxx, Ardour, JACK and MIDI
Table of Contents
- My Setup
- The software
- Putting it all together
Do crazy shit with Mixxx, JACK server routing, DAWs with VST plugins and MIDI control on Linux (Ubuntu/Pop_OS).
This is what I want to do:
- Send each of Mixxx’s 4 deck’s audio streams to a track in Ardour.
- Add Windows VST plugins as FX on those Ardour tracks.
- Control the VST plugin FX parameters from a MIDI controller (Xone K2 in my case).
- WIP Send MIDI clock from Mixxx to Ardour to for the FX (like delay) that can use tempo and beat syncing.
- Send the 4 Ardour deck tracks out of two audio interfaces (each with 4 outputs) and into a 4 channel hardware mixer (Xone 43 in my case).
- Send the master mix out of the hardware mixer to an audio interface input to be recorded in Mixxx or Ardour
Here’s how I am doing it:
# My Setup
But first, an explanation of my hardware setup:
See My audio setup
# The software
I use Linux. This is the software I use. Some of the software mentioned here isn’t directly used for this particular project, but I mention here since it’s good to know about it in general for Linux audio production.
Free, open source DJ software. Stands up to paid versions and works on Linux. It really is great.
# Developer mode
You can start Mixxx with the
--developer flag. In addition to extra logging
and a developer menu in the GUI, it also adds the
Midi Through Port-0 as an
option under Controllers. This is key for sending out MIDI time code from
Mixxx without having to depending on a sound card.
pasuspender -- mixxx --developer
# MIDI for light
MIDI for light
can to send MIDI timecode from Mixxx to wherever you want (like a DAW, FX
box, drum machine, lighting rig, etc.)
- See https://github.com/mixxxdj/mixxx/wiki/Midi-Clock-Output for more details.
- See also Mixxx’s forum for MIDI output
Full-on DAW that works on Linux. It’s not free (unless you build from source), but it’s a kind of pay what you want model as of writing this. It’s great software and it can be a slave to an external MIDI clock source.
# MIDI Control
- MIDI sync
# Using Windows VSTs in Linux
Yes, this can be done, although I was only able to get VST3 (not VST 2) to work. I was probably doing something wrong, but I didn’t care, only interested in VST3 anyhow. Doing this requires Wine (see VST plugins section) and yabridge.
# Jack Audio Connection Kit
A Sound server. Lets you route audio and MIDI all over the place.
https://github.com/rncbc/qjackctl This is a GUI for managing the Jack server.
# MIDI routing
Need to install a2jmidid. This somehow bridges the jack server MIDI port to ALSA MIDI.
sudo apt-get install a2jmidid
a2jmidid -e &as a execute after startup script. This kicks off a2jmidid and will automatically map your midi controller to jack where it can be routed to a midi input.
- I also added
killall a2jmididas a shutdown script to clean up after.
Here’s an example from Qjackctl, where I am routing MIDI from my Xone K2 to Reaper. The midi controller will now show up in Reaper in the midi device settings where it can be enabled for input and control.
# Multiple audio interfaces
JACK is designed to support a single audio interface. There are several work-arounds for those of us with several audio interfaces. See also https://jackaudio.org/faq/multiple_devices.html
- alsa_in / alsa_out
The alsa_in / alsa_out programs can expose additional audio interfaces to JACK and sync their clocks. It basically works like this:
- Get a list of sound cards by
- Find the name of the sound card
- If you need outputs:
alsa_out -d hw:NAME_OF_CARD
- Just use
alsa_in -dto enable inputs
- Get a list of sound cards by
The two CLI tools this provides do the same thing as alsa_in / alsa_out but claims to have better sound quality. I did have better luck with using this to add a second audio interface to JACK.
# Enable Realtime (Optional)
Enabling this can help performance / latency. Most Linux distros have permissions around Realtime scheduling. See https://jackaudio.org/faq/linux_rt_config.html for how to enable it (it’s really not hard).
Then you can check the box “Realtime” in the Jack settings to use it.
# Jack scripting (Optional)
This is just here for reference. It can be useful to do some things via scripts, like make connections between ports in order to automate repetitive tasks. See making connection in jack on the command line.
This is Linux kernel module that can create virtual midi interfaces that appear as sound cards to the system. This isn’t needed for this project, but it’s good to know about.
This is a Linux kernel module that can create midi through ports. This is only needed if you don’t already have an ALSA midi through port or you need an extra one for some reason.
# To start it
n = how many ports you want
sudo modprobe snd-seq-dummy ports=n
- To make it available after reboots
/etc/modprobe.d/midi.confand add line
options snd-seq-dummy ports=n
# To unload it
sudo modprobe -r snd-seq-dummy