Ardour  9.0-pre0-350-gf17a656217
surround_pannable.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2023 Robin Gareus <robin@gareus.org>
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 _ardour_surround_pannable_h_
20 #define _ardour_surround_pannable_h_
21 
22 #include "pbd/stateful.h"
23 
24 #include "ardour/automatable.h"
26 #include "ardour/session_handle.h"
27 
28 namespace ARDOUR
29 {
30 
32 {
33 public:
35  std::string get_user_string () const;
36 
37 private:
38 };
39 
41 {
42 public:
45 
46  std::shared_ptr<AutomationControl> pan_pos_x;
47  std::shared_ptr<AutomationControl> pan_pos_y;
48  std::shared_ptr<AutomationControl> pan_pos_z;
49  std::shared_ptr<AutomationControl> pan_size;
50  std::shared_ptr<AutomationControl> pan_snap;
51  std::shared_ptr<AutomationControl> binaural_render_mode;
52  std::shared_ptr<AutomationControl> sur_elevation_enable;
53  std::shared_ptr<AutomationControl> sur_zones;
54  std::shared_ptr<AutomationControl> sur_ramp;
55 
57  AutoState automation_state() const { return _auto_state; }
59 
60  bool automation_playback() const {
61  return (_auto_state & Play) || ((_auto_state & (Touch | Latch)) && !touching());
62  }
63 
64  void foreach_pan_control (std::function<void(std::shared_ptr<AutomationControl>)>) const;
65 
67  void sync_visual_link_to (std::shared_ptr<SurroundPannable>);
68  void sync_auto_state_with (std::shared_ptr<SurroundPannable>);
69 
70  bool touching() const;
71 
72  XMLNode& get_state () const;
73  int set_state (const XMLNode&, int version);
74 
75 protected:
77  virtual XMLNode& state () const;
78 
81 
82 private:
83  void value_changed ();
84 };
85 
86 }
87 
88 #endif
SurroundControllable(Session &, Evoral::Parameter, Temporal::TimeDomainProvider const &)
std::string get_user_string() const
AutoState automation_state() const
std::shared_ptr< AutomationControl > pan_pos_y
std::shared_ptr< AutomationControl > pan_size
void sync_visual_link_to(std::shared_ptr< SurroundPannable >)
std::shared_ptr< AutomationControl > pan_snap
uint32_t _responding_to_control_auto_state_change
std::shared_ptr< AutomationControl > pan_pos_x
virtual XMLNode & state() const
XMLNode & get_state() const
std::shared_ptr< AutomationControl > pan_pos_z
std::shared_ptr< AutomationControl > sur_elevation_enable
int set_state(const XMLNode &, int version)
std::shared_ptr< AutomationControl > sur_ramp
SurroundPannable(Session &s, uint32_t chn, Temporal::TimeDomainProvider const &)
void control_auto_state_changed(AutoState)
void foreach_pan_control(std::function< void(std::shared_ptr< AutomationControl >)>) const
void sync_auto_state_with(std::shared_ptr< SurroundPannable >)
std::shared_ptr< AutomationControl > binaural_render_mode
void set_automation_state(AutoState)
std::shared_ptr< AutomationControl > sur_zones
PBD::Signal< void(AutoState)> automation_state_changed
Definition: xml++.h:114
#define LIBARDOUR_API