Reference
Chart format (v2)
Riffover's JSON chart format (v2): parts, difficulties, notes, the beat grid and provenance, field by field.
On this page
Charts are JSON, read by game/src/Charts/Chart.cs. The game writes version 2 when it learns a song: the C# charter in game/src/Charts/Learn/ produces the notes, and LearnRunner adds where the chart came from. They're stored as user://charts/<slug>.json, where the slug comes from the track key: normalized artist + title + length in seconds ("queen|bohemian rhapsody|355", see TrackKeys). A chart learned from one app plays from another. Files from before this scheme (slugged from "Artist — Title") are renamed on the next library scan.
All times are song time in seconds, meaning the music app's playback position, not time within the learn audio.
{
"version": 2,
"title": "Song Title",
"artist": "Artist",
"durationSec": 215.4, // from the music app
"bpm": 121.3, // global tempo estimate
"chartStartSec": 0.42, // song position where the learn audio began
"beats": [0.91, 1.40, 1.90], // beat grid; every 4th beat is drawn as a bar line
"parts": { // instrument → difficulty → notes
"guitar": {
"easy": [{ "t": 1.40, "lane": 0, "len": 0 }],
"medium": [],
"hard": [],
"expert": [{ "t": 1.40, "lane": 2, "len": 0.85 }]
},
"drums": { // same shape; lane 0 kick, 1 red, 2 yellow, 3 blue, 4 green
"expert": [{ "t": 1.40, "lane": 0, "len": 0 }, { "t": 1.40, "lane": 2, "len": 0 }]
}
// "vocals": not generated yet
},
"envelope": { // onset strength of the learn audio, 0-255
"rate": 86.1328, // samples per second
"startSec": 0.42, // song time of data[0]
"data": [0, 3, 18, 240]
},
"provenance": {
"origin": "generated", // or "authored" (made by a person)
"generator": { // set for generated charts
"id": "riffover-learn-cs", // which charter
"version": "1.3.0", // the charter's own version; bumped whenever its output changes
"game": "0.1.0" // the game build that ran it (application/config/version)
},
"source": { // the recording the chart follows
"title": "Song Title",
"artist": "Artist",
"album": "Album",
"durationSec": 215.4,
"app": "My Music Player", // the app's name, as Windows gives it
"url": null // a link to the exact recording, when known
},
"createdAt": "2026-12-04T18:20:00Z",
"author": null, // display name of whoever made or shared it; null for your own
"listingId": null, // Discover listing, once charts can be shared
"importedFrom": null // imported charts: the song folder or .sng it came from
}
}Version 1#
Version 1 files (the C# charter's raw output, and charts from the retired Python prototype) have guitar only, under "difficulties", a free-text "generator" string, and no provenance. They still load: Chart.Parse copies difficulties into parts.guitar. The setlist marks them as old charts and offers a re-learn.
Generator versions#
ChartGenerator.GeneratorVersion is the charter's version. Bump it whenever a change alters the notes it produces. A chart whose generator id differs, or whose version is lower than this build's, counts as old (SongLibrary.IsOld), and the game suggests re-learning it. Hand-made (authored) charts are never old.
Downloaded songs#
Free songs from Riffover's catalog come with a notes.mid: hand-made (the Frets on Fire packs) or generated ahead of time by Riffover's charter (tools/chartgen). MidiChart converts it into this format when the song is installed, with origin: "authored", author: "Frets on Fire pack" (generated ones: origin: "generated", generator the charter id and version from the catalog, author: "Riffover charter"), source.app: "Riffover catalog", source.url the song's audio URL and listingId its catalog id. Only the difficulties the MIDI has are present; the game plays the nearest one for a missing difficulty. See architecture.
Imported charts#
Charts converted from the player's songs folder (community song.ini + notes.chart / notes.mid folders and .sng files) are stored in user://imported/, not user://charts/, with origin: "authored", author from song.ini's charter, and importedFrom set to the source on this PC. Their durationSec is song.ini's song_length, or 0 when unknown. See importing charts for what's read, how notes map, and which chart wins when a song has both an imported and a learned chart.
MidiChart reads guitar from a MIDI file's PART GUITAR track (or T1 GEMS) and drums from PART DRUMS when the file has named parts; a file without any (like the catalog's) is read whole as guitar.
Sharing (planned)#
Charts players share aren't in the game yet. When they are, a listing is a chart plus its provenance, never the audio: players still play the song in their own music app, and provenance.source says which recording the chart follows. author and listingId are filled in for charts that came from a listing.
Notes#
| Field | Meaning |
|---|---|
t |
Song time the note crosses the strike line |
lane |
Guitar: 0 green, 1 red, 2 yellow, 3 blue, 4 orange. Drums: 0 kick, 1 red, 2 yellow, 3 blue, 4 green |
len |
Sustain length in seconds; 0 for a tap/strum note |
Difficulty rules (game/src/Charts/Learn/ChartRules.cs)#
The C# charter in game/src/Charts/Learn/ is the only implementation. It started as a port of a Python prototype, which has been removed. Its rules are tuned against hand-made charts with tools/eval.
| Grid | Strength floor | Min gap | Lanes | |
|---|---|---|---|---|
| easy | quarters | none | 0.9 beat (at least 0.26s) | 3 |
| medium | 8ths | 15th percentile | 0.45 beat (at least 0.16s) | 4 |
| hard | 16ths | 5th | 0.45 beat (at least 0.11s) | 5 |
| expert | anything | 20th | 0.2 beat (at least 0.075s) | 5 |
Each difficulty keeps every note of the one below it and adds more, the way hand-made charts are layered. Before snapping to the grid:
- Half tempo is corrected. When the detected tempo is under 115 BPM and the off-beats are about as busy and loud as the beats, or there are more than about 3 onsets per beat, a beat is put between each pair.
- Onset latency is removed. Onsets are moved 30 ms earlier, because the onset envelope peaks just after a note's attack.
Lanes follow melodic contour: up when pitch rises, down when it falls, the same lane for repeats, pulled toward a local-range target so long runs don't pin to one edge.
Drums (see DrumCharter.cs)#
| Lane | Pad | Heard as |
|---|---|---|
| 0 | kick | energy rises at 35-130 Hz, close to the loudest nearby |
| 1 | red | snare: noisy rises at 1.2-4.5 kHz |
| 2 | yellow | hi-hat: noisy rises at 7-11 kHz |
| 3 | blue | tom: strong rises at 130-350 Hz without a kick |
| 4 | green | cymbal: the loudest hi-hat hits, on the beat |
Hits are snapped to the 16th grid. Easy keeps beats only (kick, snare, cymbals, one pad at a time); medium adds 8ths and on-beat hats; hard adds 16th snares, 8th kicks and hats, toms, and two pads at once; expert keeps everything. Drum notes never have a length.
The envelope#
Not used by the game yet. It's stored so a later version can cross-correlate the live loopback audio against it to find the exact song position, instead of relying on SMTC timestamps.