Use full GM set of musical instruments to play MIDI and single sounds or effects. Support for reverberation and equaliser. No plugins, no Flash. Pure HTML5 implementation compatible with desktop and mobile browser. See live examples.
Hello,
There is no example that I can find that uses ES6 imports. The nearest thing I can find is the "Minimal NPM code (if you need this)", but that uses Node syntax.
I'm having problems finding the presets. Here is what I have:
import WebAudioFont from 'webaudiofont'
const AudioContextFunc = window.AudioContext || window.webkitAudioContext
const audioContext = new AudioContextFunc()
const player = new WebAudioFont()
player.loader.decodeAfterLoading(audioContext, '_tone_0250_SoundBlasterOld_sf2')
function play(){
player.queueWaveTable(audioContext, audioContext.destination,
window._tone_0250_SoundBlasterOld_sf2, 0, 12*4+7, 2)
}
I also tried importing the preset by doing:
import WebAudioFont, { _tone_0250_SoundBlasterOld_sf2} from 'webaudiofont'
Hello, There is no example that I can find that uses ES6 imports. The nearest thing I can find is the "Minimal NPM code (if you need this)", but that uses Node syntax. I'm having problems finding the presets. Here is what I have:
I also tried importing the preset by doing:
I looked at player:
and what is returned by:
I'm not sure what else to try.