[sdiy] Measuring Audio Sine Purity
Richie Burnett
rburnett at richieburnett.co.uk
Sat Sep 8 12:28:06 CEST 2012
How is your candidate sinewave being generated? If it is generated digitally in software, then one option is to capture the output buffer using emulator or debugger tools then save the data to disk for analysing.
You can then load up the waveform data into Excel and calculate your desired distortion metrics. For instance you could perform an FFT and generate a THD figure from this. Another method is to compare your waveform with a numerically perfect sinewave generated by Excel, and examine the difference that remains after subtracting one from the other.
Of course this technique removes the need for any digital to analogue conversion, and analogue to digital conversion. So they dont take into account any THD or noise that would be introduced during these processes.
Its useful for proving the bottom- line distortion figure for a particular implementation of a sinewave algorithm in the digital domain though. Any programming errors should easily be apparent. And if the sinewave is pure at this point, then any distortion present in the analogue output must have been introduced by the DAC step or subsequent analogue processing.
-Richie,
Sent from my Sony Ericsson Xperia ray
Scott Gravenhorst <music.maker at gte.net> wrote:
>
>How would a DIY person measure the purity of a sine wave beyond using a
>spectrum analyzer? To give a figure of sine purity, of distortion (THD?) ?
>
>Say you have an oscillator you built, it's supposed to be a sine oscillator
>and you'd like to know just how pure it is. What would you use?
>
>I've used RMAA to analyze a wav file of a sine signal, but that doesn't
>give purity numbers, it just gives the spectrum.
>
>Is there software that might be used with a good sound card?
>(understanding, of course, that soundcard artifacts will present themselves
>in the results)
>
>I imagine that there is expensive hardware, but that's out of the question
>for me.
>
>-- ScottG
>________________________________________________________________________
>-- Scott Gravenhorst
>-- FPGA MIDI Synth Info: jovianpyx.dyndns.org:8080/public/FPGA_synth/
>-- FatMan Mods Etc.: jovianpyx.dyndns.org:8080/public/fatman/
>-- Some Random Electronics Bits: jovianpyx.dyndns.org:8080/public/electronics/
>-- When the going gets tough, the tough use the command line.
>
>_______________________________________________
>Synth-diy mailing list
>Synth-diy at dropmix.xs4all.nl
>http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
More information about the Synth-diy
mailing list