Search and retrieve MIDI fragments from the library for arrangement composition. The library is populated from reference songs: /consume-music finds songs → /learn-artist downloads + separates stems → /review-music analyzes → /create-midi to-spec converts stem audio to MIDI → /memory learn stores with HMT tags. Queries by key, BPM, instrument, mood (heart tags).
STOP. READ THIS ENTIRE SKILL.MD BEFORE CALLING ANY ENDPOINT.
Search the MIDI fragment library for reference patterns that match a target
song's musical attributes. Used by /create-midi compose to provide example
bass lines, drum grooves, chord voicings, and melodies when composing an
arrangement.
/consume-music (find reference songs by HMT tags)
→ /learn-artist (download + /create-stems separate)
→ /review-music analyze (per-stem MIR features)
→ /create-midi to-spec (stem features → MIDI JSON)
→ /memory learn (store with key, BPM, instrument, heart tags)
./run.sh search --key "D minor" --bpm 85 --instrument bass --mood anger,sadness
Returns MIDI fragments as JSON matching the query. The fragments are piano-roll-spec.json snippets with notes for the requested instrument.
Stored in ArangoDB collection consume_midi via /memory learn:
key: musical key (e.g. "D minor")bpm: tempoinstrument: which stem this came fromheart: heart taxonomy tags from the source songsource_song: title + artist of the referencenotes: array of piano-roll-spec notes for this stem