AKAudioUnitInstrument

open class AKAudioUnitInstrument: AKMIDIInstrument

Wrapper for audio units that accept MIDI (ie. instruments)

  • Initialize the audio unit instrument

    Declaration

    Swift

    public init?(audioUnit: AVAudioUnitMIDIInstrument)

    Parameters

    audioUnit

    AVAudioUnitMIDIInstrument to wrap

  • Send MIDI Note On information to the audio unit

    Declaration

    Swift

    open func play(noteNumber: MIDINoteNumber, velocity: MIDIVelocity = 64, channel: MIDIChannel = 0)
  • Send MIDI Note Off information to the audio unit

    Declaration

    Swift

    override open func stop(noteNumber: MIDINoteNumber)
  • Declaration

    Swift

    override open func stop(noteNumber: MIDINoteNumber, channel: MIDIChannel)

    Parameters

    noteNumber
    channel