Function midiToFreq

  • Get the frequency in hertzs from midi number

    Parameters

    • midi: number

      the note midi number

    • Optional tuning: number = 440

      A4 tuning frequency in Hz (440 by default)

    Returns number

    the frequency or null if not valid note midi

    Example

    import { midiToFreq} from '../midi'
    midiToFreq(69) // => 440