BASS.NET API for the Un4seen BASS Audio LibraryMidiOutputDeviceGetMidiPorts Method BASS.NET API for the Un4seen BASS Audio Library
Returns all available Midi output port IDs.

Namespace: radio42.Multimedia.Midi
Assembly: Bass.Net (in Bass.Net.dll) Version:

public static int[] GetMidiPorts()

Return Value

Type: Int32
An array of int representing the available Midi port IDs.

The values returned equals the deviceID, which might be used with the constructor of this class.

This method returns all available deviceIDs representing a Midi output port. You might use each ID with the GetDeviceDescription(Int32) method to retrieve the name of the respective Midi output device.


List all Midi output ports (devices which might be used with this class):
Dim outPorts As Integer() = MidiOutputDevice.GetMidiPorts()
Dim port As Integer
For Each port In  outPorts
  Dim name As String = MidiOutputDevice.GetDeviceDescription(port)
  Console.WriteLine("{0}={1}", port, name)
Next port
int[] outPorts = MidiOutputDevice.GetMidiPorts();
foreach (int port in outPorts)
  string name = MidiOutputDevice.GetDeviceDescription(port);
  Console.WriteLine("{0}={1}", port, name);
See Also