This is a minimal demo of using Glicol. Vite
is recommand as the build tool for your web app.
npm i glicol
import Glicol from 'glicol'
import { sin } from 'glicol'
const glicol = new Glicol()
Due to many browsers' limitation, audio playing requires a GUI action such as a button click.
For vanilla JS, you can do like this:
document.getElementById("play").onclick = () => {
glicol.play({
o: sin(440)
})
}