Component: PortMidi 
--------------------

Access Midi devices and send/receive midi notes.

| Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|
| [4.2](newinversion42.md "First functions introduced with version 4.2.") / [13.0](newinversion130.md "Newest functions in version 13.0.") | ✅ Yes | ✅ Yes | ❌ No | 🔶 4%, on macOS and Windows | ❌ No |

  
| Item | Details |
|:--|:--|
| [PortMidi.Abort](PortMidiAbort.md)   Terminates outgoing messages immediately. | Mac/Win   4.2 |
| [PortMidi.CheckHostError](PortMidiCheckHostError.md)   Checks if there is a midi host error on the stream. | Mac/Win   4.2 |
| [PortMidi.ClearDataAvailableHandler](PortMidiClearDataAvailableHandler.md)   Clears the data available handler. | Mac/Win   8.5 |
| [PortMidi.Close](PortMidiClose.md)   Closes a midi stream, flushing any pending buffers. | Mac/Win   4.2 |
| [PortMidi.CurrentEvent](PortMidiCurrentEvent.md)   Queries current event. | Mac/Win   7.1 |
| [PortMidi.DeviceCount](PortMidiDeviceCount.md)   Queries number of devices found. | Mac/Win   4.2 |
| [PortMidi.GetChannelMask](PortMidiGetChannelMask.md)   Queries current channel mask. | Mac/Win   4.2 |
| [PortMidi.GetDefaultInputDeviceID](PortMidiGetDefaultInputDeviceID.md)   Return the default input device ID. | Mac/Win   4.2 |
| [PortMidi.GetDefaultOutputDeviceID](PortMidiGetDefaultOutputDeviceID.md)   Return the default output device ID. | Mac/Win   4.2 |
| [PortMidi.GetDeviceID](PortMidiGetDeviceID.md)   Queries the ID of the device the stream is connected to. | Mac/Win   7.0 |
| [PortMidi.GetDeviceInfo](PortMidiGetDeviceInfo.md)   Return device information. | Mac/Win   4.2 |
| [PortMidi.GetDeviceName](PortMidiGetDeviceName.md)   Queries the name of the device the stream is connected to. | Mac/Win   7.0 |
| [PortMidi.GetFilter](PortMidiGetFilter.md)   Queries current filter setting. | Mac/Win   4.2 |
| [PortMidi.List](PortMidiList.md)   Lists all IDs of midi objects. | Mac/Win   13.0 |
| [PortMidi.OpenInput](PortMidiOpenInput.md)   Opens an input device. | Mac/Win   4.2 |
| [PortMidi.OpenOutput](PortMidiOpenOutput.md)   Opens an output device. | Mac/Win   4.2 |
| [PortMidi.Poll](PortMidiPoll.md)   Tests whether input is available. | Mac/Win   4.2 |
| [PortMidi.ReadMessage](PortMidiReadMessage.md)   Reads one Midi message from the buffers. | Mac/Win   4.2 |
| [PortMidi.Rescan](PortMidiRescan.md)   Terminates all streams and shutdown the midi functions. | Mac/Win   4.2 |
| [PortMidi.SendMessage](PortMidiSendMessage.md)   Sends a midi message. | Mac/Win   4.2 |
| [PortMidi.SendMessageRaw](PortMidiSendMessageRaw.md)   Sends a raw message. | Mac/Win   4.2 |
| [PortMidi.SendSysExHex](PortMidiSendSysExHex.md)   Writes a timestamped system-exclusive midi message. | Mac/Win   4.2 |
| [PortMidi.SetChannelMask](PortMidiSetChannelMask.md)   Filters incoming messages based on channel. | Mac/Win   4.2 |
| [PortMidi.SetDataAvailableEvaluate](PortMidiSetDataAvailableEvaluate.md)   Sets the data available evaluation for this midi port. | Mac/Win   8.5 |
| [PortMidi.SetDataAvailableHandler](PortMidiSetDataAvailableHandler.md)   Sets the data available handler for this midi port. | Mac/Win   8.5 |
| [PortMidi.SetFilter](PortMidiSetFilter.md)   Sets filters on an open input stream to drop selected input types. | Mac/Win   4.2 |
| [PortMidi.TimeStamp](PortMidiTimeStamp.md)   Queries current time stamp. | Mac/Win   7.0 |

27 functions shown.

These functions require a license (85%).

### Release notes

- **Version 13.0**
    - Added [PortMidi.List](https://www.mbsplugins.eu/PortMidiList.shtml) function.
- **Version 8.5**
    - Added [PortMidi.ClearDataAvailableHandler](http://www.mbsplugins.eu/PortMidiClearDataAvailableHandler.shtml), [PortMidi.SetDataAvailableEvaluate](http://www.mbsplugins.eu/PortMidiSetDataAvailableEvaluate.shtml) and [PortMidi.SetDataAvailableHandler](http://www.mbsplugins.eu/PortMidiSetDataAvailableHandler.shtml).
- **Version 7.1**
    - Added [PortMidi.CurrentEvent](http://www.mbsplugins.eu/PortMidiCurrentEvent.shtml) function.
- **Version 7.0**
    - Added [PortMidi.TimeStamp](http://www.mbsplugins.eu/PortMidiTimeStamp.shtml), [PortMidi.GetDeviceID](http://www.mbsplugins.eu/PortMidiGetDeviceID.shtml) and [PortMidi.GetDeviceName](http://www.mbsplugins.eu/PortMidiGetDeviceName.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin 7.0 - 4400 Funktionen in einem Plugin](https://www.mbsplugins.de/archive/2017-01-23/MBS_FileMaker_Plugin_70_-_4400/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 4.2 for OS X/Windows - More than 2500 Functions In One Plugin](https://www.mbsplugins.de/archive/2014-06-24/MBS_FileMaker_Plugin_42_for_OS/monkeybreadsoftware_blog_filemaker)

### Example Databases

- [Midi/Midi List Devices](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Midi/Midi%20List%20Devices.shtml#1ScriptAnchor_)
- [Midi/Midi Receive](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Midi/Midi%20Receive.shtml#1ScriptAnchor_)
- [Midi/Midi Send](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Midi/Midi%20Send.shtml#1ScriptAnchor_)

[HTML Version](component_PortMidi.shtml)