Reverberator in TS and React
JanVeb opened this issue · 1 comments
JanVeb commented
Hi there, looking how to add reverb TO piano sound but nothing works
const webFontPlayer: any = new WebAudioFontPlayer();
webFontPlayer.loader.startLoad(
this.ac,
this.nameToUrl(soundId, "JCLive", "sf2"),
this.soundFontNameBuilder(soundId, "JCLive", "sf2")
);
const self: any = this;
webFontPlayer.loader.waitLoad(function () {
self.memoryLoadedSoundFonts.set(soundId, webFontPlayer);
// TRYING TO ADD REVERB HERE
// var reverberator = webFontPlayer.createReverberator(this.ac);
// var equalizer = webFontPlayer.createChannel(this.ac);
this.echo = webFontPlayer.createReverberator(this.ac);
this.echo.wet.gain.setTargetAtTime(1.5, 0, 0.0001);
// var input = equalizer.input;
// equalizer.output.connect(reverberator.input);
// reverberator.output.connect(this.ac.destination);
// reverberator.wet.gain.setTargetAtTime(1.5, 0, 0.0001);
});
}
surikov commented
Create example in https://jsbin.com/ and paste url here.