How to write a score

Gamelan Practice · back to the app

A score is a plain text file. You can write one in any editor, and the app plays it through the samples you recorded from your own instrument. Nothing about it is tied to a particular gamelan: it names your own numbers, and the app binds those to the bars you measured.

The one idea worth understanding first

Position is duration. There are no timestamps and no note lengths. A score is a row of beats, and where a note sits is when it sounds and how long it has. This is not a simplification — it is how the music works. Measured across a real performance, 77% of note gaps were exactly one beat and 19% were half-beat subdivisions; the rest were multi-beat rests. A beat grid and a tempo carry all of it.

A bar keeps ringing after it is struck, so a beat with no note is not silence. It means no new strike — the sound already in the air continues. Stopping a bar deliberately is a different event, and has its own mark.

Try it

Edit the text on the left. The right side is what the app will draw. Notice that none of the file's punctuation appears on screen: register becomes dots, a subdivision becomes a beam, a rest becomes an empty beat.

what the app draws

The sample uses only unmarked degrees 1–5, so it plays on any five-tone instrument whatever its register layout. It is a made-up practice pattern for testing the app, not a traditional piece.

Anatomy of a score

# Anything after a hash is a comment.
name: Practice pattern      # shown when the score loads
bpm: 100                   # beats per minute — required
style: jv                   # dot convention for display only

[A] x2                       # a section, played twice
1 2 3 5 | 3 2 1 .           # four beats, a bar line, four more

A header of key: value lines comes first, then one or more sections. Everything else is beats.

Glossary

you writeit means
3Strike the bar you labelled 3, in the middle register. One beat.
_3The 3 one octave down. Drawn with a dot below.
^3The 3 one octave up. Drawn with a dot above.
__3   ^^3Two octaves down or up. Stack as far as your instrument goes.
3-3Two notes sharing one beat, evenly. Drawn under one beam.
1-2-3-5Four notes sharing one beat. Drawn under a double beam.
.A beat with no new strike. The bars already sounding carry on.
*Damp: stop the sound on this beat. Not the same as a rest.
|A bar line. Read by people, checked by the app, never drawn.
[Name]Start a section.
[Name] x3Start a section played three times.
[B] = ASection B is another copy of section A.
[B] = A oct+1Section B is section A, an octave higher.
# …A comment, to the end of the line.

Your numbers, not anyone else's

The digits are whatever you typed on the Calibrate tab. If your instrument counts 1 2 3 5 6, write that. If its numbering runs opposite to pitch — so that 5 is the lowest bar of an octave and 1 the highest — write that too. The app never assumes a scale; it plays the bar carrying the label you wrote.

If a score asks for a bar your instrument does not have, the app says so when the score loads and leaves those notes silent rather than guessing.

Register, and why it is not written as dots

Register is written as _ and ^, never as a dot, because the two traditions disagree about what a dot means. In Central Javanese kepatihan a dot above means the octave above; Sundanese notation is the reverse. A file saying "dot above" would mean opposite things to two readers, so the file states the octave and the app draws whichever dot your setting calls for.

Register is also per note, not per section, because melodies cross octave boundaries constantly. In one real piece the same phrase appeared twice, an octave apart, and within each statement it straddled the boundary — some notes in the middle register and some below.

Try these in the editor

bpm: 100
[low]
_5 _4 _3 _2 | _1 . . .
[middle]
5 4 3 2 | 1 . . .
[high] = middle oct+1

Rests, holds and damping

Three different things, easy to confuse:

.No new strike. Whatever is ringing keeps ringing. This is what most gaps in gamelan actually are, and it is what a rest in this format means.
*Damp. You stop the bar with your hand. A real action, a real sound, and audibly different from letting it ring.
—A held note needs no mark at all. A bar struck once and left alone rings through the following beats on its own; write the strike and then leave the beats empty.

Gatra and the bar line

Beats group in fours. The | you type is for your own eyes, but the app counts it: if a group between bar lines is not four beats, it tells you which one, so a miscounted line is caught before you hear it. A final short group is normal and never warned about, since a piece may end mid-gatra.

The app's ◀◀ and ▶▶ buttons move exactly one gatra at a time, which is why keeping the grouping honest is worth the trouble.

Tempo

Give either bpm: 100 or beat: 0.6 (seconds per beat). One is required. The speed slider on the Play along tab changes the tempo without changing the pitch, because a score is played from samples rather than stretched from a recording.

Letting the app write a score for you

You do not have to start from a blank file. On the Play along tab, transcribe a recording of yourself and press Save as score. The app writes out what it heard, in this format, and works out the tempo, the rests and the subdivisions.

Worth knowing what that file is: the onset times are measured, but the beat grid is inferred. Every generated score states its own fit in a comment at the top — the quantisation residual, in milliseconds and as a percentage of a beat. A small residual with playback that still sounds wrong points at the samples. A large residual points at the grid, meaning the performance does not sit neatly on a beat. Either way you learn something.

When something is wrong

messagewhat to do
needs a bpm or beatAdd bpm: 100 to the header, above the first section.
cannot read note "x"A token the app cannot parse. Degrees are letters or digits, optionally led by _ or ^.
empty subdivision slotA dangling hyphen, as in 3-. Each side of a hyphen needs a note.
unknown section modifierOnly xN and oct+N / oct-N follow a section name.
refers to unknown section[B] = A needs a section actually called A, spelled the same way.
cannot also have a bodyA section defined as a copy of another cannot have its own notes.
gatra group not 4 beatsA warning, not an error. Count the beats between your bar lines.
Gamelan Practice · back to the app · free software under the GNU AGPL v3 · source code