You can find the latest release of
Courageous drummer scales
This document describes the history and the use of a pattern generator for drummers called "DrumPatterns". For the moment, we will only focus on the member coordination (arms and feet). Independence and polyrythm will be taken into account later.
To introduce the subject, the best is to try the program available online from the DrumPatterns Home Page, with its default values. If you are already a drummer, the score will remind you something. Download the midi file and play it with a midi sequencer.
What DrumPatterns is useful for ? Practicing drum patterns.
This little program is a interesting demonstration of what can be done with Perl, CGI.pm and the HTTP protocol.
The software archive can be downloaded with ftp on the site linux-france.com.
I start with an analogy with the written language. We write texts which are made up of paragraphs. Paragraphs are made up of sentences, sentences are made up of words and words are made up of letters.
When someone wants to become a drummer, he has to work lots of exercises, stodgy at first sight, that help learning words, the vocabulary. The analogy is limited because the letters (the alphabet) are only a few. These letters are the strokes done by both hands and feet, right and left. The vocabulary is not predefined, it is "free".
The goal is to generate all the possible words (patterns) from an alphabet (right hand, left hand, right foot, left foot, silence) and some work rules (max consecutive tricks, patterns length), proved by experience.
I enumerate here the tools and their creator which helped me to build this little software and this documentation. I thank them all. I cite only the creators, the people that have collaborated are as deserving as them.
Thanks to Stan Mulder for the quality of his Steve Gadd site and the inspiration he gave me involuntarily.
I also thanks Julien Cassaigne who, by his mathematical knowledge, gave me a remarkable method to estimate the generated sequences number. It is not the one I used because it needs a formal calculator, heavy to run on a web server.
Many thanks to Nat Makarévitch who agreeded without hesitation the presence of DrumPatterns on his excellent French site linux-france.
This software is protected by the GPL, the GNU Public License Version 2, in order to avoid to be ousted from it but I am really sceptic regarding any interest from a commercial compagny. The ugly drumpattern source code is in the bin/ directory.
I put this documentation under the opencontent license. This means this document is given without any warranty. You can use it, redistribute it, modify it, by respecting the following conditions: You have to clearly specify the nature and the content of the modifications, their date and keep the opencontent license in case of redistribution. If you sell it, you sell the medium, not the content. This is a summary, read the license to get more details.
A pattern, a combinaison, a word.
Originally, I was waiting for the announcement of a similar software on the excellent Steve gadd site. Steve Gadd is a red-hot and brilliant user of these basic scales. The site has been developed and it is still maintained by Stan Mulder. The url address is http://www.intrepidsoftware.com/sgadd/.
I have been waiting for several weeks but nothing came. So I wrote it myself. When I finally contacted Stan to give him my little program, he gave me the web address where was standing his. What a pity for me ! More, his program made more beautiful results than mine. I worked harder to offer a better interface and much more functionalities. Rivalry is beautiful !
This program has been sleeping for a time in one of my directories. Before putting it on line, I had to polish it because it can be very greedy for resources (CPU and especially the memory) and it can blow its running server brains out. I took good care to be sure that nobody could go beyond the interface and play with the server memory. I added a configuration file in order to allow the webmaster to adapt the beast according to the server availability.
The software drumpatterns runs only on Unix systems. Read the file INSTALL.
First, I will describe the graphic interface globally, then I will detail each part.
The interface presents in order :
The first, called "Go !", runs the computation and presents the results if they respect the limits defined by the Web Master.
The second cancels the last interface manipulation and replaces the values with those that fit the submitted results; it does not run any computation.
The last runs the computation with the default values, as though you were loading the page for the first time.
It is a table composed with 5 lines and 4 columns. The lines represent the 5 members. The columns define the rules applied to each member.
Each line defines the member behavior rules set. The 5 members are the right hand, the left hand, the right foot, the left foot and the silence. I know the silence is not a member but fonctionnally speaking this corresponds.
It just numbers the lines. Nothing else to say.
This column is made of toggle buttons. The button defines whether the member takes part in the generated sequences. Take notice that it is necessary to toggle at least two member in this column to make relevant results because the one member sequences offer few interest.
This column is made up with option menus, one per member. The chosen value (from 0 to 16) specifies the maximal number of consecutive strokes appearing in the sequences. It is useful to limit the exercises number.
Even if the toggle button that unselect the member is off, this value is useful. It is used to determine if an opposite sequence is good or not, regarding to this value. For example, if you choose the following parameters:
Right Hand selected, Max Selected = 2, opposite = L Left Hand selected, Max Selected = 2, opposite = R Sequence length = 4
the sequence `RRLR' is not good in the normal loop `RRLR RRLR' but it is good in the opposite loop `RRLR LLRL'.
This column is made up with option menus, one per member. The chosen value specifies the member to use to compose the opposite sequence. For example, if you choose left hand as the right hand opposite then the opposite sequence of `RLRR RLRR' is `RLRR LRLL'.
This option menu allows to define the sequences length. From 0 to 16. Nought is a value with no interest, it was included to check the program side effects, it has remained. Pay attention, beyond 5 the number of generated sequences can be very long to download. To estimate this time the table estimations can help you.
These are radio buttons. Choose the `character' mode or the `score' mode. The character mode is less greedy for place and is loaded faster than the score mode containing the images (You can compare the HTML source code in both case). But the score mode is very more readable. I thanks Stan Mulder for the trick (by an examination of his HTML) allowing to generate HTML scores with only 8 small images (look at the HTML source).
The program is exhaustive, it looks for all the possible sequences. This can reach 152 587 890 625 combinations (5^16, five power sixteen) that is to say 124 Tera-octets of HTML page ! You certainly understand that I muzzled it to avoid overloading the server that put them up. Having said that, you can use this program yourself and jump the gate by editing the configuration file. The estimation table is made up of 4 lines and 17 columns :
One time you've chosen a configuration and you've run a sequence computation you can save the configuration by using this link. You have two possibilities :
It is the time that figures out how long it takes to compute the sequences, without any formatting neither a looping. You can notice that this time is always really shorter than the total time where are included the formatting and printing time. This part is really well traited.
This is computed sequences number, without any loop.
The estimations about the length of the HTML pages are appraised by multiplying the line length by the number of lines. The line length can vary because some don't contain the marks <b> and </b> upon the sequence numbers. These are the sequences that do not respect the rules when they are looped with themselves or with their opposite and the numbers are not bolded. The estimate value is then always upper or equal to the real value.
They are the pertinent data of the program. You can see for yourself that the generated sequences number is twice the announced number of sequences. More, each sequence has a length twice the one chosen in the configuration.
That's normal. In fact, each sequence has to be worked out in loop.
First with itself and then with its opposite, knowing that the opposite of a sequence is the sequence of the opposite strokes. The opposite strokes are defined in the fourth column of the configuration table, see details on section The column `Opposite Members'.
It's the total computation time, included looping, filtering, formatting, and printing.
If you find a bug, don't hesitate to inform me. In the same way for the spelling and the grammatical mistakes of this document (a lot to be done). If you find that the source code is horrible and dirtily written then we are both to think the same thing. I intend to transform the code towards the object oriented paradigm but I fear to loose in efficiency what I'll win in quality and maintenance (seeing the computer hardware progress, my fear is light).
The program has been developed on Linux, in Perl. I've tested it on Solaris 2 and it should run wherever Perl runs , that is to say everywhere, even on the dark side.
I've tested it with the following browsers : Lynx, Grail, Mosaic, Mozilla, TkWeb, RedBaron, Qweb, Amaya, Arena, W3. Let me know your results. Here are mine :
Here is how I see the possible evolutions of the program. If you are interested , contact me, I can privilege the development of the part you prefer.
Midi file generation is an excellent medium in order to work this exercices with a Midi engine, without reading anything, at different tempi. I found tclmidi. It is a very good tool. I won't make one.
Nice scores in LaTeX, DVI, PostScript formats (A4, Letter, ...). Lilypond sounds very good.
Further variations. Accents are excellent to fix stroke control.
Here, more work in view, for me and for drummers. A code remodelling is needed. The opportunity to switch towards an object oriented architecture.
A complete rewriting in an Java applet would be saving for the server's ressources. There is also Python (Is Grail still so low ?), and PerlTk (easier because in PerlTk there is Perl and Tk)