Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.5   8.0   8.1   8.2   8.3   8.4   8.5   9.0   9.1   9.2    Statistic  


Sets the data available handler for this midi port.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
PortMidi 8.5 Yes Yes No No No
MBS( "PortMidi.SetDataAvailableHandler"; StreamRef; FileName; ScriptName )   More


Parameter Description Example value
StreamRef The reference to the midi stream. You create those with PortMidi.OpenInput or PortMidi.OpenOutput and finally close them with PortMidi.Close. $stream
FileName The name of the FileMaker File that contains the script "MyDatabase.fp7"
ScriptName The name of the script to run "DataAvailable"


Returns OK or error.


Sets the data available handler for this midi port.
When new data arrives, this script is called, so you can call PortMidi.ReadMessage function.
Be aware that script may be called when just a few notes are in the read buffer.


Set script to be triggered if data is available:

Set Variable [$r; Value:MBS("PortMidi.SetDataAvailableHandler"; $$port; Get(FileName); "ReadMessage")]

See also

Blog Entries

Created 24th November 2018, last changed 26th November 2018

PortMidi.SetDataAvailableEvaluate   -   PortMidi.SetFilter

Feedback: Report problem or ask question.

MBS Xojo Chart Plugins