SpectMorph
smmorphoutput.hh
1 // Licensed GNU LGPL v3 or later: http://www.gnu.org/licenses/lgpl.html
2 
3 #ifndef SPECTMORPH_MORPH_OUTPUT_HH
4 #define SPECTMORPH_MORPH_OUTPUT_HH
5 
6 #include "smmorphoperator.hh"
7 #include "smutils.hh"
8 #include "smmath.hh"
9 #include "smproperty.hh"
10 
11 #include <string>
12 
13 namespace SpectMorph
14 {
15 
16 class MorphOutput;
17 
19 {
21 
22  XParamProperty<MorphOutput> portamento_glide;
23 
25  LogParamProperty<MorphOutput> vibrato_frequency;
26  LinearParamProperty<MorphOutput> vibrato_attack;
27 };
28 
29 class MorphOutput : public MorphOperator
30 {
31  Q_OBJECT
32 
33  std::vector<std::string> load_channel_op_names;
34  std::vector<MorphOperator *> channel_ops;
35 
36  bool m_sines;
37  bool m_noise;
38 
39  bool m_unison;
40  int m_unison_voices;
41  float m_unison_detune;
42 
43  bool m_portamento;
44  float m_portamento_glide;
45 
46  bool m_vibrato;
47  float m_vibrato_depth;
48  float m_vibrato_frequency;
49  float m_vibrato_attack;
50 
51 public:
52  MorphOutput (MorphPlan *morph_plan);
53  ~MorphOutput();
54 
55  // inherited from MorphOperator
56  const char *type();
57  int insert_order();
58  bool save (OutFile& out_file);
59  bool load (InFile& in_file);
60  void post_load (OpNameMap& op_name_map);
61  OutputType output_type();
62 
63  void set_sines (bool es);
64  bool sines() const;
65 
66  void set_noise (bool en);
67  bool noise() const;
68 
69  void set_unison (bool eu);
70  bool unison() const;
71 
72  void set_unison_voices (int voices);
73  int unison_voices() const;
74 
75  void set_unison_detune (float voices);
76  float unison_detune() const;
77 
78  void set_portamento (bool ep);
79  bool portamento() const;
80 
81  void set_portamento_glide (float glide);
82  float portamento_glide() const;
83 
84  void set_vibrato (bool ev);
85  bool vibrato() const;
86 
87  void set_vibrato_depth (float depth);
88  float vibrato_depth() const;
89 
90  void set_vibrato_frequency (float frequency);
91  float vibrato_frequency() const;
92 
93  void set_vibrato_attack (float attack);
94  float vibrato_attack() const;
95 
96  void set_channel_op (int ch, MorphOperator *op);
97  MorphOperator *channel_op (int ch);
98 
99 public slots:
100  void on_operator_removed (MorphOperator *op);
101 };
102 
103 }
104 
105 #endif
Definition: smproperty.hh:124
Definition: smmorphoutput.hh:18
Definition: smproperty.hh:61
Definition: smoutfile.hh:15
Definition: smmorphplan.hh:15
Definition: smproperty.hh:94
Class to read SpectMorph binary data.
Definition: sminfile.hh:25
Definition: smmorphoperator.hh:19
Definition: smalignedarray.cc:7
Definition: smmorphoutput.hh:29