![]() |
Umsci
Upmix Spatial Control Interface — OCA/OCP.1 spatial audio utility
|
Owns the MIDI input device and maps learned MIDI messages to upmix parameter domain values. More...
#include <MidiController.h>
Inheritance diagram for MidiController:
Collaboration diagram for MidiController:Public Member Functions | |
| MidiController () | |
| ~MidiController () override | |
| void | openDevice (const juce::String &deviceIdentifier) |
| const juce::String & | getDeviceIdentifier () const |
| void | setAssignment (UmsciExternalControlComponent::UpmixMidiParam param, const JUCEAppBasics::MidiCommandRangeAssignment &assi) |
| const JUCEAppBasics::MidiCommandRangeAssignment & | getAssignment (UmsciExternalControlComponent::UpmixMidiParam param) const |
Public Attributes | |
| std::function< void(UmsciExternalControlComponent::UpmixMidiParam, float)> | onParamValueChanged |
Owns the MIDI input device and maps learned MIDI messages to upmix parameter domain values.
Inherits juce::MidiInputCallback to receive raw MIDI on the MIDI thread, then dispatches normalised→domain-mapped values to onParamValueChanged on the message thread.
openDevice() to open a MIDI input device.setAssignment() for each UpmixMidiParam to configure which MIDI command drives that parameter.onParamValueChanged to receive (param, domainValue) pairs. Definition at line 43 of file MidiController.h.
|
default |
|
override |
Definition at line 24 of file MidiController.cpp.
| const JUCEAppBasics::MidiCommandRangeAssignment & MidiController::getAssignment | ( | UmsciExternalControlComponent::UpmixMidiParam | param | ) | const |
Returns the current assignment for a given upmix parameter.
Definition at line 60 of file MidiController.cpp.
|
inline |
Returns the identifier of the currently open MIDI input device (empty = none).
Definition at line 55 of file MidiController.h.
| void MidiController::openDevice | ( | const juce::String & | deviceIdentifier | ) |
Opens (or re-opens) the MIDI input device identified by deviceIdentifier. Closes any previously open device first. Pass an empty string to close only.
Definition at line 33 of file MidiController.cpp.
| void MidiController::setAssignment | ( | UmsciExternalControlComponent::UpmixMidiParam | param, |
| const JUCEAppBasics::MidiCommandRangeAssignment & | assi | ||
| ) |
Sets the MIDI command range assignment for a given upmix parameter.
Definition at line 54 of file MidiController.cpp.
| std::function<void(UmsciExternalControlComponent::UpmixMidiParam, float)> MidiController::onParamValueChanged |
Fired on the message thread when an incoming MIDI message matches a learned assignment. The float is the value mapped to the parameter's natural domain using UmsciExternalControlComponent::s_paramRanges.
Definition at line 70 of file MidiController.h.