Keep the opening of a phrase and listen to two ways back. Start with a MIDI clip or a saved wormhole session.
wormhole-cli endings --input sketch.mid --keep-bars 2 --output returns
Open returns/pedal-return.wav and returns/short-return.wav to compare. The pedal version sustains a new bass beneath the upper line. The short version clips the accompaniment and moves snare attacks later. Each stereo audition is 48 kHz and matched to the same RMS level with peak headroom.
Drag either .mid into your DAW for editable parts. Open its .wormhole in the standalone app to hear section B. Switch to A for the original. source.wormhole also opens the unedited phrase. manifest.json records the input hash, protected bars, output names, frame counts, RMS and peaks.
The installer puts wormhole-cli on your path on both systems. In macOS Terminal the second line prints the absolute path to paste into your desktop MCP client’s command field. Set its single argument to mcp.
wormhole-cli --version printf '%s\n' /Applications/wormhole.app/Contents/Helpers/wormhole-cli
In Windows PowerShell the second line prints the absolute MCP command path.
wormhole-cli --version (Get-Command wormhole-cli).Source
--keep-bars N retains every note starting in the first N bars, including its full duration. Upper-line notes and pitched notes crossing a bar line stay in place throughout the return. The default upper line is MIDI channel 2. Use --melody-channel 5 for a melody on channel 5. Incoming channel 10 is drums, channel 3 is bass and remaining channels become keys. Exported keys, upper, bass and drums use channels 1, 2, 3 and 10.
When a song contains a recorded reference take, inspect reports its filename, start bar, sample rate, level and playback setting. edit and arrange retain the embedded audio and plug-in rack. Use the Mac standalone’s song export to render that mix or its separate Reference.wav stem.
The instrument uses 4/4, a constant whole-number tempo of 30–240 BPM and a 480 PPQ clock. Import accepts format 0 or 1 MIDI files with up to 640 notes, an exact bar endpoint and up to 16 bars. Input PPQ can differ when notes and endpoints land on the instrument grid. Sustain pedal (CC64) is tracked separately on each pitched MIDI channel. Channel 10 drum hits keep their played lengths. A released key keeps sounding until you lift the pedal, play that pitch again or reach the end of the clip. These durations are editable and carry through to exported MIDI. Other controllers, changing tempo, incompatible meters and unpaired note events produce errors. Export your clip with the ending rest included.
The default ending covers the remaining bars. If you keep the entire phrase, the command adds up to two bars. Specify --ending-bars N to choose the return length. Output must fit within 16 bars and retain all source notes. Choose a new output folder beside an existing folder you can write to.
wormhole-cli info wormhole-cli inspect --input sketch.mid wormhole-cli edit --input returns/pedal-return.wormhole --action root --bar 3 --delta -2 --output lower.wormhole
Bar numbers start at 1. Root moves by semitones, register by octaves and displace by 60 ticks. Voicing cycles through four shapes. Other actions include pin, contrary, derive, length, variation, section, mix, automix and bpm. Section takes the source index, from 0 for A through 7 for H. Mix uses bar 1–4 for the four parts and delta in percentage points. Each edit saves a new file. Inspect, edit and endings use the activation on this computer.
info lists both. Terse reference for agents and power users; --delta is the target value unless noted.
new --output Fstart_under --pitch_classes "A C E G" --output Fexport --output DIRcostumepushgrooveswingstridevarycontrasthomeNoHomeToReturnTo otherwise).tagintrostartcommaadd_chordsPhraseAlreadyHasChords otherwise).fill_toplinePhraseAlreadyHasTopline otherwise).band / flavour / sessionroot, contrary, register, voicing, displacepin, derive, length, variation, section, bpm, automixmixtie_acrossmake_unique, insert_section, remove_section, move_sectionwormhole-cli arrange --input sketch.wormhole --order ABA --output song.wormhole
Use one to eight existing section letters, from A through H. An edit to A is heard each time A returns. Inspect reports the order, each source length and total song bars. Open the new session in the standalone and choose Play song.
To edit a single return, copy that occurrence into its own source. For an ABA song, this command creates ABC, selects C and leaves the first A intact.
wormhole-cli edit --input song.wormhole --action make_unique --bar 3 --output distinct-return.wormhole
Start wormhole-cli api and send one UTF-8 JSON object per line. Responses carry v, the supplied id and ok. On success read result. On failure read error. The process accepts another request after an error.
{"v":1,"id":"a","op":"info"}
{"v":1,"id":"b","op":"endings","input":"sketch.mid","keep_bars":2,"melody_channel":2,"output":"returns"}
Register a local stdio MCP server with the executable wormhole-cli and the single argument mcp. In a desktop client that does not inherit your shell PATH, use the full installed executable path. Give file paths as absolute paths when the client opens in another working directory. The server exposes info, new, inspect, edit, arrange, endings, start_under and export with argument schemas.
{"mcpServers":{"wormhole":{"command":"wormhole-cli","args":["mcp"]}}}
Try “Use wormhole to keep bars one and two of my sketch. Keep the held melody on channel two and make two different endings in a new folder. Give me both WAVs to compare.”