Plot Spectrum Zoom Functions

This read-only archive contains discussions from the Adding Feature forum.
New feature request may be posted to the Adding Feature forum.
Technical support is available via the Help forum.
Locked
Cataddict
Posts: 10
Joined: Mon Mar 30, 2015 5:07 pm
Operating System: Please select

Plot Spectrum Zoom Functions

Post by Cataddict » Wed Jul 22, 2015 2:36 pm

Moderator: Moved to "Adding Features"

I love the new zoom function for the Analyze -> Plot Spectrum functionality introduced in Ver 2.1.1 (Windows). However it only lets me zoom on the amplitude axis.

Is there any plans to add zoom to the FREQUENCY axis? This is what I'm really looking for.

My uses are for Amateur Radio. Here's an example:

I do a lot of analysis of power line noise and sometimes share my results with my power company; we're trying to reduce interference at my house. So I'm interested in fairly narrow range of 20 Hz to 1 kHz. I can see what I'm looking for on the current display, however there is a LOT of wasted space in that the frequency range on the plot runs from 0 Hz to 10 kHz. It's hard to show to somone not that familiar with analysis displays that a noise sample shows a peak at 120 Hz on the current display as opposed to 110 or 130. If I put the cursor (line) on the 120 Hz peak, the cursor line will show the frequency, but it also blocks out the spectrum peak on the display.

I also have a need to look at other narrow frequency ranges looking for subaudible control tones.

Please consider adding this to a future version of Audacity. Or an alternate way would be to set the frequency analysis limits in the preferences somewhere.

If somebody knows a method of how to do this now that I don't know about, please let me know.

Thanks for an EXCELLENT piece of software!

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Plot Spectrum Zoom Functions

Post by Gale Andrews » Thu Jul 23, 2015 2:18 pm

I made a note of your suggestion.

I take it you tried log frequency and a large size?


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Plot Spectrum Zoom Functions

Post by steve » Thu Jul 23, 2015 2:36 pm

Gale Andrews wrote:I take it you tried log frequency and a large size?
That is the crucial factor. "Size" refers to the size (number of samples) in the FFT window (a main part of the algorithm that analyzes the audio).

The number of data points that form the graph depends (only) on the "Size" setting. The number of data points is half the "Size". So for example, if "Size" = 512, then there are 256 data points from 0 Hz to the Nyquist frequency ("Nyquist frequency" = half the sample rate).

When you open Plot Spectrum, or change the "Size" parameter, you have probably noticed a progress bar as the tool analyzes the data. Simply "zooming in" would not increase the accuracy or precision of the graph, though it may make it easier to see. To increase the precision, the graph needs more data points, which requires a greater "Size" setting, which means that the audio would need to be re-analyzed (which takes time).

Analyzing the audio data is an all or nothing affair. The analysis must always be the full spectrum from 0 Hz to Nyquist frequency, so zooming in on the graph would show a close up view of a portion of the data points.

A simple way to get a closer view of the graph is to resize the window to full screen size.
Note also that the "Log frequency" option provides a much more detailed view of low to mid frequencies than the default "Linear frequency" setting.

(See also: http://manual.audacityteam.org/o/man/plot_spectrum.html)
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Cataddict
Posts: 10
Joined: Mon Mar 30, 2015 5:07 pm
Operating System: Please select

Re: Plot Spectrum Zoom Functions

Post by Cataddict » Sun Jul 26, 2015 3:38 pm

Thanks all.

Yes, I'm using Log Frequency. I understand that just zooming in on the frequency axis would do nothing to increase the accuracy/precision of the analysis. I'm using the max "size" of 16,384.

It IS just somewhat a matter of presentation. When looking over a fairly limited frequency range, a lot of the display is "wasted space". For example, to show somebody I'm getting 60, 120, 240, 480 Hz noise, anything on the display below say 10 Hz and above say 1 kHz is of no value. But to be able to show the amplitude scale on the left, I have to include the 0 to 10 Hz area, which is amost 1/3 of the width (in log mode). And then the 1 kHz and above range takes about 1/4 of the width.(I didn't measure pixels, just eyeballing things). I could always just crop off the higher frequencies, but to get the narrow range AND the the amplitude axis, I'd have to cut and paste parts of the display (screen cap). Not worth the trouble.

In my particular case, a longer analysis times would not be a problem. I've seen the progress bar, but things recalculate so fast I never paid much attention to it.

Yes, maximizing the analysis screen makes it a easier to see things. I'm always able to see what I'm looking for, which is really the primary purpose of the function, it's just being able to save a plot of the area of interest taking up the least amount of width (like for e-mailing a small picture to show somebody the noise freqs) that I'm asking about.

Anyway, this is not any kind of earthshaking requirement, but it was worth asking. I can more than live with the way things work as is. My situation may be one of those 1% niche requirements not worth compliticating the code for. Just wanted to make sure I wasn't missing something.

Thanks!

Locked