-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using "Edit: Lengthen notes one grid unit" or "Edit: Shorten notes one grid unit" actions in the piano roll, OSARA reports adjustments incorrectly if the note being adjusted overlaps more than one other note #1078
Comments
I'm not exactly sure where the disconnect is here. However, as far as I understand it, you can't really have overlapping notes at the same pitch in MIDI. MIDI notes are defined by note on and note off messages. If you have a note on message at the same pitch, that just continues the note. If you then send a note off message, that ends the note. So, I guess REAPER (maybe even MIDI files) has a concept of overlapping notes, but when that gets sent to the instrument, they can't really overlap. This is relevant because I'm wondering whether the REAPER API truncates the note end accordingly. The note does end at this point as far as the instrument is concerned, so perhaps the API exposes it thus. If that's the case, we're going to need some new API from Cockos to give us the raw length without truncation. It's also possible that this truncation is happening somewhere inside OSARA. I don't think that's the case from a brief look at the code, but some of our length reporting code is a bit complicated, so I'm not ruling it out just yet. I need to dig a little more. |
Note that if the subsequent notes are at different pitches, you don't hit this problem. |
From my tests, the result comes from REAPER, technically from MIDI_GetNote API function. Is that a bug or feature is unclear. Behind the scene, REAPER keeps full length, while reporting shorter length. So more bug then feature. But from musical perspective, the note will be shorter. MIDI does not prescribe to count MIDI On events for MIDI Off events, so after the first overlapping note ends, triggering MIDI Off, synths will stop playing both. The effect is different if the first note ends before the second since the second MIDI On is send without MIDI Off, the synth can interpret that on its will. But once any overlapped note ends, all current notes will stop playing. And so from that perspective, that is a feature which indicate maximal length the note is meaningful for the synth. In case notes are not exactly the same, for example have different MIDI channels, REAPER reports full length. |
Thanks for verifying, @AZSlow3. I suspected as much, but hadn't gotten to debugging it yet. Regardless of whether it's a bug or feature of REAPER, it's a problem for us that the API exposes it differently to the UI. We'll probably need a new API function here (or perhaps a fix to the existing one, but Cockos probably won't do that because of the backwards compatibility risk). |
As for UI, OSARA in fact reports more then GUI. In the example from Scott, visually there is no difference when the first note is expanded over following notes, it is hidden behind overlaps. Even when the note end is dragged by mouse. But what sighted people notice easily is the fact the note is going to be overlapped. May be it is a good idea to add related feature into OSARA, I mean indicating a note is overlapping. As I have explained, the first overlapping may be desired, but any following overlapping will not work. I mean this issue comes from note manipulation which make no sense, currently users just don't have any hint there is a problem. If REAPER will report real length, that can be even more confusing then current issue since the sound will have currently reported length. |
Hi, |
I could not reproduce this with notes of different pitches. @Reza-JDP, if you are experiencing this, please provide exact steps to reproduce. |
Steps to reproduce:
The expected behaviour is the note to be extended up to the edge of the item (or over its bounderies if set), But The result is The note length being announced incorrectly and getting stuck in a certain value. |
You're absolutely certain that one of the other notes didn't have the same pitch? They don't all need to be the same pitch for this to occur. The first time you hit a note with the same pitch, that will cause overlapping to go weird. |
Yes. |
In your project there are two first E4 notes. I mean two E4 starting at the beginning of the clip. That is definitively looking for troubles. All other notes have duplicates in the timeline, so when you increase the length you eventually overlap. Well, we can report a bug to REAPER, from the change log I guess around 7.10 they have leaked auto-correction of overlapping notes when the option is off. I don't know how to reproduce without OSARA, it is only obvious once you make an overlap and then start navigating notes OSARA way. Along the road you can select a new note which was not there, which starts at the beginning of the overlap and ends at the end of the first overlapped note. If you move it, it become real, original two notes are auto-merged into one. Or just turn on "Automatically correct overlapping notes". Then you should not hit related problems. Note you still can transiently move notes over existing, for example when creating chord inversion, but if you navigate away from the note which currently overlap, REAPER will fix the overlap. The only reason to not auto-fix is when you use a synth which produce distinct sound when you overlap notes and that is desired effect. But I will not try to use such feature in real projects, till your usual live performance style is playing the same synth with two distinct keyboards, the only way to reproduce such behavior without MIDI editing. |
@AZSlow3 That makes sense. |
I have posted bug report: https://forums.cockos.com/showthread.php?p=2782973 |
From comments in the REAPER forum, it may take some effort to convince devs provide usable solution. Alternative approach is manipulating raw MIDI events instead of notes in OSARA. With potential difference between visual representation and audition, especially in a long term (if devs change behavior of the editor). Also before considering workaround, extra check should be done that automatic correction option is immediately mirrored in the events when on and not cached in the editor. |
Expected: OSARA should report each extension of note length in 25% increments seeing as we're set to a 16th note grid. I'd expect this to happen consistently either until the note reaches the right edge of the MIDI item or perhaps beyond, depending on local settings.
Actual: OSARA reports the first 4 extends fine "50%, 75%, 1 beat, 1 beat 25%". However, this is where we reach overlapping with more than one other note. Keep hitting NumPad3 or L, you'll hear that OSARA continues to report "1 beat 25%" forever. You can verify that the length of the note is extending using REAPER's Event Properties dialog (Control+F2).
Expected: OSARA should report the note length as retracting in 25% increments, matching what we find in REAPER's Event Properties.
Actual: OSARA will report "1 beat 25%" until overlapping a single note, then reporting resumes as expected, in this case a single accurate report of "1 beat 25%", then "1 beat, 75%, 50%, 25%".
Thanks in advance for any tightening!
The text was updated successfully, but these errors were encountered: