Go Back   Cockos Incorporated Forums > Projects > Deprecated REAPER issue tracker > Closed Issue

Overlapping midi items get truncated when changing midi editors Issue Tools
issueid=2041 02-16-2010 05:28 AM
Human being with feelings
Overlapping midi items get truncated when changing midi editors
Overlapping midi item is truncated when changing between the piano roll and action editor

To reproduce:

1. Open piano roll on blank midi item and insert two midi notes with the same note value.
2. Move one so it overlaps with the other one
3. Change the editor to the action editor
4. Click on one of the cells in the action editor
5. Change the editor to the piano roll

The length of the second overlapping note is changed to the length of the first note.

This seems to be a problem with the underlying midi handling. Say I have a list of MIDI_event structs (mn is midi_message[n]):
Code:
frame_offset m0  m1  m2  m3  size
20318        144 24  96  0   3
29571        144 24  96  0   3
39218        128 24  0   0   3
48471        128 24  0   0   3
it is ambiguous as to which note-on events (144) correspond to which note-off (128) events.
Issue Details
Issue Type Closed Issue
Project Deprecated REAPER issue tracker
Category MIDI recording and playback
Status Fixed
Priority 1 - Highest
Affected Version 3.301
Closed Version 3.4
Yes votes 1
No votes 0
Assigned Users (none)
Tags (none)

02-16-2010 10:58 AM
Super Moderator (no feelings)
 
This is a little confusing. Do you mean the event editor, the action window or the toolbar editor?

Anyway I can't reproduce that with either of them:



What am I missing?
Reply
02-16-2010 02:40 PM
Human being with feelings
 
Sorry. Posted the bug at around 2am here. Action editor should be list editor and you also need to select both notes in either the piano roll or list editor.

Pictures say a thousand words:

http://screencast.com/t/NTNkNzM5Zm

My 2 cents on the issue is that the midi editors should not allow overlapping events of the same note as it doesn't make sense. It causes issues like this one and others if you write reaper extensions.
Reply
02-16-2010 03:14 PM
-blänk-
 
I can confirm, though here it is the first of the overlapping notes that gets truncated to the left edge of the second note.

- In Piano roll, create two notes on the same pitch that overlap
- select both notes
- change view to event list
- change back to piano roll
-> First note is trimmed to the left edge of the second note


Actually, this overlap-removal is a feature that was missed several times in Reaper, so I am happily going to exploit it as long it is there. But of course it is a very strange way to 'implement' it :).

EDIT: Actually the second note gets truncated as well, as fingers and Steindork say. Don't know how I could overlook that. So no "happy accident". Pity :)
Reply
02-16-2010 04:03 PM
Super Moderator (no feelings)
 
That looks not that strange to me, except that the right/later note gets truncated too which could be the actual bug in the current "hot" implementation.

Reply
02-16-2010 04:28 PM
Human being with feelings
 
I think the general issue is that overlapping notes of the same pitch should not be allowed. Any midi editor should not allow this to get into the midi event list as the behaviour is undefined. It doesn't make sense to have two note on events without note off events in between the note on events, as you don't know which note off event corresponds to which note on event (see the table in my original post).

The midi editor is truncating the second note to the length of the first note as the first note's off event happens first. The current implementation is 'fixing' a problem which should not be allowed to get in the midi event list to begin with.

I think that on overlapping notes the first note should get truncated to the start of the second note automatically. That way you can never have overlapping items entering the midi event list.
Reply
Reply

Issue Tools
Subscribe to this issue

All times are GMT -7. The time now is 03:36 PM.


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