The default program which plays sounds, as directed by the Drum Master hardware.

Requirements:

-Python 2.5 (http://python.org/download/)
-Pygame 1.8 (http://www.pygame.org/download.shtml)
-wxPython 2.8 (Tested with Unicode; Ansi may work as well) (http://www.wxpython.org/download.php#binaries)
-pySerial 2.3 (http://pyserial.wiki.sourceforge.net/pySerial)
-Working USB / Serial drivers (included with Arduino software)

Quickstart:

Run the program in whatever method you normally run python programs on your operating system.  If you don't have the Drum Master hardware connected, use the --keyboard flag.  If Drum Master is connected, but not at '/dev/tty.usbserial-A200294u', change this line in slave.py to whatever device name your operating system has given the Arduino.

Once you start, you will see a GUI screen, with some default values.  To start playing, you will need to map the pads to samples using three levels of abstraction: Hardware, Logic, and Samples.

To edit Hardware, go to the Edit -> Hardware menu.  Here you will see a series of text boxes, numbered 0 to 39.  These correlate to the analog inputs 0-31, and the digital inputs 0-7 respectively.  For each pad that you have connected, you should fill in the Pad name and Zone name.  The pad name is generally the same for all zones in a pad.  For instance, a pad name may be 'Ride 1', with the zones called 'Bow', 'Edge', 'Bell', and 'Mute'.  While you can call the pads whatever you want, it is recommended to name them in relation to the actual physical pads.  You could also name them by port number (Right 0, Right 1, etc), but that can get confusing.

Once you have added all the hardware, you can now assign logic functions to it.  Go Edit -> Logic.  For each of the hardware zones, select a logic function, and possibly options.

Finally, you can select samples for a kit.  From the pulldowns, select the instrument (folder names in sample folder), and sample name (.wav files in the given folder).  Note that the .wav files are grouped together, with a two digit sequence before the .wav extension.  For instance, the sample for the Bell zone would be called 'Bell01.wav', 'Bell02.wav', etc.

Now you can either play, or, if you used the --keyboard option, you can type the Drum Master messages in the console.  For instance, to play zone #24 at full velocity, type '24:1024' (without the quotes) and hit enter.


A note about samples:  Currently (at least when using the pygame sound library), you must have your samples set to 16 bit signed stereo at 44100 Hz.  You can convert them to this format by using the sox command:
	sox infile.wav -s -w -c 2 -r 44100 outfile.wav

You may be able to play samples in other formats, but in my experience, it is hit and miss.