Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.1   7.2   7.3   7.4   7.5   8.0   8.1   8.2   8.3   8.4    Statistic  


Opens an output device.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
PortMidi 4.2 Yes Yes No No No

MBS( "PortMidi.OpenOutput"; DeviceID { ; BufferSize; Latency } )


Parameter Description Example value
DeviceID The device ID, a number from 0 to PortMidi.DeviceCount-1. 0
BufferSize Optional
Optional, Specifies the number of output events to be buffered waiting for output. Default is 100 if you don't pass this parameter.
Latency Optional
The latency you want.
Default is zero.
Latency is the delay in milliseconds applied to timestamps to determine when the output should actually occur. (If latency is < 0, 0 is assumed.)
If latency is zero, timestamps are ignored and all output is delivered immediately. If latency is greater than zero, output is delayed until the message timestamp plus the latency.
In some cases, PortMidi can obtain better timing than your application by passing timestamps along to the device driver or hardware. Latency may also help you to synchronize midi data to audio data by matching midi latency to the audio buffer latency.


Returns StreamRef or error.


Opens an output device.
Midi reference numbers are starting at 17000 and counting up for each new midi stream.

See also

Example Databases

Created 18th August 2014, last changed 25th January 2017

PortMidi.OpenInput   -   PortMidi.Poll

Feedback: Report problem or ask question.

MBS Xojo Chart Plugins