Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools
Old 05-02-2023, 06:35 PM   #1
PelPix
Human being with feelings
 
Join Date: Jun 2011
Posts: 26
Default MIDI type 0 note ends don't display correctly when split into tracks by channel

This is a bug I've been running into on and off for the past 10 or so years when I try to load old midis from 90s games into REAPER.

Steps to reproduce:
Load an old type 0 midi, usually from a game (this is music2.mid from the AoE2 OST)
Select "single channel item on multiple tracks"

See attached for what (occasionally) results. This also still happens if you select the other option and then explode it in item processing.

If you select "multi channel item on single track" and then filter to the same channel, it displays correctly. This seems to happen with certain specific midis, but I haven't figured out precisely what causes it. As far as I can tell, this only happens with affected midis in REAPER.
Attached Images
File Type: png Screenshot 2023-05-02 213004.png (6.2 KB, 201 views)
File Type: png Screenshot 2023-05-02 213151.png (4.2 KB, 191 views)
PelPix is offline   Reply With Quote
Old 05-03-2023, 04:15 AM   #2
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 17,824
Default

Can you post one of the .mid files that causes this behavior?
schwa is offline   Reply With Quote
Old 05-03-2023, 04:29 AM   #3
PitchSlap
Human being with feelings
 
PitchSlap's Avatar
 
Join Date: Jan 2008
Location: Vancouver, BC
Posts: 3,836
Default

Pretty sure this is the same bug.
It also affects the unsplit MIDI file in the Media Explorer.

Note ends seem to extend creating an overlap, and then don't display correctly.
Quantizing the note ends corrects the issue, but as can be seen below, if a different track is opened and the same quantize setting is then bypassed, if causes the previously corrected tracks to revert to being wonky.


There's also an inconsistency with the track lengths (though it's possible that's a bug with the MIDI export).

Example attached.
Attached Files
File Type: mid Test.mid (7.5 KB, 189 views)
__________________
FRs: v5 Media Explorer Requests, Global Quantization, Session View
Win10 Pro 64-bit, Reaper 6(x64), AMD 3950x, Aorus X570 Master, 64GB DDR4 3600, PowerColor Red Devil 5700XT, EVO 970 2TB, 10TB HD, Define R6
PitchSlap is offline   Reply With Quote
Old 05-03-2023, 06:55 PM   #4
PelPix
Human being with feelings
 
Join Date: Jun 2011
Posts: 26
Default

Quote:
Originally Posted by schwa View Post
Can you post one of the .mid files that causes this behavior?
happily, as long as it doesn't cause you copyright issues
Attached Files
File Type: mid music2.mid (19.2 KB, 172 views)
PelPix is offline   Reply With Quote
Old 05-04-2023, 03:41 AM   #5
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 17,824
Default

And what channel has the problem?
schwa is offline   Reply With Quote
Old 05-04-2023, 03:59 PM   #6
PelPix
Human being with feelings
 
Join Date: Jun 2011
Posts: 26
Default

Quote:
Originally Posted by schwa View Post
And what channel has the problem?
4, at the end, for instance. sometimes it can be all of them. sometimes it's only 1 or 2, sometimes it's only some of the notes in any combination of those.
PelPix is offline   Reply With Quote
Old 05-04-2023, 05:40 PM   #7
PelPix
Human being with feelings
 
Join Date: Jun 2011
Posts: 26
Default

Quote:
Originally Posted by PitchSlap View Post
Pretty sure this is the same bug.
this bug only exists in the piano roll
Attached Images
File Type: png Untitled-1.png (80.0 KB, 183 views)
PelPix is offline   Reply With Quote
Old 05-05-2023, 02:15 AM   #8
PitchSlap
Human being with feelings
 
PitchSlap's Avatar
 
Join Date: Jan 2008
Location: Vancouver, BC
Posts: 3,836
Default

Quote:
Originally Posted by PelPix View Post
this bug only exists in the piano roll
My mistake. Different bugs then, I was just about to post a new thread when I saw this, but as they both affect type 0 MIDI, maybe there's a common denominator.

I'll create a new thread if/when your bug is fixed and the one I mentioned isn't.
__________________
FRs: v5 Media Explorer Requests, Global Quantization, Session View
Win10 Pro 64-bit, Reaper 6(x64), AMD 3950x, Aorus X570 Master, 64GB DDR4 3600, PowerColor Red Devil 5700XT, EVO 970 2TB, 10TB HD, Define R6
PitchSlap is offline   Reply With Quote
Old 05-05-2023, 02:45 AM   #9
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,787
Default

IS it because the file's PPQ is 120 (and Reaper's preference setting here is 960

Here are MIDI Event lists for channel 10 in the multichannel clip and the "exploded on import" clips.

__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 05-05-2023, 04:50 AM   #10
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 17,824
Default

The file is 120 ppq but that is not the problem. The highlighted notes in the previous post are equivalent, they are the same length in beats.

The cause is that the file uses running status, which is an old protocol for reducing bandwidth. REAPER is not handling running status properly when filtering by channel. Decoding running status requires looking at every byte in the file which can be tricky to do if you are intentionally skipping some messages. This might be a pain to fix but we'll look at it.
schwa is offline   Reply With Quote
Old 05-05-2023, 04:54 AM   #11
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 17,824
Default

Technical debt from 1983, basically.
schwa is offline   Reply With Quote
Old 05-08-2023, 01:13 AM   #12
PelPix
Human being with feelings
 
Join Date: Jun 2011
Posts: 26
Default

Quote:
Originally Posted by schwa View Post
Technical debt from 1983, basically.
No worries, take your time! It's so rare I only just now reported it after experiencing it for a while. Excited though. I remake video game music as a hobby and it's always nice to have original midi for reference.
PelPix is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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