Write piano-roll notes
fl_write_piano_roll_notesWrite MIDI notes into the currently open FL Studio Piano roll with pitch, start bar, length, velocity, optional portamento, and grid quantization; replace or append to the pattern.
Instructions
Write notes into the currently-open FL Piano roll.
Each note: {pitch (MIDI), time_bars, length_bars, velocity 0-1, porta (optional, slide into the note)}. Set quantize (grid in bars) to snap note starts to a grid before writing. Setup: open the Piano roll and run 'MCP_Apply' once from its Scripting menu (so Run last script again targets it). mode='replace' clears first.
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": {
"notes": "<notes>"
},
"name": "fl_write_piano_roll_notes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'replace' clears the pattern first; 'append' adds to it. | replace |
| notes | Yes | ||
| quantize | No | Optional grid (bars) to snap note starts to before writing: 0.0625=1/16, 0.125=1/8, 0=off. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||