Platforms to show: All Mac Windows Linux Cross-Platform

Back to MidiPlaybackMBS class.

MidiPlaybackMBS.Callback as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS MacOSX Plugin 6.0 ✅ Yes ❌ No ❌ No ✅ Yes All
Needed for the MidiPortMBS class to know which function to call
Example
dim p as MidiPlaybackMBS
dim m as MidiPortMBS
// do something useful
m.SetCallback p.Callback, p

Return the address of the callback method used to process Midi data.
The method is to be used together with the SetCallback method in the MidiPortMBS class.

MidiPlaybackMBS.Constructor(UsesInternalReverb as boolean=false, AutoStart as boolean=true)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS MacOSX Plugin 8.7 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes the midi playback.

After calling the constructor the Inited flag is true on success.
If AutoStart is false the midi playback is not started.

MidiPlaybackMBS.CPULoad as single

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS MacOSX Plugin 5.4 ✅ Yes ❌ No ❌ No ✅ Yes All
The CPU load of the graph.

Returns a short-term running average of the current CPU load of the graph.

MidiPlaybackMBS.InstrumentCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS MacOSX Plugin 5.4 ✅ Yes ❌ No ❌ No ✅ Yes All
The number of instruments.

Some examples using this method:

MidiPlaybackMBS.InstrumentID(index as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS MacOSX Plugin 5.4 ✅ Yes ❌ No ❌ No ✅ Yes All
The ID of the instrument with the given index.

Some examples using this method:

MidiPlaybackMBS.InstrumentIDOnChannel(Channel as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MIDI MBS MacOSX Plugin 5.4 ✅ Yes ❌ No ❌ No ✅ Yes All
Which instrument is playing on which channel.

(Read and Write computed property)

Some examples using this property:

MidiPlaybackMBS.InstrumentName(index as Integer) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS MacOSX Plugin 5.4 ✅ Yes ❌ No ❌ No ✅ Yes All
The name of the instrument with the given index.
Example
// show list of all names
dim m as new MidiPlaybackMBS

dim u as Integer = m.InstrumentCount-1
for i as Integer = 0 to u
Listbox1.AddRow m.InstrumentName(i)
next

Index from 0 to InstrumentCount-1.

Some examples using this method:

MidiPlaybackMBS.IsRunning as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS MacOSX Plugin 9.4 ✅ Yes ❌ No ❌ No ✅ Yes All
Whether the midi playback is running.

Lasterror is set.

MidiPlaybackMBS.LoadSoundBankFile(file as folderitem)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS MacOSX Plugin 8.5 ✅ Yes ❌ No ❌ No ✅ Yes All
Loads a sound bank file.
Example
Sub LoadSoundFont (SoundFontName as string)

dim j as Integer
dim f as folderitem
dim e as string

//GET SOUNDFONT
f = Volume(0).Child("Library").Child("Audio").Child("Sounds").Child("Banks").Child(SoundFontName)

if f <> Nil then
//INSTALL SOUNDFONT
me.LoadSoundBankFile(f)
Window1.PopupMenu1.DeleteAllRows
for j = 0 to 127
if me.InstrumentName(j) <> "" then
Window1.PopupMenu1.addrow me.InstrumentName(j)
end if
next
Window1.PopupMenu1.ListIndex = 0
else
e = "Could not locate the SoundFont: "+ SoundFontName
e = e + " Please make sure the file is a valid soundfont file"
e = e + " and is located in the folder YourHardDrive/Library/Audio/Sounds/Banks"
e = e + " and has the extension .sf2"
MsgBox e
end if

End Sub

This function can load files with .sf2 extension placed in the location: Library/Audio/Sounds/Banks.

Lasterror is set.

To avoid crashes on Mac OS X 10.5, the midi playback is stopped before loading is done and restarted if necessary after loading completed.

As a side effect stopping the midi playback may reset volume, reverb and tuning.

Some examples using this method:

MidiPlaybackMBS.MaxCPULoad as single

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS MacOSX Plugin 8.7 ✅ Yes ❌ No ❌ No ✅ Yes All
The Maximum CPU load of the graph

Returns the max CPU load of the graph since this call was last made or the graph was last started.

MidiPlaybackMBS.ReverbVolume as single

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MIDI MBS MacOSX Plugin 8.7 ✅ Yes ❌ No ❌ No ✅ Yes All
The reverb volume.

The value range is -120 to 40 dB.
(Read and Write computed property)

Some examples using this property:

MidiPlaybackMBS.SendMidiEvent(Status as Integer, Data1 as Integer, Data2 as Integer, OffsetSampleFrame as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS MacOSX Plugin 5.4 ✅ Yes ❌ No ❌ No ✅ Yes All
Sends midi data for playback.

MidiPlaybackMBS.Start

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS MacOSX Plugin 9.4 ✅ Yes ❌ No ❌ No ✅ Yes All
Starts the midi playback.

Lasterror is set.

MidiPlaybackMBS.Stop

Type Topic Plugin Version macOS Windows Linux iOS Targets
method MIDI MBS MacOSX Plugin 9.4 ✅ Yes ❌ No ❌ No ✅ Yes All
Stops the midi playback.

Lasterror is set.

As a side effect stopping the midi playback may reset volume, reverb and tuning.

MidiPlaybackMBS.StreamFromDisk as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MIDI MBS MacOSX Plugin 8.7 ✅ Yes ❌ No ❌ No ✅ Yes All
Whether we are streaming from disk.

Currently setting this value can crash the application.
(Read and Write computed property)

Some examples using this property:

MidiPlaybackMBS.Tuning as single

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MIDI MBS MacOSX Plugin 8.7 ✅ Yes ❌ No ❌ No ✅ Yes All
The tuning setting.

Value is in cents from -1200 to 1200.
(Read and Write computed property)

Some examples using this property:

MidiPlaybackMBS.UsesInternalReverb as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MIDI MBS MacOSX Plugin 8.7 ✅ Yes ❌ No ❌ No ✅ Yes All
One of the audio unit properties.
Example
dim m as new MidiPlaybackMBS

MsgBox "UsesInternalRever: "+str(m.UsesInternalReverb)
m.UsesInternalReverb=true
MsgBox "UsesInternalRever: "+str(m.UsesInternalReverb)

Lasterror is set.
(Read and Write computed property)

Some examples using this property:

MidiPlaybackMBS.Volume as single

Type Topic Plugin Version macOS Windows Linux iOS Targets
property MIDI MBS MacOSX Plugin 8.7 ✅ Yes ❌ No ❌ No ✅ Yes All
The volume.

The value is in dB from -120 to 40.
(Read and Write computed property)

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


The biggest plugin in space...