PortMidi.GetDefaultOutputDeviceID
---------------------------------

Return the default output device ID.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [PortMidi](component_PortMidi.md) | [4.2](newinversion42.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "PortMidi.GetDefaultOutputDeviceID" ) ### Parameters

none

### Result

Returns Device ID.

### Description

Return the default output device ID.  
Returns -1 if no device is found. You can pass the index to [PortMidi.OpenOutput](PortMidiOpenOutput.md) function.  
### See also

- [PortMidi.GetDefaultInputDeviceID](PortMidiGetDefaultInputDeviceID.md)
- [PortMidi.OpenOutput](PortMidiOpenOutput.md)

### Example Databases

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

This function checks for a license.

Created 18th August 2014 , last changed 18th August 2014

  
[PortMidi.GetDefaultInputDeviceID](PortMidiGetDefaultInputDeviceID.md) - [PortMidi.GetDeviceID](PortMidiGetDeviceID.md)

[HTML Version](PortMidiGetDefaultOutputDeviceID.shtml)