![]() |
Umsci
Upmix Spatial Control Interface — OCA/OCP.1 spatial audio utility
|
Owns the OSC receiver and maps incoming OSC float messages to upmix parameter domain values. More...
#include <OscController.h>
Inheritance diagram for OscController:
Collaboration diagram for OscController:Public Member Functions | |
| OscController () | |
| ~OscController () override | |
| void | openPort (int port) |
| int | getPort () const |
| void | setAddress (UmsciExternalControlComponent::UpmixMidiParam param, const juce::String &address) |
| juce::String | getAddress (UmsciExternalControlComponent::UpmixMidiParam param) const |
Public Attributes | |
| std::function< void(UmsciExternalControlComponent::UpmixMidiParam, float)> | onParamValueChanged |
Owns the OSC receiver and maps incoming OSC float messages to upmix parameter domain values.
Inherits juce::OSCReceiver::Listener<MessageLoopCallback> so that oscMessageReceived() is called on the message thread directly. Incoming float values are clamped to the natural parameter range defined in UmsciExternalControlComponent::s_paramRanges before being forwarded via onParamValueChanged.
openPort() to start listening on a UDP port (0 = stop listening).setAddress() for each UpmixMidiParam to configure the OSC address pattern that drives that parameter.onParamValueChanged to receive (param, domainValue) pairs. Definition at line 43 of file OscController.h.
| OscController::OscController | ( | ) |
Definition at line 22 of file OscController.cpp.
References UmsciExternalControlComponent::s_oscDefaultAddresses, and UmsciExternalControlComponent::UpmixMidiParam_COUNT.
|
override |
Definition at line 30 of file OscController.cpp.
| juce::String OscController::getAddress | ( | UmsciExternalControlComponent::UpmixMidiParam | param | ) | const |
Returns the current OSC address for a given upmix parameter.
Definition at line 54 of file OscController.cpp.
|
inline |
Returns the currently open OSC listen port (0 = not listening).
Definition at line 55 of file OscController.h.
| void OscController::openPort | ( | int | port | ) |
Opens (or re-opens) the OSC UDP listen port. Pass 0 to stop listening without reopening.
Definition at line 36 of file OscController.cpp.
| void OscController::setAddress | ( | UmsciExternalControlComponent::UpmixMidiParam | param, |
| const juce::String & | address | ||
| ) |
Sets the OSC address pattern for a given upmix parameter.
Definition at line 48 of file OscController.cpp.
| std::function<void(UmsciExternalControlComponent::UpmixMidiParam, float)> OscController::onParamValueChanged |
Fired on the message thread when an incoming OSC float message matches a configured address. The float is the received value clamped to the parameter's natural domain using UmsciExternalControlComponent::s_paramRanges.
Definition at line 69 of file OscController.h.