Function scaleNotes

  • Given an array of notes, return the scale: a pitch class set starting from the first note of the array

    Parameters

    • notes: string[]

    Returns string[]

    pitch classes with same tonic

    Function

    Example

    scaleNotes(['C4', 'c3', 'C5', 'C4', 'c4']) // => ["C"]
    scaleNotes(['D4', 'c#5', 'A5', 'F#6']) // => ["D", "F#", "A", "C#"]