Xwax and Serato Quickstart Guide
This guide has been written to get you up and running with xwax and the Rane SL-1 on a linux system. Some of the commands (specifically the "apt-get" commands) are ubuntu/debian specific, but it should be fairly easy to substitute these steps to suit your particular flavour of linux.
Please let me know if you come across any errors or ommissions. Most of the credit must go to the xwax maintainer, Mark, who guided me through the process outlined below.
1. Patch ALSA
The first step is to patch, build and install ALSA so that the O/S will recognise the SL1 as an audio device. Note that this first step may soon become unneccessary, as the patch has been submitted to the alsa team and will hopefully be included in the next release (1.0.15).
Get the latest development alsa source (you will need the linux kernel headers also):
$ sudo apt-get install mercurial $ sudo apt-get install linux-headers-<kernel-version> $ hg clone http://hg-mirror.alsa-project.org/alsa-driver alsa-driver $ hg clone http://hg-mirror.alsa-project.org/alsa-kernel alsa-kernel
Download the patch and apply it:
$ cd alsa-kernel $ wget members.iinet.net.au/~jkburges/xwax/rane-sl1.patch $ patch -p1 < rane-sl1.patch
Build and install the patched version of alsa:
$ cd ../alsa-driver $ ./hgcompile $ sudo make install
Reboot your machine (there is probably a way to avoid a reboot here - let me know if you know how), and then plug in the SL1.
Check the contents of "/proc/asound/cards":
$ cat /proc/asound/cards
0 [Intel ]: HDA-Intel - HDA Intel
HDA Intel at 0xdfebc000 irq 20
1 [SL1 ]: USB-Audio - SL-1
Rane SL-1 at usb-0000:00:1d.3-2, full speed
As above, you should see "Rane SL-1" in there somewhere. The Intel card is the inbuilt card in my laptop by the way.
2. Check the SL1 device
Before going any further, do some further checks to confirm that the SL1 is working as expected, with the following couple of commands.
First, check that it is possible to play audio out on each of the channels (where "test.wav" is some audio file already residing in the current directory):
$ sudo apt-get install alsa-utils $ aplay -D hw:1,0 test.wav $ aplay -D hw:1,1 test.wav
You should hear whatever it is you're playing (i.e. the wav file) coming out of each of the SL1 line outs respectively (as long as you have an amp/headphones connected obviously).
The first number after "hw:", in this case '1', is the audio device number for SL1, which corresponds to the card number listed in "/proc/asound/cards" above (on my system, as my laptop's in built soundcard is '0'). The second number is the channel number, i.e. SL1 is device number '1', and has two channels.
Likewise, we now check audio coming in. For this test, hook up any line level audio source (e.g. a standard turntable running through a phono pre-amp or an iPod) to each of the inputs in turn on the SL1:
$ arecord -c2 -f S16_LE -r44100 -D hw:1,0 record_1.wav $ arecord -c2 -f S16_LE -r44100 -D hw:1,1 record_2.wav
A WAV file (stereo, 16 bit little endian, 44.1kHz) should be recorded to disk, for each channel, which contains the incoming audio. You should check the contents sound ok:
$ aplay record_1.wav $ aplay record_2.wav3. .asoundrc
For convenience, you can now add an ".asoundrc" file to your home directory. This enables you to name each of the SL1 channels something meaningful, and have the SL1 appear to the O/S as two separate audio interfaces.
Here is an example .asoundrc:
# Laptop internal sound card
pcm.laptop_out {
type hw
card 0
device 0
}
# Serato audio devices
pcm.serato_line1 {
type hw
card 1
device 0
}
pcm.serato_line2 {
type hw
card 1
device 1
}
Using the example .asoundrc file, the aplay command from above, for example, could be run as:
$ aplay -D serato_line1 test.wav $ aplay -D serato_line2 test.wav
4. Build alsa branch of xwax
The main branch of xwax uses the OSS audio subsystem - we want alsa, so we need to check out the alsa branch of xwax, and build it ourselves. You will also need to install the development files for SDL ttf library (version 2.0):
$ sudo apt-get install git git-core libsdl-ttf2.0-dev $ git clone http://www.xwax.co.uk/devel/xwax.git $ cd xwax $ git checkout origin/alsa $ make
5. Run xwax
You should now be ready to run xwax with the SL1 (remembering to run as root so that the process can be given a high priority):
$ sudo ./xwax -t serato_2b -i xwax_import -l music -d serato_line1 -d serato_line2
If you got this far, congratulations and enjoy :-)
External links
ALSARane Serato