UNPKG

isomorphic-qwerty

Version:

Isomorphic coordinate-system for the QWERTY keyboard with sustain using the Shift key

12 lines (11 loc) 677 B
import { Coords3D } from './coordinates'; /** * Convert a linear sequence of note types into a piano-style layout * @param ys Desired vertical coordinates for the notes/keys * @param shifts 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 `indexByCode`: a `Map` instance from keycodes to note indices. `coordsByIndex`: location of each note on layer 1 (the one with QWERTY/ASDF keys). */ export declare function pianoMap(ys: number[], shifts?: number[]): { coordsByIndex: (Coords3D | undefined)[]; indexByCode: Map<string, number>; };