Ardour  8.12
osc_global_observer.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2018 Len Ovens <len@ovenwerks.net>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef __osc_oscglobalobserver_h__
20 #define __osc_oscglobalobserver_h__
21 
22 #include <memory>
23 #include <string>
24 
25 #include <sigc++/sigc++.h>
26 #include <lo/lo.h>
27 
28 #include "pbd/controllable.h"
29 #include "pbd/stateful.h"
30 #include "ardour/types.h"
31 
33 {
34 
35  public:
38 
39  lo_address address() const { return addr; };
40  void tick (void);
41  void clear_observer (void);
42  void jog_mode (uint32_t jogmode);
43 
44  private:
46 
49 
50  enum STRIP {
53  };
54 
56  bool _init;
60  lo_address addr;
61  std::string path;
62  std::string mark_text;
63  uint32_t gainmode;
64  std::bitset<32> feedback;
66  uint32_t _jog_mode;
68  uint32_t _heartbeat;
69  float _last_meter;
70  uint32_t master_timeout;
71  uint32_t monitor_timeout;
72  uint32_t last_punchin;
73  uint32_t last_punchout;
74  uint32_t last_click;
77  struct LocationMarker {
78  LocationMarker (const std::string& l, samplepos_t w)
79  : label (l), when (w) {}
80  std::string label;
82  };
83  std::vector<LocationMarker> lm;
84 
86  bool operator() (const LocationMarker& a, const LocationMarker& b) {
87  return (a.when < b.when);
88  }
89  };
90 
92  void send_change_message (std::string path, std::shared_ptr<PBD::Controllable> controllable);
93  void send_gain_message (std::string path, std::shared_ptr<PBD::Controllable> controllable);
94  void send_trim_message (std::string path, std::shared_ptr<PBD::Controllable> controllable);
97  void solo_active (bool active);
98  void session_name (std::string path, std::string name);
99  void extra_check (void);
100  void marks_changed (void);
101  void mark_update (void);
103  void group_changed (void);
104 };
105 
106 #endif /* __osc_oscglobalobserver_h__ */
ARDOUR::Session * session
void jog_mode(uint32_t jogmode)
void extra_check(void)
void solo_active(bool active)
std::vector< LocationMarker > lm
void session_name(std::string path, std::string name)
PBD::ScopedConnectionList strip_connections
void send_record_state_changed(void)
OSCGlobalObserver(ArdourSurface::OSC &o, ARDOUR::Session &s, ArdourSurface::OSC::OSCSurface *su)
lo_address address() const
void marks_changed(void)
void group_changed(ARDOUR::RouteGroup *)
void send_change_message(std::string path, std::shared_ptr< PBD::Controllable > controllable)
void update_mixer_scene_state()
void send_trim_message(std::string path, std::shared_ptr< PBD::Controllable > controllable)
void group_changed(void)
ArdourSurface::OSC & _osc
std::bitset< 32 > feedback
void send_gain_message(std::string path, std::shared_ptr< PBD::Controllable > controllable)
void clear_observer(void)
void mark_update(void)
PBD::ScopedConnectionList session_connections
void send_transport_state_changed(void)
ArdourSurface::OSC::OSCSurface * sur
GtkImageIconNameData name
Definition: gtkimage.h:6
PBD::PropertyDescriptor< bool > active
Temporal::samplepos_t samplepos_t
bool operator()(const LocationMarker &a, const LocationMarker &b)
LocationMarker(const std::string &l, samplepos_t w)