Function numeric

  • Create a numeric range. You supply a list of notes or numbers and it will be connected to create complex ranges.

    Parameters

    • notes: (string | number)[]

      the list of notes or midi numbers used

    Returns number[]

    an array of numbers or empty array if not valid parameters

    Example

    numeric(["C5", "C4"]) // => [ 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60 ]
    // it works midi notes
    numeric([10, 5]) // => [ 10, 9, 8, 7, 6, 5 ]
    // complex range
    numeric(["C4", "E4", "Bb3"]) // => [60, 61, 62, 63, 64, 63, 62, 61, 60, 59, 58]