SpectMorph
smmorphoperatormodule.hh
1 // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl-2.1.html
2 
3 #ifndef SPECTMORPH_MORPH_OPERATOR_MODULE_HH
4 #define SPECTMORPH_MORPH_OPERATOR_MODULE_HH
5 
6 #include "smmorphoperator.hh"
7 #include "smlivedecodersource.hh"
8 #include "smrandom.hh"
9 #include "smtimeinfo.hh"
10 #include "smrtmemory.hh"
11 
12 #include <string>
13 
14 namespace SpectMorph
15 {
16 
17 class MorphPlanVoice;
18 
20 {
21 public:
23  virtual ~MorphModuleSharedState();
24 };
25 
27 {
28 protected:
29  MorphPlanVoice *morph_plan_voice;
30  MorphOperator::PtrID m_ptr_id;
31  float m_notify_value = 0;
32  bool m_have_notify_value = false;
33 
34  Random *random_gen() const;
35  RTMemoryArea *rt_memory_area() const;
36  TimeInfo time_info() const;
37  float apply_modulation (const ModulationData& mod_data) const;
38  void set_notify_value (float value);
39 public:
41  virtual ~MorphOperatorModule();
42 
43  virtual void set_config (const MorphOperatorConfig *op_cfg) = 0;
44  virtual LiveDecoderSource *source();
45  virtual float value();
46  virtual void reset_value (const TimeInfo& time_info);
47  virtual void update_shared_state (const TimeInfo& time_info);
48  virtual MorphModuleSharedState *create_shared_state();
49  virtual void set_shared_state (MorphModuleSharedState *new_shared_state);
50 
51  void set_ptr_id (MorphOperator::PtrID ptr_id);
52  bool get_notify_value (float& value);
53 
54  static MorphOperatorModule *create (const std::string& type, MorphPlanVoice *voice);
55 };
56 
57 }
58 
59 #endif
Definition: smlivedecodersource.hh:12
Definition: smmodulationlist.hh:17
Definition: smmorphoperatormodule.hh:20
Definition: smmorphoperatormodule.hh:27
Definition: smmorphplanvoice.hh:16
Definition: smrtmemory.hh:16
Definition: smrandom.hh:15
Definition: smtimeinfo.hh:11
Definition: smmorphoperator.hh:18