|
RADLib
RADical C++ application framework
|
ALSA raw-MIDI input wrapper for USB MIDI controllers and DIN adapters. More...
#include <RADMedia.h>
Public Member Functions | |
| MidiInputDevice () | |
| Creates a closed MIDI input. More... | |
| ~MidiInputDevice () | |
| Closes the MIDI input if open. More... | |
| MidiInputDevice (const MidiInputDevice &)=delete | |
| MIDI inputs own native handles and are move-only. More... | |
| MidiInputDevice & | operator= (const MidiInputDevice &)=delete |
| MIDI inputs own native handles and are move-only. More... | |
| MidiInputDevice (MidiInputDevice &&) noexcept | |
| Moves a MIDI input. More... | |
| MidiInputDevice & | operator= (MidiInputDevice &&) noexcept |
| Moves a MIDI input. More... | |
| bool | open (const std::string &deviceId, std::string *error=nullptr) |
| Opens deviceId in nonblocking input mode. More... | |
| void | close () |
| Closes the MIDI input. More... | |
| bool | isOpen () const |
| Returns true when open. More... | |
| const std::string & | deviceId () const |
| Returns the configured ALSA raw-MIDI id. More... | |
| std::vector< MidiMessage > | readMessages (size_t maxBytes=256) |
| Reads and decodes all currently available MIDI messages without blocking. More... | |
Static Public Member Functions | |
| static std::vector< MidiInputDeviceInfo > | inputDevices () |
| Lists detected raw-MIDI input devices. More... | |
ALSA raw-MIDI input wrapper for USB MIDI controllers and DIN adapters.
| RADMedia::MidiInputDevice::MidiInputDevice | ( | ) |
Creates a closed MIDI input.
| RADMedia::MidiInputDevice::~MidiInputDevice | ( | ) |
Closes the MIDI input if open.
|
delete |
MIDI inputs own native handles and are move-only.
|
noexcept |
Moves a MIDI input.
| void RADMedia::MidiInputDevice::close | ( | ) |
Closes the MIDI input.
| const std::string& RADMedia::MidiInputDevice::deviceId | ( | ) | const |
Returns the configured ALSA raw-MIDI id.
|
static |
Lists detected raw-MIDI input devices.
| bool RADMedia::MidiInputDevice::isOpen | ( | ) | const |
Returns true when open.
| bool RADMedia::MidiInputDevice::open | ( | const std::string & | deviceId, |
| std::string * | error = nullptr |
||
| ) |
Opens deviceId in nonblocking input mode.
|
delete |
MIDI inputs own native handles and are move-only.
|
noexcept |
Moves a MIDI input.
| std::vector<MidiMessage> RADMedia::MidiInputDevice::readMessages | ( | size_t | maxBytes = 256 | ) |
Reads and decodes all currently available MIDI messages without blocking.