Unity MIDI control

More information and the project code can be found on Github or BitBucket.

This Unity interface is a project enable the mapping of MIDI inputs to keyboard buttons - play the mapped input on your instrument to trigger the corresponding key press. Any instrument detected by UnityMidiBridge (Windows; OSX) should work.

Example Use

The following note mappings trigger:

Example key mappings

These keypresses may be detected programmatically using the following code:

if (UnityMidiControl.Input.InputManager.GetKeyDown("x")) {
	Debug.Log("'x' down");
}
if (UnityMidiControl.Input.InputManager.GetKeyDown("d")) {
	Debug.Log("'d' down");
}
if (UnityMidiControl.Input.InputManager.GetKeyDown("a")) {
	Debug.Log("'a' down");
}

Using key codes rather than string arguments will also work:

if (UnityMidiControl.Input.InputManager.GetKeyUp(KeyCode.X)) {
	Debug.Log("'x' up");
}
if (UnityMidiControl.Input.InputManager.GetKeyUp(KeyCode.D)) {
	Debug.Log("'d' up");
}
if (UnityMidiControl.Input.InputManager.GetKeyUp(KeyCode.A)) {
	Debug.Log("'a' up");
}