[chuck-users] Tracking down clicks and pops. [sample code!]
enigma.0za at gmail.com
Mon Jun 13 09:59:34 EDT 2011
On Jun 12, 2011, at 4:57 AM, Kassen wrote:
> Actually, I think I may have found part of the problem... If I have my high pass filter set as high as I did (4x the sounded freq) then I get the click. Anything 1x or lower and there's no click... Could the filter be bringing out the click more or actually causing it, our would that be evidence of an error relating to it or something else?
> Interesting! That sounds like something you might be able to re-create in a few lines and send to the list. It does sounds like you found the issue, congratulations.
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
I have an example for you (and everyone else)... It's here: http://pastebin.com/vc2W0UNW ... There's only 41 lines of code, but with my comments explaining it, it's more like 80 lines. You can take out the Attack/Decay code and replace that with a chuck to now (like noteLen => now) if you want to just peel that bit out, I mostly included it to prove (or disprove) that adding a fadein/fadeout didn't have any effect. You can mask the click by adding a really slow decay (>100::ms or so). Line #54 causes the click. Lines 37 or 38 can be used to set up a static filter combined with commenting out #54, and that conclusively gets rid of the click. There is still a small pop if the filter is set real high, but considering it's a "high pass" filter, I'm ready to write that bit off as the nature of the beast. That pop is nothing like the one I get from changing the filter around... FWIW this doesn't happen with an LPF IME.
It also seems that it's not actually affected by how the HPF is related to the output freq, if you change the *4 to *1 on line 54, it actually gets louder, at least to my ears.
Anyway, I'm going to keep poking at it (as always), but here's the proof of concept. Let me know what you think.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the chuck-users