AKMIDIListener

public protocol AKMIDIListener
  • Receive the MIDI note on event

    Default Implementation

    Receive the MIDI note on event

    Declaration

    Swift

    func receivedMIDINoteOn(noteNumber: MIDINoteNumber, velocity: MIDIVelocity, channel: MIDIChannel, portID: MIDIUniqueID?, offset: MIDITimeStamp)

    Parameters

    noteNumber

    MIDI Note number of activated note

    velocity

    MIDI Velocity (0-127)

    channel

    MIDI Channel (1-16)

    portID

    MIDI Unique Port ID

    offset

    the offset in samples that this event occurs in the buffer

  • Receive the MIDI note off event

    Default Implementation

    Receive the MIDI note off event

    Declaration

    Swift

    func receivedMIDINoteOff(noteNumber: MIDINoteNumber, velocity: MIDIVelocity, channel: MIDIChannel, portID: MIDIUniqueID?, offset: MIDITimeStamp)

    Parameters

    noteNumber

    MIDI Note number of released note

    velocity

    MIDI Velocity (0-127) usually speed of release, often 0.

    channel

    MIDI Channel (1-16)

    portID

    MIDI Unique Port ID

    offset

    the offset in samples that this event occurs in the buffer

  • Receive a generic controller value

    Default Implementation

    Receive a generic controller value

    Declaration

    Swift

    func receivedMIDIController(_ controller: MIDIByte, value: MIDIByte, channel: MIDIChannel, portID: MIDIUniqueID?, offset: MIDITimeStamp)

    Parameters

    controller

    MIDI Controller Number

    value

    Value of this controller

    channel

    MIDI Channel (1-16)

    portID

    MIDI Unique Port ID

    offset

    the offset in samples that this event occurs in the buffer

  • Receive single note based aftertouch event

    Default Implementation

    Receive single note based aftertouch event

    Declaration

    Swift

    func receivedMIDIAftertouch(noteNumber: MIDINoteNumber, pressure: MIDIByte, channel: MIDIChannel, portID: MIDIUniqueID?, offset: MIDITimeStamp)

    Parameters

    noteNumber

    Note number of touched note

    pressure

    Pressure applied to the note (0-127)

    channel

    MIDI Channel (1-16)

    portID

    MIDI Unique Port ID

    offset

    the offset in samples that this event occurs in the buffer

  • Receive global aftertouch

    Default Implementation

    Receive global aftertouch

    Declaration

    Swift

    func receivedMIDIAftertouch(_ pressure: MIDIByte, channel: MIDIChannel, portID: MIDIUniqueID?, offset: MIDITimeStamp)

    Parameters

    pressure

    Pressure applied (0-127)

    channel

    MIDI Channel (1-16)

    portID

    MIDI Unique Port ID

    offset

    the offset in samples that this event occurs in the buffer

  • Receive pitch wheel value

    Default Implementation

    Receive pitch wheel value

    Declaration

    Swift

    func receivedMIDIPitchWheel(_ pitchWheelValue: MIDIWord, channel: MIDIChannel, portID: MIDIUniqueID?, offset: MIDITimeStamp)

    Parameters

    pitchWheelValue

    MIDI Pitch Wheel Value (0-16383)

    channel

    MIDI Channel (1-16)

    portID

    MIDI Unique Port ID

    offset

    the offset in samples that this event occurs in the buffer

  • Receive program change

    Default Implementation

    Receive program change

    Declaration

    Swift

    func receivedMIDIProgramChange(_ program: MIDIByte, channel: MIDIChannel, portID: MIDIUniqueID?, offset: MIDITimeStamp)

    Parameters

    program

    MIDI Program Value (0-127)

    channel

    MIDI Channel (1-16)

    portID

    MIDI Unique Port ID

    offset

    the offset in samples that this event occurs in the buffer

  • Receive a MIDI system command (such as clock, sysex, etc)

    • data: Array of integers
    • portID: MIDI Unique Port ID
    • offset: the offset in samples that this event occurs in the buffer

    Default Implementation

    Receive a MIDI system command (such as clock, sysex, etc)

    • data: Array of integers
    • portID: MIDI Unique Port ID
    • offset: the offset in samples that this event occurs in the buffer

    Declaration

    Swift

    func receivedMIDISystemCommand(_ data: [MIDIByte], portID: MIDIUniqueID?, offset: MIDITimeStamp)
  • receivedMIDISetupChange() Default implementation

    MIDI Setup has changed

    Default Implementation

    MIDI Setup has changed

    Declaration

    Swift

    func receivedMIDISetupChange()
  • MIDI Object Property has changed

    Default Implementation

    MIDI Setup has changed

    Declaration

    Swift

    func receivedMIDIPropertyChange(propertyChangeInfo: MIDIObjectPropertyChangeNotification)
  • Generic MIDI Notification

    Default Implementation

    Generic MIDI Notification

    Declaration

    Swift

    func receivedMIDINotification(notification: MIDINotification)
  • isEqualTo(_:) Extension method

    Declaration

    Swift

    func isEqualTo(_ listener: AKMIDIListener) -> Bool