OpenDUNE / OpenDUNE

DUNE, REINVENTED
GNU General Public License v2.0
1.6k stars 149 forks source link

Question - Is Core Midi supported on Mac in order to play midi on real external devices, e.g. Roland sc55? #392

Open mikesk8 opened 8 months ago

mikesk8 commented 8 months ago

Hi,

I just wanted to ask if it's possible to play midi on real external devices on Mac, e.g. Roland sc55? I understand from the project description that on Windows and Linux it's supported, but what about Mac and CoreMidi framework?

Thank you, m.

miniupnp commented 8 months ago

I don't think the MacOS midi driver does support that.

The Atari version does :wink:

miniupnp commented 8 months ago

MacOS midi driver of OpenDUNE of course.

miniupnp commented 8 months ago

@mikesk8 it is pretty simple, if you know how to route midi output to your device , just tell me ;) https://github.com/OpenDUNE/OpenDUNE/blob/master/src/audio/midi_osx.c

mikesk8 commented 8 months ago

Thank you for your answer @miniupnp ! Unfortunately, I don't have technical knowledge to help ;( I can tell you my setup and maybe this will help.

My Roland SC55 is connected to my Intel Mac via Roland UM-One USB-Midi interface. I have configured the midi device in the Audio Midi Setup tool (part of OS) on the Mac. Then, in DosBox Staging I added "mididevice= coremidi" in the config. In the original Dune II game I selected Sound Canvas in the audio setup and all works ok.

My understanding is the Core Midi Apple framework (https://developer.apple.com/documentation/coremidi) is the key to send MIDI to the external devices on Mac. I am sorry that I cannot help more, but I could test it if you have any idea how to make it work ;-)

mikesk8 commented 6 months ago

I just wanted to check if you need any testing help or anything to make this change happen? ;-)

miniupnp commented 6 months ago

I need sample code to send midi command to an external device.

mikesk8 commented 6 months ago

I need sample code to send midi command to an external device.

Would implementation by Dosbox Staging help? https://github.com/dosbox-staging/dosbox-staging/blob/main/src/midi/midi_coremidi.h In Dosbox Staging external midi on Mac works perfect.