Xojo Conferences
MBSOct2019CologneDE

Platforms to show: All Mac Windows Linux Cross-Platform

MidiPlaybackMBS.Callback as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacOSX Plugin 6.0 Yes Yes No Yes No
Function: 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
Notes:
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.

Feedback, Comments & Corrections

MidiPlaybackMBS.Constructor(UsesInternalReverb as boolean=false, AutoStart as boolean=true)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacOSX Plugin 8.7 Yes No No Yes, macOS only No
Function: Initializes the midi playback.
Notes:
After calling the constructor the Inited flag is true on success.
If AutoStart is false the midi playback is not started.

Feedback, Comments & Corrections

MidiPlaybackMBS.CPULoad as single
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacOSX Plugin 5.4 Yes No No Yes, macOS only No
Function: The CPU load of the graph.
Notes:
Returns a short-term running average of the current CPU load of the graph.

Feedback, Comments & Corrections

MidiPlaybackMBS.InstrumentCount as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacOSX Plugin 5.4 Yes No No Yes, macOS only No
Function: The number of instruments.

Feedback, Comments & Corrections

MidiPlaybackMBS.InstrumentID(index as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacOSX Plugin 5.4 Yes No No Yes, macOS only No
Function: The ID of the instrument with the given index.

Feedback, Comments & Corrections

MidiPlaybackMBS.InstrumentIDOnChannel(Channel as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property MIDI MBS MacOSX Plugin 5.4 Yes No No Yes, macOS only No
Function: Which instrument is playing on which channel.
Notes: (Read and Write computed property)

Feedback, Comments & Corrections

MidiPlaybackMBS.InstrumentName(index as Integer) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacOSX Plugin 5.4 Yes No No Yes, macOS only No
Function: 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
Notes: Index from 0 to InstrumentCount-1.

Feedback, Comments & Corrections

MidiPlaybackMBS.IsRunning as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacOSX Plugin 9.4 Yes No No Yes, macOS only No
Function: Whether the midi playback is running.
Notes: Lasterror is set.

Feedback, Comments & Corrections

MidiPlaybackMBS.LoadSoundBankFile(file as folderitem)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacOSX Plugin 8.5 Yes No No Yes, macOS only No
Function: 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
Notes:
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.

Feedback, Comments & Corrections

MidiPlaybackMBS.MaxCPULoad as single
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacOSX Plugin 8.7 Yes No No Yes, macOS only No
Function: The Maximum CPU load of the graph
Notes: Returns the max CPU load of the graph since this call was last made or the graph was last started.

Feedback, Comments & Corrections

MidiPlaybackMBS.ReverbVolume as single
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property MIDI MBS MacOSX Plugin 8.7 Yes No No Yes, macOS only No
Function: The reverb volume.
Notes:
The value range is -120 to 40 dB.
(Read and Write computed property)

Feedback, Comments & Corrections

MidiPlaybackMBS.SendMidiEvent(Status as Integer, Data1 as Integer, Data2 as Integer, OffsetSampleFrame as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacOSX Plugin 5.4 Yes No No Yes, macOS only No
Function: Sends midi data for playback.

Feedback, Comments & Corrections

MidiPlaybackMBS.Start
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacOSX Plugin 9.4 Yes No No Yes, macOS only No
Function: Starts the midi playback.
Notes: Lasterror is set.

Feedback, Comments & Corrections

MidiPlaybackMBS.Stop
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method MIDI MBS MacOSX Plugin 9.4 Yes No No Yes, macOS only No
Function: Stops the midi playback.
Notes:
Lasterror is set.

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

Feedback, Comments & Corrections

MidiPlaybackMBS.StreamFromDisk as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property MIDI MBS MacOSX Plugin 8.7 Yes No No Yes, macOS only No
Function: Whether we are streaming from disk.
Notes:
Currently setting this value can crash the application.
(Read and Write computed property)

Feedback, Comments & Corrections

MidiPlaybackMBS.Tuning as single
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property MIDI MBS MacOSX Plugin 8.7 Yes No No Yes, macOS only No
Function: The tuning setting.
Notes:
Value is in cents from -1200 to 1200.
(Read and Write computed property)

Feedback, Comments & Corrections

MidiPlaybackMBS.UsesInternalReverb as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property MIDI MBS MacOSX Plugin 8.7 Yes No No Yes, macOS only No
Function: 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)
Notes:
Lasterror is set.
(Read and Write computed property)

Feedback, Comments & Corrections

MidiPlaybackMBS.Volume as single
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property MIDI MBS MacOSX Plugin 8.7 Yes No No Yes, macOS only No
Function: The volume.
Notes:
The value is in dB from -120 to 40.
(Read and Write computed property)

Feedback, Comments & Corrections

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

The biggest plugin in space...




Links
MBS Xojo Chart Plugins