Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]Send MIDI message to non-existense MIDI 1.0 device cable index port #447

Open
ShowUN00dles opened this issue Dec 2, 2024 · 6 comments
Assignees
Labels
area-usb-driver 💻 Related to the USB MIDI 2.0 driver bug 🐞 Something isn't working

Comments

@ShowUN00dles
Copy link

Describe the bug
When sending MIDI message to MIDI 1.0 device, Host PC sends non-existent cable index.

To Reproduce

  1. Load the attached firmware to the ProtoZOA.
    This firmware has worked as MIDI 1.0 device, and this has 4 MIDI input/output as below.
    Image

  2. Make sure the USB MIDI 2.0 driver (UsbMidi2.sys) is loaded.

  3. Open midi.exe and send the enclosed midi message file which sends note on message to all GTBs.

  4. Check the USB packet which outputs Host PC, and it shows Host PC sends all cable index even if the MIDI device has 4 ports.
    Image
    Image

Expected behavior
Host PC sends MIDI message to the exisiting MIDI port only.

Installer Name or Version

  • Windows.MIDI.Services.In-Box.Service.-.1.0.1-preview.7.24305.1438-x64.exe

Desktop (please complete the following information):

  • OS: Windows 11 24H2 build 26120.2415 (Insider Dev channel)

Device information, if this is with an external MIDI device:

  • ProtoZOA running with the attached firmware.
    UUT_ZOA_104.zip
  • USB MIDI 2.0 class driver (USBMIDI2_10.0.1.7.x64.zip)

Application Information
'midi.exe' console app.

Additional context
When we use MIDI 1.0 driver(USBAUDIO.sys), this issue doesn't happen. Host PC only sends first 4 MIDI I/O port as below.
Image

@ShowUN00dles ShowUN00dles added the bug 🐞 Something isn't working label Dec 2, 2024
@Psychlist1972
Copy link
Contributor

Thanks. this is a known limitation in this release: all messages to/from WinMM use Group 0, which is going to map to that first port on a MIDI 1 device.

Duplicate of #418

@Psychlist1972 Psychlist1972 added the area-service-or-api 🖥️ Related to the Windows Service, core API, abstractions, etc. label Dec 2, 2024
@Psychlist1972 Psychlist1972 added the duplicate 🍭🍭 This issue or pull request already exists label Dec 2, 2024
@m-komo
Copy link
Collaborator

m-komo commented Dec 3, 2024

@Psychlist1972
This is the case using midi.exe (MIDI 2.0 API), not WinMM.
I think the main point of this feedback is that there is no cable number filter for USB MIDI 1.0 packets sent out by the USB MIDI 2.0 driver (USBMidi2.sys). As noted in the report, this issue has not been observed with the USB MIDI 1.0 driver (USBAUDIO.sys).

@Psychlist1972
Copy link
Contributor

Oh got it. Thanks. I was reading another bug right before this and thought it was the same thing.

Our approach with the MIDI 2.0 driver with a MIDI 2.0 device is to send everything and the device drops messages when there's no existing group. Looks like the same logic is being used here @AmeNote-Michael , but that won't work. Instead, the driver needs to drop the message for the MIDI 1.0 device.

Changing to a driver bug.

@Psychlist1972 Psychlist1972 added area-usb-driver 💻 Related to the USB MIDI 2.0 driver and removed area-service-or-api 🖥️ Related to the Windows Service, core API, abstractions, etc. duplicate 🍭🍭 This issue or pull request already exists labels Dec 3, 2024
@AmeNote-Michael
Copy link
Collaborator

@Psychlist1972 we need to discuss this. It would be a special data handling in the case of USB MIDI 1.0. In case of USB MIDI 2.0 the GTB and more importantly the Function Block information is unknown to the driver and thus the data-stream is just passed through in both directions - there is currently no handling for filtering data in the driver.

Should this filtering occur in driver? And then I would argue that there would need to be some kind of mechanism to handle for adapting filter in USB MIDI 2.0 as well.

@Psychlist1972
Copy link
Contributor

@Psychlist1972 we need to discuss this. It would be a special data handling in the case of USB MIDI 1.0. In case of USB MIDI 2.0 the GTB and more importantly the Function Block information is unknown to the driver and thus the data-stream is just passed through in both directions - there is currently no handling for filtering data in the driver.

Should this filtering occur in driver? And then I would argue that there would need to be some kind of mechanism to handle for adapting filter in USB MIDI 2.0 as well.

MIDI 1.0 only. No changes to the MIDI 2.0 device behavior.

This would only be at the point where you actually go to send messages to a specific cable #. At that point, you're doing translation, and you're having to read the message to translate group->cable anyway.

@AmeNote-Michael
Copy link
Collaborator

@Psychlist197 this issue is resolved in PR#468

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-usb-driver 💻 Related to the USB MIDI 2.0 driver bug 🐞 Something isn't working
Projects
Status: No status
Development

No branches or pull requests

5 participants