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.5
10.0
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
Statistic
FMM
Blog
Sets filters on an open input stream to drop selected input types.
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 |
Filter | The new filter value. | 0 |
Returns OK or error.
Filter active sensing messages (0xFE) | PM_FILT_ACTIVE | 16384 |
Filter system exclusive messages (0xF0) | PM_FILT_SYSEX | 1 |
Filter clock messages (CLOCK 0xF8, START 0xFA, STOP 0xFC, and CONTINUE 0xFB) | PM_FILT_CLOCK | 7424 |
Filter play messages (start 0xFA, stop 0xFC, continue 0xFB) | PM_FILT_PLAY | 1024 |
Filter tick messages (0xF9) | PM_FILT_TICK | 512 |
Filter undefined FD messages | PM_FILT_FD | 8192 |
Filter undefined real-time messages | PM_FILT_UNDEFINED | 8192 |
Filter reset messages (0xFF) | PM_FILT_RESET | 32768 |
Filter all real-time messages | PM_FILT_REALTIME | 65281 |
Filter note-on and note-off (0x90-0x9F and 0x80-0x8F | PM_FILT_NOTE | 50331648 |
Filter channel aftertouch (most midi controllers use this) (0xD0-0xDF) | PM_FILT_CHANNEL_AFTERTOUCH | 536870912 |
Per-note aftertouch (0xA0-0xAF) | PM_FILT_POLY_AFTERTOUCH | 67108864 |
Filter both channel and poly aftertouch | PM_FILT_AFTERTOUCH | 603979776 |
Program changes (0xC0-0xCF) | PM_FILT_PROGRAM | 268435456 |
Control Changes (CC's) (0xB0-0xBF) | PM_FILT_CONTROL | 134217728 |
Pitch Bender (0xE0-0xEF | PM_FILT_PITCHBEND | 1073741824 |
MIDI Time Code (0xF1) | PM_FILT_MTC | 2 |
Song Position (0xF2) | PM_FILT_SONG_POSITION | 4 |
Song Select (0xF3) | PM_FILT_SONG_SELECT | 8 |
Tuning request (0xF6) | PM_FILT_TUNE | 64 |
All System Common messages (mtc, song position, song select, tune request) | PM_FILT_SYSTEMCOMMON | 78 |
To prohibit, say, active sensing and sysex messages, call:
MBS( "PortMidi.SetFilter"; $StreamRef; 16384 + 1 )
Created 18th August 2014, last changed 18th August 2014
PortMidi.SetDataAvailableHandler - PortMidi.TimeStamp
Feedback: Report problem or ask question.