Umsci
Upmix Spatial Control Interface — OCA/OCP.1 spatial audio utility
Loading...
Searching...
No Matches
OscController.h
Go to the documentation of this file.
1/* Copyright (c) 2026, Christian Ahrens
2 *
3 * This file is part of Umsci <https://github.com/ChristianAhrens/Umsci>
4 *
5 * This tool is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU Lesser General Public License version 3.0 as published
7 * by the Free Software Foundation.
8 *
9 * This tool is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12 * details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this tool; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19#pragma once
20
21#include <JuceHeader.h>
22
24
25
43class OscController : public juce::OSCReceiver::Listener<juce::OSCReceiver::MessageLoopCallback>
44{
45public:
47 ~OscController() override;
48
49 //==============================================================================
52 void openPort(int port);
53
55 int getPort() const { return m_port; }
56
57 //==============================================================================
60 const juce::String& address);
61
64
65 //==============================================================================
70
71private:
72 //==============================================================================
74 void oscMessageReceived(const juce::OSCMessage& message) override;
75
76 //==============================================================================
77 juce::OSCReceiver m_oscReceiver;
78 int m_port = 0;
79 std::array<juce::String,
81
82 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(OscController)
83};
Owns the OSC receiver and maps incoming OSC float messages to upmix parameter domain values.
juce::String getAddress(UmsciExternalControlComponent::UpmixMidiParam param) const
int getPort() const
std::function< void(UmsciExternalControlComponent::UpmixMidiParam, float)> onParamValueChanged
void openPort(int port)
~OscController() override
void setAddress(UmsciExternalControlComponent::UpmixMidiParam param, const juce::String &address)
UpmixMidiParam
Identifies each controllable upmix transform parameter.