Skip to content

Function note_to_hertz

function note_to_hertz(const T1 &) dsp

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

Convert a MIDI note number to frequency in Hertz.

Uses A4 (note 69) = 440 Hz as the reference tuning. NaNs in the result are replaced with -infinity.

Parameters
x MIDI note number (60 = middle C).
Returns
Frequency in Hertz.

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

Declared at dsp/units.hpp:142

Function note_to_hertz

function note_to_hertz(E1 &&) dsp

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

Convert a MIDI note number expression to frequency in Hertz.

Parameters
x Expression yielding MIDI note numbers (60 = middle C).
Returns
Expression yielding frequencies in Hertz.

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

Declared at dsp/units.hpp:154

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