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 #include "smproperty.hh"
8 
9 #include <string>
10 
11 namespace SpectMorph
12 {
13 
14 class MorphLFO;
15 
17 {
19 
24 };
25 
26 class MorphLFO : public MorphOperator
27 {
28 public:
29  enum WaveType {
30  WAVE_SINE = 1,
31  WAVE_TRIANGLE = 2,
32  };
33 protected:
34  WaveType m_wave_type;
35  float m_frequency;
36  float m_depth;
37  float m_center;
38  float m_start_phase;
39  bool m_sync_voices;
40 
41 public:
42  MorphLFO (MorphPlan *morph_plan);
43  ~MorphLFO();
44 
45  // inherited from MorphOperator
46  const char *type();
47  int insert_order();
48  bool save (OutFile& out_file);
49  bool load (InFile& in_file);
50  OutputType output_type();
51 
52  WaveType wave_type();
53  void set_wave_type (WaveType new_wave_type);
54 
55  float frequency() const;
56  void set_frequency (float new_frequency);
57 
58  float depth() const;
59  void set_depth (float new_depth);
60 
61  float center() const;
62  void set_center (float new_center);
63 
64  float start_phase() const;
65  void set_start_phase (float new_start_phase);
66 
67  bool sync_voices() const;
68  void set_sync_voices (float new_sync_voices);
69 };
70 
71 }
72 
73 #endif
Definition: smproperty.hh:140
Definition: smoutfile.hh:15
Definition: smmorphplan.hh:16
Definition: smproperty.hh:110
Definition: smmorphlfo.hh:16
Class to read SpectMorph binary data.
Definition: sminfile.hh:25
Definition: smmorphoperator.hh:18
Definition: smadsrenvelope.hh:8
Definition: smmorphlfo.hh:26