Ardour  9.0-pre0-582-g084a23a80d
osc_route_observer.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010-2015 Paul Davis <paul@linuxaudiosystems.com>
3  * Copyright (C) 2016-2020 Len Ovens <len@ovenwerks.net>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef __osc_oscrouteobserver_h__
21 #define __osc_oscrouteobserver_h__
22 
23 #include <bitset>
24 #include <memory>
25 #include <string>
26 
27 #include <sigc++/sigc++.h>
28 #include <lo/lo.h>
29 
30 #include "pbd/controllable.h"
31 #include "pbd/stateful.h"
32 #include "ardour/types.h"
33 #include "ardour/panner_shell.h"
34 
35 #include "osc.h"
36 
38 {
39 
40  public:
43 
44  std::shared_ptr<ARDOUR::Stripable> strip () const { return _strip; }
45  uint32_t strip_id () const { return ssid; }
46  lo_address address () const { return addr; };
47  void tick (void);
49  void refresh_strip (std::shared_ptr<ARDOUR::Stripable> strip, bool force);
50  void refresh_send (std::shared_ptr<ARDOUR::Send> send, bool force);
51  void set_expand (uint32_t expand);
52  void set_link_ready (uint32_t not_ready);
53  void clear_strip ();
54 
55  private:
56  std::shared_ptr<ARDOUR::Stripable> _strip;
57  std::shared_ptr<ARDOUR::Send> _send;
58  std::shared_ptr<ARDOUR::GainControl> _gain_control;
59 
62 
64  lo_address addr;
65  std::string path;
66  uint32_t gainmode;
67  std::bitset<32> feedback;
68  uint32_t ssid;
70  float _last_meter;
71  uint32_t gain_timeout;
72  float _last_gain;
73  float _last_trim;
74  bool _init;
75  uint32_t _expand;
76  bool in_line;
78  bool _tick_busy;
79  std::shared_ptr<ARDOUR::PannerShell> current_pan_shell;
80 
81  void send_clear ();
82  void name_changed (const PBD::PropertyChange& what_changed);
83  void panner_changed (std::shared_ptr<ARDOUR::PannerShell>);
84  void group_name ();
86  void send_change_message (std::string path, std::shared_ptr<PBD::Controllable> controllable);
87  void send_monitor_status (std::shared_ptr<PBD::Controllable> controllable);
89  void gain_automation ();
90  void send_automation (std::string path, std::shared_ptr<PBD::Controllable> control);
92  void no_strip ();
93 };
94 
95 #endif /* __osc_oscrouteobserver_h__ */
void gain_automation()
void send_change_message(std::string path, std::shared_ptr< PBD::Controllable > controllable)
void send_trim_message()
void set_link_ready(uint32_t not_ready)
void name_changed(const PBD::PropertyChange &what_changed)
std::shared_ptr< ARDOUR::Stripable > _strip
ArdourSurface::OSC & _osc
OSCRouteObserver(ArdourSurface::OSC &o, uint32_t sid, ArdourSurface::OSC::OSCSurface *sur)
void send_automation(std::string path, std::shared_ptr< PBD::Controllable > control)
void panner_changed(std::shared_ptr< ARDOUR::PannerShell >)
ARDOUR::AutoState as
void send_select_status(const PBD::PropertyChange &)
void send_monitor_status(std::shared_ptr< PBD::Controllable > controllable)
std::shared_ptr< ARDOUR::Stripable > strip() const
void set_expand(uint32_t expand)
PBD::ScopedConnectionList strip_connections
void refresh_strip(std::shared_ptr< ARDOUR::Stripable > strip, bool force)
void pi_changed(PBD::PropertyChange const &)
PBD::ScopedConnectionList pan_connections
std::shared_ptr< ARDOUR::GainControl > _gain_control
lo_address address() const
void send_gain_message()
ArdourSurface::OSC::OSCSurface * sur
void tick(void)
void refresh_send(std::shared_ptr< ARDOUR::Send > send, bool force)
uint32_t strip_id() const
std::shared_ptr< ARDOUR::PannerShell > current_pan_shell
std::bitset< 32 > feedback
std::shared_ptr< ARDOUR::Send > _send