NAP
Public Member Functions | List of all members
MidiPortInfo Class Referencefinal

#include <midiport/midiportinfo.h>

Public Member Functions

bool init (utility::ErrorState &errorState)
 
int getInputPortCount ()
 
std::string getInputPortName (int portNumber)
 
int getInputPortNumber (const std::string &portName)
 
int getOutputPortCount ()
 
std::string getOutputPortName (int portNumber)
 
int getOutputPortNumber (const std::string &portName)
 
void printPorts ()
 

Description

Helper class to poll rtmidi for available input and output ports

Member Function Documentation

◆ getInputPortCount()

int getInputPortCount ( )

Returns number of available midi input ports on the system.

◆ getInputPortName()

std::string getInputPortName ( int  portNumber)

Returns the name of a given input port number on this system.

◆ getInputPortNumber()

int getInputPortNumber ( const std::string &  portName)

Returns the number of an input port with the given name. Returns -1 when no port with this name has been found.

◆ getOutputPortCount()

int getOutputPortCount ( )

Returns the number of available midi output ports on the system.

◆ getOutputPortName()

std::string getOutputPortName ( int  portNumber)

Returns the name of a given output port number on this system.

◆ getOutputPortNumber()

int getOutputPortNumber ( const std::string &  portName)

Returns the number of an output port with the given name. Returns -1 when no port with this name has been found.

◆ init()

bool init ( utility::ErrorState errorState)

Tries to initialize RtMidi

Parameters
errorStateRtMidi initialization error
Returns
True on success

◆ printPorts()

void printPorts ( )

Logs a list of all available midi input and output ports on this system.