https://bugs.winehq.org/show_bug.cgi?id=48781
Bug ID: 48781 Summary: midiOutShortMsg sends more than 2 bytes for Program Change Product: Wine Version: 5.0-rc6 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winmm&mci Assignee: wine-bugs@winehq.org Reporter: reinhold.hoffmann@hotmail.com Distribution: ---
According to the Windows multimedia spec of midiOutShortMsg the second pair of MIDI data bytes are optional, depending on the MIDI status byte. For the MIDI event Program Change there are no optional data bytes. But midiOutShortMsg for Program Change sends those optional bytes, too. This results that some modern keyboards accepts the second byte as a further Program Change which is 0 meaning piano for bank 0. The consequence is that every midi file played by such an external MIDI device always sounds as piano. According to the Windows spec "This function - midiOutShortMsg - is used to send any MIDI message except for system-exclusive or stream messages." - which means for Program Change as well resulting in that behaviour.
As a workaround midiOutLongMsg was used for Program Change with length = 2. This avoids sending additional invalid bytes. midiOutShortMsg is very broadly used according to the Windows spec for Program Change events and should be able to handle Program Change correctly.
https://bugs.winehq.org/show_bug.cgi?id=48781
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
https://bugs.winehq.org/show_bug.cgi?id=48781
Sagawa sagawa.aki+winebugs@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sagawa.aki+winebugs@gmail.c | |om
--- Comment #1 from Sagawa sagawa.aki+winebugs@gmail.com --- Could you attach WINEDEBUG=+winmm,+midi log with your application? See https://wiki.winehq.org/FAQ#How_do_I_get_a_debug_trace.3F for details.