Functions¶
A¶
functionamp_to_dB(const T1 &) Convert an amplitude value to decibels (20*log10).functionamp_to_dB(E1 &&) Convert an amplitude expression to decibels (20*log10).functionarrangement_for_channels(size_t) Returns a predefined speaker arrangement for a given number of channels.functionarrangement_speakers(speaker_arrangement) Returns the canonical channel list for a speaker arrangement.functionaweighting(const T1 &) A-weighting filter response for a scalar frequency.functionaweighting(E1 &&) A-weighting filter response as an expression.
B¶
functionbegin_pass(const expression_iir<1, T, E1, Stateless> &, shape<1>, shape<1>) Internal ADL-provided implementation forfunctionbegin_pass(const expression_iir<filters, T, E1, Stateless> &, shape<1>, shape<1>) Internal ADL-provided implementation forfunctionbessel(int) Analog Bessel/Thomson lowpass filter prototype (normalized cutoff = 1 rad/s).functionbiquad_allpass(std::type_identity_t<T>, std::type_identity_t<T>) Calculates coefficients for the all-pass biquad filterfunctionbiquad_bandpass(std::type_identity_t<T>, std::type_identity_t<T>) Calculates coefficients for the band-pass biquad filterfunctionbiquad_highpass(std::type_identity_t<T>, std::type_identity_t<T>) Calculates coefficients for the high-pass biquad filterfunctionbiquad_highshelf(std::type_identity_t<T>, std::type_identity_t<T>) Calculates coefficients for the high-shelf biquad filterfunctionbiquad_lowpass(std::type_identity_t<T>, std::type_identity_t<T>) Calculates coefficients for the low-pass biquad filterfunctionbiquad_lowshelf(std::type_identity_t<T>, std::type_identity_t<T>) Calculates coefficients for the low-shelf biquad filterfunctionbiquad_notch(std::type_identity_t<T>, std::type_identity_t<T>) Calculates coefficients for the notch biquad filterfunctionbiquad_peak(std::type_identity_t<T>, std::type_identity_t<T>, std::type_identity_t<T>) Calculates coefficients for the peak biquad filterfunctionbutterworth(int) Analog Butterworth lowpass filter prototype (normalized cutoff = 1 rad/s).functionbweighting(const T1 &) B-weighting filter response for a scalar frequency.functionbweighting(E1 &&) B-weighting filter response as an expression.
C¶
functionchebyshev1(int, double) Analog Chebyshev Type I lowpass filter prototype (normalized cutoff = 1 rad/s).functionchebyshev2(int, double) Analog Chebyshev Type II lowpass filter prototype (normalized cutoff = 1 rad/s).functioncweighting(const T1 &) C-weighting filter response for a scalar frequency.functioncweighting(E1 &&) C-weighting filter response as an expression.
D¶
functiondB_to_amp(const T1 &) Convert a level in decibels to an amplitude (10^(dB/20)).functiondB_to_amp(E1 &&) Convert a decibel level expression to amplitudes (10^(dB/20)).functiondB_to_power(const T1 &) Convert a power level in decibels to a power value (10^(dB/10)).functiondB_to_power(E1 &&) Convert a power level expression in decibels to power values (10^(dB/10)).functiondcremove(E1 &&, double)functiondcremove(E1 &&, double, double) Applies a DC removal filter to the given input expression.functiondelay(delay_state<T, samples, STag> &, E1 &&) Returns template expression that applies delay to the input (uses ring buffer in state)functiondelay(E1 &&) Returns template expression that applies delay to the input (uses ring buffer internally)functiondelay(E1 &&, std::reference_wrapper<delay_state<T, samples, STag>>) Returns template expression that applies delay to the input (uses ring buffer in state)functiondownsample2(E1 &&, csize_t<offset>) Downsamples a signal by a factor of 2 by selecting every other sample.functiondownsample4(E1 &&, csize_t<offset>) Downsamples a signal by a factor of 4 by selecting every fourth sample.
E¶
functionelliptic(int, double, double) Analog elliptic (Cauer) lowpass filter prototype (normalized cutoff = 1 rad/s).functionend_pass(const expression_iir<1, T, E1, Stateless> &, shape<1>, shape<1>) Internal ADL-provided implementation forfunctionend_pass(const expression_iir<filters, T, E1, Stateless> &, shape<1>, shape<1>) Internal ADL-provided implementation forfunctionenergy_to_loudness(T) Convert mean-square energy to loudness in LUFS.
F¶
functionfiltfilt(univector<T, Tag> &, const iir_params<T, Itag> &) Applies forward and backward filtering to the input array using the given IIR filter parameters.functionfir_bandpass(const univector_ref<T> &, std::type_identity_t<T>, std::type_identity_t<T>, const expression_handle<T> &, bool)functionfir_bandpass(univector<T, Tag> &, std::type_identity_t<T>, std::type_identity_t<T>, const expression_handle<T> &, bool) Calculates coefficients for the band-pass FIR filter using the windowed-sinc method.functionfir_bandstop(const univector_ref<T> &, std::type_identity_t<T>, std::type_identity_t<T>, const expression_handle<T> &, bool)functionfir_bandstop(univector<T, Tag> &, std::type_identity_t<T>, std::type_identity_t<T>, const expression_handle<T> &, bool) Calculates coefficients for the band-stop (notch) FIR filter using the windowed-sinc method.functionfir_highpass(const univector_ref<T> &, std::type_identity_t<T>, const expression_handle<T> &, bool)functionfir_highpass(univector<T, Tag> &, std::type_identity_t<T>, const expression_handle<T> &, bool) Calculates coefficients for the high-pass FIR filter using the windowed-sinc method.functionfir_lowpass(const univector_ref<T> &, std::type_identity_t<T>, const expression_handle<T> &, bool)functionfir_lowpass(univector<T, Tag> &, std::type_identity_t<T>, const expression_handle<T> &, bool) Calculates coefficients for the low-pass FIR filter using the windowed-sinc method.functionfir(E1 &&, fir_params<T>) Returns template expression that applies FIR filter to the input.functionfir(E1 &&, std::reference_wrapper<fir_state<T, U>>) Returns template expression that applies FIR filter to the input.functionfir(E1 &&, Taps &&) Returns template expression that applies FIR filter to the input.functionfir(fir_state<T, U> &, E1 &&) Returns template expression that applies FIR filter to the input.functionfracdelay(E1 &&, T) Returns template expression that applies a fractional delay to the input
G¶
functionget_elements(const expression_iir<1, T, E1, Stateless> &, shape<1>, axis_params<0, N>) Internal ADL-provided implementation forfunctionget_elements(const expression_iir_l<filters, T, E1, Stateless> &, shape<1>, axis_params<0, N>) Internal ADL-provided implementation forfunctionget_elements(const expression_iir<filters, T, E1, Stateless> &, shape<1>, axis_params<0, N>) Internal ADL-provided implementation forfunctiongoertzel(complex<T> &, std::type_identity_t<T>) Create a single-bin Goertzel expression.functiongoertzel(complex<T> (&)[width], const T (&)[width]) Createwidthparallel Goertzel expressions.
H¶
functionhertz_to_note(const T1 &) Convert a frequency in Hertz to a MIDI note number.functionhertz_to_note(E1 &&) Convert a frequency expression in Hertz to MIDI note numbers.
I¶
functioniir_bandpass(const zpk &, double, double, double) Designs a digital bandpass IIR filter and returns ZPK coefficients.functioniir_bandstop(const zpk &, double, double, double) Designs a digital bandstop (notch) IIR filter and returns ZPK coefficients.functioniir_highpass(const zpk &, double, double) Designs a digital highpass IIR filter and returns ZPK coefficients.functioniir_lowpass(const zpk &, double, double) Designs a digital lowpass IIR filter and returns ZPK coefficients.functioniir(E1 &&, const iir_params<T, tag_dynamic_vector> &) Returns a template expression that applies a runtime-sized biquad cascade to the input.functioniir(E1 &&, const zpk &) Applies an IIR filter (in ZPK form) to an input signal expression.functioniir(E1 &&, iir_params<T, filters>) Returns a template expression that applies a biquad filter cascade to the input.functioniir(E1 &&, std::reference_wrapper<iir_state<T, filters>>) Returns a template expression that applies a biquad cascade using externally-owned state.functionisawtooth(const T1 &) Inverse (rising) sawtooth wave of a phase in radians.functionisawtooth(E1 &&) Expression overload ofisawtooth; applies element-wise to an expression.functionisawtoothnorm(const T1 &) Inverse (rising) sawtooth wave of a phase ramp in [0, 1) cycles.functionisawtoothnorm(E1 &&) Expression overload ofisawtoothnorm; applies element-wise to an expression.
J¶
functionjaehne_arg(size_t)functionjaehne(std::type_identity_t<T>, size_t) Returns expression template that generates a jaehne vector Generates the sine with linearly increasing frequency from 0hz to nyquist frequency.
L¶
functionlibrary_version_dsp() Returns the full version string of the KFR DSP module.functionloudness_to_energy(T) Inverse ofenergy_to_loudness: convert LUFS back to linear energy.
M¶
functionmake_kfilter(int) Build the EBU R128 K-weighting pre-filter as an IIR expression handle.functionmatrix_halfsum_halfdiff() Returns a 2x2 matrix that computes half-sum/half-difference of stereo channels.functionmatrix_sum_diff() Returns a 2x2 matrix that computes sum/difference of stereo channels.functionmixdown_stereo(Left &&, Right &&, const f64x2x2 &) Returns a template expression that produces a length-2 vector mixing the left and right channels according tomatrix.functionmixdown(E &&...) Returns a template expression that yields the sample-wise sum of all the inputs.functionmoving_sum(E1 &&) Returns template expression that performs moving sum on the input.functionmoving_sum(E1 &&, size_t) Returns template expression that performs moving sum on the input.functionmoving_sum(E1 &&, std::reference_wrapper<moving_sum_state<U, Tag>>) Returns template expression that performs moving sum on the input.functionmoving_sum(moving_sum_state<U, STag> &, E1 &&) Returns template expression that performs moving sum on the input.
N¶
functionnote_to_hertz(const T1 &) Convert a MIDI note number to frequency in Hertz.functionnote_to_hertz(E1 &&) Convert a MIDI note number expression to frequency in Hertz.
P¶
functionphasor(std::type_identity_t<T>) Phasor withsample_rate = 1andphase = 0.functionphasor(std::type_identity_t<T>, std::type_identity_t<T>, std::type_identity_t<T>) Phasor (normalized phase ramp in [0, 1)) advancing at the given frequency.functionpower_to_dB(const T1 &) Convert a power value to decibels (10*log10).functionpower_to_dB(E1 &&) Convert a power expression to decibels (10*log10).
R¶
functionrawsawtooth(const T1 &) Sawtooth wave of a phase ramp in [0, 1) cycles.functionrawsawtooth(E1 &&) Expression overload ofrawsawtooth; applies element-wise to an expression.functionrawsine(const T1 &) Sine of a phase ramp in [0, 1) cycles.functionrawsine(E1 &&) Expression overload ofrawsine; applies element-wise to an expression.functionrawsquare(const T1 &) Square wave of a phase ramp in [0, 1) cycles.functionrawsquare(E1 &&) Expression overload ofrawsquare; applies element-wise to an expression.functionrawtriangle(const T1 &) Triangle wave of a phase ramp in [0, 1) cycles.functionrawtriangle(E1 &&) Expression overload ofrawtriangle; applies element-wise to an expression.functionresampler(sample_rate_conversion_quality, size_t, size_t, subtype<T>, subtype<T>) Helper function to create a sample rate converter instance.functionreset(const expression_delay<1, E, stateless, STag> &) Clears a one-sample delay expression's stored sample.functionreset(const expression_delay<delay, E, stateless, STag> &) Clears a multi-sample delay expression's ring buffer and cursor.functionreset(const expression_fir<T, U, E1, stateless> &) Clears a generic FIR expression's delay line while preserving its taps.functionreset(const expression_goertzel<T> &) Clears a Goertzel resonator's recursive state.functionreset(const expression_iir_l<filters, T, E1, Stateless> &) Clears an IIR cascade's delay-line state while preserving its coefficients.functionreset(const expression_iir<filters, T, E1, Stateless> &)functionreset(const expression_moving_sum<U, E1, STag, stateless> &) Clears a moving-sum expression's delay line and restores its cursors.functionreset(const expression_parallel_goertzel<T, width> &) Clears all recursive states in a parallel Goertzel expression.functionreset(const expression_short_fir<tapcount, T, U, E1, stateless> &) Clears a short FIR expression's delay line while preserving its taps.
S¶
functionsample_rate_converter(sample_rate_conversion_quality, size_t, size_t, subtype<T>, subtype<T>) Helper function to create a sample rate converter instance.functionsaturate_I(const T1 &) Type-I saturation curve (odd-symmetric, bounded to (-1, 1)).functionsaturate_I(E1 &&) Expression form of saturate_I.functionsaturate_II(const T1 &) Type-II saturation curve (odd-symmetric, bounded to (-1, 1)).functionsaturate_II(E1 &&) Expression form of saturate_II.functionsawtooth(const T1 &) Sawtooth wave of a phase in radians.functionsawtooth(E1 &&) Expression overload ofsawtooth; applies element-wise to an expression.functionsawtoothnorm(const T1 &) Sawtooth wave of a phase ramp in [0, 1) cycles (alias ofrawsawtooth).functionsawtoothnorm(E1 &&) Expression overload ofsawtoothnorm; applies element-wise to an expression.functionshort_fir(E1 &&, const univector<T, TapCount> &) Returns template expression that applies a short FIR filter to the input (tap count must be in range 2..33).functionshort_fir(E1 &&, std::reference_wrapper<short_fir_state<TapCount, T, U>>) Returns template expression that applies a short FIR filter to the input (tap count must be in range 2..33).functionshort_fir(short_fir_state<InternalTapCount, T, U> &, E1 &&) Returns template expression that applies a short FIR filter to the input (tap count must be in range 2..33).functionsine(const T1 &) Sine of a phase in radians.functionsine(E1 &&) Expression overload ofsine; applies element-wise to an expression.functionsinenorm(const T1 &) Sine of a phase ramp in [0, 1) cycles (alias ofrawsine).functionsinenorm(E1 &&) Expression overload ofsinenorm; applies element-wise to an expression.functionsquare(const T1 &) Square wave of a phase in radians.functionsquare(E1 &&) Expression overload ofsquare; applies element-wise to an expression.functionsquarenorm(const T1 &) Square wave of a phase ramp in [0, 1) cycles (alias ofrawsquare).functionsquarenorm(E1 &&) Expression overload ofsquarenorm; applies element-wise to an expression.functionswept_arg(size_t)functionswept(std::type_identity_t<T>, size_t) Returns expression template that generates a jaehne vector Generates the sine with logarithmically increasing frequency from 0hz to nyquist frequency.
T¶
functionto_sos(const zpk &) Converts a zero-pole-gain filter to second-order sections (SOS) form.functiontriangle(const T1 &) Triangle wave of a phase in radians.functiontriangle(E1 &&) Expression overload oftriangle; applies element-wise to an expression.functiontrianglenorm(const T1 &) Triangle wave of a phase ramp in [0, 1) cycles (alias ofrawtriangle).functiontrianglenorm(E1 &&) Expression overload oftrianglenorm; applies element-wise to an expression.
U¶
functionunitimpulse() Returns expression template that generates a unit impulsefunctionupsample2(E1 &&) Upsamples a signal by a factor of 2 by inserting zero samples.functionupsample4(E1 &&) Upsamples a signal by a factor of 4 by inserting zero samples.
W¶
functionwaveshaper_hardclip(E1 &&, double) Hard-clipping waveshaper.functionwaveshaper_poly(E1 &&, fbase, fbase, Cs...) Polynomial (odd-only) waveshaper using Horner evaluation.functionwaveshaper_saturate_I(E1 &&, double) Waveshaper based on the type-I saturation curve.functionwaveshaper_saturate_II(E1 &&, double) Waveshaper based on the type-II saturation curve.functionwaveshaper_tanh(E1 &&, double) Hyperbolic-tangent waveshaper.functionwindow_bartlett_hann(size_t, ctype_t<T>) Returns template expression that generates a Bartlett-Hann window of lengthsizefunctionwindow_bartlett(size_t, ctype_t<T>) Returns template expression that generates a Bartlett window of lengthsizefunctionwindow_blackman_harris(size_t, window_symmetry, ctype_t<T>) Returns template expression that generates a Blackman-Harris window of lengthsizefunctionwindow_blackman(size_t, std::type_identity_t<T>, window_symmetry, ctype_t<T>) Returns template expression that generates a Blackman window of lengthsizewhere α =alphafunctionwindow_bohman(size_t, ctype_t<T>) Returns template expression that generates a Bohman window of lengthsizefunctionwindow_cosine_np(size_t, ctype_t<T>) Returns template expression that generates a cosine window (numpy compatible) of lengthsizefunctionwindow_cosine(size_t, ctype_t<T>) Returns template expression that generates a cosine window of lengthsizefunctionwindow_flattop(size_t, ctype_t<T>) Returns template expression that generates a flat-top window of lengthsizefunctionwindow_gaussian(size_t, std::type_identity_t<T>, ctype_t<T>) Returns template expression that generates a Gaussian window of lengthsizewhere α =alphafunctionwindow_hamming(size_t, std::type_identity_t<T>, ctype_t<T>) Returns template expression that generates a Hamming window of lengthsizewhere α =alphafunctionwindow_hann(size_t, ctype_t<T>) Returns template expression that generates a Hann window of lengthsizefunctionwindow_kaiser(size_t, std::type_identity_t<T>, ctype_t<T>) Returns template expression that generates a Kaiser window of lengthsizewhere β =betafunctionwindow_lanczos(size_t, ctype_t<T>) Returns template expression that generates a Lanczos window of lengthsizefunctionwindow_planck_taper(size_t, std::type_identity_t<T>, window_symmetry, ctype_t<T>) Returns template expression that generates a Planck-taper window of lengthsizefunctionwindow_rectangular(size_t, ctype_t<T>) Returns template expression that generates a rectangular window of lengthsizefunctionwindow_triangular(size_t, ctype_t<T>) Returns template expression that generates a triangular window of lengthsizefunctionwindow_tukey(size_t, std::type_identity_t<T>, window_symmetry, ctype_t<T>) Returns template expression that generates a Tukey window of lengthsize(numpy compatible)functionwindow(size_t, cval_t<window_type, type>, std::type_identity_t<T>, window_symmetry, ctype_t<T>) Returns a window expression of the requested compile-time typefunctionwindow(size_t, window_type, std::type_identity_t<T>, window_symmetry, ctype_t<T>) Returns a type-erased window expression of the requested runtime type
This file was generated by cxxdox, a C++ documentation generator based on MkDocs Material and libclang.