[Audacity-devel] 24-bit audio and plot spectrum
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Doc N. <doc...@po...> - 2009-03-26 01:56:07
|
Martyn Shaw wrote: > Sorry, this is only half a post, but I am a bit inundated right now... > > Doc Nelson wrote: >> During testing for 24 bit operation, I encountered a Plot Spectrum >> with a purple screen, the usual -90dB at bottom but -102 at the top. >> >> To determine what triggers this, I made a tone of 4410 Hz with 0dB >> amplitude (using Generate with amplitude of 1 makes a signal at >> -.4dB, so an amplify of .4 pushes it to full amplitude. Close >> inspection did not reveal any clipping. > > This is bogus. You made a signal with 10 samples per cycle, and a > sinewave, so the first maximum occurs at 360/4 = 90 degrees but that > doesn't correspond with a sample. The samples are at 360/10 degrees > so the 1st max ones are at 72 and 108 degrees. > 20*log10(sin(72degrees)) = -0.436 dB. If you were to upsample (and so > fill in the gaps) (Tracks -> Resample... -> 96000 (eg)) then there > would be values exceeding 1. Recent changes have meant that they > don't get clipped internally, but you may not have that version. OK, you're right. I was a bit lazy and wanted an integer divison, so 10 was conveniently done in head. I'll run the experiment again dividing by 8 or 12. I'll set the sampling rate to 48k to make arithmentic simple > >> Amplify -96dB does not work -- it produces a signal of about -48. > > We restrict 'Amplify' to a maximum of 50dB per application (I don't > know why). No big deal. It's probably only for rare testing like this that anybody would want to make attenuations greater than 50dB. Still, the why is a good question. Why not just let it go to -144dB?? > > I'm going to have to get back to you on the rest... Thanks for the help. I have learned a lot about Audacity and the team's good works. I would really like to do a bit of code development, but have to confess I am intimidated by the complexity of the OS environments and tools and methods. Would it be useful to document any of this for a tutorial? I had a friend/professional software developer do the ALSA build that you tutored in the past. He has since moved away and I have lost the recipe. > > TTFN > Martyn > >> Accordingly, I applied Amplify -48 twice to get a test tone at -96dB. >> At that level Plot Spectrum (4096) works as usual showing a peak >> signal at 4410Hz with amplitude of -86.7. The vertical scale of the >> plot differs significantly from the measured values from the cursor. >> This result is solidly repeatable -- no variations over several tests. >> >> I next applied Amplify -6dB repeatedly until the Plot Spectrum screen >> went purple. At a level of -114dB the Plot Spectrum still operates as >> usual, but there is no signal displayed. At -117 the purple screen >> appears. >> >> I also made some measurements of this test tone at 0dB, -24dB, -48dB, >> -72dB and -96dB for FFT widths from 128 to 4096 samples. >> >> In all cases, the level indication of the Output Playback Meter >> precisely matches the sinusoidal peak amplitude so there is no >> attempt to apply square roots of 2 for RMS or fudge factors to >> convert to dBU. The output meter scale is dBV peak. >> >> Cursor-measured spectrum peaks tracked the 24dB attenuations of the >> signal. At each level, I measured the peak at several FFT widths and >> find the the cursor-measured peak drops by approximately 3dB for each >> halving of the FFT width from 4096 down to 128 samples. But that >> number varies quite predictably as follows 3.7dB, 2.8dB, 3dB, 2.6dB, >> and 3.5dB as we go from 128 to 256 to 512 to 1024 to 2048 to 4096 >> samples at all signal levels. >> >> Apparently the tool scales results by the square root of the >> bandwidth producing results in dB/rootHz. My HP audio spectrum >> analyzer has that feature as an option. We might want to make that >> correction optional by a setting in Preferences/Spectrograms. >> >> Suggestions: >> I suggest that the Preferences/Spectrograms wants to have a feature >> like Preferences/Interface so users can choose to have the spectrum >> vertical scale go down below the noise floor of their 24-bit sampler. >> There is some logic to having the spectrum analyzer inherit the >> selection from Preferences/Interface. It also seems as if we ought to >> have the vertical scale of the graph match the calibration of the >> cursor measurements. The differences are in many cases quite large. I >> did not attempt to quantify once it was clear that the cursor was >> entirely reliable. >> >> Questions: >> I would very much like to know what the Plot Spectrum does when we >> select a patch of signal longer the the 2^N FFT width. Does it take >> the 2^N samples from the left edge, right edge, average several >> spectra across entire window or what? >> >> Are we using the FFTW freeware from MIT? http://www.fftw.org/ >> >> Thanks >> > > -- Gary Nelson Porpoise Research Institute Port Townsend, WA, 98368 -- Gary Nelson Porpoise Research Institute Port Townsend, WA, 98368 |