.mid file writes each note as two events: a note-on where it starts, and a note-off where it ends. A scanner pairs them into one note, whose length is the number of ticks between them:
.chart file writes each note’s length in the note itself. See Notes.
Pairing
These rules apply to every note of an instrument track: notes, modifiers and phrases. Vocal tracks pair the same way, and trim overlapping notes of one pitch as sustains are trimmed: see Vocals and harmonies.- A note-off ends a note of its own number and channel.
- A note-on with velocity 0 is a note-off. A note-off’s velocity has no effect.
- Required: a note-off later in its track for every note-on.
- Required: each note ends at or before the tick where the next note of its number and channel starts.
- Recommended: every note of a track on one channel.
Events at one tick
A note that ends where the next starts. Required: the note-off before the next note-on of its number, when the two share a tick. Then every scanner reads two notes, as in the example above. Edge case: a note of length 0. A note-on, then its note-off, at one tick. A note of length 0 has no sustain, and a modifier of length 0 covers the notes on its tick. For a phrase, see Phrases.Length
A note’s length is its note-off’s tick minus its note-on’s tick. What it means depends on the note:The sustain cutoff
A note whose sustain is no longer than the cutoff is read with no sustain. In a.mid file, the cutoff is the resolution divided by 3, rounded down, plus 1:
sustain_cutoff_thresholdinsong.ini, in ticks, replaces it. See Settings.- The cutoff applies to notes, not to phrases or vocal notes.
.chart file has no cutoff by default. See Cut off short sustains.
After pairing and the cutoff, a scanner resolves the notes as in a .chart file. See How notes resolve. It decides strums and HOPOs with the .mid rules on Note modifiers.
Invalid forms
Overlapping notes of one number
Overlapping notes of one number
A scanner ends the latest open note of the number first, then trims overlapping sustains, as How notes resolve says. So two overlapping notes read as they would in a
.chart file. Clone Hero, YARG and scan-chart read them this way. scan-chart reports overlappingMidiNotes. Saving with scan-chart keeps them as written.Two note-ons of one number at one tick
Two note-ons of one number at one tick
Clone Hero, YARG and scan-chart keep the longer note, as in a
.chart file. scan-chart’s export writes the longer one.A note-on with no note-off
A note-on with no note-off
Every scanner ignores it, and also a note whose note-off comes after the end of track. scan-chart’s export leaves it out. YARG’s lyrics read a vocal phrase without its note-off differently: see Vocals and harmonies.
A note-off with no note-on
A note-off with no note-on
Every scanner ignores it, except YARG’s lyrics for a vocal phrase: see Vocals and harmonies.
A note-off on another channel than its note-on
A note-off on another channel than its note-on
The note-off doesn’t end the note, so every scanner ignores the note.