SpectMorph
smmorphplanvoice.hh
1 // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl-2.1.html
2 
3 #ifndef SPECTMORPH_MORPH_PLAN_VOICE_HH
4 #define SPECTMORPH_MORPH_PLAN_VOICE_HH
5 
6 #include "smmorphplan.hh"
7 #include "smmorphoperatormodule.hh"
8 #include "smmorphplansynth.hh"
9 #include "smnotifybuffer.hh"
10 
11 namespace SpectMorph {
12 
13 class MorphOutputModule;
14 class MorphPlanSynth;
15 
17 protected:
18  std::vector<MorphPlanSynth::OpModule> modules;
19 
20  std::vector<double> m_control_input;
21  MorphOutputModule *m_output = nullptr;
22  float m_mix_freq;
23  float m_velocity;
24  MorphPlanSynth *m_morph_plan_synth;
25 
26  void configure_modules();
27 
28 public:
29  MorphPlanVoice (float mix_freq, MorphPlanSynth *synth);
30  ~MorphPlanVoice();
31 
32  void cheap_update (MorphPlanSynth::UpdateP update);
33  void full_update (MorphPlanSynth::FullUpdateVoice& full_update_voice);
34 
35  MorphOperatorModule *module (const MorphOperatorPtr& ptr);
36 
37  double control_input (double value, MorphOperator::ControlType ctype, MorphOperatorModule *module);
38  void set_control_input (int i, double value);
39  void set_velocity (float velocity);
40 
41  float velocity() const;
42  float mix_freq() const;
43 
44  MorphOutputModule *output();
45  MorphPlanSynth *morph_plan_synth() const;
46 
47  void update_shared_state (const TimeInfo& time_info);
48  void reset_value (const TimeInfo& time_info);
49  void fill_notify_buffer (NotifyBuffer& notify_buffer);
50 };
51 
52 }
53 
54 
55 #endif
Definition: smmorphoperatormodule.hh:27
Definition: smmorphoperator.hh:147
Definition: smmorphoutputmodule.hh:14
Definition: smmorphplansynth.hh:20
Definition: smmorphplanvoice.hh:16
Definition: smnotifybuffer.hh:29
Definition: smtimeinfo.hh:11
Definition: smmorphplansynth.hh:40