View Single Post
Old 06-15-2016, 09:05 AM   #71
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

Quote:
Originally Posted by Fergler View Post
This seems to be affecting much more than just the selected notes, e.g.:

Before:
http://puu.sh/ptamy/2067033266.png

After:
http://puu.sh/ptann/f783758985.png

Now it's all f'd up past where I made the edit.

Sometimes undo/redo fixes it, too, which is bizarre.

I'm using 1-sided and 2-sided to test this

Another version of this I can reproduce:
1. Select some MIDI events in between 2 other chunks of MIDI (like I did in the screenshots)
2. Use either 1 sided or 2 sided hotkey
3. Alter, press hotkey again to stop
4. Appears fine but does not play back correctly
5. Glue, reveal why it doesn't play back correctly. Entire MIDI is bonkers
Weird...

You are welcome to send me any MIDI or RPP that would allow me to reproduce the problem.

EDIT:
The fact that each of the notes at the bottom pitch has been weirdly extended to the beginning of the next note makes me think that there is some mix-up of note-ons and note-offs. It may be related to the bug report Overlapping notes problem. I have encountered the bug when moving or stretching notes onto existing notes, but not yet when using the warping scripts.

The MIDI in your example looks like drumkit MIDI. Are there perhaps overlapping notes or notes of zero length? The selected note at the bottom left looks suspiciously short, and may be overlapping with the preceding unselected one.

EDIT 2:
The good news is that I have been able to reproduce the problem.

The bad news is that the problem appears to be caused by overlapping notes, and unfortunately there is no way around it: ReaScript simply cannot handle overlapping notes. I have tested REAPER's native functions such as MIDI_SetEvt, MIDI_SetNote and MIDI_InsertNote, as well as SWS's alternative FNG functions, but no luck.

I suggest that the best solution is to simply avoid using any ReaScript when there are overlapping notes. (In fact, given the innumerable bug reports related to overlapping notes that have nothing to do with scripts, it is probably prudent to avoid overlapping notes altogether in REAPER.)

P.S. The problems with overlapping notes are not actually REAPER's own fault, since the standard MIDI specifications themselves do not allow for overlapping notes. REAPER's MIDI editor can visually represent overlapping notes and can 'remember' them in its internal memory, but as soon as the notes are converted to actual MIDI, overlapping notes get jumbled up.

EDIT: REAPER v5.32 has fixed the API bugs with overlapping and zero-length notes! These should not cause problems any more.

Last edited by juliansader; 02-06-2017 at 10:56 PM.
juliansader is offline   Reply With Quote