keijiro / MidiJack

MIDI input plugin for Unity
697 stars 113 forks source link

When in edit mode no input is detected, once stopped midi device is no longer accessible by any application. #57

Closed Echoframe closed 4 years ago

Echoframe commented 4 years ago

i use the getKey & getKeyDown in my code like this:

(...)

        if (MidiJack.MidiMaster.GetKeyDown(MidiJack.MidiChannel.All, i) == true || MidiJack.MidiMaster.GetKey(MidiJack.MidiChannel.All, i) > 0)
        {
            IndexDisplay = i;
            NoteNumberD = i - _ShiftValue;
            tar.SetBlendShapeWeight(_Indexes[NoteNumberD], MidiJack.MidiMaster.GetKey(MidiJack.MidiChannel.All, i) * 75f);
        }

(...)

once i press play, no input is detected and when i stop, the device is no longer detected for other applications (Chrome, FLstudio, Ableton).

keijiro commented 4 years ago

When in edit mode no input is detected,

MidiJack doesn't work in Edit mode.

the device is no longer detected for other applications (Chrome, FLstudio, Ableton).

As far as I know, most MIDI devices on Windows are exclusively allocated by a process. You can't share them between multiple applications.

By the way, I'm not actively working on this package any more. In recent projects, I'm using a new package called Minis. I'd recommend migrating to it.

https://github.com/keijiro/Minis

Echoframe commented 4 years ago

Thank you for the quick answer!