Function tr

  • Transpose a note by an interval.

    Parameters

    Returns NoteName

    the transposed note name or empty string if not valid notes

    Example

    import { tranpose } from "../core"
    transpose("d3", "3M") // => "F#3"
    transpose("D", "3M") // => "F#"
    ["C", "D", "E", "F", "G"].map(pc => transpose(pc, "M3)) // => ["E", "F#", "G#", "A", "B"]