logue / Reverb.js

Append reverb effect to audio source.
https://logue.github.io/Reverb.js/
MIT License
15 stars 2 forks source link

Reverb.js on html with cdn. #2

Open jomin398 opened 1 year ago

jomin398 commented 1 year ago

how to use code?

i tried to use with umd.js; it't throws error.

i tried again with cdn.

import { default as Reverb } from "reverb"; 
var context = new AudioContext();
    let el = document.querySelector("audio");
var source = context.createMediaElementSource(el);
    var reverb = new Reverb(context, {
      noise: 'pink',
      time: 6,
      decay: 25,
      delay: 4,
      reverse: false
    });
    await reverb.ready;
    reverb.connect(source);
    source.connect(context.destination);

but effect is dosen't work. (No audio) how to fix it?

logue commented 1 year ago

It seems that the package it depends on is not loaded. I think it will work if you read it with esm.

https://www.jsdelivr.com/package/npm/@thi.ng/colored-noise