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,067
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
Old 10-07-2019, 05:41 AM   #2
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
Default

Solved thanks to lb0!

I had to disable sort MIDI also for delete notes.
__________________
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

Last edited by _Stevie_; 10-07-2019 at 06:01 AM.
_Stevie_ is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:52 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.