SpectMorph
smmorphlfo.hh
1 // Licensed GNU LGPL v3 or later: http://www.gnu.org/licenses/lgpl.html
2 
3 #ifndef SPECTMORPH_MORPH_LFO_HH
4 #define SPECTMORPH_MORPH_LFO_HH
5 
6 #include "smmorphoperator.hh"
7 
8 #include <string>
9 
10 namespace SpectMorph
11 {
12 
13 class MorphLFO : public MorphOperator
14 {
15 public:
16  enum WaveType {
17  WAVE_SINE = 1,
18  WAVE_TRIANGLE = 2,
19  };
20 protected:
21  WaveType m_wave_type;
22  float m_frequency;
23  float m_depth;
24  float m_center;
25  float m_start_phase;
26  bool m_sync_voices;
27 
28 public:
29  MorphLFO (MorphPlan *morph_plan);
30  ~MorphLFO();
31 
32  // inherited from MorphOperator
33  const char *type();
34  int insert_order();
35  bool save (OutFile& out_file);
36  bool load (InFile& in_file);
37  OutputType output_type();
38 
39  WaveType wave_type();
40  void set_wave_type (WaveType new_wave_type);
41 
42  float frequency() const;
43  void set_frequency (float new_frequency);
44 
45  float depth() const;
46  void set_depth (float new_depth);
47 
48  float center() const;
49  void set_center (float new_center);
50 
51  float start_phase() const;
52  void set_start_phase (float new_start_phase);
53 
54  bool sync_voices() const;
55  void set_sync_voices (float new_sync_voices);
56 };
57 
58 }
59 
60 #endif
Definition: smoutfile.hh:15
Definition: smmorphplan.hh:14
Class to read SpectMorph binary data.
Definition: sminfile.hh:25
Definition: smmorphoperator.hh:19
Definition: smaudio.hh:15
Definition: smmorphlfo.hh:13