|
JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins
« « « Anklang Documentation |
Represents a midi input device. More...
#include "juce_MidiDevices.h"
Classes | |
| class | Pimpl |
Public Member Functions | |
| ~MidiInput () | |
| Destructor. | |
| void | start () |
| Starts the device running. | |
| void | stop () |
| Stops the device running. | |
| MidiDeviceInfo | getDeviceInfo () const noexcept |
| Returns the MidiDeviceInfo struct containing some information about this device. | |
| String | getIdentifier () const noexcept |
| Returns the identifier of this device. | |
| String | getName () const noexcept |
| Returns the name of this device. | |
| void | setName (const String &newName) noexcept |
| Sets a custom name for the device. | |
Static Public Member Functions | |
| static Array< MidiDeviceInfo > | getAvailableDevices () |
| Returns a list of the available midi input devices. | |
| static MidiDeviceInfo | getDefaultDevice () |
| Returns the MidiDeviceInfo of the default midi input device to use. | |
| static std::unique_ptr< MidiInput > | openDevice (const String &deviceIdentifier, MidiInputCallback *callback) |
| Tries to open one of the midi input devices. | |
| static std::unique_ptr< MidiInput > | createNewDevice (const String &deviceName, MidiInputCallback *callback) |
| This will try to create a new midi input device (only available on Linux, macOS and iOS). | |
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.
@tags{Audio}
Definition at line 163 of file juce_MidiDevices.h.
| class juce::MidiInput::Pimpl |
Definition at line 743 of file juce_Midi_linux.cpp.
| juce::MidiInput::~MidiInput | ( | ) |
Destructor.
Definition at line 751 of file juce_Midi_linux.cpp.
|
static |
This will try to create a new midi input device (only available on Linux, macOS and iOS).
This will attempt to create a new midi input device with the specified name for other apps to connect to.
NB - if you are calling this method on iOS you must have enabled the "Audio Background Capability" setting in the iOS exporter otherwise this method will fail.
Returns an empty object if a device can't be created.
| deviceName | the name of the device to create |
| callback | the object that will receive the midi messages from this device |
Definition at line 757 of file juce_Midi_linux.cpp.
|
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.
Definition at line 754 of file juce_Midi_linux.cpp.
|
static |
Returns the MidiDeviceInfo of the default midi input device to use.
Definition at line 755 of file juce_Midi_linux.cpp.
|
noexcept |
Returns the MidiDeviceInfo struct containing some information about this device.
Definition at line 230 of file juce_MidiDevices.h.
|
noexcept |
Returns the identifier of this device.
Definition at line 233 of file juce_MidiDevices.h.
|
noexcept |
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 |
Definition at line 756 of file juce_Midi_linux.cpp.
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.
Definition at line 752 of file juce_Midi_linux.cpp.
| void juce::MidiInput::stop | ( | ) |