An open API service indexing awesome lists of open source software.

https://github.com/micahscopes/all-around-keyboard

a web component for piano keyboards
https://github.com/micahscopes/all-around-keyboard

d3 keyboard music piano web-components

Last synced: 1 day ago
JSON representation

a web component for piano keyboards

Awesome Lists containing this project

README

          

# all-around keyboards
a web component for round pianos

### [demo](http://micahscopes.github.io/all-around-keyboard)

## usage:
```html

```
You can also customize the keyboard with the following attributes:
```html

```
### Pressing and releasing keys
``` javascript
// select the keyboard
let kb = document.querySelector('all-around-keyboard');

kb.keysPress([2,6,9,11,18])
setTimeout(() => { kb.keysRelease([2,6,9,11,18]) }, 4000);
```

### Lighting and dimming keys
``` javascript
kb.keysLight([2,6,9,11,18])
setTimeout(() => { kb.keysDim([2,6,9,11,18]) }, 4000);
```

### Lighting and dimming notes (pitch classes)
``` javascript
kb.notesLight([2,4,6,7,9,11,1])
setTimeout(() => { kb.notesDim([2,4,6,7,9,11,1]) }, 4000);
```
##### *inspired by mbostock's example for d3: https://bl.ocks.org/mbostock/5723d93e4f617b542991*