SpectMorph
smmorphlinear.hh
1 // Licensed GNU LGPL v3 or later: http://www.gnu.org/licenses/lgpl.html
2 
3 #ifndef SPECTMORPH_MORPH_LINEAR_HH
4 #define SPECTMORPH_MORPH_LINEAR_HH
5 
6 #include "smmorphoperator.hh"
7 
8 #include <string>
9 
10 namespace SpectMorph
11 {
12 
13 class MorphLinear : public MorphOperator
14 {
15 public:
16  enum ControlType {
17  CONTROL_GUI = 1,
18  CONTROL_SIGNAL_1 = 2,
19  CONTROL_SIGNAL_2 = 3,
20  CONTROL_OP = 4
21  };
22 protected:
23  std::string load_left, load_right, load_control;
24 
25  MorphOperator *m_left_op;
26  std::string m_left_smset;
27  MorphOperator *m_right_op;
28  std::string m_right_smset;
29  MorphOperator *m_control_op;
30  double m_morphing;
31  ControlType m_control_type;
32  bool m_db_linear;
33 
34 public:
35  MorphLinear (MorphPlan *morph_plan);
36  ~MorphLinear();
37 
38  // inherited from MorphOperator
39  const char *type();
40  int insert_order();
41  bool save (OutFile& out_file);
42  bool load (InFile& in_file);
43  void post_load (OpNameMap& op_name_map);
44  OutputType output_type();
45 
46  MorphOperator *left_op();
47  void set_left_op (MorphOperator *op);
48 
49  std::string left_smset();
50  void set_left_smset (const std::string& smset);
51 
52  MorphOperator *right_op();
53  void set_right_op (MorphOperator *op);
54 
55  std::string right_smset();
56  void set_right_smset (const std::string& smset);
57 
58  MorphOperator *control_op();
59  void set_control_op (MorphOperator *op);
60 
61  double morphing();
62  void set_morphing (double new_morphing);
63 
64  ControlType control_type();
65  void set_control_type (ControlType new_control_type);
66 
67  bool db_linear();
68  void set_db_linear (bool new_db_linear);
69 
70 /* slots: */
71  void on_operator_removed (MorphOperator *op);
72 };
73 
74 }
75 
76 #endif
Definition: smmorphlinear.hh:13
Definition: smoutfile.hh:15
Definition: smmorphplan.hh:16
Class to read SpectMorph binary data.
Definition: sminfile.hh:25
Definition: smmorphoperator.hh:18
Definition: smadsrenvelope.hh:8