https://bugs.winehq.org/show_bug.cgi?id=39048
Bug ID: 39048 Summary: MIDI Clock Messages are Corrupted Between Wine and ALSA Product: Wine Version: 1.7.43 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winealsa.drv Assignee: wine-bugs@winehq.org Reporter: josh.sarro@gmail.com Distribution: ---
When using an app running over Wine, MIDI Clock messages sent from the app to native Linux applications using ALSA MIDI are corrupted and not recognized as MIDI Clock messages.
To Reproduce:
1. Start a native Linux application that supports MIDI Clock via ALSA MIDI.
In this example, I'll use Renoise, but I've also tested with other software, for example gmidimonitor. In Renoise open Edit -> Preferences -> MIDI and under MIDI Clock Slave select In device "Renoise MIDI In Sync".
2. Start MIDI Clock enabled Windows app using Wine and enable MIDI Clock output
In this example I'll use Reaper, but I've also tested with MIDIClock (a simple windows application that sends MIDIClock messages). Go to Options -> Preference (CTRL-P). In the left pane, under the heading "Audio" select "MIDI Devices". In the bottom right pain, right click on "Renoise MIDI In Sync". Click "Enable Output". Again, right click on "Renoise MIDI In Sync". Click "Send Clock/SPP to Output". Click OK
3. Run the MIDI Clock
In REAPER press play or space bar
Expected Results:
Native Linux app receives and responds to MIDI Clock
Actual Results:
Native Linux app does not recognize messages as MIDI Clock
Notes:
Another illustrative example is to use gmidimonitor instead of Renoise as the native Linux app. Start it in alsa mode (--alsa). In Reaper, perform the same steps listed above, but select gmidimonitor's port. When Reaper is playing there is a repeated message: "Sysex with size 1: F8", but connected to a native Linux application with MIDI Clock out (such as Renoise), the message is: "MIDI Real time clock message". To rule out a bug in Reaper, I tested the same scenario with a Windows application called "MIDIClock". It's available as a free download from Download.com.
https://bugs.winehq.org/show_bug.cgi?id=39048
--- Comment #1 from josh.sarro@gmail.com --- This appears to be a regression of bug 26928
https://bugs.winehq.org/show_bug.cgi?id=39048
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
--- Comment #2 from super_man@post.com --- (In reply to josh.sarro from comment #1)
This appears to be a regression of bug 26928
The bug is now marked fixed.
https://bugs.winehq.org/show_bug.cgi?id=39048
--- Comment #3 from josh.sarro@gmail.com ---
The bug is now marked fixed.
What release fixed the bug? I'd like to try to test it myself.
https://bugs.winehq.org/show_bug.cgi?id=39048
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |http://midiclock.com Keywords| |download
--- Comment #4 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to josh.sarro from comment #3)
The bug is now marked fixed.
What release fixed the bug? I'd like to try to test it myself.
Actually he was referring to bug 26928, not this one. The instructions to reproduce are a bit too complex. Is it possible to reproduce only with MIDI Clock and gmidimonitor? Does the bug require real hardware to reproduce?
You could attach a +midi log when running the app in Wine to check the messages. See https://wiki.winehq.org/FAQ#get_log
https://bugs.winehq.org/show_bug.cgi?id=39048
--- Comment #5 from josh.sarro@gmail.com --- No special hardware is needed. And yes, the programs MIDIClock and gmidimonitor can be used to reproduce the bug. I realize the scenario is a little complicated to create. I'll try to create a log and attach it. Maybe that could help. Is there something I could do to get some attention to this bug. I imagine if there is a developer that has done work on the MIDI code in the past, it shouldn't be too complicated to fix. I'd try myself, but I'm not at all familiar with the Wine codebase, so I wouldn't even know where to begin.
https://bugs.winehq.org/show_bug.cgi?id=39048
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1
--- Comment #6 from Bruno Jesus 00cpxxx@gmail.com --- I was able to reproduce what you said with gmidimonitor and MIDI Clock. MIDI is a very obscure area to me but judging by wine source code comment I guess this is a valid bug, and looking at the alsa documentation maybe wine is really using the wrong method to send the data.
At file winealsa.drv/midi.c:
906 case 0x06: /* Tune Request */ 907 case 0x08: /* Timing Clock. */ 908 case 0x0A: /* Start. */ 909 case 0x0B: /* Continue */ 910 case 0x0C: /* Stop */ 911 case 0x0E: /* Active Sensing. */ 912 /* FIXME: Is this function suitable for these purposes 913 (and also Song Select and Song Position Pointer) */ 914 snd_seq_ev_set_sysex(&event, 1, &evt);
Maybe it should actually use snd_rawmidi_write because this is not really a sysex message.
https://bugs.winehq.org/show_bug.cgi?id=39048
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx@gmail.com
--- Comment #7 from Bruno Jesus 00cpxxx@gmail.com --- Created attachment 54095 --> https://bugs.winehq.org/attachment.cgi?id=54095 patch
The attached patch fixes the issue for me. When I have more time I will come back to this (July - naturally anyone interested can tackle this in the mean time) because there is some more room for improvement.
https://bugs.winehq.org/show_bug.cgi?id=39048
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Fixed by SHA1| |53454ce9359f4ec485aa9411a0e | |9b14e3d1ed0fa Resolution|--- |FIXED
--- Comment #8 from Bruno Jesus 00cpxxx@gmail.com --- Fixed by http://source.winehq.org/git/wine.git/commitdiff/53454ce9359f4ec485aa9411a0e...
https://bugs.winehq.org/show_bug.cgi?id=39048
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 2.2.
https://bugs.winehq.org/show_bug.cgi?id=39048
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.0.x
https://bugs.winehq.org/show_bug.cgi?id=39048
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|2.0.x |---
--- Comment #10 from Michael Stefaniuc mstefani@winehq.org --- Removing the 2.0.x milestone from bugs included in 2.0.1.