keijiro / MinisVS

MIDI input add-on for Bolt visual scripting
The Unlicense
71 stars 2 forks source link

Virual MIDI device support on macOS #1

Open olgv opened 3 years ago

olgv commented 3 years ago

Having the ability to select a different midi devices to listen from (then current), will allow bridging with MaxMSP over MIDI?

keijiro commented 3 years ago

Yes, that's a must-have feature for this add-on, but I'm pretty new to Bolt, so still I'm not sure what the best design is.

I'll think about it in a later phase of the development. Please stay tuned.

keijiro commented 3 years ago

I added the channel option to MIDI bolt units. Although you still can't select a specific device, you can workaround the problem by using different channel numbers in each device.

By the way, for bridging with MaxMSP, I think OSC is a better protocol choice. I'm thinking of implementing BoltOSC or something like that in the near future.

olgv commented 3 years ago

The channel addition is great!!! I also found the Midi Device Assigner class and was trying to make use of it to point to a different device :P

I ended up testing with MaxMSP's MIDItester but somehow the MIDItester successfully talks to the controller (AKAI LPD8) and the controller successfully talks to Unity, but not the MaxMSP MIDItester with Unity. I saw mentions of the Unity Input Controls on the old Minis repo - I will have to look into that, might be why Unity is not seeing MaxMSP.

BoltOSC, that's another dream :)

keijiro commented 3 years ago

Are you using a virtual MIDI device driver to connect Max/MSP with Unity?

olgv commented 3 years ago

I am using the macOS Catalina's on-board one.

Here is my test setup: Screenshot 2020-11-05 at 09 28 55 On channel 0 I get the LPD8 (OK), while on channel 10 I am expecting the ctrl'r value from MaxMSP.

And the virtual MIDI's ports look like this: Screenshot 2020-11-05 at 09 29 06

Do you recommend a different virtual MIDI device?

keijiro commented 3 years ago

Thank you for the information. When I tried the IAC driver with Unity several years ago, it didn't work well. I'm not sure of the current status.

olgv commented 3 years ago

Ah! I see... good to know that the IAC Driver is not reliable with Unity. Let me dig a bit around Unity and that and also check some alternatives.

keijiro commented 3 years ago

FYI, I released the OSC addon. I think it's handier for Max-Unity interoperability. https://github.com/keijiro/BoltOscJack

olgv commented 3 years ago

Oh WOW!!! ..that's amasing! Thank you very much for approaching OSC and bringing it into Bolt.

The more I look in this MIDI issue, the more I realise that the problem lays in Unity not shaking hands with a virtual MIDI controller, at least on macOS. I tried two other virtual MIDI devices with no luck.

But now that you brought both MIDI and OSC into Bolt, is a good use case to keep them separate. BoltMinis can remain in use for MIDI hardware while BoltOSCJack becomes the bridge for all virtual ones.

keijiro commented 3 years ago

I modified the topic of this issue ticket. Although I can't fix it very soon, I keep it open for record purposes.