muse-sequencer / muse

MusE is a digital audio workstation with support for both Audio and MIDI
https://muse-sequencer.github.io/
Other
634 stars 67 forks source link

MSB value of Program Change event sended by midi input device is always omitted by MusE #1238

Closed ChihHao-Su closed 7 months ago

ChihHao-Su commented 10 months ago

Describe the bug When I send a Program Change midi event 8: 1: 82 (with format "MSB: LSB: PROGRAM", which is also used in MusE) via my keyboard, with track input monitor enabled, MusE displays --: 1: 82 like

圖片.

If I send that event while recording, the recorded result is not correct too, as in picture:

圖片

The problem will occur is, this incomplete Program Change event cannot switch to the correct instrument, if the midi channel is at another instrument because of some reason (e.g. I pushed the buttons on my keyboard to switch to another instrument in order to playing it on my keyboard to see what it sounds like, or, I need to switch instrument while playing, so there's Program Change event in the progression of the song).

What I can ensure is, my Casio keyboard has no problem, the Program Change event send by it is correct. I tried Ardour, rosegarden, both of them can catch the Program Change event properly.

To Reproduce Steps to reproduce the behavior:

Expected behavior If I send a Program Change event with MSB via external midi input device, MusE should receive it properly and completely, MusE should not lost MSB value of the event.

Desktop (please complete the following information):

terminator356 commented 10 months ago

You found a 20 year old bug! Amazing. Unnoticed all these years. Thank you very much for the report. Should be fixed in master branch now. Try it out. Let me know if any trouble.

Workaround instructions for users of packaged MusE or users who are unable to build MusE:

1) Open the 'Midi Filter' dialog from the 'Midi' menu. 2) In each of the four controller filter combo boxes, click and select 'No Ctrl'. Even if they already say 'No Ctrl', do it anyway! (That is the bug: The underlying variables are init wrong.) 3) Close MusE, to store the new configuration settings. 4) Now, the changes are permanent. Only once required! Open MusE again and start using it. However, note that when the Midi Filter dialog is opened again, the controller combo boxes are not showing 'No Ctrl', they are blank which is incorrect. The reason is this bug causes the value in the combo boxes to be 'one off' or 'one away' from the true underlying value. Therefore, most users would likely want to just leave the controller combo boxes alone forever and never use them again, unless you are comfortable with this 'one off' bug.

For users who have ever set one or more of the four controller comb boxes in the past at least once, you'll likely want to open the dialog and select 'No Ctrl', or adjust your existing settings accordingly.

Please note: All users: The 'Midi Filter' feature is very old, and it needs some modern re-work. The 'Thru' buttons and the 'Channel' buttons actually do not do anything at all!

terminator356 commented 10 months ago

Update:

I wrote, for users of packaged MusE or users unable to build MusE:

Now, the changes are permanent. Only once required!

Well, actually you may have to do this for each song that is loaded, and then save the song again.

ChihHao-Su commented 7 months ago

Sorry for the long delay, I have tried it, the bug is fixed now. Thank you.