Skip to content

Function phasor

function phasor(std::type_identity_t<T>, std::type_identity_t<T>, std::type_identity_t<T>) dsp

template <typename T = fbase>
KFR_FUNCTION static auto phasor(std::type_identity_t<T> frequency, std::type_identity_t<T> sample_rate,
                                std::type_identity_t<T> phase = 0) { … }

Phasor (normalized phase ramp in [0, 1)) advancing at the given frequency.

Template parameters
T Floating point type (defaults to fbase ).
Parameters
frequency Oscillator frequency, in Hz.
sample_rate Sample rate, in Hz. Use 1 to express frequency as a normalized fraction of the sample rate.
phase Initial phase, in normalized cycles ([0, 1)).
Returns
Expression producing a per-sample phase value in [0, 1).

Fully qualified name: kfr::phasor(std::type_identity_t<T>, std::type_identity_t<T>, std::type_identity_t<T>)

Function phasor

function phasor(std::type_identity_t<T>) dsp

template <typename T = fbase>
KFR_FUNCTION static auto phasor(std::type_identity_t<T> frequency) { … }

Phasor with sample_rate = 1 and phase = 0 .

Template parameters
T Floating point type (defaults to fbase ).
Parameters
frequency Normalized frequency (cycles per sample).
Returns
Expression producing a per-sample phase value in [0, 1).

Fully qualified name: kfr::phasor(std::type_identity_t<T>)

This file was generated by cxxdox, a C++ documentation generator based on MkDocs Material and libclang.