Class

AVAudioUnitMIDIInstrument

An abstract class representing music devices or remote instruments.

Declaration

class AVAudioUnitMIDIInstrument : AVAudioUnit

Overview

An AVAudioUnitMIDIInstrument subclass can be used in a chain that processes real-time (live) input and has general concept of music events; for example, notes.

Topics

Creating a MIDI Instrument Audio Unit

init(audioComponentDescription: AudioComponentDescription)

Initializes a MIDI instrument audio unit with the specified component description.

Sending Information to the MIDI Instrument

func sendController(UInt8, withValue: UInt8, onChannel: UInt8)

Send a MIDI controller event to the instrument.

func sendMIDIEvent(UInt8, data1: UInt8)

Sends a MIDI event which contains one data byte to the instrument.

func sendMIDIEvent(UInt8, data1: UInt8, data2: UInt8)

Sends a MIDI event which contains two data bytes to the instrument.

func sendMIDISysExEvent(Data)

Sends a MIDI System Exclusive event to the instrument.

func sendPitchBend(UInt16, onChannel: UInt8)

Sends a MIDI Pitch Bend event to the instrument.

func sendPressure(UInt8, onChannel: UInt8)

Sends a MIDI channel pressure event to the instrument.

func sendPressure(forKey: UInt8, withValue: UInt8, onChannel: UInt8)

Sends a MIDI Polyphonic key pressure event to the instrument.

func sendProgramChange(UInt8, bankMSB: UInt8, bankLSB: UInt8, onChannel: UInt8)

Sends MIDI Program Change and Bank Select events to the instrument.

func sendProgramChange(UInt8, onChannel: UInt8)

Sends MIDI Program Change and Bank Select events to the instrument.

Starting and Stopping Play

func startNote(UInt8, withVelocity: UInt8, onChannel: UInt8)

Sends a MIDI Note On event to the instrument.

func stopNote(UInt8, onChannel: UInt8)

Sends a MIDI Note Off event to the instrument

Relationships

Inherits From

See Also

Source Node Types

class AVAudioInputNode

A node that connects to the system's audio input.

class AVAudioIONode

The base class for nodes that connect to the system's audio input or output.

typealias AVAudioIONodeInputBlock

A block to get input data when called by a render operation in the manual rendering mode.

typealias AVAudioNodeCompletionHandler

A general callback handler.

typealias AVAudioPlayerNodeCompletionHandler

The callback handler for buffer or file completion.

class AVAudioPlayerNode

A class that plays buffers or segments of audio files.

class AVAudioUnitGenerator

An audio unit subclass that generates audio output.

class AVAudioUnitSampler

A class that encapsulates Apple's Sampler Audio Unit.

class AVAudioSequencer

A collection of MIDI events organized into multiple music tracks, plus a player to play back the events.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software