mcp_opendaw_replace_instrument
Swap the MIDI instrument on an audio unit for another (Vaporisateur, Nano, Soundfont, Apparat) via unit index and new instrument key, replacing the old instrument in place.
Instructions
Replace the instrument on an audio unit with a different MIDI instrument.
Uses ProjectApi.replaceMIDIInstrument — deletes the old instrument and creates a new one on the same AU. Only works for MIDI instruments (Nano, Vaporisateur, Soundfont, Apparat). Tape (audio player) cannot be replaced this way.
The AU must have a CaptureMidiBox (i.e. it was created as a synth/note instrument, not an audio track).
unit_index: Audio unit index (must be >= 1). new_instrument: Factory key — 'Vaporisateur', 'Nano', 'Soundfont', 'Apparat'.
Returns old and new instrument type.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit_index | Yes | ||
| new_instrument | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |