SpectMorph
smmorphlinearmodule.hh
1 // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl-2.1.html
2 
3 #ifndef SPECTMORPH_MORPH_LINEAR_MODULE_HH
4 #define SPECTMORPH_MORPH_LINEAR_MODULE_HH
5 
6 #include "smmorphplan.hh"
7 #include "smmorphoutput.hh"
8 #include "smmorphoperatormodule.hh"
9 #include "smmorphlinear.hh"
10 #include "smmorphsourcemodule.hh"
11 
12 namespace SpectMorph
13 {
14 
16 {
17  const MorphLinear::Config *cfg = nullptr;
18 
19  MorphOperatorModule *left_mod;
20  MorphOperatorModule *right_mod;
21  SimpleWavSetSource left_source;
22  bool have_left_source;
23  SimpleWavSetSource right_source;
24  bool have_right_source;
25 
26  Audio audio;
27 
28  struct MySource : public LiveDecoderSource
29  {
30  MorphLinearModule *module;
31 
32  void interp_mag_one (double interp, uint16_t *left, uint16_t *right);
33  void retrigger (int channel, float freq, int midi_velocity) override;
34  Audio* audio() override;
35  bool rt_audio_block (size_t index, RTAudioBlock& block) override;
36  } my_source;
37 
38 public:
41 
42  void set_config (const MorphOperatorConfig *cfg);
43  LiveDecoderSource *source();
44 };
45 
46 }
47 
48 #endif
Audio sample containing many blocks.
Definition: smaudio.hh:80
Definition: smlivedecodersource.hh:12
Definition: smmorphlinearmodule.hh:16
Definition: smmorphoperatormodule.hh:27
Definition: smmorphplanvoice.hh:16
Definition: smrtmemory.hh:139
Definition: smmorphsourcemodule.hh:13
Definition: smmorphlinear.hh:19
Definition: smmorphoperator.hh:18