Change the session
edit_sessionBuilds or changes a Lathe project in one call: add, remove, rename or move tracks and returns, set plug-ins, routing, sends, mixer, channel EQ, tempo and song keys, all landing as one undo step.
Instructions
Builds or changes the project: adds, removes, renames and moves tracks and returns, and sets plug-ins, routing, sends, mixer, channel EQ, tempo and keys. Give every change for one request in a single call, in order: they all land as ONE undo step in Lathe, or, if one can't be made, none of them do (the reply says which and why). Plug-in placement is automatic unless position is given: a note generator goes before the instrument it drives, an instrument before the effects. A MIDI track plays one instrument. A track whose input is another track gets monitoring In so it plays without being armed. Routing a note generator into an instrument, two ways: on one track, {"action":"add_track","kind":"midi","name":"Arp","plugins":["",""]} (simplest), or on two, so the generator's notes can be recorded or drive several instruments: a MIDI track with the generator, a MIDI track with the instrument, then {"action":"set_input","track":"","from_track":""}. A reverb return: {"action":"add_track","kind":"return","name":"Verb","plugins":["Reverb"]}, then set_send from each track. Lathe's own effects start 100% wet on a return. Every track, return and the master has a six-band channel EQ (low cut, low shelf, bell 1, bell 2, high shelf, high cut), after its plug-ins unless it was moved in among them (describe_track shows what's active and where it sits). set_eq changes one band: {"action":"set_eq","track":"Guitar","band":"bell 1","freq_hz":300,"gain_db":-3,"q":1.4} or {"action":"set_eq","track":"Vocal","band":"low cut","freq_hz":100}. Changing a band switches it on. Prefer this to adding an EQ plug-in for corrective cuts. "before" moves the EQ in the chain: {"action":"set_eq","track":"Master","before":"Mastering"}. On the master, put the EQ before Mastering (or any limiter) for tonal moves on the whole mix: after it, a boost can push the output past the limiter's ceiling. On a MIDI track it can't go before the instrument. The key lane says what key the song is in, bar by bar; Lathe's Play Along window shows the person where those notes are on guitar, bass, ukulele and keyboard so they can jam along. set_keys replaces the lane (or a range of it): {"action":"set_keys","keys":[{"bar":1,"key":"A minor pentatonic"},{"bar":17,"key":"C major"}]}. An empty list clears it. With "track", a track gets keys of its own, for a part that plays in a different key or mode from the band (a solo in D dorian over a D minor song); it follows the song's key until its first one, and an empty list puts it back on the song's. Play Along can follow that track. Most parts don't need one: a bass playing roots is still in the song's key. Work the keys out from the notes (get_notes; convert_to_midi for audio) and pick the scale a player would improvise with: minor pentatonic or blues over a minor blues-rock riff, the full major or minor scale when the melody uses all seven notes. Volume, pan, send levels and the EQ are part of the undo step; mute, solo, monitoring and arm change live and aren't.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"changes": "<changes>"
},
"name": "edit_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| changes | Yes | The changes, applied in order |