Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skratchdot/timbre.soundfont.js
play soundfont urls using timbre.js
https://github.com/skratchdot/timbre.soundfont.js
Last synced: 23 days ago
JSON representation
play soundfont urls using timbre.js
- Host: GitHub
- URL: https://github.com/skratchdot/timbre.soundfont.js
- Owner: skratchdot
- License: mit
- Created: 2013-07-31T21:21:23.000Z (over 11 years ago)
- Default Branch: gh-pages
- Last Pushed: 2014-04-25T05:29:57.000Z (over 10 years ago)
- Last Synced: 2024-10-13T23:37:10.203Z (26 days ago)
- Language: JavaScript
- Size: 293 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
- awesome-javascript-audio - timbre_soundfonts.js - soundfonts for [timbre.js](https://github.com/mohayonao/timbre.js/) (Sound assets / SoundFonts)
README
# timbre.soundfont.js
A library that lets you play soundfont urls via timbre.js.
Currently it uses the [free-midi](https://code.google.com/p/free-midi/)
repo to get it's sounds via jsonp.You can play all the instruments in the
[general midi standard](http://en.wikipedia.org/wiki/General_MIDI#Program_change_events) by
default, or you can set a different url template, and pull sounds from your own site.## Demo
[Timbre.js Soundfont Demo](http://projects.skratchdot.com/timbre.soundfont.js/)
## Dependencies
- [timbre.js](https://github.com/mohayonao/timbre.js/)
- [jsmad](https://github.com/audiocogs/jsmad/) - (If your soundfonts are in mp3 format)
- [timbre.mp3_decode.js](https://github.com/skratchdot/timbre.mp3_decode.js/) - (If your soundfonts are in mp3 format)
- [audio-jsonp.js](http://mohayonao.github.io/timbre.js/src/extras/audio-jsonp.js) - (If your soundfonts are on a different domain)
## Usage
```html
// play note 64
timbre.soundfont.play(64);// set instrument and play again
timbre.soundfont.setInstrument(5);
timbre.soundfont.play(64);// only play if this note has already been cached
timbre.soundfont.play(70, false);
```