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

Ability to specify MIDI output device? #635

Open
fragglet opened this issue Sep 19, 2024 · 1 comment
Open

Ability to specify MIDI output device? #635

fragglet opened this issue Sep 19, 2024 · 1 comment

Comments

@fragglet
Copy link

fragglet commented Sep 19, 2024

Hi, this is a feature request / inquiry about whether this idea would be accepted as an extension to the API.

Native MIDI output always uses the "default" MIDI device for the system, and there is currently no way to specify an alternative. In some cases, users want to be able to override the default. A simple example is that some really dedicated Doom players will buy a Roland SC-55 (the original MIDI synthesizer used when composing Doom's music), and want to be able to select that instead of the system's built-in MIDI synthesizer.

Some ideas I have for how this might be implemented:

  1. Allow the device to be specified in an environment variable or SDL hint. Simple to implement, but it provides no ability to enumerate the available options, and is kind of crude.
  2. Add a proper API that allows the MIDI output devices to be enumerated and a specific device chosen
  3. Reuse the soundfont system and treat alternative MIDI devices as though they're "sound fonts". The sound font API is already pretty similar to what we'd need for the device API. This approach could be nice since it avoids making the SDL_mixer API any bigger, and any programs that have already integrated with the soundfont API would get the upgrade.
@AlexMax
Copy link

AlexMax commented Sep 19, 2024

Odamex currently relies on PortMidi in order to work around SDL_Mixer's incomplete support of post-Vista MIDI. We use it primarily to control volume, but it also allows our users to play MIDI through actual hardware or virtual MIDI synthesizers if they so choose.

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

No branches or pull requests

2 participants