BASS.NET API for the Un4seen BASS Audio Library

MidiInputDeviceGetMidiPorts Method

BASS.NET API for the Un4seen BASS Audio Library
Returns all available Midi input port IDs.

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

public static int[] GetMidiPorts()

Return Value

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

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 input port. You might use each ID with the GetDeviceDescription(Int32) method to retrieve the name of the respective Midi input device.

Examples

List all Midi input ports (devices which might be used with this class):
int[] inPorts = MidiInputDevice.GetMidiPorts();
foreach (int port in inPorts)
{
  string name = MidiInputDevice.GetDeviceDescription(port);
  Console.WriteLine("{0}={1}", port, name);
}
See Also

Reference