25template <is::constant C>
26struct InvertedConstant
28 static constexpr double value = 1.0 / double (C::value);
33namespace vctr::expressions
36template <
size_t extent,
class SrcType,
class DecibelConstant,
class MinDb>
37using MagToDb = ClampByConstant<extent,
38 MultiplyVecByConstant<extent,
39 Log10<extent, SrcType>,
44template <
size_t extent,
class SrcType,
class DecibelConstant>
45using DBToMag = PowConstantBase<extent,
46 MultiplyVecByConstant<extent,
48 detail::InvertedConstant<DecibelConstant>>,
84template <
is::constant DecibelConstant,
auto minDb = -100>
96template <is::constant DecibelConstant>
Constrains the type to be a class that defines a static const value field.
Definition: GenericConcepts.h:114
constexpr ExpressionChainBuilderWithRuntimeArgs< expressions::MagToDb, detail::RuntimeArgChain< std::tuple<>, std::tuple<>, std::tuple<> >, DecibelConstant, Constant< minDb > > magToDb
Converts the source magnitude into a decibel representation.
Definition: Decibels.h:85
constexpr ExpressionChainBuilderWithRuntimeArgs< expressions::DBToMag, detail::RuntimeArgChain< std::tuple<>, std::tuple<>, std::tuple<> >, DecibelConstant > dbToMag
Converts the source decibel values into their magnitude representation.
Definition: Decibels.h:97
The main namespace of the VCTR project.
Definition: Array.h:24
A simple helper struct to pass a constant as argument wrapped in a struct with a single public static...
Definition: ExpressionChainBuilder.h:104
An expression chain builder is an object which supplies various operator<< overloads which build chai...
Definition: ExpressionChainBuilder.h:136
Decibel constant dbFS to be passed to dbToMag or magToDb.
Definition: Decibels.h:60
Decibel constant dbPower to be passed to dbToMag or magToDb.
Definition: Decibels.h:72
Decibel constant dbVoltage to be passed to dbToMag or magToDb.
Definition: Decibels.h:66