Getting started with xwax

Getting xwax up and running isn't difficult at all, as long as you have a working Linux system and soundcard.

Unpacking

Having downloaded the software, unpack it and change directory, eg.

$ tar xvzf xwax-0.3_ix86.tar.gz
$ cd xwax-0.3_ix86

Starting the software

xwax runs from the command line. The arguments to the program setup audio devices, music directories etc.. To get started, try a single deck using OSS:

$ ./xwax -l ~/music -d /dev/dsp
or you can use an ALSA device, which will be required for some soundcards, eg.
$ ./xwax -l ~/music -a hw:0

For lowest latency, xwax will try to increase the scheduling priority of the audio playback thread. Don't complain about skips or latency in the audio if xwax has not done this! This normally requires root priviledges (using su or sudo) or a modification to rtprio in the limits.conf file.

Once you have a basic setup, you can give extra devices for more decks and other options, eg.

$ ./xwax -t serato_2b -l ~/music -l cdtracks -a hw:1 -a hw:2

What you're actually doing in the command above is:

./xwaxRunning the xwax command
-t serato_2bUsing Serato 2nd Edition, side B timecode (see xwax -h for available timecodes)
-l ~/musicA path to a directory containing music tracks
-l cdtracksA path to a directory containing the virtual music tracks (which instruct the importer to extract from audio CD)
-a hw:1Audio device for first deck
-a hw:2Another audio device for second deck

As you will have seen above, some of the parameters can be specified multiple times; eg. if you have many disjoint directories of music. For a list of command line options use xwax -h.

The display

xwax screenshot with explanation

Checking input audio

With the software running, placing the needle on the timecode vinyl should give a healthy circle display in the timecode scope, like above.

The only adjustment which you may need is to set the input levels using a mixer control for the device (eg. alsamixer). When settled, the circle should approximately fill the timecode scope display. The rest of the timecode control is self-calibrating.

Don't be alarmed that the scope goes all over the place when you scratch or mix, or even just touch the record — this is normal.

Keyboard controls

Track selection

Use the up/down cursor keys to highlight a track from the record library. Use page-up/page-down scroll one screen at a time.

Type a portion of a track name, using the letter and number keys to search the record library. Use backspace to delete.

Highlight the chosen track and use the F1, F5 or F9 keys to import to a chosen deck, and begin mixing/scratching!

Deck controls

Deck 0Deck 1Deck 2
F1F5F9 Load currently selected track to this deck
F2F6F10 Reset start of track to the current position
F3F7F11 Disconnect turntable control
F4F8F12 Reconnect turntable control

Turntable control is automatically disconnected when the end of the record is reached (ie. the music will continue to play). Replace the needle back near the start of the record and press the reconnect button.

Other controls

=Zoom in audio display
-Zoom out audio display

Troubleshooting

Software won't load

Read the error message in the terminal carefully. This should be reasonably descriptive in working out the problem.

Check you have the right libraries available and are on an x86 Linux system. Use ldd xwax to see if any are missing.

I get some kind of ALSA audio device error

You need to give a valid ALSA device name. This varies depending on the style of audio interface. The command aplay -l gives a list of available devices by card, device, subdevice. Take a look at the examples in the next section.

If your device doesn't support 2 channel, 44100Hz audio, then it may be necessary to use an ALSA 'plug' to do a transparent conversion. Substituting hw for plughw in the device name is one way to do this.

Errors or no activity when importing a track

Check that you are providing a correct importer script, and that the programs it calls are available on your system (eg. mpg123, cdparanoia etc.). Open the import script in an editor to see the requirements.

Everything is all in red, not green!

It's most likely that you're scratching silence, and importing the track has failed. See above.

Track loads, but won't play

Check there is audio coming through the input. The should be a strong circle in the timecode scope. Without this, xwax has no incoming audio to decode. If there is no display at all, check your audio mixer settings are using the correct capture device (eg. line in).

If there's a display in the timecode scope, but not a clean circle, check the condition of the stylus, turntable balance and cables. Also check xwax is connect to the right audio and not some music from elsewhere.

The audio is skipping

Make sure you are running so that xwax can prioritise the audio playback thread (see above).

Try increasing the device buffer sizes (-m for ALSA devices, -f and -b for OSS devices). See xwax -h for a description of these flags.

When I drop the needle to the middle of the record, the music plays from the same point

This behaviour is similar to the 'relative positioning' of some other systems. It happens when the timecode position cannot be read from the vinyl, but speed and direction can

Ensure that you see a number in 'timecode:' of the timecode info. If this is intermittent, the vinyl might be in poor condition — check for a clean circle in the timecode scope. If you see nothing at all, check you have the right vinyl (ie. Serato 2nd Edition) and are using the right side. You can set the timecode you would like to use using the -t argument.

It's skipping around and/or playing backwards!

Check your cabling, and that left and right channels are not reversed. Look for a clean circle in the scope display to show the condition of the audio input.

Why the limit of 3 decks?

The core of xwax supports as many decks as you can throw at it. Sadly there aren't enough keys on the keyboard(!)

Reference commands

These examples are not guaranteed, but should serve as a good reference to see how things are achieved on similar systems. In particular, the examples below skip the internal soundcard and use the second audio device (hw:1).

The Stanton ScratchAmp v1 contains two separate audio interfaces. ALSA 10.0.15 is required:

$ xwax -m 2 -a hw:1 -a hw:2

Same as above, using kernel OSS emulation

$ xwax -d /dev/dsp1 -d /dev/dsp2

The Rane SL-1 (Serato Scratch Live interface) is a single ALSA 'card' with multiple devices. The driver is new with ALSA 10.0.15:

$ xwax -a hw:1,0 -a hw:1,1

The Echo Layla 3G has all analogue channels on a single device, so it is necessary to call xwax with subdevices. In this example, there are three decks (tested on ALSA 10.0.15):

$ xwax -a hw:1,0,0 -a hw:1,0,2 -a hw:1,0,4