Extra DSP functions¶
jaehne
function¶
template <typename T = fbase>
auto jaehne(identity<T> magn, size_t size)
Returns expression template that generates a jaehne vector Generates the sine with linearly increasing frequency from 0hz to nyquist frequency.
Source code
template <typename T = fbase>
auto jaehne(identity<T> magn, size_t size)
{
return magn * sin(jaehne_arg<T>(size));
}
https://github.com/kfrlib/kfr/blob//include/kfr/dsp/special.hpp#L62
mixdown
function¶
template <typename... E>
internal::expression_function<fn::add, E...>
mixdown(E &&...e)
Returns template expression that returns the sum of all the inputs
Source code
template <typename... E>
internal::expression_function<fn::add, E...> mixdown(E&&... e)
{
return internal::expression_function<fn::add, E...>(fn::add(), std::forward<E>(e)...);
}
https://github.com/kfrlib/kfr/blob//include/kfr/dsp/mixdown.hpp#L39
mixdown_stereo
function¶
template <typename Left, typename Right,
typename Result = internal::expression_function<
internal::stereo_matrix,
internal::expression_pack<Left, Right>>>
Result mixdown_stereo(Left &&left, Right &&right,
const f64x2x2 &matrix)
Returns template expression that returns the vector of length 2 containing mix of the left and right channels
Source code
template <typename Left, typename Right,
typename Result =
internal::expression_function<internal::stereo_matrix, internal::expression_pack<Left, Right>>>
Result mixdown_stereo(Left&& left, Right&& right, const f64x2x2& matrix)
{
return Result(internal::stereo_matrix{ matrix },
pack(std::forward<Left>(left), std::forward<Right>(right)));
}
https://github.com/kfrlib/kfr/blob//include/kfr/dsp/mixdown.hpp#L80
swept
function¶
template <typename T = fbase>
auto swept(identity<T> magn, size_t size)
Returns expression template that generates a jaehne vector Generates the sine with logarithmically increasing frequency from 0hz to nyquist frequency.
Source code
template <typename T = fbase>
auto swept(identity<T> magn, size_t size)
{
return magn * sin(swept_arg<T>(size));
}
https://github.com/kfrlib/kfr/blob//include/kfr/dsp/special.hpp#L80
unitimpulse
function¶
template <typename T = int> auto unitimpulse()
Returns expression template that generates a unit impulse
Source code
template <typename T = int>
auto unitimpulse()
{
return lambda<T>([](cinput_t, size_t index, auto x) {
if (index == 0)
return onoff(x);
else
return zerovector(x);
});
}
https://github.com/kfrlib/kfr/blob//include/kfr/dsp/special.hpp#L41
Auto-generated from sources, Revision , https://github.com/kfrlib/kfr/blob//include/kfr/