This topic might not be new. But the data to be shown are probably "new". The tools involved are USBStreamer, WM8740 DAC board, Audacity and WinAudioMLS.
A 1 kHz wav (Fs = 48 kHz) file was generated by Audacity. The file was analyzed by WinAudioMLS. 16k-point FFT with Rife-Vincent 4 window function was used to analyze the file. FFT plot is shown below.
A 1 kHz wav (Fs = 48 kHz) file was generated by Audacity. The file was analyzed by WinAudioMLS. 16k-point FFT with Rife-Vincent 4 window function was used to analyze the file. FFT plot is shown below.
Attachments
In contrast to the above 16 bit, 48 kHz wav file, Audacity can also export 24 bit, 48 kHz wav file. FFT analysis of this wav file is shown below.
I also used AP2700 to generate a 1kHz wav file. In the utility, 24 bit and 48 kHz was selected. As can be seen, AP generated wav file is effectively a perfect 1 kHz sine.
I also used AP2700 to generate a 1kHz wav file. In the utility, 24 bit and 48 kHz was selected. As can be seen, AP generated wav file is effectively a perfect 1 kHz sine.
Attachments
Hardware is now involved. Signal is loopback at I2S interface of USBStreamer. No ADC/DAC is involved.
WinAudioMLS ASIO signal generator plays wav file and also generates sine. It can be seen that AP generated wav file is still the best.
WinAudioMLS ASIO signal generator plays wav file and also generates sine. It can be seen that AP generated wav file is still the best.
Attachments
you know what you could do to improve things? add a notch filter and let only the 1kHz sine through and discard everything else....
Ah nevermind, I am a giddy goat, those noise levels are the noise floor....
Ah nevermind, I am a giddy goat, those noise levels are the noise floor....
Last edited:
Have you considered using the click track generator in audacity for audio analysis and testing of rise/fall times?
you're just looking at digital sines - the "hardware" to move the bits will always be "perfect" - or the digital interface is simply broken - no need to look at -170 dB distortion to see that
you should be able to select dither for the Audacity sine too - although they use a frequency shaped differentiated dther
you should be able to select dither for the Audacity sine too - although they use a frequency shaped differentiated dther
Hi,
I've played a lot with software sine generation in the past and indeed not all programms allow you to go theoretical and practical limits of purity. I've never used Audacity, though.
All I can say for x86(PC)-based systems that the math operation of the FPU (floating point unit of the CPU) is NOT the culprit. I was able to get perfect 24bit precision using the old Turbo-C compiler, from way back in the early 90'ies.
I also anaysed 64-bit double precision floating-point output from the FPU with FFT working in the same domain and found the results to be free of any worries. Without dithering this allow one to better see some aspects of sine generation.
It's best to use exact FFT bin center frequencies only so you don't need any windowing and you may use synced averaging.
You may need to trick the software by setting the sample rate to the FFT size (65536Hz for a 65536-pt. FFT) so that bin frequencies are integer and spaced "1Hz" apart (but scaled). Then overwrite the samplerate field in the ouput with desired value, the ratio determining the scale factor to be used.
You want to avoid the repetition of identical value sequences within one FFT block, therefore the "unit frequency" (bin number) should not contain any factors of two (assuming a 2^N FFT block size). TThat's the reason for the 997Hz used with 48kHz. 1kHz would loop one very short 48 samples block all the time.
This sort of maximally self-dithers the values but additional dithering should be used when going to integer 24 or 16 bit output. Here the period of the random generator used for the dithering should also be non-related to FFT size and notably much larger.
I've played a lot with software sine generation in the past and indeed not all programms allow you to go theoretical and practical limits of purity. I've never used Audacity, though.
All I can say for x86(PC)-based systems that the math operation of the FPU (floating point unit of the CPU) is NOT the culprit. I was able to get perfect 24bit precision using the old Turbo-C compiler, from way back in the early 90'ies.
I also anaysed 64-bit double precision floating-point output from the FPU with FFT working in the same domain and found the results to be free of any worries. Without dithering this allow one to better see some aspects of sine generation.
It's best to use exact FFT bin center frequencies only so you don't need any windowing and you may use synced averaging.
You may need to trick the software by setting the sample rate to the FFT size (65536Hz for a 65536-pt. FFT) so that bin frequencies are integer and spaced "1Hz" apart (but scaled). Then overwrite the samplerate field in the ouput with desired value, the ratio determining the scale factor to be used.
You want to avoid the repetition of identical value sequences within one FFT block, therefore the "unit frequency" (bin number) should not contain any factors of two (assuming a 2^N FFT block size). TThat's the reason for the 997Hz used with 48kHz. 1kHz would loop one very short 48 samples block all the time.
This sort of maximally self-dithers the values but additional dithering should be used when going to integer 24 or 16 bit output. Here the period of the random generator used for the dithering should also be non-related to FFT size and notably much larger.
- Status
- Not open for further replies.
- Home
- Source & Line
- Digital Source
- Audacity sine generation