SpectMorph
smmorphlinear.hh
1 // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl-2.1.html
2 
3 #ifndef SPECTMORPH_MORPH_LINEAR_HH
4 #define SPECTMORPH_MORPH_LINEAR_HH
5 
6 #include "smmorphoperator.hh"
7 #include "smmodulationlist.hh"
8 #include "smwavset.hh"
9 
10 #include <string>
11 
12 namespace SpectMorph
13 {
14 
15 class MorphLinear : public MorphOperator
16 {
17 public:
18  struct Config : public MorphOperatorConfig
19  {
20  MorphOperatorPtr left_op;
21  MorphOperatorPtr right_op;
22  WavSet *left_wav_set = nullptr;
23  WavSet *right_wav_set = nullptr;
24 
25  ModulationData morphing_mod;
26  bool db_linear;
27  };
28  static constexpr auto P_MORPHING = "morphing";
29 protected:
30  Config m_config;
31  std::string load_left, load_right;
32  std::string m_left_smset;
33  std::string m_right_smset;
34 
35 public:
36  MorphLinear (MorphPlan *morph_plan);
37  ~MorphLinear();
38 
39  // inherited from MorphOperator
40  const char *type() override;
41  int insert_order() override;
42  bool save (OutFile& out_file) override;
43  bool load (InFile& in_file) override;
44  void post_load (OpNameMap& op_name_map) override;
45  OutputType output_type() override;
46  MorphOperatorConfig *clone_config() override;
47 
48  std::vector<MorphOperator *> dependencies() override;
49 
50  MorphOperator *left_op();
51  void set_left_op (MorphOperator *op);
52 
53  std::string left_smset();
54  void set_left_smset (const std::string& smset);
55 
56  MorphOperator *right_op();
57  void set_right_op (MorphOperator *op);
58 
59  std::string right_smset();
60  void set_right_smset (const std::string& smset);
61 
62  void set_morphing (double new_morphing);
63 
64  bool db_linear();
65  void set_db_linear (bool new_db_linear);
66 
67 /* slots: */
68  void on_operator_removed (MorphOperator *op);
69 };
70 
71 }
72 
73 #endif
Class to read SpectMorph binary data.
Definition: sminfile.hh:27
Definition: smmodulationlist.hh:17
Definition: smmorphlinear.hh:16
Definition: smmorphoperator.hh:147
Definition: smmorphoperator.hh:27
Definition: smmorphplan.hh:18
Definition: smoutfile.hh:19
Definition: smwavset.hh:29
Definition: smmorphlinear.hh:19
Definition: smmorphoperator.hh:18