Quality audio generation
richaj45
Posts: 179
Hello:
What is the best audio output that has been generated with PWM and filtering.
That is approximately how many bits of accuracy can be obtained by using a PWM generator in a COG with an external filter.
The project uses a standard stereo audio input ADC but i was hoping i could get away with a PWM and filter for the output.
I would like 16-bits of precision at 10 kHz of bandwidth.
I did search the site but did not get much coherent information.
Thanks for any help.
rich
What is the best audio output that has been generated with PWM and filtering.
That is approximately how many bits of accuracy can be obtained by using a PWM generator in a COG with an external filter.
The project uses a standard stereo audio input ADC but i was hoping i could get away with a PWM and filter for the output.
I would like 16-bits of precision at 10 kHz of bandwidth.
I did search the site but did not get much coherent information.
Thanks for any help.
rich
Comments
http://forums.parallax.com/showthread.php/140927-Propeller-Signal-Generator?highlight=Sinewave_v2.1.spin
bandwidth:
bitDepth = log2( clkFreq / (bandwidth * 2) )
sample rate:
bitDepth = log2( clkFreq / sampleRate )
For an example, this gives a bit depth of 10.8 for an 44100 Hz CD quality audio signal.
Or in other words, ~64 times less resolution compared to 16 bits.
Even so, a "CD track" played back from the Propeller this way sounds surprisingly good. Not Hifi in any way, but good enough for many projects.
Btw, by using pik33´s technique you would gain a little bit more than 1 bit of resolution.
/Johannes
Thanks much all.
This forum is surely the best feature of the Prop.
cheers,
rich