Initializer

init(contentsOf:soundBankURL:)

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

Declaration

init(contentsOf inURL: URL, soundBankURL bankURL: URL?) throws

Parameters

inURL

The file to play.

bankURL

The URL of the sound bank. The sound bank must be a SoundFont2 or DLS bank.

outError

Returns, by-reference, a description of the error, if an error occurs.

Return Value

An initialized AVMidiPlayer instance or nil if an error is encountered.

Discussion

See Also

Creating a MIDI Player

init(data: Data, soundBankURL: URL?)

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