Repository navigation
Music lab: game music built around a hum (ritmo-tools music) - #138
Merged
Merged
Conversation
`ritmo-tools music` keeps game music as JSON songs (tempo, key, bars, tracks of notes on twelve synthesized instruments). The agent cannot hear, so `music listen` turns a hum or recording into a tempo, a key, and a melody on the song's grid for it to build around; `music check` measures what it can without listening; `music review` opens a page in the pixel fixer's look where the person plays, edits notes, records a hum, and comments on bars, and `music notes` hands that back. Ships the `ritmo-music` skill and an example song built around a test hum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HendNdbrF7BLwx5WKX2ruk
…ck fixes Four new synthesized instruments for music the acoustic and chiptune voices cannot make: a distorted guitar (`rockGuitar`), a reese bass (`reese`), a supersaw lead (`synthLead`), and a punchy drum kit (`breaks`, the same drum names as `drums`). A song's new `compressor` (off by default) squeezes the mix louder and punchier, its peaks held under -1 dBFS; stems and the check's per-track loudness stay uncompressed. The review page: the hum's play button stops it (it stacked a new copy on every click), Play/Pause carries on from where it paused with a separate Stop, and a start marker set by clicking the bar numbers or a lane shows where Play starts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…is not one voice `music listen` measures how far off pitch a voice sits over all its notes (a mean on a circle of semitones, weighted by how long each note is held) and takes it out before naming them, so a hum sung a third of a semitone flat no longer comes out a semitone low on half its notes. The report gives it as `tuning`, in cents. A recording with too few notes for its length (a full song played in the room, a noisy one) is now called out by `music listen` and the page: hum the part alone. `music listen` suggests `--tempo` when the song already has a different one, and the page says the review server is not running when a save cannot reach it, instead of "could not listen". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Sandro · project thread
A third tool in
@typeonce/ritmo-tools, following the sound lab's pattern: an agent-readable format and CLI, plus a local review page in the pixel fixer's look.The flow
music listen <song> <audio>hears its tempo, key, and melody (YIN pitch tracking, onset-based tempo, Krumhansl key profiles) and writes them into the song as itsreference. It creates the song if it does not exist.music instrumentslists 12 synthesized instruments: piano, electric piano, guitar (Karplus-Strong), bass, strings, flute, marimba, bells, pad, two chiptune voices, and a drum kit).music checkmeasures what can be known without hearing: clipping, loudness, notes out of key or range, a buried track, and how closely the melody follows the hum (follows).music reviewopens the page. It has an arrangement view, a note grid (click to add, drag to move or stretch, double-click to remove), mute/solo, instrument swap, mic recording, playing the hum with the song, and comments on bars.music notesreturns the comments plus the person's hand edits in words.music renderwrites a seamless-loop WAV, a MIDI file, and--stems.Like the sound lab, the scope ends at audio files, with no in-game player.
Also
ritmo-musicskill inpackages/core/skills, linked in SETUP.md, checked by pack-check and listed in llms.txtexamples/village.song.jsonwith a synthesized test hum as its referencetest/music.test.tscovers: format round-trip, every instrument rendered then heard back in tune, the hum heard note for note, checks, WAV/MIDI, edits in words, and the CLI end to endpnpm checkpassesGenerated by Claude Code