vsariola / sointu

Fork of 4klang that can target 386, amd64 and WebAssembly. Tools run on Windows, Mac & Linux
MIT License
240 stars 15 forks source link

Fix denormalizing #68

Closed vsariola closed 1 month ago

vsariola commented 3 years ago

Despite all attempts, there seems to be something denormalizing, exemplified by the Adam song. When the kick stops playing, the audio starts to stutter after a while. This happens with the x87 core.

Need to investigate why this is still happening and how to avoid it.

reaby commented 2 months ago

i tried to debug this... got cpu usage pretty high with only one simple patch: env+osc+mulp+filter+filter+pan+outaux. with my system from default 5% cpu usage, it gets to 12.9% with only this, increasing sound to 4 it already is at 24%.

vsariola commented 1 month ago

I'm pretty sure it's the filter unit. Let's see if I can spot where we need flush to zero.

LeStahL commented 1 month ago

I can reproduce it in tracks with filter unit on 3-oscilator instrument with unison enabled, and it vanishes when removing the filter.

LeStahL commented 1 month ago

Envelope + Send to filter cutoff makes it significantly worse.

vsariola commented 1 month ago

Ok, I think I found the right place to flush to zero, can you try the binaries from the dev branch (https://github.com/vsariola/sointu/actions/runs/9584723750) to see if that fixes the CPU hogging.

LeStahL commented 1 month ago

Checked; this fixes the CPU hogging, thank you very much for looking into this! :)

vsariola commented 1 month ago

Great! I'll merge this to master branch then.