News for hackers. Stuff that matters.
Re:WASM SYNTH, or, how music taught me the beauty of math by capableweb on Tuesday May 25, 2021 @02:37PM (#27280545)
Not sure what went wrong and I'm not sure about the exact measurements but your synth has huge input or output latency, maybe around 100ms or something like that? Other WASM/web synths I've tried doesn't suffer from the same problem.

Otherwise it's a nifty little toy, thanks for sharing :) Lots of fun.

Re:WASM SYNTH, or, how music taught me the beauty of math by Ameo on Tuesday May 25, 2021 @07:53PM (#27284375)
Yeah some browsers/operating systems have worse latency issues than others with Web Audio. However, it's possible to tune the `latencyHint` a bit when constructing the `AudioContext` to specify a custom value. You have to find a balance between too low where have buffer underruns and miss samples and too high where it adds noticeable delay.

After a good bit of trial and error, I came up with a setup that works well on all platforms I could test: https://github.com/Ameobea/web-synth/blob/master/src/index.h...

Re:WASM SYNTH, or, how music taught me the beauty of math by apanloco on Tuesday May 25, 2021 @03:00PM (#27280911)
i don't have this issue! awesome synth! and i really like the tracker-style keys ;D
Re:WASM SYNTH, or, how music taught me the beauty of math by errozero on Tuesday May 25, 2021 @03:06PM (#27281014)
Thanks! :) Yeah the keyboard layout is based on the tracker style. I spent a lot of time with FastTracker 2.