|
|
|
10-10-2019, 02:15 PM
|
#1
|
Human being with feelings
Join Date: Oct 2018
Posts: 367
|
reaper.MIDI_Sort() deletes notes it shouldn't
As you can see in the below animation, the right note is deleted by MIDI_Sort.
Code:
reaper.MIDI_InsertNote(reaper.MIDIEditor_GetTake(reaper.MIDIEditor_GetActive()), false, false, 3840.0, 7680.0, 0, 55, 96, true)
reaper.MIDI_InsertNote(reaper.MIDIEditor_GetTake(reaper.MIDIEditor_GetActive()), false, false, 0.0, 3840.0, 0, 55, 96, true)
reaper.MIDI_Sort(reaper.MIDIEditor_GetTake(reaper.MIDIEditor_GetActive()))
|
|
|
10-14-2019, 09:44 AM
|
#2
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,746
|
This is expected due to the ambiguity of MIDI note on vs off. Insert earlier notes first, or don’t disable sorting when adding notes that overlap...
|
|
|
10-14-2019, 10:09 AM
|
#3
|
Human being with feelings
Join Date: Oct 2018
Posts: 367
|
It also happens when noSort is false
Code:
reaper.MIDI_InsertNote(reaper.MIDIEditor_GetTake(reaper.MIDIEditor_GetActive()), false, false, 3840.0, 7680.0, 0, 55, 96, false)
reaper.MIDI_InsertNote(reaper.MIDIEditor_GetTake(reaper.MIDIEditor_GetActive()), false, false, 0.0, 3840.0, 0, 55, 96, false)
or when sorting twice
Code:
reaper.MIDI_InsertNote(reaper.MIDIEditor_GetTake(reaper.MIDIEditor_GetActive()), false, false, 3840.0, 7680.0, 0, 55, 96, true)
reaper.MIDI_Sort(reaper.MIDIEditor_GetTake(reaper.MIDIEditor_GetActive()))
reaper.MIDI_InsertNote(reaper.MIDIEditor_GetTake(reaper.MIDIEditor_GetActive()), false, false, 0.0, 3840.0, 0, 55, 96, true)
reaper.MIDI_Sort(reaper.MIDIEditor_GetTake(reaper.MIDIEditor_GetActive()))
Last edited by pandabot; 10-14-2019 at 10:36 AM.
|
|
|
10-14-2019, 10:18 AM
|
#4
|
Human being with feelings
Join Date: Oct 2018
Posts: 367
|
For context it affects my ChordGun tool, for example when replacing a chord in a progression with one that shares notes with the following chord. I can't seem to find a way around it
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 08:57 AM.
|