https://github.com/diversen/js-svg-piano
Very small npm module for drawing a piano using javascript and svg
https://github.com/diversen/js-svg-piano
piano svg webaudio
Last synced: 16 days ago
JSON representation
Very small npm module for drawing a piano using javascript and svg
- Host: GitHub
- URL: https://github.com/diversen/js-svg-piano
- Owner: diversen
- Created: 2017-10-24T20:12:21.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-24T20:16:15.000Z (almost 8 years ago)
- Last Synced: 2025-08-17T12:49:03.000Z (about 2 months ago)
- Topics: piano, svg, webaudio
- Language: JavaScript
- Size: 6.84 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# js-svg-piano
Very small module for drawing a piano using js and svg
The point in using svg is that it is easy to scale multiple octaves
to fit exact in a single div container## Install
npm install --save js-svg-piano
## Usage
~~~js
var p = require('js-svg-piano');
var elemID = 'piano-container';var p = new piano(elemID, {
octaves: 2,
octaveBegin: 3
});p.createPiano();
~~~You can see [index.html](index.html) which includes the bundle built from [test.js](test.js)
You can see the example here:
[https://diversen.github.io/js-svg-piano/](https://diversen.github.io/js-svg-piano/)
## Related
* [js-css-piano](https://github.com/diversen/js-css-piano/)
## Build and watch example
./watch
## License
MIT © [Dennis Iversen](https://github.com/diversen)