Contents

init(contentsOf:soundBankURL:)

Creates a player to play a MIDI file with the specified soundbank.

Declaration

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

Parameters

  • inURL:

    The URL of the file to play.

  • bankURL:

    The URL of the sound bank. The sound bank must be in SoundFont2 or DLS format. In macOS, you can pass Nil 227m0 for the bank URL argument to use the default sound bank. In iOS, you must always pass a valid bank file.

Return Value

A new MIDI player, or nil if an error occurred.

See Also

Creating a MIDI player