X-Raym / REAPER-ReaScripts

X-Raym's Free and Open Source Scripts for Cockos REAPER.
http://www.extremraym.com/en/my-reaper-scripts/
GNU General Public License v3.0
183 stars 50 forks source link

Reaper hang on - Mute selected notes in open MIDI Take randomly #24

Closed signoc closed 1 year ago

signoc commented 1 year ago

This script hangs when the midi clipped is pooled and playing..

The fix is a tiny one since SetNote must have the nosort option set to true.

reaper.MIDI_SetNote(take, init_notes[j], true, true, startppqposOut, endppqposOut, chan, pitch, vel, true)

When the loop that sets the notes breaks, sort the midi:

reaper.MIDI_Sort(take)

Funny enough it does not hang on non pooled midi items. I guess pooled items trigger the input sort differently somehow.

X-Raym commented 1 year ago

ouch, 2015 code...

Fixed https://github.com/X-Raym/REAPER-ReaScripts/commit/09ede73759f8b44d54ed23af318f05b1f3f536d8

You can propose a pull request directly next time, this prevent the needs for finding the file, and line etc :P

Cheers !