The score model
This page covers the ideas behind the elements you have seen so far. No new file; just the model that makes the format work.
A measure is the fixed unit of time
Section titled “A measure is the fixed unit of time”Every part in a score agrees on how many beats each measure has. In the ลาวดวงเดือน tutorial file, every measure has four beats. One part may play four notes where another plays a note, two rests, and a group of three, but both parts occupy the same four beats.
A measure’s beat count is simply the number of its <note>, <rest>, and <group> children. There is no time signature or division count to set.
A note has no duration
Section titled “A note has no duration”In Western notation a quarter note and a half note differ in written length. In ThaiMusicXML every note occupies exactly one slot, and the slot is the duration. There is no <duration> element and no <divisions> system. A note sounds, and the next slot arrives.
This makes the grid simple: count the children of a measure and you know its shape.
A rest is no attack, not silence
Section titled “A rest is no attack, not silence”A <rest> means the instrument strikes nothing new on that beat. It does not mean silence. Thai instruments have no notated sustain: a Ranat Ek bar left ringing under a following rest is the instrument behaving, not a notation decision. The format trusts the instrument.
A beat arrives on its last slot
Section titled “A beat arrives on its last slot”In Western music (and MusicXML), a beat is anchored to its leading edge: the downbeat is where the note starts. ThaiMusicXML works the other way around. A beat’s position is where it ends. The notes before it lead up to it, and the last note in the group lands on the beat itself.
Reading four slots left to right:
slot 1 slot 2 slot 3 slot 4 ········ beat 4 arrives hereThis is the most significant difference from Western notation in the format, and it governs how groups subdivide a beat. Page 5 covers subdivision in detail.
ชั้น is not tempo
Section titled “ชั้น is not tempo”ชั้น (chan) is the Thai rhythmic layer system: ชั้นเดียว, สองชั้น, สามชั้น, and so on. It controls how often the ฉิ่ง cycle falls, not how fast the notes play.
<bpm> fixes the tempo. One bpm beat is half a measure, whatever the ชั้น, so a measure takes the same time wherever it falls and its beats divide that time between them. Going from ชั้นเดียว to สองชั้น at the same bpm stretches the melody over twice as many measures and stretches the ฉิ่ง cycle with it, so the strokes arrive half as often. The notes keep their rate. The song plays at the same speed with a sparser cycle underneath.
<chan> and <nathap> in <direction> are metadata: they record what the piece is, and carry that information to editors, libraries, and playback engines. A processor that ignores them entirely still sounds the score correctly, because the ฉิ่ง part is written out as an ordinary unpitched <part> rather than generated from the ชั้น value.
The renderer generates almost nothing
Section titled “The renderer generates almost nothing”A ThaiMusicXML file carries structure, not layout. The renderer draws the grid, places the notes, and shows what the arranger typed. It does not generate section headings, composer names, tempo markings, or repeat labels from the metadata.
section/@name, <composer>, <chan>, <repeat> are there for the file and the tools that read it. What prints on the page is what the arranger put into an <annotation> or a credit. If you want a heading over a section, you type it. If you want the composer’s name on the page, you write it in a credit. The format does not decide what appears; the arranger does.
This is a deliberate difference from MusicXML, where the renderer derives much of the printed output from the markup. Here the markup is the data and the page is the arranger’s work.
Coming from MusicXML
Section titled “Coming from MusicXML”| MusicXML | ThaiMusicXML | Notes |
|---|---|---|
<duration>, <divisions> |
No counterpart | Notes have no written duration. Each occupies one slot. |
<tie> |
No counterpart | Thai instruments have no notated sustain. A note ringing under a rest is the instrument, not a tie. |
<part-list> |
<ensemble> |
Lists parts with <part> elements. |
| Partwise / timewise | No equivalent | There is one arrangement, not two layouts of the same data. |
<time> |
No counterpart | Beat count is the number of children in a measure. |
<note type="quarter"> |
No counterpart | Every note is one slot. There are no note types. |
Next, see Notes, rests, and octaves for the full pitch table and how octaves work.