ape  0.5.0
Audio Programming Environment
effect.h
Go to the documentation of this file.
1 #ifndef CPPAPE_EFFECT_H
2 #define CPPAPE_EFFECT_H
3 
4 #include "common.h"
5 #include "fpoint.h"
6 #include "simd.h"
7 
8 namespace ape
9 {
15  class Effect : public Processor
16  {
17  protected:
18  Effect() {}
19  };
20 
28  {
29  protected:
31  };
32 
40  template<class TEffect>
41  class EmbeddedEffect final : public EmbeddedProcessor<TEffect>
42  {
43  public:
44 
45  static_assert(std::is_base_of<Effect, TEffect>::value || std::is_base_of<TransportEffect, TEffect>::value, "Embedded effects must derive from a effect");
46 
50  void process(umatrix<const float> inputs, umatrix<float> outputs, size_t frames)
51  {
52  this->processor.processFrames(inputs, outputs, frames);
53  }
54  };
55 }
56 
57 
58 #endif
ape::EmbeddedProcessor< TEffect >::processor
TEffect processor
Definition: processor.h:358
fpoint.h
ape::umatrix< const float >
ape::EmbeddedEffect::process
void process(umatrix< const float > inputs, umatrix< float > outputs, size_t frames)
Call this to invoke the embedded effect's processor routine.
Definition: effect.h:50
simd.h
ape::TransportEffect
The same as Effect, except it also can query information about the playhead (TransportProcessor::getP...
Definition: effect.h:27
ape
Definition: audiofile.h:7
ape::Effect
An effect is a simple processor that can modify an audio stream. An effect is guaranteed to the same ...
Definition: effect.h:15
ape::TransportEffect::TransportEffect
TransportEffect()
Definition: effect.h:30
ape::EmbeddedEffect
A utility class to embed another Effect inside your own. It takes care of initialization.
Definition: effect.h:41
common.h
ape::TransportProcessor
A Processor with additional access to the transport / playhead of the host.
Definition: processor.h:206
ape::Effect::Effect
Effect()
Definition: effect.h:18
ape::Processor
Definition: processor.h:41
ape::EmbeddedProcessor
Class for easily embedding processors within your processor. Base functionality for EmbeddedEffect an...
Definition: processor.h:280