Skip to content

XMMS2 as a DJ station

Erik Massop edited this page Nov 4, 2017 · 1 revision

Why?

DJing is fun! XMMS2 hacking is fun!

How?

                            +--xmms2d--+      +--headphones                            /            \     |    controldevice--client--+              +--jackd--speakers                      |     \            /     |                      |      +--xmms2d--+      |                      +------------------------+

Xmms2d

Two or more xmms2ds each listening to a unique ipc socket, and using jack as output plugin. The xmms2 effect layer provides means for implementing all important DJ features like changing speed and equalising. A sophisticated equaliser already exists.

Jackd

When running in realtime mode latencies of 2.9ms are easily achieved for a fairly modern computer. It's easy to manage the diffrent streams. Some scenarios:

  • Selecting what audio streams go to the speakers and what streams go to the headphones.
  • Connecting the output stream to an oddcast server enabling listeners from all over the world to hear your crazy mixes over the Internet.
  • Connecting the output stream to a recording program that stores your mixing session for later review.

Client

A client capable of controlling two or more xmms2d's from a DJ friendly GUI.

Control Device

There are lots of cool hardware DJ controllers out there. Some using MIDI, some using USB joystick/keyboard protocol.

Then what?

The development of a DJ client implementing the above items is in the works by Daniel Svensson and will hopefully grow somewhat usable during this summer. A test client that demonstrating the use of two xmms2d's connected to jack and a midi controller exists but main development starts when school ends (2:nd of June). There are a couple of technical issues that needs to be resolved, explained below.

Phase Vocoder

Juhovh has written a phase vocoder effect that allows for changing speed but keeping tone. On todo is to convert the code into an xmms2 xform effect plugin.

BPM Detection

Find a library suitable for BPM (beats per minute) detection. Maybe parts of BpmDJ could be turned into a library for this purpose. This will be performed clientside using the visualisation API.

Cueing

To find a cue point xmms2 needs to loop on a sample. This is not something that will be implemented in the server but instead could be done by seeking to a specific sample. To do this the clientlib API must be extended to signal playsamples updates, and the audable artefacts you get when seeking this much must be found and resolved.

Waveform preview

When loading a song in one of the decks you expect a modern DJ application to show a waveform preview of the song, perhaps one zoomed in, following playsamples updates, and one overview. This should be cached for fast loading. When a song is loaded and it's missing a waveform preview xmms2d switches to null output for fastest possible decoding of the file, and the client chews the audio data and stores a low resolution preview on disk. This will be performed clientside using the visualisation API.

Radio

Further more this could be optimised for radio by having a custom jack/xmms2d client manage other inputs for incoming VOIP, external sources such as vinyl, cd players, tape players, and be intergrated with a usb mixing board for hands on control. This could become a complete solution for radio built with ruby/xmms2/EFL's edje and jack.

Clone this wiki locally