fuzzix dot org

ASIO + JackRouter + loopMIDI = cheap fun

18 Nov 2021

Here are some notes on my current audio routing setup for music on Windows 10. I am neither a professional nor a musician, so this may be useful to amateurs.

ASIO4ALL

If your audio device does not ship with true ASIO drivers, ASIO4ALL can provide low latency throughput for consumer-grade audio hardware. Low latency is important if monitoring live playing, such as from a guitar or MIDI instrument. Latency is tied to buffer size - the larger the buffer, the higher the latency. The smaller the buffer, the greater the chance of audio clicks, pops and other glitches.

ASIO4ALL and exclusive device access

ASIO4ALL, by default, takes exclusive control of all available audio interfaces when in use. If you have a dedicated audio interface for music and wish to use it while allowing other Windows sounds to be mixed through an on-board device, exclusive control can be disabled in advanced device properties.

Windows audio device dialog showing "exclusive control" disabled

You will then want to configure ASIO4ALL to not use the on-board device, but the dedicated external one.

ASIO4ALL dialog showing a USB device enabled and all other devices disabled

A dedicated USB audio interface is an inexpensive option to increase your flexibility. I use an old Behringer Xenyx 302 USB, which remains a popular choice.

JackRouter

The Jack Audio Connection Kit is an API and server for routing audio and MIDI between applications and devices. While it is commonly associated with Unix-like environments, a Windows version is available.

When installing Jack, be sure to enable the JackRouter ASIO driver. Windows applications tend not to be built with Jack support, so the ASIO bridge is invaluable.

Jack ships with a configuration frontend called QjackCtl. There are some changes I recommend before using the server. The first is in Setup -> Settings -> Parameters. Set the Interface to your ASIO interface. Depending on your requirements, you may also need to change the Realtime and buffer size (Frames/Period) settings.

Jack interface parameters.

In Advanced options, I recommend disabling Jack's MIDI support by setting the Server Prefix to "jackd -S" (that is, delete "-X winmme"). This allows applications built without Jack support to continue using MIDI normally.

Jack advanced settings showing server command line.

If running QjackCtl at startup, it also has some useful options to start in the systray, start the jack server on startup and so on.

Jack Misc settings showing tray and startup options

Finally, you may want to increase the number of IO ports available in the file C:\Program Files\JACK2\jack-router\win64\JackRouter.ini - in the IO section, update the input and output values. I found 8 to be a good starting point.

loopMIDI

Windows lacks support for virtual MIDI devices, making simple routing of MIDI between applications a challenge. The loopMIDI Virtual loopback MIDI cable allows creation of arbitrary numbers of virtual MIDI devices.

loopMIDI with two devices configured

Wiring things together

For this example, VCV Rack will be integrated with SunVox to demonstrate sharing of effects, voices, and sequences. Each of them needs to be configured to use the JackRouter ASIO driver.

The first step is creating a patch in VCV Rack. Clock, generative sequencer, a simple drum loop, and so on. The important components here are the VCV AUDIO-8 module, which routes audio in and out of Rack, the CV-MIDI module, which converts control voltages and triggers to MIDI, and the Mind Meld Mixer and Auxspander, which allow control over a channel's amplitude when sending to an Aux in/out.

The VCV Rack Patch.

Next, we run two instances of SunVox. The first is an effect chain consisting of a pitch shifter and reverb.

A simple SunVox effects chain

The second is an analog generator simply connected directly to output. This instance should be configured to receive notes from the same loopMIDI device as VCV Rack's CV-MIDI module.

A SunVox analog generator connected to output

Next, audio is routed between Rack and SunVox using the QjackCtl graph feature. As the AuxSpander "SNVX" channel routes through inputs/output 3 and 4, these are connected to the first SunVox instance. The "BIPS" voice is sent through this Aux. We can send the output of the second SunVox instance to VCV inputs 5 and 6, which are connected to the "SQSV" mixer track. We can now trivially route audio from the generator SunVox instance to the effect SunVox instance by increasing "SQSV" to "SNVX" in Rack's aux sends.

The Jack connections graph showing SunVox and VCV Rack routes

We now have a generative patch where we can modulate instruments and effects in both Rack and SunVox. For example, as the SunVox reverb is set to zero "dry", the pitch shifter can be modulated upwards for "whoosh" type effects without sounding distorted. Below is a sample where I modulate attack/decay in Rack, release in the SunVox generator, and pitch shifter in the SunVox effect chain.

Finally...

While the setup described here focuses on Windows, routing audio with Jack should apply just as well to BSD, MacOS or Linux. MIDI routing options also tend to be more flexible on these platforms.

I have recently started dabbling with the Carla plugin host (Jack/ASIO) and Bespoke Synth (ASIO), either of which can be routed for new instruments or effects as described here. If you are struggling to achieve an effect in one DAW, but know how to do it in another, just connect them up! :)