# Marathon Devlog 2: Text Command

Hey there, I’ve added a new, very useful preset to Marathon this week so I figured I might as well write a post about it. I added preset “99”, which is text command. Before now, you had to create a MIDI file by yourself, using an external program, and Marathon was really fragile about that. So, for now, I suggest to stay away from preset “1” and try “99” when creating custom beats, unless you are certain that your procedure for creating MIDI files is tolerated by the program.

With Text Command, you can write out rhythmic patterns that the program will translate into MIDI notes. Here is what is prompted once you choose preset 99:

Enter text notation for track 1

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

Notes
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

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

Rest (at the end)
r

Enter text command (track 1):

A similar prompt will appear for track 2. One of the main and only requirements is that the two commands should have the same number of notes. Without that, interpolation between note pairs can’t be achieved and the program will quit. What constitutes a note, in the program’s eye? Simply, a string of text. Different notes will be divided by the space that separates them. That means that a tied note (two notes linked with a dash) will be seen as one note, because it’s a single “NoteOn” and “NoteOff” event. For example, a half note can be written as h or q-q (similarly, it could also be written out a myriad of other ways, such as q3/2-q3/2-q3/2 or q.-e). In short: notes separated by a dash will count as one.

Other than that, you can easily create most rhythmic patterns you can think of. Since it doesn’t keep track of measures and adds the note lengths with tick values directly, you can easily write incomplete tuplets, as would happen in non-dyadic (a.k.a. “irrational”) time signatures like $$\frac{5}{7}$$ or $$\frac{2}{3}$$. Couple that with the tied notes, and you can create pretty much any note length you can think of. The only limitation here is that note subdivisions only go as far as thirty-second notes. If you need to use smaller subdivisions of time, I suggest you double every note value and then the tempo too. In any case, once you have your MIDI file, it’s easy to import it in a digital audio workstation (DAW) and modify it.

Speaking of tempo, I didn’t include it in Marathon, since it doesn’t matter. MIDI works with beat resolution—in this program 960 ticks per beat, the highest resolution possible—and this value doesn’t change whether you play it at tempo 20 or 400. Just import the program’s MIDI output into your project, and it will automatically synchronize with its tempo.

Since Marathon is mainly about rhythm, I didn’t add note height to Text Command. The output is, by default, on MIDI note 60, which is usually C4. Feel free to alter this as you wish and modify the MIDI output to create distinct harmonies or chords; anything you can imagine.