get_selected_midi_notes
Retrieve the MIDI notes currently selected in REAPER's editor for the active take. Use the selection to build explicit value filters for transform tools.
Instructions
Read the MIDI notes currently SELECTED in REAPER's editor for the active take.
The escape hatch for "operate on what I've selected": select notes by hand in REAPER, call this to see which they are, then translate that into an explicit value filter (pitch range / beat window / channel) for the transform tools. Read-only, no undo.
Returns:
{ok, notes:[...], ret} - the selected notes, same shape as get_midi_notes (each note
carries item-relative start_beat/end_beat). index is REAPER's absolute PPQ-sorted
note index, so a partial selection is non-contiguous. Empty selection -> notes:[].
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No | ||
| item_index | Yes | ||
| track_index | Yes |