View Single Post
Old 10-07-2019, 03:08 AM   #1
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,048
Default reaper.MIDI_InsertNote slow, even with MIDI sort off

Hey all,

I'm replicating the glue tool from Cubase for the MIDI editor.
My first attempt was to use reaper.MIDI_SetNote. This had the disadvantage,
that I couldn't tag notes for further editing (delete, selection).
So, I switched to tables, e.g. dumping the notes to a table, do my editings, delete all notes in the ME,
insert them again with MIDI_InsertNote. MIDI sort is turned off and only called after all
notes have been inserted in the take.

However, I noticed that with a lot of notes, MIDI_InsertNote + tables is far inferior compared to
just altering the notes via MIDI_SetNote.

Is there any way to speed this up?

Get/SetAllEvts is out of question, because my brain is exploding with all these use cases I have to cover.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote