General Functions ================= .. currentmodule:: pyvoimooo .. attribute:: eps Return the machine epsilon, that is, the difference between 1.0 and the next value representable by the default floating-point type used in the underlying C++ implementation. .. attribute:: sizeoffloat The size of the default float type of Voimooo [number of bytes] .. attribute:: pi The value of :math:`\pi`. This attribute is provided to reflect the actual value used in the underlying C++ implementation. .. attribute:: pi2 Twice the value of :math:`\pi`. This attribute is provided to reflect the actual value used in the underlying C++ implementation. .. function:: lin2db(v) :arg v: Input value on linear scale. :return: the value on a decibel [dB] scale. :class:`lin2dbd` provides the same for 64b float values. .. versionadded:: 0.8.9 .. function:: db2lin(v) :arg v: Input value on decibel scale. :return: the value on a linear scale. :class:`db2lind` provides the same for 64b float values. .. versionadded:: 0.8.9 .. function:: hz2cent(v) :arg v: Input value on linear hertz scale. :return: the value on a cent scale (relative to 440Hz). .. versionadded:: 0.8.9 .. function:: cent2hz(v) :arg v: Input value on cent scale (relative to 440Hz). :return: the value on a linear hertz scale. .. versionadded:: 0.8.9 .. function:: cent2freqratio(v) :arg v: Input value on cent scale. :return: the value as a linear coefficient. .. versionadded:: 0.10.1 .. function:: freqratio2cent(v) :arg v: A linear coefficient. :return: the value on cent scale. .. versionadded:: 0.10.1 .. function:: dftlen_from_over_sampling_factor(winlen, osf) :arg winlen: A window length. :type winlen: int :arg osf: An over-sampling factor. :type osf: int :return: The power-2 **dftlen**, based on a given :attr:`winlen` and an over-sampling factor :attr:`osf`. .. versionadded:: 0.8.9 .. attribute:: libversion Return the version of the Voimooo library that is wrapped by this Python wrapper. Identical to `__version__`. .. versionadded:: 0.8.9 .. attribute:: compile_info Report some compile-time information in a string. .. versionadded:: 0.8.9 .. attribute:: user_name The user name, as obtained by Voimooo through the operating system. .. versionadded:: 0.10.1 .. attribute:: user_id The user id, which is the MD5 of the `user_name`. .. versionadded:: 0.10.1