Piano Keys
A two-octave piano keyboard that plays Web Audio notes, with computer-key mapping on every key, pressed states, glissando, octave shift, sustain and volume.
Preview
NoteB4
Freq493.9 Hz
RangeC4–C6
Volume
Note—
Freq— Hz
RangeC3–C4
Volume
Install
Pro source requires Pebble Pro. Try the full preview above.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| defaultOctave | number | 4 | Octave of the lowest C (C4 is middle C); [ and ] shift it. |
| octaves | number | 2 | Octaves shown, plus the closing C. |
| defaultSustain | boolean | false | Start with sustain on: released notes ring out. |
| defaultVolume | number | 70 | Volume 0–100. |
| showKeys | boolean | true | Print the computer key on each piano key. |
| defaultPressed | number[] | [] | MIDI notes shown held at first render (for docs and demos). |
| onNote | (note: PianoNote) => void | — | Called for every note-on. |
| label | string | "Piano" | Accessible name of the keyboard. |
Pro component
Try the full preview above. Editable source and build guides require Pebble Pro.
