Create MIDI
create_midiGenerate MIDI files from structured composition data with chord support, returning base64-encoded MIDI and an interactive piano-roll preview.
Instructions
Generate a MIDI file from structured composition data with chord support. Supports single notes, note arrays (chords), and chord names (5, 6, 7, 9, 11, 13, maj, m, min, dim, etc.). Returns base64-encoded MIDI data and displays an interactive preview with piano-roll notation and playback.
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": {
"title": "<title>"
},
"name": "create_midi"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Title of the composition | |
| composition | No | Composition object with bpm (number), optional timeSignature ({numerator, denominator}), and tracks (array of {name?, instrument?, notes: [{pitch, chord?, beat?, startTime?, duration, velocity?, channel?}]}) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bpm | Yes | ||
| title | Yes | ||
| midiBase64 | Yes | ||
| trackCount | Yes |