Platforms to show: All Mac Windows Linux Cross-Platform

MidiPlaybackMBS.Callback as integer
method, MIDI, MBS REALbasic MacOSX Plugin (MidiPlayback), class MidiPlaybackMBS, Console safe, Plugin version: 6.0, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

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.
class MidiPlaybackMBS
class, MIDI, MBS REALbasic MacOSX Plugin (MidiPlayback), class MidiPlaybackMBS, Console safe, Plugin version: 5.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: A class to do Midi playback on Mac OS X.
MidiPlaybackMBS.Constructor(UsesInternalReverb as boolean=false, AutoStart as boolean=true)
method, MIDI, MBS REALbasic MacOSX Plugin (MidiPlayback), class MidiPlaybackMBS, Console safe, Plugin version: 8.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

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.
MidiPlaybackMBS.CPULoad as single
method, MIDI, MBS REALbasic MacOSX Plugin (MidiPlayback), class MidiPlaybackMBS, Console safe, Plugin version: 5.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The CPU load of the graph.
Notes:
Returns a short-term running average of the current CPU load of the graph.
MidiPlaybackMBS.GraphHandle as Integer
property, MIDI, MBS REALbasic MacOSX Plugin (MidiPlayback), class MidiPlaybackMBS, Console safe, Plugin version: 8.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The handle for the AUGraph.
Notes: (Read only property)
MidiPlaybackMBS.Inited as boolean
property, MIDI, MBS REALbasic MacOSX Plugin (MidiPlayback), class MidiPlaybackMBS, Console safe, Plugin version: 8.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Whether the constructor was successful.
Notes:
This property is false if the constructor failed to initialize.
(Read only property)
MidiPlaybackMBS.InstrumentCount as integer
method, MIDI, MBS REALbasic MacOSX Plugin (MidiPlayback), class MidiPlaybackMBS, Console safe, Plugin version: 5.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The number of instruments.
MidiPlaybackMBS.InstrumentID(index as integer) as integer
method, MIDI, MBS REALbasic MacOSX Plugin (MidiPlayback), class MidiPlaybackMBS, Console safe, Plugin version: 5.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The ID of the instrument with the given index.
MidiPlaybackMBS.InstrumentIDOnChannel(Channel as integer) as integer
method, MIDI, MBS REALbasic MacOSX Plugin (MidiPlayback), class MidiPlaybackMBS, Console safe, Plugin version: 5.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Which instrument is playing on which channel.
Notes: (Read and Write computed property)
MidiPlaybackMBS.InstrumentName(index as integer) as string
method, MIDI, MBS REALbasic MacOSX Plugin (MidiPlayback), class MidiPlaybackMBS, Console safe, Plugin version: 5.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The name of the instrument with the given index.
MidiPlaybackMBS.IsRunning as boolean
method, MIDI, MBS REALbasic MacOSX Plugin (MidiPlayback), class MidiPlaybackMBS, Console safe, Plugin version: 9.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Whether the midi playback is running.
Notes: Lasterror is set.
MidiPlaybackMBS.Lasterror as Integer
property, MIDI, MBS REALbasic MacOSX Plugin (MidiPlayback), class MidiPlaybackMBS, Console safe, Plugin version: 5.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The last error code.
Notes: (Read only property)
MidiPlaybackMBS.LoadSoundBankFile(file as folderitem)
method, MIDI, MBS REALbasic MacOSX Plugin (MidiPlayback), class MidiPlaybackMBS, Console safe, Plugin version: 8.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

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.
MidiPlaybackMBS.MaxCPULoad as single
method, MIDI, MBS REALbasic MacOSX Plugin (MidiPlayback), class MidiPlaybackMBS, Console safe, Plugin version: 8.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

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.
MidiPlaybackMBS.ReverbVolume as single
method, MIDI, MBS REALbasic MacOSX Plugin (MidiPlayback), class MidiPlaybackMBS, Console safe, Plugin version: 8.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The reverb volume.
Notes:
The value range is -120 to 40 dB.
(Read and Write computed property)
MidiPlaybackMBS.SendMidiEvent(Status as integer, Data1 as integer, Data2 as integer, OffsetSampleFrame as integer)
method, MIDI, MBS REALbasic MacOSX Plugin (MidiPlayback), class MidiPlaybackMBS, Console safe, Plugin version: 5.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Sends midi data for playback.
MidiPlaybackMBS.Start
method, MIDI, MBS REALbasic MacOSX Plugin (MidiPlayback), class MidiPlaybackMBS, Console safe, Plugin version: 9.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Starts the midi playback.
Notes: Lasterror is set.
MidiPlaybackMBS.Stop
method, MIDI, MBS REALbasic MacOSX Plugin (MidiPlayback), class MidiPlaybackMBS, Console safe, Plugin version: 9.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Stops the midi playback.
Notes:
Lasterror is set.

As a side effect stopping the midi playback may reset volume, reverb and tuning.
MidiPlaybackMBS.StreamFromDisk as boolean
method, MIDI, MBS REALbasic MacOSX Plugin (MidiPlayback), class MidiPlaybackMBS, Console safe, Plugin version: 8.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Whether we are streaming from disk.
Notes:
Currently setting this value can crash the application.
(Read and Write computed property)
MidiPlaybackMBS.Tuning as single
method, MIDI, MBS REALbasic MacOSX Plugin (MidiPlayback), class MidiPlaybackMBS, Console safe, Plugin version: 8.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The tuning setting.
Notes:
Value is in cents from -1200 to 1200.
(Read and Write computed property)
MidiPlaybackMBS.UsesInternalReverb as boolean
method, MIDI, MBS REALbasic MacOSX Plugin (MidiPlayback), class MidiPlaybackMBS, Console safe, Plugin version: 8.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

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)
MidiPlaybackMBS.Volume as single
method, MIDI, MBS REALbasic MacOSX Plugin (MidiPlayback), class MidiPlaybackMBS, Console safe, Plugin version: 8.7, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The volume.
Notes:
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 REALbasic MacOSX Plugin.




Links
MBS REAL studio Chart Plugins - Pfarrgemeinde Messdiener Nickenich