[squeak-dev] Sound mixing makes nasty noises
tim at rowledge.org
Sun Dec 20 23:21:07 UTC 2020
I've made a tiny bit of progress on fighting this and I've discovered some points that might help with understanding why a VolumeEnvelope stops the volume adjustment working.
So first, using a simple FMSound with the base volume set to 40% solves a lot of problems in practice when it comes to the note-chooser in Scratch - simply keeping the volume lower avoids any clamping. The simple FMSound has not volume envelope and so the volume control actually works.
Looking at how the volume envelope works it seems like it shouldn't cause any issues; after all the operation of the envelope uses the #adjustVolume... method. I think that we're looking at the attempt to set the volume with it is clashing with the VolumeEnvelope>>#updateTargetAt: stomping on the related variables. That happens every time the #doControl method runs, which is nominally 100Hz. Somewhere there is a way to composite the two and get the desired result. I just don't see it right now because I'm trying too many things at once.
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
"How many Motie Warriors does it take to change a lightbulb?”
"None. One of the dead ones will do it."
More information about the Squeak-dev