openshot-audio
0.1.7
|
#include <juce_MidiInput.h>
Public Member Functions | |
~MidiInput () | |
const String & | getName () const noexcept |
void | setName (const String &newName) noexcept |
void | start () |
void | stop () |
Static Public Member Functions | |
static StringArray | getDevices () |
static int | getDefaultDeviceIndex () |
static MidiInput * | openDevice (int deviceIndex, MidiInputCallback *callback) |
Represents a midi input device.
To create one of these, use the static getDevices() method to find out what inputs are available, and then use the openDevice() method to try to open one.
MidiInput::~MidiInput | ( | ) |
Destructor.
|
static |
Returns the index of the default midi input device to use.
This refers to the index in the list returned by getDevices().
|
static |
Returns a list of the available midi input devices.
You can open one of the devices by passing its index into the openDevice() method.
|
inlinenoexcept |
Returns the name of this device.
|
static |
Tries to open one of the midi input devices.
This will return a MidiInput object if it manages to open it. You can then call start() and stop() on this device, and delete it when no longer needed.
If the device can't be opened, this will return a null pointer.
deviceIndex | the index of a device from the list returned by getDevices() |
callback | the object that will receive the midi messages from this device. |
|
inlinenoexcept |
Allows you to set a custom name for the device, in case you don't like the name it was given when created.
void MidiInput::start | ( | ) |
Starts the device running.
After calling this, the device will start sending midi messages to the MidiInputCallback object that was specified when the openDevice() method was called.
void MidiInput::stop | ( | ) |
Stops the device running.