Tonejs / Tone.js

A Web Audio framework for making interactive music in the browser.
https://tonejs.github.io
MIT License
13.46k stars 978 forks source link

Freeverb seems to be broken #663

Closed danijar closed 4 years ago

danijar commented 4 years ago

Example: https://jsfiddle.net/v8t3o57p/

synth = new Tone.PolySynth(Tone.FMSynth)
// effect = new Tone.Gain()
effect = new Tone.Freeverb()
synth.chain(effect, Tone.Destination)
document.addEventListener('click', () => {
  synth.triggerAttackRelease('C4', 1)
})
Uncaught (in promise) SyntaxError: Unexpected token '==='
Promise.then (async)
cn @ AudioContext.ts:52
ln @ AudioContext.ts:52
pn @ AudioContext.ts:52
(anonymous) @ AudioContext.ts:52
ts @ AudioContext.ts:52
(anonymous) @ (index):38
tambien commented 4 years ago

I had converted to a new system for handling AudioWorkletProcessors where i could write everything in typescript and convert using toString() to a blob url. The issue is that the webpack's optimizer really mangles everything which caused this error. I've converted all of the worklets back to strings which should fix this issue, but unfortunately the worklets don't get any benefits of type checking now.