Created
November 2, 2019 15:29
-
-
Save neogeek/1a8b0b4642a6837f9eb67b1379e2c740 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dependencies": { | |
"jp.keijiro.midi-jack": "https://github.com/keijiro/MidiJack.git#upm", | |
... | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MidiJack; | |
using UnityEngine; | |
public class MidiInputController : MonoBehaviour | |
{ | |
private void HandleMidiKnob(MidiChannel channel, int knobnumber, float knobvalue) | |
{ | |
Debug.Log($"{channel}, {knobnumber}, {knobvalue}"); | |
} | |
private void OnEnable() | |
{ | |
MidiMaster.knobDelegate += HandleMidiKnob; | |
} | |
private void OnDisable() | |
{ | |
MidiMaster.knobDelegate -= HandleMidiKnob; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment