mcp_opendaw_replace_instrument
Replace the instrument on a MIDI audio unit with a different factory instrument. Deletes the old instrument and creates a new one, supporting Nano, Vaporisateur, Soundfont, and Apparat.
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 |