isomorphic-qwerty
    Preparing search index...

    Function pianoMap

    • Convert a linear sequence of note types into a piano-style layout.

      Parameters

      • ys: number[]

        Desired vertical coordinates for the notes/keys

      • Optionalshifts: number[]

        Adjustments to the first three rows. A shift difference of 1 puts a row behind the next row. Defaults to [0, 0, 0] so all rows are ahead of the rows below.

      Returns { coordsByIndex: (Coords3D | undefined)[]; indexByCode: Map<string, number> }

      indexByCode: a Map instance from keycodes to note indices. coordsByIndex: location of each note on layer 1 (the one with QWERTY/ASDF keys).