SpectMorph
smeffectdecoder.hh
1 // Licensed GNU LGPL v3 or later: http://www.gnu.org/licenses/lgpl.html
2 
3 #ifndef SPECTMORPH_EFFECTDECODER_HH
4 #define SPECTMORPH_EFFECTDECODER_HH
5 
6 #include "smlivedecoder.hh"
7 #include "smlivedecodersource.hh"
8 #include "smmorphoutput.hh"
9 #include "smadsrenvelope.hh"
10 
11 #include <memory>
12 
13 namespace SpectMorph
14 {
15 
16 class SimpleEnvelope;
17 class EffectDecoderSource;
19 {
20  LiveDecoderSource *original_source;
21  EffectDecoderSource *skip_source;
22 
23  bool use_skip_source;
24 
25  std::unique_ptr<LiveDecoder> chain_decoder;
26  std::unique_ptr<ADSREnvelope> adsr_envelope;
27  std::unique_ptr<SimpleEnvelope> simple_envelope;
28 
29 public:
31  ~EffectDecoder();
32 
33  void set_config (MorphOutput *output, float mix_freq);
34 
35  void retrigger (int channel, float freq, int midi_velocity, float mix_freq);
36  void process (size_t n_values,
37  const float *freq_in,
38  float *audio_out);
39  void release();
40  bool done();
41 };
42 
43 }
44 
45 #endif
Definition: smeffectdecoder.cc:70
Definition: smlivedecodersource.hh:10
Definition: smadsrenvelope.hh:8
Definition: smmorphoutput.hh:35
Definition: smeffectdecoder.hh:18