AKMIDINode

open class AKMIDINode: AKNode, AKMIDIListener

A version of AKInstrument specifically targeted to instruments that should be triggerable via MIDI or sequenced with the sequencer.

  • MIDI Input

    Declaration

    Swift

    open var midiIn = MIDIEndpointRef()
  • Name of the instrument

    Declaration

    Swift

    open var name = "AKMIDINode"
  • Initialize the MIDI node

    Declaration

    Swift

    public init(node: AKPolyphonicNode)

    Parameters

    node

    A polyphonic node that will be triggered via MIDI

  • Enable MIDI input from a given MIDI client

    Declaration

    Swift

    open func enableMIDI(_ midiClient: MIDIClientRef = AKMIDI().client,
                             name: String = "Unnamed")

    Parameters

    midiClient

    A refernce to the midi client

    name

    Name to connect with

  • Handle MIDI commands that come in externally

    Declaration

    Swift

    open func receivedMIDINoteOn(_ noteNumber: MIDINoteNumber,
                                     velocity: MIDIVelocity,
                                     channel: MIDIChannel)

    Parameters

    noteNumber

    MIDI Note number

    velocity

    MIDI velocity

    channel

    MIDI channel