Some of MIDI's pitch bend events are being ignored entirely?
Trenavix opened this issue · 3 comments
Upon importing this to SM64 (This was ripped via seq64 from OOT and had pitch bend values halved), right at 36:617 (the 193rd pitch bend event), seq64 starts missing a bunch of pitch bend events for seemingly no reason. I isolated the channel with the problem. There are only pitch bend and volume events around this timestamp so I'm very confused why it's going on. Any help or a look into it is heavily appreciated!
I will take a look, but have you tried turning off all the CC Bandwidth Reduction options? SEQ64 will intentionally drop events like pitch bends if they're being sent very quickly or with very little change between them, in order to save space in the imported sequence. You can turn this off by setting all the values to 0 in the CC Bandwidth Reduction section of the Optimization box. Also it potentially might be due to it aggressively merging similar CC data so it can be shared--might want to also set the "Merge Even If Off By / CCs" to 0.
Some other midi events definitely had an impact. I ended up fixing it by removing all events except the essentials (Pan, Volume, velocities, bends, reverb, CC100/101/6), so it was quite a rare case to me. Something I couldn’t find was screwing it up. I can send a new fixed midi if you wanted to try comparing the two but I couldn’t even tell myself what really fixed it lol.
Absolutely love your tool btw, it’s one of the biggest recent advancements for the SM64 community at least. Keep up the good work 👌
Edit:
LonLonRanchMIDI.zip
Here's the MIDI if desired. The first channel is the one seen from the last post, but the problem was also fixed for 3 other channels (the other choir/voice and guitars).
Bug found and fixed. This was a tricky one, thanks so much for finding it! Call-based optimization would fail and corrupt later parts of the sequence section if the common sections ("hooks") being optimized overlapped due to aggressive merging of CC/pitch values, but only if the first half of the overlap was the original hook (oversight in checking for these overlaps). In the case of your MIDI, the corruption deleted one later time delay command, which led to shifting all the pitch values backwards in time, which "sounded" like they had been dropped. It was a lucky find!