On Thu, 8 Jul 2004 mstamm@itin.fr wrote:
I have a "dac object" and a "number" to variate its value. When the number comes to a negative or positive number, the speaker generates a "tac" sound, and I don't understand why.
The "tac" sound is due to any sudden change of the voltage in a speaker. If your numberbox goes suddenly from -1 to 0 and/or from 0 to +1, then you hear a click. You will not hear a click when changing among values higher than +1, or among values lower than -1, because of clipping.
On Thu, 8 Jul 2004, Frank Barknecht wrote:
If you send anything whose absolute value is greater than 1.0 to a dac~ it will click because of clipping at the soundcard, which is overdriven then.
The clipping is only a voltage stopper. It will not cause clicking by itself; it does nothing audible. However if a roundy wave enters in contact with one or both clipping lines, it changes the waveform, normally enriching the sound with odd harmonics (resembling a square wave).
On Thu, 8 Jul 2004, Lex Ein wrote:
Luckily, most soundcard outputs are not DC coupled; so the speaker won't stay pushed out there.
It doesn't matter much if, numbers are clipped during a digital-to-digital conversion. Soundcards don't understand floats, and converting to their number format does the clipping at -1 and +1.
it leads to asymmetrical clipping in the signal processing chain, which sounds pretty bad.
At the pdmtl#2 meeting, we had a demo of asymmetrical fuzz done on purpose using a formula involving hyperbolic tangent. Apparently some people DO think it sounds good. But I guess it's always what happens... when we try to imitate an old sound using a new sound, we don't see the new sound for its own qualities, but rather for how close it is to the old one...
On Thu, 8 Jul 2004, Frank Barknecht wrote:
Two questions: Why do they remove the DC? And is this always necessary? Then why not build something like that directly into [dac~]?
The DC is removed because:
float-to-int conversion does hard clipping
if the DC reaches the speaker, then the non-DC sound may sound
distorted, because the speaker has its own (soft) clipping, in the sense that speakers always have the best fidelity when the average voltage is 0V (speaker cone at rest, = not strained)
heat. This will be a complete waste of energy (unless your house needs to be heated), as playing a DC does not result in any acoustic wave at all. I have never seen a speaker overheating but then I don't have experience with big gear. Btw I'm trying to picture a speaker with a heatsink on it and somehow it doesn't fit...
completely vanish. e.g. a sound with range [.4;.6] boosted fourfold is [1.6;2.4], which if hard clipped to [-1;1] (e.g. by [dac~]), will effectively become [1;1], which is silence. if your goal is to make asymmetrical fuzz you have to adjust your settings appropriately so that you actually get a result instead of void.
Removing the DC is not done by [dac~] because it may take some CPU time and slightly change the "equalizing" in low frequencies in a way that the user might not want.
I usually remove the DC just after a [adc~] though, because it's best to design a patch assuming no sound has a DC at all, than even thinking about how DC might skew the effects.
Mathieu Bouchard http://artengine.ca/matju