Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
PortMidi.SetDataAvailableHandler
Sets the data available handler for this midi port.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| PortMidi | 8.5 | Yes | Yes | No | No | No |
Parameters
| Parameter | Description | Example |
|---|---|---|
| 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" |
Result
Returns OK or error.
Description
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.
Examples
Set script to be triggered if data is available:
Set Variable [$r; Value:MBS("PortMidi.SetDataAvailableHandler"; $$port; Get(FileName); "ReadMessage")]
See also
- PortMidi.ClearDataAvailableHandler
- PortMidi.Close
- PortMidi.OpenInput
- PortMidi.OpenOutput
- PortMidi.ReadMessage
- PortMidi.SetDataAvailableEvaluate
- SerialPort.SetDataAvailableHandler
- Socket.SetDataAvailableHandler
Blog Entries
Release notes
- Version 8.5
Created 24th November 2018, last changed 26th November 2018
PortMidi.SetDataAvailableEvaluate - PortMidi.SetFilter
Feedback: Report problem or ask question.
Links
MBS Xojo Chart Plugins