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:
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
13.5
Statistic
FMM
Blog
Reads one Midi message from the buffers.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
PortMidi | 4.2 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |
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 |
Returns message, empty or error.
Split MIDI Timestamp:
# last five bits are frame counter
Set Variable [$Frame; MBS("Math.BitwiseAND"; TimeStamp; 31)]
# Seconds are in 2nd byte, so take 6 bits after shifting 8 to right
Set Variable [$Second; MBS( "Math.BitwiseAND"; MBS( "Math.BitwiseShiftRight"; TimeStamp; 8 ); 63)
# Minutes are in 3rd byte, so take 6 bits after shifting 16 to right
Set Variable [$Minute; MBS( "Math.BitwiseAND"; MBS( "Math.BitwiseShiftRight"; TimeStamp; 16 ); 63)
# Hours are in 4th byte: take 5 bits after shifting 24 to right
Set Variable [$Hour; MBS( "Math.BitwiseAND"; MBS( "Math.BitwiseShiftRight"; TimeStamp; 24 ); 31)
This function checks for a license.
Created 18th August 2014, last changed 20th February 2023