Skip to content

Function hertz_to_note

function hertz_to_note(const T1 &) dsp

template <numeric T1>
KFR_FUNCTION flt_type<T1> hertz_to_note(const T1& x)

Convert a frequency in Hertz to a MIDI note number.

Uses A4 (note 69) = 440 Hz as the reference tuning.

Parameters
x Frequency in Hertz.
Returns
MIDI note number (fractional for non-standard frequencies).

Fully qualified name: kfr::hertz_to_note(const T1 &)

Declared at dsp/units.hpp:168

Function hertz_to_note

function hertz_to_note(E1 &&) dsp

template <expression_argument E1>
KFR_FUNCTION expression_function<fn::hertz_to_note, E1> hertz_to_note(E1&& x)

Convert a frequency expression in Hertz to MIDI note numbers.

Parameters
x Expression yielding frequencies in Hertz.
Returns
Expression yielding MIDI note numbers.

Fully qualified name: kfr::hertz_to_note(E1 &&)

Declared at dsp/units.hpp:180

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