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 
27 
28  XParamProperty<MorphOutput> portamento_glide;
29 
31  LogParamProperty<MorphOutput> vibrato_frequency;
32  LinearParamProperty<MorphOutput> vibrato_attack;
33 };
34 
35 class MorphOutput : public MorphOperator
36 {
37  Q_OBJECT
38 
39  std::vector<std::string> load_channel_op_names;
40  std::vector<MorphOperator *> channel_ops;
41 
42  bool m_sines;
43  bool m_noise;
44 
45  bool m_unison;
46  int m_unison_voices;
47  float m_unison_detune;
48 
49  bool m_adsr;
50  float m_adsr_skip;
51  float m_adsr_attack;
52  float m_adsr_decay;
53  float m_adsr_sustain;
54  float m_adsr_release;
55 
56  bool m_portamento;
57  float m_portamento_glide;
58 
59  bool m_vibrato;
60  float m_vibrato_depth;
61  float m_vibrato_frequency;
62  float m_vibrato_attack;
63 
64 public:
65  MorphOutput (MorphPlan *morph_plan);
66  ~MorphOutput();
67 
68  // inherited from MorphOperator
69  const char *type();
70  int insert_order();
71  bool save (OutFile& out_file);
72  bool load (InFile& in_file);
73  void post_load (OpNameMap& op_name_map);
74  OutputType output_type();
75 
76  void set_sines (bool es);
77  bool sines() const;
78 
79  void set_noise (bool en);
80  bool noise() const;
81 
82  void set_unison (bool eu);
83  bool unison() const;
84 
85  void set_unison_voices (int voices);
86  int unison_voices() const;
87 
88  void set_unison_detune (float voices);
89  float unison_detune() const;
90 
91  void set_adsr (bool eadsr);
92  bool adsr() const;
93 
94  void set_adsr_skip (float skip);
95  float adsr_skip() const;
96 
97  void set_adsr_attack (float attack);
98  float adsr_attack() const;
99 
100  void set_adsr_decay (float decay);
101  float adsr_decay() const;
102 
103  void set_adsr_sustain (float sustain);
104  float adsr_sustain() const;
105 
106  void set_adsr_release (float release);
107  float adsr_release() const;
108 
109  void set_portamento (bool ep);
110  bool portamento() const;
111 
112  void set_portamento_glide (float glide);
113  float portamento_glide() const;
114 
115  void set_vibrato (bool ev);
116  bool vibrato() const;
117 
118  void set_vibrato_depth (float depth);
119  float vibrato_depth() const;
120 
121  void set_vibrato_frequency (float frequency);
122  float vibrato_frequency() const;
123 
124  void set_vibrato_attack (float attack);
125  float vibrato_attack() const;
126 
127  void set_channel_op (int ch, MorphOperator *op);
128  MorphOperator *channel_op (int ch);
129 
130 public slots:
131  void on_operator_removed (MorphOperator *op);
132 };
133 
134 }
135 
136 #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: smadsrenvelope.hh:8
Definition: smmorphoutput.hh:35