Created
November 16, 2018 14:01
-
-
Save Ivorforce/1d4ac1a6b531e3a19517f4116d54e9da 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
// source = MIKMIDIDeviceManager.shared.virtualSources[idx] | |
try MIKMIDIDeviceManager.shared.connectInput(source) { (source, commands) in | |
var numbers = MIDI.numbers | |
for case let command as MIKMIDIControlChangeCommand in commands { | |
numbers[safe: Int(command.controllerNumber)] = Float(command.controllerValue) / 127 | |
} | |
MIDI.numbers = numbers | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment