MIDIReceiver
public protocol MIDIReceiver : AnyObject
Functionality we expect for entities that can receive MIDI messages.
-
The channel the controller listens on. If -1, then it wants msgs from ALL channels
Declaration
Swift
var channel: Int { get } -
Stop playing note.
Declaration
Swift
func noteOff(note: UInt8)Parameters
notethe MIDI note to stop
-
Start playing a note.
Declaration
Swift
func noteOn(note: UInt8, velocity: UInt8)Parameters
notethe MIDI note to play
velocitythe velocity to use when playing
-
Command the keyboard to release any pressed keys
Declaration
Swift
func releaseAllKeys() -
Update the key pressure of a playing note
Declaration
Swift
func polyphonicKeyPressure(note: UInt8, pressure: UInt8)Parameters
notethe MIDI note that was previous started
pressurethe new pressure to use
-
Change a controller value
Declaration
Swift
func controlChange(controller: UInt8, value: UInt8)Parameters
controllerthe controller to change
valuethe value to use
-
Change the program/preset (0-127)
Declaration
Swift
func programChange(program: UInt8)Parameters
programthe new program to use
-
Change the whole pressure for the channel. Affects all playing notes.
Declaration
Swift
func channelPressure(pressure: UInt8)Parameters
pressurethe new pressure to use
-
Update the pitch-bend controller to a new value
Declaration
Swift
func pitchBendChange(value: UInt16)Parameters
valuethe new pitch-bend value to use
-
process(_:Extension methodwhen: ) Process a collection of MIDI messages for the controller.
Declaration
Swift
public func process(_ msgs: [MIDIMsg], when: MIDITimeStamp)Parameters
msgsthe MIDIMsg collection
View on GitHub
MIDIReceiver Protocol Reference