+ //! convert amplitude to dB
+ template<class TYPE>
+ TYPE lp(TYPE value)
+ {
+ return 20*log10(abs(value));
+// return 20*log10(abs(value)+numeric_limits<TYPE>::epsilon());
+ }
+
+ //! convert dB to amplitude
+ // TODO cannot create a template so easily because the pow10 is not defined for all types
+ inline double invlp(double value)
+ {
+ return pow10(value/20.0);
+// return pow(TYPE(10), value/TYPE(20));
+ }
+
+ std::vector<double> conv(const std::vector<double>& u, const std::vector<double>& v);