Reference
Riffover source protocol (draft, v1)
The draft HTTP protocol for running your own source of songs and charts that players can add to Riffover.
On this page
- Discovery: GET {base}/
- Search: GET {base}/songs
- Match what's playing: GET {base}/match
- Suggest: GET {base}/suggest?q=
- Browse: GET {base}/browse
- Song
- Community song folders and packages
- Putting an existing chart index on Discover
- What Riffover guarantees players
- What a source is responsible for
- Later (not in v1)
Status: draft. Nothing implements this yet. Riffover's official source (its listings) will be the first, built against this document. Field names may change before v1 is final.
A source is a web service that Riffover can search for songs. Riffover's official source is one; anyone else (a charting community, a label, a store, a friend with a folder of charts) can run another. Players add a source by its URL, and its results appear in Discover next to everything else, marked with the source's name.
A source can return either of these:
- Chart only: the notes (frets, timing, sustains). The player plays the song from their own music app, the way Riffover always works.
- Full package: the chart plus the audio and artwork. Riffover then plays the song itself, which is the only way a song works on a machine without a music app.
All endpoints are plain HTTPS GET requests that return JSON (application/json; charset=utf-8). There are no cookies and no sessions, and v1 needs no authentication.
Discovery: GET {base}/#
The base URL returns the source's manifest. Riffover fetches it when the player adds the source, and again at most once a day.
{
"protocol": "riffover-source/1",
"name": "Example Charts", // shown on every result, max 40 chars
"description": "Hand-made charts for indie rock.",
"homepage": "https://charts.example.com",
"icon": "https://charts.example.com/icon.png", // square PNG, at least 128px
"contact": "https://charts.example.com/contact",
"policies": { // shown before adding the source
"terms": "https://charts.example.com/terms",
"content": "https://charts.example.com/takedown"
},
"capabilities": ["search", "match", "suggest", "browse"], // endpoints this source implements
"delivers": ["chart", "package"] // what results may contain
}Riffover ignores fields it doesn't know. A source must implement search; every other endpoint is optional.
Search: GET {base}/songs#
| Parameter | Meaning |
|---|---|
q |
Free text: matched against title, artist, album and charter. |
artist, title |
Exact-ish fields, when Riffover knows them. |
part |
guitar, bass, drums or vocals: only songs with a chart for this part. |
difficulty |
easy / medium / hard / expert: only songs charted at this level. |
min_sec, max_sec |
Song length range. |
delivers |
chart or package: only results of that kind. |
sort |
relevance (default), new, popular, title, artist. A source may ignore sorts it doesn't support. |
cursor, limit |
Paging. limit defaults to 25, max 100. |
Response:
{
"items": [ /* Song, below */ ],
"next": "opaque-cursor-or-null"
}Match what's playing: GET {base}/match#
The core use: the player is already listening to something, so Riffover asks every source for charts of that exact recording. No typing involved.
Parameters: artist, title, duration_sec (the music app's reported length) and optionally album. Return the best matches first, in the same shape as search. Treat a length within ±2 seconds as the same recording, the same tolerance Riffover's track keys use.
Suggest: GET {base}/suggest?q=#
Autocomplete for the on-screen keyboard: { "suggestions": ["Artist — Title", ...] }, at most 10. It should respond fast (under 300 ms).
Browse: GET {base}/browse#
Rows for Discover's front page, so players with a guitar controller can find songs without typing:
{ "rows": [ { "id": "new", "title": "New this week", "items": [ /* Song */ ] } ] }Song#
{
"id": "abc123", // stable within this source; [A-Za-z0-9_-], max 64
"title": "Song Title",
"artist": "Artist",
"album": "Album", // optional
"durationSec": 215.4, // length of the recording the chart follows
"recording": "https://…", // optional: a page identifying the exact recording
"charter": "Name", // who made the chart
"chartOrigin": "authored", // "authored" (made by a person) or "generated"
"parts": { // charted parts → difficulties → note counts
"guitar": { "easy": 212, "medium": 340, "hard": 512, "expert": 701 }
},
"license": { // license of what's delivered
"id": "CC-BY-SA-4.0", // SPDX id, or "proprietary"
"url": "https://creativecommons.org/licenses/by-sa/4.0/",
"credit": "\"Song\" by Artist, CC BY-SA 4.0. Chart by Name."
},
"cover": "https://…/cover.jpg", // optional, for the listing
"updatedAt": "2026-12-05T00:00:00Z",
"files": [ // what Riffover downloads when the player confirms
{ "role": "chart", "format": "riffover", "url": "https://…/chart.json",
"size": 48213, "sha256": "…" },
{ "role": "song", "format": "ogg", "url": "https://…/song.ogg",
"size": 6120443, "sha256": "…" } // only in a full package
]
}File roles: chart (exactly one, unless there's a package), package (a whole song in one file, see below), song, guitar, bass, drums, vocals, keys, rhythm (audio stems), cover, license, readme.
Chart formats: riffover (see chart-format.md), mid (a notes.mid), chart (a notes.chart).
Package formats: sng (the single-file song package used by community chart tools) and zip (a zipped song folder, below).
Audio formats: ogg (Vorbis). opus and mp3 are planned, because community packages use them a lot.
A result with only a chart file is a chart-only result. A result with a song file, or a package that contains audio, is a full package. File URLs may be short-lived signed URLs: Riffover fetches them right after the player confirms. They don't have to be on the source's own domain.
Community song folders and packages#
Riffover reads the formats the rhythm-game charting community already uses (see importing-charts.md). A source can deliver songs exactly as charters publish them, with no conversion:
sng: one.sngfile. Riffover reads its metadata and chart, and its audio once local playback of packages lands.zip: a zipped song folder:song.ini,notes.chartornotes.mid, audio stems (song.ogg,guitar.ogg,drums.oggand so on), and optionallyalbum.pngoralbum.jpg. Its contents may sit at the root of the archive or inside one top-level folder.
Riffover unpacks a package into its own library and reads it with the same importer as a songs folder on disk. Fill the Song fields from song.ini:
| Song field | From song.ini |
|---|---|
title, artist, album |
name, artist, album |
charter |
charter (or frets) |
durationSec |
song_length ÷ 1000 |
parts |
diff_guitar, diff_drums and so on: a part with -1 isn't charted. Note counts are optional; send 0 when you don't know them. |
chartOrigin |
authored |
Archives get extra checks: at most 300 MB unpacked and 64 files. Only known file types are extracted (.ini, .chart, .mid, .sng, audio, images, .txt); paths that try to leave the folder are rejected; and nothing executable is ever extracted or run.
Putting an existing chart index on Discover#
A source can be a thin adapter in front of a community chart index or download site that already exists. The adapter translates its search into /songs and /match, and points files at the index's own download URLs. Since file URLs may live on any domain, the adapter hosts nothing itself. Any such adapter should identify the index it fronts in its manifest's description and homepage, and honor the index's own terms and rate limits.
What Riffover guarantees players#
A source is untrusted input, and the client treats it that way:
- Nothing downloads without the player confirming. The confirm shows the song, the source, the size and the license.
- Every file is checked. Its size and sha256 must match what the result declared. A chart must parse with Riffover's own readers. Audio must be a valid stream in a supported format. Images must be real PNG or JPEG. Packages are unpacked with the archive checks above. Anything else is rejected and deleted.
- Limits: 1 MB per chart, 50 MB per audio file, 5 MB per image, 200 MB per package (
sngorzip), 25 results per page. A source that times out (5 s) or errors is skipped. One broken source never breaks Discover. - HTTPS only. No redirects to
http:, and no private or local addresses (localhost, 10.x, 192.168.x and so on), except a source the player explicitly added as local. - Every result shows where it came from and its license. The same song from several sources appears once, with a choice of source. Openly licensed results (Creative Commons, CC0, public domain) get a clear badge saying the files are free to download and keep. Any other license is shown as the source states it, with a link to the source's terms.
- Sources are the player's choice. Riffover ships with its own source and doesn't vet, approve or restrict which others a player adds; it publishes none of them. The player adds others by pasting a URL in settings, by a
riffover://add-source?url=…link (which asks for confirmation), or from their account on the website. The account option works for players who only have a guitar controller in hand.
What a source is responsible for#
- Rights. Audio, charts and art are all allowed. You're responsible for what you distribute: only deliver what you have the right to, and label its license honestly. Riffover shows your license and policies with every result and doesn't host or republish anything from your source.
- Takedowns. Publish a content policy and honor it; rights holders contact you, not Riffover.
- Stability. Keep
ids stable andsha256values accurate. SendCache-Controlheaders; Riffover respects them.
Later (not in v1)#
- Accounts for paid or private catalogs: the OAuth 2.0 device flow. The game shows a short code, and the player approves it on their phone. No typing on a guitar.
- Ratings and play counts reported back to the source.