Audio clicking noise
HED GROUP
Posts: 15
HI TO THE PROPELLER EXPERS. CAN SOMEONE TELL ME HOW CAN I ELIMINATE
THE CLIKING NOISE PRODUCE AT THE BEGINING AND SOMETIMES AT THE END
OF THE SPEAKERS IN USE. EX: (FREQa OR ANY SOUND OBJECT)
I TRY ALSO THE FOLLOWING CIRCUIT AND DOES'NT FIX THE PROBLEM.
THANKS IN ADVANCE FOR YOUR HELP.
EDGARDO LOPEZ
······················ R=100
Prop Pin
/\/\/\/\
· Audio Out SPEAKER +
································· |
······························
· C=0.1uF
······························
································· |······ GND - SPEAKER -
······························
································ ----
································· --
THE CLIKING NOISE PRODUCE AT THE BEGINING AND SOMETIMES AT THE END
OF THE SPEAKERS IN USE. EX: (FREQa OR ANY SOUND OBJECT)
I TRY ALSO THE FOLLOWING CIRCUIT AND DOES'NT FIX THE PROBLEM.
THANKS IN ADVANCE FOR YOUR HELP.
EDGARDO LOPEZ
······················ R=100
Prop Pin
/\/\/\/\
· Audio Out SPEAKER +
································· |
······························
· C=0.1uF
······························
································· |······ GND - SPEAKER -
······························
································ ----
································· --
Comments
The DAC mode which produces analog voltages through an RC filter however is usually a matter of software, if your samples result in voltages centered around half supply volts and then at the end you turn it off or write a zero value then the output will see a sudden change to 0V which results in a click. A similar thing happens when you start playing samples so just make sure you don't output any sudden changes because the output will do what you ask it to do.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
A way around this would be for the software to initially "slowly" ramp up the duty cycle from 0% to 50% before any sound output is required. Any "slow" that is sub audible, or well below the frequency responce or your equipment, would do, try 100mS as that shouldn't be too noticible as a delay. This is only required at the initial start of the software, once the 50% is established, and maintained, the "Clicks" shouldn't happen, unless they are intended to be there. The reverse will have to be done at the end of playback.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
Post Edited (Toby Seckshund) : 2/26/2010 8:55:47 AM GMT
Set the sound output to input using DIRA during silence periods and I think it will float in high impedance.
My other solution involved using two pins, which may have been complementary, although I am not sure
what state I put them in for clickless transition to silence, whether remaining complementary and added together
in the filters, or else grounding both pins during silence. I assume the former, since the click is caused by
DC BIAS change, because the average output during sound is 3.3V / 2 but during silence must be either 0 or 3.3V,
so transitions on one pin from sound to silence or vice versa creates an impulse which sounds like a nasty
click.
A new solution available with the propeller is to leave an audio cog running, and output a DAC value of
zero equivalent (which would be actually 3.3V / 2) during silent periods. Even an extreme transition between
different sounds will tend to produce impulses otherwise, for example if you suddenly invert a sine wave
at its peak then a very nasty impulse is likely to be heard..
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I should be typing in Spin now.
Coming soon. My open Propeller Project Pages and favorite links index.
EDIT
Thinking about it, all I have said is me assuming that the DAC output was running at a much higher rate, with PWM to form the audio. If the Prop's pin is switching up and down at the audio rate then the grounded end of the speaker could be placed at Vdd/2. At least this would balance out to the aveage, and as already said, making the pin an input would shut off any current ( I wonder if the 50% would then make the input pin dither on and off, perhaps slightly to one side of 50% would be better )
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
Post Edited (Toby Seckshund) : 2/28/2010 10:46:57 AM GMT