这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Integrate libremidi for real MIDI device enumeration

This PR integrates the libremidi library to replace hardcoded MIDI device lists with real cross-platform MIDI device enumeration in the qt5-ci-tool application.

Changes Made

CMake Integration

  • Added libremidi dependency using FetchContent in root CMakeLists.txt
  • Linked libremidi to midi-ci-tool-lib target in tools/ci-tool/CMakeLists.txt

MidiDeviceManager Updates

  • Added libremidi include header
  • Replaced hardcoded device lists with real libremidi::observer enumeration
  • Added error handling for device enumeration failures
  • Maintained existing interface for backward compatibility

SettingsWidget Integration

  • Updated updateDeviceLists() to use real device enumeration from MidiDeviceManager
  • Modified device selection callbacks to actually configure MIDI transport layer
  • Added proper index checking to skip placeholder items

Features

  • ✅ Cross-platform MIDI device support (Windows, macOS, Linux)
  • ✅ MIDI 1.0 and MIDI 2.0 protocol support through libremidi
  • ✅ Real-time device enumeration in Settings tab
  • ✅ Proper device selection and configuration
  • ✅ Error handling for enumeration failures
  • ✅ Backward compatible interface

Testing

Note: Local testing was limited due to CMake not being available in the development environment. CI validation will confirm the build works correctly.

Implementation Reference

Implementation follows patterns from ktmidi-ci-tool application in the ktmidi repository, specifically the MidiDeviceManager device enumeration approach.

Link to Devin run: https://app.devin.ai/sessions/ea4a3f80fe804aba82963b442f593d06
Requested by: Atsushi Eno (atsushieno@gmail.com)

- Add libremidi dependency using FetchContent in root CMakeLists.txt
- Link libremidi to midi-ci-tool-lib target
- Replace hardcoded device lists in MidiDeviceManager with real libremidi enumeration
- Update SettingsWidget to use actual device enumeration from MidiDeviceManager
- Add proper device selection callbacks that configure MIDI transport layer
- Support cross-platform MIDI 1.0 and 2.0 devices through libremidi
- Add error handling for device enumeration failures

Co-Authored-By: Atsushi Eno <atsushieno@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@atsushieno atsushieno merged commit 9c6f52b into main Jun 15, 2025
@atsushieno atsushieno deleted the devin/1750002967-midi-device-integration branch June 19, 2025 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants