TkRhythm

Usage

Rhythmex is designed to create rhythm exercises for music students. This program displays a sheet of music containing random rhythmic patterns and plays the notes on a MIDI synthesizer on your computer. If desired, the music can be saved as pdf files and MIDI files. The pdf files can be read by other software and sent to a printer, producing copyright free music exercises. The program runs on all platforms where tcl/tk can be installed (for example, Windows 98/2000/XP, Apple Mac, Linux, Unix, etc.).

Good proficiency in sight reading and music transcription is a requirement for most university level music programs. Developing these skills requires regularr practice. Working alone with a rhythm exercise book is quite tedious and it is easy to reinforce one's mistakes.

Assuming you have succeeded in installing this program with its support software, the program will display the following tableau.

tksolfege console

Each checkbox is associated with a rhythm pattern equivalent to one quarter note. Check or uncheck the boxes to select the rhythm patterns that you wish to concentrate on. (When you start the program, tkrhythm makes a random selection of several patterns.) Now click the create button and after a couple of seconds a new window appears, displaying a short rhythm exercise.

music

Your goal is to try to clap or tap this rhythm at an even beat. To check your accuracy, click the play button (which is no longer disabled) and you should hear this rhythm played on your speakers. It might be helpful to tap the rhythm along with the computer to check your accuracy.

Using this tableau of rhythm patterns, you can create music of any level of complexity. When you get tired of simple time, you can switch to a new tableau containing compound rhythm patterns. Tempo, key signatures, musical instruments, and the number of tied notes can be changed as described below. If you click on the radio button labeled compound, the tableau will be replaced with a new set of rhythm patterns designed for compound time signatures like 12/8.

If you are running the program for the first time, it is likely that it may require further setup in order to run properly. See the installation notes near the bottom of this page. Tkrhythm, depends upon external programs to do much of the work and if these programs are in nonstandard locations you will need to configure it using the configure/setup menu button. Clicking that button displays the following window.

setup

The first four lines contain links to the helper programs that are required. If these programs are not in the same folder as this program or not in your current path list, it will be necessary to indicate the paths to these executables in the adjoining entry boxes. For your convenience clicking the buttons allows you to browse your file structure for these programs. Once the program has been setup correctly it will not be necessary to return to this window. The last entry, save folder indicates the folder where to store MIDI and pdf files that you may wish to keep for later work.

To configure the time signature, beats per minute and other parameters you need to click on the menubutton configure/output, which will open the following window. output

Beats per minute controls the tempo at which the rhythm is played. If you are having difficulty, it is a good idea to slow the tempo and count the beats or beat divisions in your mind.

Beats per bar selects the time signature. You can choose between 2/4, 3/4 or 4/4 for simple time and 6/8, 9/8 and 12/8 for compound time depending upon the tableau you have selected.

The complexity of the rhythm can be increased by introducing ties. Check the tie box and select the fraction of beats that can be tied together using the slider.

The program can create rhythm exercises for two voices. If you create an exercise for two voices, you can play the top line while you clap the second line. Select the number of voices, by ticking the appropriate radio button. If you select two voices, voice 1 will be the top line and voice 2 will be the lower line. If you select one voice, only voice 1 will be used.

The instruments used to play the rhythm or the count-in beats are selectable; but be careful, not all instruments are suitable. To select the instrument and pitch for voice 1, click the button labeled voice 1 parameters which will open the following window.

voice 1

The pitch is indicated in MIDI units where middle C is 60 and the units shift in steps of semitones. Thus C# is 61, B is 59, C above middle C is 72. If you are playing two voices, you should make the pitch of the first voice higher than the second voice and use a distinct instrument. Clicking on the instrument button, here labeled Honky-Tonk will open a program list menu shown next.

program

Clicking on any instrument on this list will change the instrument for that voice. Note that this same listbox, can be used to change the instrument for voice 2 or the leadin instrument. The little label on the top indicates which voice it will apply.

Installation Notes

The program requires the ghostscript package, which you will need to install separately if it is not already on your system. The package is obtained from the web site http://www.cs.wisc.edu/~ghost Select the latest stable release, either AFPL Ghostscript or GPL Ghostscript. This will send you to one of the mirror sites where you can find the executables or sources for your system. For Windows the executables file may have a name similar to gs860w32-gpl.exe or gs860w32.exe. Download this file and run it to install ghostscript. You do not require gsview to run this program.

The program also requires a MIDI player, which usually comes with your sound card. If you running Windows, it is recommended that you also install winamp. The free version is adequate for your purposes. On other operating systems, you can use the TiMidity++ package. TiMidity++ requires a SoundFont file or other audio patches.

If you are running the Windows version and installing the executables, you are finished. The other executables abcm2ps and abc2midi are included.

For other operating systems you will also need to get the sources for abcm2ps and abc2midi and compile them on your system using a GNU compatible C compiler. You can find executables and source code from http://abcplus.sourceforge.net, http://moinejf.free.fr/, and ifdo.pugmarks.com

You also need to configure the program using the configure/setup button so that it knows where to find these programs.

You also will require the glyph/ folder which is found in tkrhythm.tar.gz.

If tcl/tk is not installed on your system and you do not wish to install it, then you can download tkrhythm.kit and place tclkit in any folder specified by your PATH environment variable. Tclkit is obtained from www.equi4.com/tclkit.html. Make sure to rename the file to tclkit.exe (eg. rename tclkit-darwin-ppc tclkit). Tkrhythm.kit should start up tclkit which will load and execute tkrhythm.kit.

If tcl/tk is installed on your system, then tkrhythm.tcl should start up "wish" which would load and start tkrhythm.tcl.

Programmer's Guide

The program creates an abc music notation file named out.abc. (Abc is an open source music notation format which is stored in a text file and easy to read. There are a lot of shareware and freeware programs that read these files and there is a lot of Celtic music available in that format. See abc home page.) It calls upon abc2mps to convert this into common music notation in the form of a PostScript file named Out.ps. In order to view this file in a tcl/tk canvas, this file needs to be converted to a Portable Greymap file out.pgm which is read in by TkrRythm. The conversion is done by the program called gs which is part of the ghostscript package. Gs also converts the PostScript file into a pdf file, out.pdf, for which there are free viewers such as Adobe Acrobat (If you run Windows, it is very likely that Adobe Acrobat is already installed on your computer, since a lot of software comes with documentation in pdf format and an Adobe Acrobat installer.)

All of this is done automatically when you press the button labeled create, but only if the program finds the other utilities. If nothing happens, pressing the keyboard combination Alt-c will display a couple of message windows with hopefully useful information.

Prior to creating a MIDI file, the program copies the out.abc file onto a new file called outm.abc inserting additional MIDI information (eg. tempo and MIDI instruments.). The MIDI file called outm1.mid is created from the file outm.abc using the program abc2midi. The output MIDI file is sent to the MIDI player which you have selected.

If you click the save button, the output MIDI files and pdf files are renamed to a name you have selected and placed in the folder that you can specify in the configuration window.

Again this is done automatically for you when you press the button play . If this does not happen, you can press the Alt-c combination to get more information. All the configuration information that you set up in the program is stored in a text file called tkrhythm.ini, so you do not have to set it up each time you run the program. The tkrhythm.ini file is created when you exit from tkrhythm.ini. If for some reason this file becomes corrupted and tkrhythm fails to start without error, you can delete tkrhythm.ini and the program will start with the factory settings (i.e. in the state it was when you ran it for the first time.)

Advanced Features

Certain features designed for the teacher or administrator are only accessible by editing the tkrhythm.ini. Setting lockconfig to 1 will suppress displaying the config/setup menu item. Setting lockconfig to 2 will in addition disable the automatic update of tkrhythm.ini whenever the program exits. Setting nosave to a nonzero value will permanently disable the menu save button. Temporary files such as out.abc, out.pdf, out.pgm, out1.mid, and outm1.mid can be written on a folder specified by the path name in assigned to the temp_path variable. If nothing is assigned to this variable, then these temporary files are written in the same folder where tkrhythm is executed. If the variable repeatability is nonzero, then an addition config item allows you to set the seed to the random number generator. More details are given in the tksolfege documentation.

Seymour Shlien
seymour.shlien@crc.ca