Function pianoMap

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

    Parameters

    • ys: number[]

      Desired vertical coordinates for the notes/keys

    • Optional shifts: 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 that the all rows are ahead of the rows below.

    Returns {
        coordsByIndex: (undefined | Coords3D)[];
        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).

    • coordsByIndex: (undefined | Coords3D)[]
    • indexByCode: Map<string, number>

Generated using TypeDoc