1 #ifndef ANDROID_FXLAB_DOUBLINGDESCRIPTION_H 2 #define ANDROID_FXLAB_DOUBLINGDESCRIPTION_H 3 4 #include "EffectDescription.h" 5 #include "../DoublingEffect.h" 6 7 namespace Effect { 8 class DoublingDescription: public EffectDescription<DoublingDescription, 3> { 9 public: getName()10 static constexpr std::string_view getName() { 11 return std::string_view("Doubling"); 12 } 13 getCategory()14 static constexpr std::string_view getCategory() { 15 return std::string_view("Delay"); 16 } 17 getParams()18 static constexpr std::array<ParamType, getNumParams()> getParams() { 19 return std::array<ParamType, getNumParams()> { 20 ParamType("Depth (ms)", 10, 100, 40), 21 ParamType("Delay (ms)", 1, 100, 40), 22 ParamType("Noise pass", 1, 10, 4), 23 }; 24 } 25 template<class iter_type> buildEffect(std::array<float,getNumParams ()> paramArr)26 static _ef<iter_type> buildEffect(std::array<float, getNumParams()> paramArr) { 27 return _ef<iter_type> { 28 DoublingEffect<iter_type>{paramArr[0], paramArr[1], paramArr[2]} 29 }; 30 } 31 }; 32 } //namespace Effect 33 #endif //ANDROID_FXLAB_DOUBLINGDESCRIPTION_H 34