M-Audio Quattro

Introduction
The M-Audio Quattro USB Audio Interface allows you to plug in up to 4 (externally preamped) mics or instruments and record them each on a separate track. By keeping audio in separate tracks rather than downmixing before going to the computer, you are then free to tweak levels and effects and rerecord individual tracks later to create a professional sounding mix.

Working with professional audio in linux is just now (as of early 2005) becoming a reality with free and open source software. The combination of Real-Time kernel patches, Jack, Alsa, and Ardour makes for a powerful and useful digital production station on a shoestring budget.

Caveat Emptor
First, I must mention that there are better products for this. If you have the room in your PC, pci-card based solutions by M-Audio are better supported under linux. Although you can get the quattro working, it is not always reliable and does not currently support hardware acceleration. The result is that there will always be a delay between playback and recording, which can be quite bothersome when recording a synced track, such as a vocal over an instrumental.

Where to get it
The M-Audio Quattro retails for ~$350, but can be acquired on e-bay for significantly less, as the Firewire solutions from M-Audio are becoming much more desirable for those working on Macs and PCs. Due to the incredibly sparse documentation on the web regarding these new firewire products and linux, it is difficult to say whether they will work under linux at all at the moment.

Be aware that while the Quattro is a nice little device, it does not include pre-amps for the inputs, so you'll need to purchase preamps for your mics and run your instruments through their amplifiers before plugging them into the quattro.

Preparing your system
Setting your system up as a Digital Audio Workstation is not a small undertaking, but thanks to the hardworking people at Planet CCRMA, there is an easy way to prepare everything you'll need.

The CCRMA (pronounced karma) packages include a realtime kernel, up-to-date alsa and jack, and hundreds of audio and video applications. Built on top of Red Hat Linux and now Fedora Core, installing the CCRMA pages is as simple as editing your /etc/apt/sources.list file to include the CCRMA repository and then install the neccessary pages. Please refer the Planet CCRMA documentation for more details.

This step is not absolutely necessary, but without installing the Real-Time Kernels and other CCRMA software, you may be missing essential programs and the quattro will perform poorly, generating long xruns.

Ensuring the quattro gets the same "device identifier" at each boot
In alsa, the first device to be configured is referred to as hw:0, the second as hw:1, and so forth.

When you first plug in the quattro, it will be recognized and autoconfigure as hw:1. Unfortunately, at your first reboot, the snd-usb-audio module will load before the pci or integrated soundcard, making the quattro hw:0.

To avoid this problem, edit /etc/modprobe.conf (this may be /etc/modules.conf in older/other distros)  

The quattro will now always be hw:1

Configuring Alsa with /root/.asoundrc
Alsa can be configured to reference complex hardware in a simple way by editing the .asoundrc file in your home directory. Since we will be starting jack and ardour as root, we will want to edit /root/.asoundrc. If this file doesn't exist, please create it.

Thankfully, someone has gone to the trouble of figuring out the hardware of the quattro and has created a suitable .asoundrc file.  

Starting Jack
jackd -R -d alsa -d q4 -H -C -r 44100 -p 1024 -i4 -o -P hw:0

jackstart does not always allow normal users to run with realtime capabilities.

Explanation of jackd options selected

 * -R = run with realtime priority if possible


 * -d = driver, we're going to use alsa


 * -d = this second d tells the alsa driver to use device q4 (defined in /root/.asoundrc)


 * -H = attempts to use hardware accellerated communications. This doesn't work with the quattro as of now.


 * -C = capture settings


 * -r = rate, in this case 44100, CD quality. If you're using all 4 channels, you're not going to be getting any better out of the quattro.


 * -p = the quattro seems to only accept buffer lengths which are a multiple of 1024. (Buffer = Period length p * number of periods n)


 * -n = (not included here) how many periods, this will default to n2. The less of these, the shorter the delay between recording and playback, or latency.


 * -i4 = number of inputs to enable. The quattro's got 4, so let's use them!


 * -o = number of outputs to enable (defaults to the card's default, usually 2)


 * -P Playback settings follow this. using separate -C and -P sections allows us to route the mixed-down audio through to a second sound card.
 * hw:0 here tells jack to route playback through the first audio card


 * after startup, I get quite a few xruns and then jack settles down after about 10 seconds. Recording will be (pretty) reliable after this

Making your first multi-track recording

 * run
 * start a new session, name it
 * right click on the empty area of the "mixer" window
 * add 1 track
 * "manual setup" configuration
 * New track is not yet connected to any inputs
 * you can connect more than one track to each input, so be careful not to add 2 tracks listening to channel 1, as it will be loud and "clip" out
 * If you want to record more than one track from a specific input (for example overdubbing harmony on a vocal by recording a second pass,) "disconnect" the first track from the input, then create a new track and connect it to the desired input.
 * click the input button on your new track
 * edit
 * add input
 * click the alsa_pcm tab
 * select the appropriate capture port
 * I chose capture_1 (the first port on the quattro)
 * You should see a live "monitor" area light up on the track
 * If you have a mic+preamp plugged into this port, try making some noise, you should see the monitor react.
 * Now listen to the output of your pre-existing (non-quattro) soundcard.
 * Record a track by
 * Arming the track by clicking the "r" button
 * Go to "recording standby" by clicking the red-circle record button
 * Start recording by hitting play. You should see your waveforms being drawn in periodically as the recording progresses.
 * Start recording by hitting play. You should see your waveforms being drawn in periodically as the recording progresses.

Bug Notice
You may have to restart alsa and the device to get the Quattro to initialize properly.


 * Stop alsa
 * /sbin/service alsasound stop
 * Reboot the device
 * Wait at least 10 seconds after turning it back on
 * Restart alsa
 * /sbin/service alsasound start

If you notice that the channels are behaving erratically or are too loud (as if they have their gain turn up much too high, and are producing a lot of hum,) try this procedure before changing any settings.


 * NOTE: If you've restarted alsa, it has a tendency to reset volume defaults to muted and silenced. be sure to run your mixer program to check the levels. Don't assume that the quattro's not recording if you don't hear anything coming out at this point!