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.SendMessage
Sends a midi message.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| PortMidi | 4.2 | Yes | Yes | No | No | No |
MBS( "PortMidi.SendMessage"; StreamRef; Status; Data1; Data2 { ; Timestamp } ) More
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| StreamRef | The reference to the midi stream. You create those with PortMidi.OpenInput or PortMidi.OpenOutput and finally close them with PortMidi.Close. | $stream | |
| Status | The Midi status code. | 144 | |
| Data1 | The first data byte. | 4*12+0 | |
| Data2 | The second data bytes. | 127 | |
| Timestamp | The timestamp. If zero or not provided, note is sent immediately. | 0 | Optional |
Result
Returns OK or error.
Description
Sends a midi message.The Status is the command code. 144 is note on and 128 is note off. For those note commands Data1 is the number of the note. 48 (4*12) is C2 and than you can count over all notes till you get to next octave with C3 (5*12).
Examples
Press down a C note:
MBS( "PortMidi.SendMessage"; $StreamRef; 144; 4*12+0; 127 )
Release a C note:
MBS( "PortMidi.SendMessage"; $StreamRef; 128; 4*12+0; 127 )
See also
- PortMidi.Close
- PortMidi.OpenInput
- PortMidi.OpenOutput
- PortMidi.ReadMessage
- PortMidi.SendMessageRaw
- Socket.SendMessage
Example Databases
Created 18th August 2014, last changed 18th August 2014
PortMidi.Rescan - PortMidi.SendMessageRaw
Feedback: Report problem or ask question.
Links
MBS Xojo Chart Plugins