Class

AVMIDIPlayer

A player for music file formats such as MIDI and iMelody.

Declaration

@interface AVMIDIPlayer : NSObject

Topics

Creating a MIDI Player

- initWithContentsOfURL:soundBankURL:error:

Initializes a newly allocated MIDI player with the contents of the file specified by the URL, using the specified sound bank.

- initWithData:soundBankURL:error:

Initializes a newly allocated MIDI player with the contents of the data object.

Playing Content

- prepareToPlay

Prepares to play the sequence by prerolling all events.

- play:

Plays the sequence.

playing

A Boolean value that indicates whether the sequence is playing.

- stop

Stops playing the sequence.

duration

The length of the currently loaded file, in seconds.

currentPosition

The current playback position, in seconds.

rate

The playback rate of the player.

Constants

AVMIDIPlayerCompletionHandler

A block to be called when a MIDI playback request is completed.

Relationships

Inherits From

See Also

Single Track Playback and Recording

AVAudioPlayer

An audio player that provides playback of audio data from a file or memory.

AVAudioRecorder

A class that provides audio recording capability in your application.