SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

Trommler version 3.0 - X11 Drum Machine Copyright (C) 1998 - 2002 Robert Muth <robert at muth dot org>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of June 1991.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program in form of the file COPYING; if not, write to the

Free Software Foundation, Inc. <http://www.fsf.org> 59 Temple Place, Suite 330,
Boston, MA 02111-1307 USA

$Id: README,v 1.10 2004/05/07 22:18:50 muth Exp $

Short Description

Trommler is an X-windows based drum machine with the following features

  • Graphical user interface based on the gimp toolkit. (http://www.gtk.org)
  • Use of 16 bit 44100kHz mono drum samples
  • Realtime audio output using the /dev/dsp device on linux machines
  • Alternatively, audio output to file
  • Variable number of beats per pattern
  • Volume adjustment of drum samples
  • Stereo panning of (mono) drum samples
  • Environment variable "TROMMLER_DRUM_DIR" for drum sample directory

Credits

  • Stereo panning by David Orme <djo at coconut-palm-software dot com>
  • Muting by Jani Nurminen <jnurmine at lut dot fi>
  • Misc improvements by Stefan Braun <braun32 at attglobal dot net>
  • Documenation by Hans <hansfong at zonnet dot nl>
  • GUI improvements by Simeon Berkley <simeonb at bellsouth dot net>

Updates

If you want receive email about future Trommler version please sign up at Trommler's Freshmeat page at:

http://freshmeat.net/projects/trommler/

While you are at it, please write a comment or rank Trommler.

Compiling Trommler

The distribution comes with a binary "trommler". Just starting this binary should work in most cases. Because of space problems the binary is dynamically linked and you will need a recent version of gtk (see next section).

If you have downloaded the Trommler tar file and the binary provided there does not work for you or you want to modify Trommler you need to recompile it.

Before you type make, say "make dep".
You will need the gimp toolkit header files and libraries to compile and link Trommler. If the compiler complains about the functions `gtk_entry_set_max_length' and `gtk_entry_set_editable' being undefined you need to get a newer version of the gimp toolkit.
If 'gtk_scrolled_window_add_with_viewport' is undefined you can try to use 'gtk_container_add' instead.

Running Trommler

Before you run Trommler make sure that your environment variable TROMMLER_DRUM_DIR points to the subdirectory "Drums" or otherwise trommler cannot load the drum samples used by test song in the the "Songs" subdirectory. Always omit the trailing "/" when specifying a path with TROMMLER_DRUM_DIR.

Later you can change TROMMLER_DRUM_DIR to point to an arbitray directory. Path names of drum samples will encoded relative to this directory.

You can specify a song on the command line to be loaded by trommler. Trommler also understands default gtk command line options and the -geometry option. The option -nosound will keep trommler from using your soundcard.

Getting Started

The Trommler interface comes up with 32 empty tracks. Each track has the following items (from left to right): track number, volume control, panning, mute/unmute, track name, 4 measures with 4 beats each.

First off you will need to load drum samples. (if you load a song and the path are set correcty, this step may be skipped). Click on the track number and the pop-up menu will give you a choice of loading, clearing or swapping a sample. After loading a sample you can name the track as you wish, because this is not done automatically. Set the volume and make sure the track is not muted. You can now depress the rectangles in the measures where you want the beat to be.

The bottom of the interface contains the play options (Nothing, Pattern, Range, Song). Depress Pattern and the riff you just created will be looped continuously. If you don't hear anything check speakers, volume settings and sound drivers of your box.

Taking It Further

The concept of Trommler is to build songs, which in turn are build up of patterns. An example of a song might be: 1. intro, 2. riff, 3. changeover, 4. riff, 5. outro. In this example there are only four different patterns. The top of the interface houses the options for patterns (from left to right): pattern number, pattern name, number of units (or measures if you prefer), beats per unit (measure), rotating the riff, copying another pattern into the current one.

To build a song first build the four different patterns. Select pattern 0, build the intro and name the pattern. Now use the arrow buttons to switch to pattern 1, build the riff and name the pattern. Do the same for the changeover and outro.

Now that you have all the different patterns ready you can put the song together. Just below the tracks are the song options (from left to right): song name, number of measures, beats per minute, set first measure of song range, set last measure of song range. Our song name is 'example' and we have five measures in our song, so we use the arrow buttons to make that choice. You will see that the five measures appear just below the song options. You can now link the patterns with the measures by entering the number of the pattern in the text box. In our case this would be 000 -> 0, 001 -> 1, 002 -> 2, 003 -> 1, 004 -> 3. To hear the song depress the radio button Song in the play options. Lastly we will save our masterpiece.

Obtaining The Gimp Toolkit (GTK)

The gimp toolkit is available from http://www.gtk.org. Most linux distribution should come with it, though. You will also need glibc.
Trommler is known to work with version 1.2.x.

User Interface

The userinterface has undergone many changes. Currently Trommler uses the gimp toolkit gtk. Trommler should be fairly self-explanatory, tooltips are provided for some features.

The special drum name "@ACCENT" will superimpose its volume on other drums played simultaneously with "@ACCENT".

Samples

Trommler uses 44100Hz 16 bit signed mono samples as input. but as of version 2 (and higher) will produce 16 bit signed STEREO samples as output. (this implies that it is not possible to feed back samples into Trommler)

A few samples are provided in the "Drums" subdirectory. You should use the environment variable "TROMMLER_DRUM_DIR" to point to this directoy. Use an absolute path and avoid a trailing "/"!

In order to convert other sample formats to the raw format used by Trommler use the sound file convertion tool sox:

wav -> raw

sox infile -t raw -c 1 -r 44100 -s -w outfile

If the source file is a 44100Hz Mono wave file with extension ".wav" you should use the included wav2smp instead. wav2smp will also properly normalize the sample (see below)!

If you want to convert a sample produce by Trommler into a wave file you need to run sox in the following way.

raw -> wav

sox -t raw -c 2 -r 44100 -s -w infile -t wav -c 2 -r 44100 -s -w outfile

Please not that while the drum samples are mono, the samples produced by trommler are stereo!

The following sites provide a good collection of drum samples.

http://spec.ch.man.ac.uk/~ashley/drums.html http://hem2.passagen.se/lej97/kalava/drumkits.html http://volftp.tin.it/soundwave/free.html http://tilt.largo.fl.us/samples/samples.html http://www.hyperreal.org/music/machines/

The program playsample provided with Trommler can be used to test your soundcard and the samples:

./playsample sample-file1 sample-file2 ...

Some samples available on the web are not "normalized" or "zeroed" properly. Trommler uses signed 16 bit samples, hence zero denotes silence. A misbehaving sample might use 500 to indicate silence instead. This will lead to nasty clicking sounds. To fix this look at the biginning and the end of the sample if the values are far away from zero, eg. 500, you need to substract 500 from all sample values to obtain a properly zeroed sample.

Soundcards

The program playsample (mentioned above) can be used to test whether Trommler works with your soundcard.
Even if it works there might still be problems. Eg. sound output might be jerky if there is a lot of system activity going on or if the bpm setting is extremely high or extremely low. A quick fix is usually obtained by playing with the way the time interval is computed for the sounditerrupt routine "SoundTimerInterrupt()" in "gui.c". Saving sound into a (sample) file should always be fine, though.

If there are problems with your soundcard or you do not have any at all, you can run trommler with the -nosound option.

Song Description File Format

I have not had time to document the format. It is an ascii text file and fairly self explanatory.

A test song is provided in the "Songs" subdirectory.

Glossary

Song
A sequence of measures. The length of a song is its number of measures.
Measure
Part of a song. A pattern is assigned to a measure.
Pattern
Main object in Trommler describes which drum is played at what time.
Drum
Percussion instrument that can be played in a pattern.
Range
A continuous sequence of measures in a song.
Unit
Each pattern is subdivided into units. A unit roughly correspods to the numerator of fraction indicating the kind of rhythm use. Eg. a Waltz has 3 units, most other songs probably 4. The speed of a song/pattern is controlled via the units.
Beat
Each unit is subdivided in to Beats.


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.