OpenShot Audio Library | OpenShotAudio 0.4.0
|
#include <juce_MidiDevices.h>
Public Member Functions | |
~MidiInput () | |
void | start () |
void | stop () |
MidiDeviceInfo | getDeviceInfo () const noexcept |
String | getIdentifier () const noexcept |
String | getName () const noexcept |
void | setName (const String &newName) noexcept |
Static Public Member Functions | |
static Array< MidiDeviceInfo > | getAvailableDevices () |
static MidiDeviceInfo | getDefaultDevice () |
static std::unique_ptr< MidiInput > | openDevice (const String &deviceIdentifier, MidiInputCallback *callback) |
static StringArray | getDevices () |
static int | getDefaultDeviceIndex () |
static std::unique_ptr< MidiInput > | openDevice (int, MidiInputCallback *) |
Represents a midi input device.
To create one of these, use the static getAvailableDevices() method to find out what inputs are available, and then use the openDevice() method to try to open one.
Definition at line 163 of file juce_MidiDevices.h.
juce::MidiInput::~MidiInput | ( | ) |
Destructor.
|
static |
Returns a list of the available midi input devices.
You can open one of the devices by passing its identifier into the openDevice() method.
|
static |
Returns the MidiDeviceInfo of the default midi input device to use.
|
inlinenoexcept |
Returns the MidiDeviceInfo struct containing some information about this device.
Definition at line 230 of file juce_MidiDevices.h.
|
inlinenoexcept |
Returns the identifier of this device.
Definition at line 233 of file juce_MidiDevices.h.
|
inlinenoexcept |
Returns the name of this device.
Definition at line 236 of file juce_MidiDevices.h.
|
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.
If the device can't be opened, this will return an empty object.
deviceIdentifier | the ID of the device to open - use the getAvailableDevices() method to find the available devices that can be opened |
callback | the object that will receive the midi messages from this device |
Referenced by juce::AudioDeviceManager::setMidiInputDeviceEnabled().
|
inlinenoexcept |
Sets a custom name for the device.
Definition at line 239 of file juce_MidiDevices.h.
void juce::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 juce::MidiInput::stop | ( | ) |
Stops the device running.