Marathon is a program to help musicians create microrhythms. You can read more about microrhythms here and here.

The program can easily create MIDI microrhythm tracks that can serve many purposes, like a click track for music practice and improvement on micro- and xenorhythms
or a template for microrhythmic composition on MIDI. Besides microrhythms, Marathon can also create regular rhythms as well as n-tuplets of any sort which can then be superposed on a steady grid.


You can download a standalone version of the script for your operating system below, just double-click on it and it will run.

Marathon (Mac OS X) 2019-04-20 (6.7 MB)

Marathon (Windows 7 and above) 2019-03-18-3 (7 MB)

Marathon (Linux) – (Coming soon)

Github link


What Does It Do?

Marathon is a program to help people play with microrhythms. The program creates a midi file with a series of hits on one note. The prime objective of Marathon is to give the user a reference pattern for playing microrhythms. For example, one can use the midi output to create a click track to which practice, or decide to develop it into a full-fledged composition.

How to Get Started

Getting to use Marathon is very easy. Unzip the compressed file and double-click or open it. It will install what it needs to function on your computer and you will be greeted by the first menu, a list of preset beats.

Marathon: Microrhythm Generation Software

Choose preset

1: Swing (2(q) / q. e)
2: West African Triplet (3(q) / e 2(s))
3: Gnawa Triplet (3(e) / e s e)
4: Brazilian 16ths (4(s) / e 2(s) e)
5: Braff's Quintuplet (5(s) / e 2(s) e s)
6: Viennese Waltz (3(q) / e. s-q q)
0: Text Command

q: Quit Program

Enter number: 

If you choose number 1, you will have a second list of preset beats, but presets 1 to 6 eventually ask you for two morph values for the selected pattern. Entering 0 means that the first pattern is unchanged, while entering 100 means that for the second one.

If you enter the same value twice—for the starting and the ending—you will get a punctual microrhythm. That means that the morph will remain static throughout the length of the output file. If you enter two different values, you will make a linear microrhythm, that will gradually move from the first to the second morph value. This is an important feature to give different degrees of energy to the same beat, for example, or to move fluidly from one pattern to another.

Finally, you will be asked for the number of repetitions of the pattern you want. This will also affect how quickly the morphing value shifts from the starting value to the ending one.

When all is done, your midi file should be found in the user’s root directory. If you have trouble finding it, just search your computer for “marathon_out”, and you should stumble upon it. Each time you create a midi file, it will have a different name, so you can create multiple files before importing them in a software.

After successfully creating a file, Marathon will go back to the first menu for a new cycle.

Text Command

Presets 1 to 6 are prearranged patterns. This can be very helpful, but you may need to create your own patterns to get what you really want. If you’re not satisfied with the previous presets, enter 0 and a whole new world opens to you.

w: whole note
h: half note
q: quarter note
e: eighth note
s: sixteenth note
t: thirty-second note

Dots (after the note)
.:   dotted
..:  double dotted
...: triple dotted (and so on)

Tuplets (after note and dots)
x/y: where x-tuplet notes are to be played in y non-tuplet notes

Rest (at the end)

Single Note Repetition
x(note): where x is an integer and "note" is the repeated note

Separate each note by a space, tied notes with a dash

Enter text command (track 1): 

This may look daunting at first, but let’s approach it one step at a time.

Here, you are asked to write your first pattern. Keep in mind that the second track will have to have the same number of notes, but it doesn’t have to represent the same duration. For example, the two tracks can be “q” and “e”, but not “q” and “e e”. Each note should be separated by a space, except for tied notes, separated by a dash.

Here, the letters represent the length of musical notes, from the 4-beat whole note “w” to the thirty-second note “t”. One letter is the most basic command, but you can add to it. For example, you can add dots after the note letter to add length to it, similar to how dotted notes work. After that, you can add a tuplet modifier, which will alter the length of the note. For example, “q3/2” note will represent one triplet quarter note, equal to two thirds of a regular quarter note. Finally, you can add the letter “r” if you want this note to be silent instead of played.

If you need to write the same note multiple times, you can place it in parentheses, behind a numerical value. For example, “8(e)” will give off 8 eighth notes.

When your two tracks are written out, you will be asked for the starting and ending morph values. This works just as with other presets.

Then, you will be asked to enter the tick value of the pattern you want.

w: whole note =        3840 ticks
h: half note =         1920 ticks
q: quarter note =       960 ticks
e: eighth note =        480 ticks
s: sixteenth note =     240 ticks
t: thirty-second note = 120 ticks

Enter the total tick value of the pattern: 

For our “8(e)” example, we’d like to set a tick value of 3840 ticks, equal to a whole note, or a \(\frac{4}{4}\) bar. If you would like your eight notes to fit within three beats instead, just enter 2880. This will shrink your notes down.

Finally, you will be asked for the number of repetitions desired, and your file will be created in the root directory.

If you experience any issues, please feel free to create one on Github.