@libraz/libcantus - v1.1.0
    Preparing search index...

    Function stepOf

    • Step index of a frequency under a tuning, unrounded.

      The exact inverse of frequencyOf. nearestStep rounds it, which discards how far off the pitch actually is — the figure a tuner display, a pitch-bend amount, or an intonation check is built on.

      Parameters

      • freq: number

        Frequency in Hz.

      • tuning: TuningTable = TWELVE_TET

        The tuning (default 12-TET).

      Returns number

      The fractional step index.

      import { stepOf } from '@libraz/libcantus';
      stepOf(442); // slightly above 69, the step for A440