Created
June 12, 2015 19:58
-
-
Save siemensikkema/eeb99ad0ac9fa7ebf685 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
import XCPlayground | |
import CoreMIDI | |
XCPSetExecutionShouldContinueIndefinitely(true) | |
func notifyProc(a: UnsafePointer<MIDINotification>, b: UnsafeMutablePointer<Void>) -> Void { | |
let notification = a[0] | |
notification.messageID | |
notification.messageSize | |
} | |
var client = MIDIClientRef() | |
let status = withUnsafeMutablePointer(&client) { | |
return MIDIClientCreate("SwiftMIDI", notifyProc, nil, $0) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment