Drum Master

DIY Electronic Drum Brain

 

Slave Software

The Drum Slave software is written in Java, and provides a pluggable platform allowing for multiple sample mappings, easily configurable kit setup, etc. In essense, this software reads a hit from the serial port, and plays a sound correlating to that sensor. It sounds simple, right?

Actually, it is simple. Most configuration functions can be accessed via GUI configuration screens, and the logic is modular enough to let you add / modify your own classes with relative ease.

I use JOAL (a Java implementation of OpenAL) for sample playback, (and I have also implemented a semi-functional proof of concept Sample implementation using the Java media framework). If you have a favourite sound library you wish to use, however, it is quite easy to make your own implementation - just implement the Sample abstract class.

Serial communications are handled by RXTX, a cross platform JNI implementation of Serial communctions for Java.

In order to run this software, you will need the following:

Depending on the distribution used, you may have some of these included already.

You can download snapshots below. In general, you will likely want to download the most recent version, unless you have a specific reason to do otherwise.

You can also pull the latest code from git (see below for details).

The OSX distributions (the .dmg files) are a self-contained Macintosh application package, which should run without anything special other than OpenAL client libraries (which must be installed to the OS itself, and can't be included in the package). The generic bundles (the _All.zip files) contain the needed .jar files and all libraries for all platforms. There are currently stubs to start drumslave (drumslave.bat and drumslave.sh), but these currently do not work. You will need to launch manually using the console and something like the following (all on one line): java -Djava.library.path=./lib/osx -Xmx1024m -cp ./lib/drumslave-2.0.1.0.jar:./lib/gluegen-rt-joal-1.1.2.jar:./lib/joal-1.1.2.jar:./lib/moss-collections-2.0.1.0.jar:./lib/moss-common-2.0.1.0.jar:./lib/moss-swing-2.0.1.0.jar:./lib/quaqua-5.2.1.jar:./lib/RXTXcomm-2.2pre2.jar:./lib/xstream-1.3.1.jar ca.digitalcave.drumslave.DrumSlave

Currently Drum Slave will look through all common serial ports and use the first one it finds. If it does not find your serial port, please let me know what the port name is (e.g. /dev/usbtty0 on *nix). This should be the same device which the Arduino software connects to. I do not know what form this is under Windows, so chances are Windows will not find the correct port at this time.

When you first start, you are prompted to configure your pads. The details here will depend greatly on your hardware configuration. However, to give you an example of what can be done, I have included my configuration. To use it, unzip and extract to your configuration directory (on OSX it is ~/Library/Application Support/Drum Slave; on Windows it is C:\Documents and Settings\Username\Application Data\Drum Slave, and on other platforms it is ~/.drumslave).

I have also released a few samples whose licenses allow it. These samples are copyright the original authors, and are released under the terms listed by the author. A readme file is in each folder, describing the samples, the author, and where I got them from. If any of the authors has a problem with me redistributing them, please let me know and I will remove them. Included in this sample pack are some TR 808 samples, various drums, and some cymbals.

Screenshots

Below are some screenshots, as of June 26th 2009. There are four main windows in the Drum Slave software. First, we can see the main window, which includes per-pad volume adjustment:
Main window

Next we can see the hardware configuration screen. Here you map logical names to each of the Drum Master's analog (0-31) and digital (0-7) channels:
Hardware configuration window

Next we have the logic screen, where you can assign python functions and set mapameters for each of the pads.
Logic configuration window

Finally we can see the sample assignment screen. This allows you to assign samples to each of the pads. The first pulldown correlates to folder names in the samples folder; the second pulldown correlates to file names.

Samples configuration window

Python version

When I first started this project, I was using Python as the slave software, because of the simplicity in talking to a serial port in Python. However, in May 2009, when I was working on improving my drum set by using a rack mount system, I decided to do a complete re-write of the slave software. As discussed above, I am now using Java instead of Python (mostly because of my familiarity with Java - Python is a great language, but I am far better at programming in Java). For information about, and downloads of, the original software, please see the Drum Slave version 1 archived page.

Pulling Git Code

To pull the latest code via git, use the following commands: git clone http://git.digitalcave.ca/java/ca.digitalcave.drumslave.git drumslave

Once you have the git repository already cloned, you can update it using the command: git pull origin master