Skip to content
play soundfont urls using timbre.js
Branch: gh-pages
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
.gitignore
.jshintrc
Gruntfile.js
LICENSE-MIT
README.md
index.html
package.json
timbre.soundfont.js
timbre.soundfont.min.js

README.md

timbre.soundfont.js

A library that lets you play soundfont urls via timbre.js.

Currently it uses the free-midi repo to get it's sounds via jsonp.

You can play all the instruments in the general midi standard by default, or you can set a different url template, and pull sounds from your own site.

Demo

Timbre.js Soundfont Demo

Dependencies

Usage

	<script src="jsmad.js"></script>
	<script src="timbre.js"></script>
	<script src="timbre.mp3_decode.js"></script>
	<script src="timbre.soundfont.js"></script>
	<script>
		// 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);
	</script>
You can’t perform that action at this time.