Hi,
With ReaScript we can access currently active take in MIDI editor, thanks to
reaper.MIDIEditor_GetTake( midieditor )
The problem is that returns only one take, and if you have "One MIDI editor per project options", you can select and edit multiple takes at the same time.
On the following screenshot, you can see how scripts works only in currently active take, but native actions works on all selected items. (Note: I assume I don't miss a function
We miss a function to enumerate all takes active in the MIDI editor, for making scripts which works on all selected notes.
Even the MIDI_GetNote function do require a take as argument.
What we would require is either:
- A way to enumerate all takes open in MIDI editor.
Code:
reaper.MIDIEditor_EnumerateTakes( midi editor ), reaper.MIDIEditor_GetTake( midieditor, i )
- or a way to GetNotes in the midi editor, but without the need of "take" parameter (this value will instead be returned by the function) - with a midieditor as parameter.
Code:
retval, take, selected, muted, startppqpos, endppqpos, chan, pitch, vel = reaper.MIDI_GetNote( midieditor, noteidx )
I think the first solution would be more handy. It would also works with other events.
Thanks for your support !