Skip to content

[BUG]: MIDI Baby Gen 4 - USB-MIDI 1.0 inbound SysEx non-deterministically corrupted (bytes dropped / message abandoned) with usbaudio.sys MIDI 1 driver and KSA transport #1040

Description

@kmarchiori

Report pre-requisites

  • I have searched this repo for existing issues to confirm this is not a duplicate
  • I agree to follow this project's Code of Conduct

Clarity and Disclosure

  • I confirm that any AI analysis included in this report is clearly called out / tagged as AI-generated with "AI Generated Content". Reports with suspected AI content may be closed if not disclosed.
  • I confirm that I will quickly follow-up to questions or requests for additional detail, otherwise the issue may be closed

Windows Version

Microsoft Windows 11 Pro 25H2, build 26200.8655

Type of bug

  • Windows doesn't recognize MIDI device (doesn't show in device manager)
  • Application doesn't recognize MIDI device or ports
  • Cannot update firmware on MIDI device (specify device, app, and firmware info)
  • MIDI device is recognized, but cannot send or receive messages
  • Sent or received MIDI messages are corrupted
  • Application not working as expected
  • MIDI 1.0 ports not named as expected
  • Performance not as expected
  • Localization issue (incorrect or missing language for Windows running something other than en-US)
  • General application crash or hang
  • MIDI Service crash or hang requiring Windows reboot
  • Windows bugcheck / BSOD (please include in the areas below the device id from Windows Settings About page or a link to your crash dump uploaded to a sharing service)
  • Other or Unsure (please indicate in additional notes section below)

Location

  • Application using WinMM MIDI 1.0 (Classic API). Name provided below.
  • Application using WinRT MIDI 1.0 (Windows 10 MIDI). Name provided below.
  • Application using Windows MIDI Services SDK (MIDI 2.0). Name provided below.
  • Other app/DAW/tool. Not sure about which API or SDK it uses. Name provided below.
  • Windows MIDI Services tools like MIDI Settings, Console, etc.
  • Directly in Windows MIDI Services SDK (for Developers only, please provide repro code)
  • General Windows shell (Device Manager, Settings, Services, etc.). Name provided below.
  • Windows MIDI 2.0 Class Driver (usbmidi2-acx)
  • Windows MIDI 1.0 Class Driver (usbaudio)
  • Vendor-provided MIDI driver (please provide details below)
  • Other or Unsure (please indicate in additional notes section below)

Application Name and Version

Windows MIDI Services Console (midi.exe), SDK Runtime and Tools 1.0.17-rc.4.25 (x64) — the attached midi_ump_capture.txt was produced here (native UMP monitor, upstream of WinMM). Also reproduced in Pocket MIDI (WinMM MIDI 1.0) and a Chromium WebMIDI editor (Disaster Area's web editor for the MIDI Baby Gen4)

MIDI Device Name

Disaster Area Designs MIDI Baby Gen4, firmware v34. Class-compliant USB-MIDI 1.0 device. Enumerates on the KSA transport as endpoint MIDI Baby Gen4, ID \?\swd#midisrv#midiu_ksa_9573422563528216463#{e7cce071-3c03-423f-88d3-f1045d02552b}

Output from the MIDI Diagnostics Tool

========================================================================================================================
header
========================================================================================================================

This tool is part of the Windows MIDI Services SDK and tools
Copyright 2026- Microsoft Corporation.
Information, license, and source available at https://aka.ms/midi

Microsoft Windows MIDI Services - Diagnostics Report

ver_build_source                     : GitHub Preview
ver_build_name                       : SDK Release Candidate 4
ver_build_full                       : 1.0.17-rc.4.25

========================================================================================================================
os
========================================================================================================================

os_version                           : 10.0.26200

========================================================================================================================
processor_env
========================================================================================================================

PROCESSOR_ARCHITECTURE               : AMD64
PROCESSOR_IDENTIFIER                 : AMD64 Family 25 Model 97 Stepping 2, AuthenticAMD
PROCESSOR_LEVEL                      : 25
PROCESSOR_REVISION                   : 6102

========================================================================================================================
native_system_info
========================================================================================================================

processor_architecture               : 64-bit Intel/AMD
processor_level                      : 25
processor_revision                   : 0x6102
------------------------------------------------------------------------------------------------------------------------
running_emulated                     : Native Intel/AMD x64 on x64 PC (Not Emulated)
------------------------------------------------------------------------------------------------------------------------

timecaps_min_period                  : 1
timecaps_max_period                  : 1000000

timer_resolution_min                 : 0.500 ms
timer_resolution_max                 : 15.625 ms
timer_resolution_current             : 1.000 ms

========================================================================================================================
dev_mode
========================================================================================================================

dev_mode_enabled                     : true

========================================================================================================================
reg_drivers32
========================================================================================================================

reg_drivers32_entry                  : midi = wdmaud.drv
reg_drivers32_entry                  : MidisrvTransferComplete = 1
reg_drivers32_entry                  : midi1 = wdmaud2.drv

========================================================================================================================
reg_drivers32wow
========================================================================================================================

reg_drivers32wow_entry               : midi = wdmaud.drv
reg_drivers32wow_entry               : midi1 = wdmaud2.drv

========================================================================================================================
enum_winrt_midi1_api_input_ports
========================================================================================================================

endpoint_device_id                   : \\?\SWD#MMDEVAPI#MIDIU_KSA_12543800668182195140_0_1#{504be32c-ccf6-4d2c-b73f-6f8b3747e22b}
name                                 : MBOX Studio Control
------------------------------------------------------------------------------------------------------------------------
endpoint_device_id                   : \\?\SWD#MMDEVAPI#MIDIU_KSA_9573422563528216463_0_0#{504be32c-ccf6-4d2c-b73f-6f8b3747e22b}
name                                 : MIDI Baby Gen4
------------------------------------------------------------------------------------------------------------------------
endpoint_device_id                   : \\?\SWD#MMDEVAPI#MIDIU_KSA_12543800668182195140_0_0#{504be32c-ccf6-4d2c-b73f-6f8b3747e22b}
name                                 : MBOX Studio External

========================================================================================================================
enum_winrt_midi1_api_output_ports
========================================================================================================================

endpoint_device_id                   : \\?\SWD#MMDEVAPI#MIDIU_KSA_9573422563528216463_1_0#{6dc23320-ab33-4ce4-80d4-bbb3ebbf2814}
name                                 : MIDI Baby Gen4
------------------------------------------------------------------------------------------------------------------------
endpoint_device_id                   : \\?\SWD#MMDEVAPI#MIDIU_KSA_12543800668182195140_1_0#{6dc23320-ab33-4ce4-80d4-bbb3ebbf2814}
name                                 : MBOX Studio External
------------------------------------------------------------------------------------------------------------------------
endpoint_device_id                   : \\?\SWD#MMDEVAPI#MicrosoftGSWavetableSynth#{6dc23320-ab33-4ce4-80d4-bbb3ebbf2814}
name                                 : Microsoft GS Wavetable Synth
------------------------------------------------------------------------------------------------------------------------
endpoint_device_id                   : \\?\SWD#MMDEVAPI#MIDIU_KSA_12543800668182195140_1_1#{6dc23320-ab33-4ce4-80d4-bbb3ebbf2814}
name                                 : MBOX Studio Control

========================================================================================================================
enum_winmm_midi1_api_input_ports
========================================================================================================================

endpoint_count                       : 3
------------------------------------------------------------------------------------------------------------------------
endpoint_index                       : 0
name                                 : MBOX Studio External
------------------------------------------------------------------------------------------------------------------------
endpoint_index                       : 1
name                                 : MBOX Studio Control
------------------------------------------------------------------------------------------------------------------------
endpoint_index                       : 2
name                                 : MIDI Baby Gen4
------------------------------------------------------------------------------------------------------------------------
dev_caps_error_count                 : 0

========================================================================================================================
enum_winmm_midi1_api_output_ports
========================================================================================================================

endpoint_count                       : 4
------------------------------------------------------------------------------------------------------------------------
endpoint_index                       : 0
name                                 : Microsoft GS Wavetable Synth
------------------------------------------------------------------------------------------------------------------------
endpoint_index                       : 1
name                                 : MBOX Studio External
------------------------------------------------------------------------------------------------------------------------
endpoint_index                       : 2
name                                 : MBOX Studio Control
------------------------------------------------------------------------------------------------------------------------
endpoint_index                       : 3
name                                 : MIDI Baby Gen4
------------------------------------------------------------------------------------------------------------------------
dev_caps_error_count                 : 0

========================================================================================================================
enum_registry
========================================================================================================================

reg_current_config                   : Not present
reg_discovery_enabled                : true
reg_discovery_timeout_ms             : Not present
reg_use_mmcss                        : Not present
------------------------------------------------------------------------------------------------------------------------
reg_midisrv_exe                      : %systemroot%\system32\midisrv.exe
------------------------------------------------------------------------------------------------------------------------
reg_sdk_installed                    : C:\Program Files\Windows MIDI Services\Desktop App SDK Runtime\
------------------------------------------------------------------------------------------------------------------------
reg_transport_name                   : (Midisrv Transport)
reg_transport_clsid                  : {2BA15E4E-5417-4A66-85B8-2B2260EFBC84}
reg_transport_dll                    : C:\WINDOWS\System32\Midi2.MidiSrvTransport.dll
file_version                         : 1.0.15.0
------------------------------------------------------------------------------------------------------------------------
reg_transport_name                   : (Diagnostics Transport)
reg_transport_clsid                  : {ac9b5417-3fe0-4e62-960f-034ee4235a1a}
reg_transport_dll                    : C:\WINDOWS\System32\Midi2.DiagnosticsTransport.dll
file_version                         : 1.0.15.0
------------------------------------------------------------------------------------------------------------------------
reg_transport_name                   : Midi2KSAggregateTransport
reg_transport_clsid                  : {0f273b18-e372-4d95-87ac-c31c3d22e937}
reg_transport_enabled                : true
reg_transport_dll                    : C:\WINDOWS\System32\Midi2.KSAggregateTransport.dll
file_version                         : 1.0.16.1
------------------------------------------------------------------------------------------------------------------------
reg_transport_name                   : Midi2KSTransport
reg_transport_clsid                  : {26FA740D-469C-4D33-BEB1-3885DE7D6DF1}
reg_transport_enabled                : true
reg_transport_dll                    : C:\WINDOWS\System32\Midi2.KSTransport.dll
file_version                         : 1.0.15.0
------------------------------------------------------------------------------------------------------------------------
reg_transport_name                   : Midi2LoopbackMidiTransport
reg_transport_clsid                  : {942BF02D-93C0-4EA8-B03E-D51156CA75E1}
reg_transport_enabled                : true
reg_transport_dll                    : C:\WINDOWS\System32\Midi2.LoopbackMidiTransport.dll
file_version                         : 1.0.15.0
------------------------------------------------------------------------------------------------------------------------
reg_transport_name                   : Midi2VirtualMidiTransport
reg_transport_clsid                  : {8feaad91-70e1-4a19-997a-377720a719c1}
reg_transport_enabled                : true
reg_transport_dll                    : C:\WINDOWS\System32\Midi2.VirtualMidiTransport.dll
file_version                         : 1.0.15.0
------------------------------------------------------------------------------------------------------------------------

========================================================================================================================
sdk_runtime_status
========================================================================================================================

sdk_runtime_initialized              : true

========================================================================================================================
service_status
========================================================================================================================

available                            : true

========================================================================================================================
midi_clock
========================================================================================================================

clock_frequency                      : 10000000
clock_now                            : 9029420065

========================================================================================================================
enum_transports
========================================================================================================================

transport_id                         : {8FEAAD91-70E1-4A19-997A-377720A719C1}
name                                 : Virtual Midi
transport_code                       : APP
version                              : 1.0.15.0
author                               : Microsoft Corporation
description                          : Provides virtual device (app-to-app MIDI) support for MIDI 2.0
------------------------------------------------------------------------------------------------------------------------
transport_id                         : {AC9B5417-3FE0-4E62-960F-034EE4235A1A}
name                                 : Diagnostics Endpoints
transport_code                       : DIAG
version                              : 1.0.15.0
author                               : Microsoft Corporation
description                          : Provides the built-in diagnostics loopback and diagnostics ping endpoints for MIDI 2.0
------------------------------------------------------------------------------------------------------------------------
transport_id                         : {942BF02D-93C0-4EA8-B03E-D51156CA75E1}
name                                 : Loopback MIDI
transport_code                       : LOOP
version                              : 1.0.15.0
author                               : Microsoft Corporation
description                          : Provides simple loopback app-to-app MIDI support
------------------------------------------------------------------------------------------------------------------------
transport_id                         : {26FA740D-469C-4D33-BEB1-3885DE7D6DF1}
name                                 : Kernel Streaming MIDI for UMP Drivers
transport_code                       : KS
version                              : 1.0.15.0
author                               : Microsoft Corporation
description                          : Provides Kernel Streaming (KS) support for USB MIDI 1.0 and USB MIDI 2.0 using the new MIDI 2.0/UMP class driver.
------------------------------------------------------------------------------------------------------------------------
transport_id                         : {0F273B18-E372-4D95-87AC-C31C3D22E937}
name                                 : Kernel Streaming Aggregate (KSA) MIDI
transport_code                       : KSA
version                              : 1.0.15.0
author                               : Microsoft Corporation
description                          : Provides Kernel Streaming (KSA) support for USB MIDI 1.0 kernel streaming drivers aggregated into a UMP endpoint.
------------------------------------------------------------------------------------------------------------------------

========================================================================================================================
enum_ump_api_endpoints
========================================================================================================================

endpoint_device_id                   : \\?\swd#midisrv#midiu_ksa_12543800668182195140#{e7cce071-3c03-423f-88d3-f1045d02552b}
name                                 : Avid MBOX Studio MIDI
transport_code                       : KSA
name_user_supplied                   :
name_endpoint_supplied               :
name_transport_supplied              : Avid MBOX Studio MIDI
desc_transport_supplied              :
desc_user_supplied                   :

gtb_number                           : 1
gtb_name                             : MBOX Studio External
gtb_first_group_number               : 1
gtb_group_count                      : 1
gtb_direction                        : Message Source

gtb_number                           : 2
gtb_name                             : MBOX Studio Control 2
gtb_first_group_number               : 2
gtb_group_count                      : 1
gtb_direction                        : Message Source

gtb_number                           : 3
gtb_name                             : MBOX Studio External
gtb_first_group_number               : 1
gtb_group_count                      : 1
gtb_direction                        : Message Destination

gtb_number                           : 4
gtb_name                             : MBOX Studio Control 2
gtb_first_group_number               : 2
gtb_group_count                      : 1
gtb_direction                        : Message Destination

midi_out_port                        : 1: MBOX Studio External
midi_out_port                        : 2: MBOX Studio Control
midi_in_port                         : 1: MBOX Studio Control
midi_in_port                         : 0: MBOX Studio External
parent_id                            : TUSBAUDIO_ENUM\VID_0B0F&PID_2020&MI_03&KS\8&95f8671&0&0003
parent_name                          : Avid MBOX Studio MIDI
------------------------------------------------------------------------------------------------------------------------
endpoint_device_id                   : \\?\swd#midisrv#midiu_ksa_9573422563528216463#{e7cce071-3c03-423f-88d3-f1045d02552b}
name                                 : MIDI Baby Gen4
transport_code                       : KSA
name_user_supplied                   :
name_endpoint_supplied               :
name_transport_supplied              : MIDI Baby Gen4
desc_transport_supplied              :
desc_user_supplied                   :

gtb_number                           : 1
gtb_name                             : MIDI Baby Gen4
gtb_first_group_number               : 1
gtb_group_count                      : 1
gtb_direction                        : Message Source

gtb_number                           : 2
gtb_name                             : MIDI Baby Gen4
gtb_first_group_number               : 1
gtb_group_count                      : 1
gtb_direction                        : Message Destination

midi_out_port                        : 3: MIDI Baby Gen4
midi_in_port                         : 2: MIDI Baby Gen4
parent_id                            : USB\VID_16D0&PID_1353&MI_00\9&1dc01d6f&0&0000
parent_name                          : MIDI Baby Gen4
------------------------------------------------------------------------------------------------------------------------
endpoint_device_id                   : \\?\swd#midisrv#midiu_diag_loopback_a#{e7cce071-3c03-423f-88d3-f1045d02552b}
name                                 : Service Test Loopback A
transport_code                       : DIAG
name_user_supplied                   :
name_endpoint_supplied               :
name_transport_supplied              : Service Test Loopback A
desc_transport_supplied              : Diagnostics loopback endpoint. For testing and development purposes.
desc_user_supplied                   :
parent_id                            : SWD\MIDISRV\MIDIU_DIAG_TRANSPORT
parent_name                          : MIDI 2.0 Service Tests
------------------------------------------------------------------------------------------------------------------------
endpoint_device_id                   : \\?\swd#midisrv#midiu_diag_loopback_b#{e7cce071-3c03-423f-88d3-f1045d02552b}
name                                 : Service Test Loopback B
transport_code                       : DIAG
name_user_supplied                   :
name_endpoint_supplied               :
name_transport_supplied              : Service Test Loopback B
desc_transport_supplied              : Diagnostics loopback endpoint. For testing and development purposes.
desc_user_supplied                   :
parent_id                            : SWD\MIDISRV\MIDIU_DIAG_TRANSPORT
parent_name                          : MIDI 2.0 Service Tests
------------------------------------------------------------------------------------------------------------------------
endpoint_device_id                   : \\?\swd#midisrv#midiu_diag_ping#{e7cce071-3c03-423f-88d3-f1045d02552b}
name                                 : Service Test Ping (Internal)
transport_code                       : DIAG
name_user_supplied                   :
name_endpoint_supplied               :
name_transport_supplied              : Service Test Ping (Internal)
desc_transport_supplied              : Internal UMP Ping endpoint. Do not send messages to this endpoint.
desc_user_supplied                   :
parent_id                            : SWD\MIDISRV\MIDIU_DIAG_TRANSPORT
parent_name                          : MIDI 2.0 Service Tests

========================================================================================================================
ping_test
========================================================================================================================

ping_attempt_count                   : 10
ping_return_count                    : 10
round_trip_total_ticks               : 3482
round_trip_average_ticks             : 348

========================================================================================================================
*** Successful Run ***
========================================================================================================================


========================================================================================================================
end_of_file
========================================================================================================================

mididiag.txt

Repro

  • I confirm that I was able to reproduce this issue using a simple app like midi.exe, midi1monitor.exe or Pocket MIDI
  • I tried but was unable to reproduce this issue using a simple application

Steps to reproduce

  1. Connect a class-compliant USB-MIDI 1.0 device (here: Disaster Area MIDI Baby Gen4, firmware v34). Confirm via midi list endpoints that it enumerates on the KSA transport as a single bidirectional function block on Group 1 (endpoint MIDI Baby Gen4, ID \?\swd#midisrv#midiu_ksa_9573422563528216463#…). See attached midi_endpoint_list.txt.

  2. Monitor the endpoint in the Windows MIDI Services Console: midi.exe, message/UMP view (native path, upstream of WinMM).

  3. Trigger the device's full-configuration SysEx dump repeatedly. Here the dump was requested by the vendor's editor issuing config-read SysEx; each cycle begins with a Universal Identity Request/Reply (F0 7E … 06 02 …) followed by the config blocks.

  4. Let it run several cycles (the attached midi_ump_capture.txt is 6 cycles / 1217 packets).

  5. Reassemble the MT3 SysEx7 packets per block and compare byte-for-byte across reads, and against the device's true output (attached android_midi_output.txt, same device on an Android USB-MIDI host).

Observed: the same block reassembles differently across reads — e.g. block 0F 00 00 is intact on reads 1/3/4/6 but drops both non-default 0x40 parameter bytes on read 5 (packets 792–801), and is abandoned with no End on read 2. Full per-read breakdown and packet citations in the attached report.

midi_ump_capture.txt

android_midi_output.txt

Expected behavior

Each SysEx block reassembles to the exact bytes the device transmits, identically on every read. Inbound SysEx from a class-compliant USB-MIDI 1.0 device should pass through the KSA transport's USB-MIDI 1.0 → UMP conversion losslessly, with each message properly framed (one Start, contiguous Continues, one End) and no bytes dropped, regardless of how many read cycles run.
Concretely, block 0F 00 00 should come back on every read as it does on the device (confirmed via Android, attached android_midi_output.txt):
F0 00 02 17 0F 00 00 01 00 … 11 00 … 40 00 … 09 09 09 09 09 09 09 09 09 40 09 09 09 09 09 09 00 … 01 F7
The two 0x40 bytes are real non-default parameter values, not padding, and must survive intact.

Additional notes

AI Generated Content: The analysis and write-up in this report — packet reassembly, failure-mode classification, KSAggregate localization, and cross-referencing to other issues — were AI-assisted and reviewed by me. The evidence is not AI-generated: all captures, mididiag, endpoint enumeration, and registry/workaround testing were produced on my own hardware with the shipped tools, and I verified the cited packets against the attached capture.

Not a duplicate of #1025 (usbmidi2-acx wrong CIN on outbound System Realtime; this is KSAggregate dropping inbound SysEx7 data — different driver, direction, and message class). Related: #944, #975, #226, #372, #1014.
Non-deterministic: corruption appears within a few read cycles, not necessarily cycle 1; the attached 6-cycle capture is the authoritative artifact if the exact vendor config-request isn't reproducible.

midi_endpoint_list.txt
midi-services-usbmidi1-sysex-truncation-report.md

Metadata

Metadata

Assignees

Labels

area-service-or-api 🖥️Related to the Windows Service, core API, abstractions, etc.area-transports 🚌General transports like USB, BLE, Network, etc.bug 🐞Something isn't workingneeds-investigation 🔍Needs to be investigated before considering or solving.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions