Platforms to show: All Mac Windows Linux Cross-Platform

Back to AVMIDIPlayerMBS class.

AVMIDIPlayerMBS.Constructor(Data as MemoryBlock, SoundBankFile as FolderItem = nil, byref error as NSErrorMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Midi MBS AVFoundation Plugin 16.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes a newly allocated MIDI player with the contents of the String, using the specified sound bank.

Data: The data to play.
SoundBankFile: The folderitem of the sound bank. The sound bank must be a SoundFont2 or DLS bank.
Error: Returns, by-reference, a description of the error, if an error occurs.

For OS X the bank folderitem can be set to nil to use the default sound bank. However, iOS must always refer to a valid bank file.

See also:

AVMIDIPlayerMBS.Constructor(Data as String, SoundBankFile as FolderItem = nil, byref error as NSErrorMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Midi MBS AVFoundation Plugin 16.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes a newly allocated MIDI player with the contents of the String, using the specified sound bank.

Data: The data to play.
SoundBankFile: The folderitem of the sound bank. The sound bank must be a SoundFont2 or DLS bank.
Error: Returns, by-reference, a description of the error, if an error occurs.

For OS X the bank folderitem can be set to nil to use the default sound bank. However, iOS must always refer to a valid bank file.

See also:

AVMIDIPlayerMBS.Constructor(File as FolderItem, SoundBankFile as FolderItem = nil, byref error as NSErrorMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Midi MBS AVFoundation Plugin 16.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes a newly allocated MIDI player with the contents of the file, using the specified sound bank.

File: The file to play.
SoundBankFile: The folderitem of the sound bank. The sound bank must be a SoundFont2 or DLS bank.
Error: Returns, by-reference, a description of the error, if an error occurs.

For OS X the bank folderitem can be set to nil to use the default sound bank. However, iOS must always refer to a valid bank file.

See also:

AVMIDIPlayerMBS.Destructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Midi MBS AVFoundation Plugin 16.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The destructor.

AVMIDIPlayerMBS.play

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Midi MBS AVFoundation Plugin 16.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Plays the sequence.

If prepareToPlay has not been invoked, play may be delayed while the events are prerolled.

AVMIDIPlayerMBS.prepareToPlay

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Midi MBS AVFoundation Plugin 16.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Prepares to play the sequence by prerolling all events.

This happens automatically on play if it has not already been called, but may produce a delay in startup.

AVMIDIPlayerMBS.stop

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Midi MBS AVFoundation Plugin 16.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Stops playing the sequence.

The items on this page are in the following plugins: MBS AVFoundation Plugin.


The biggest plugin in space...