How change X-axis range in Spectrum Analysis Plot
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
-
Spriter1275
- Posts: 20
- Joined: Fri Apr 18, 2014 7:54 pm
- Operating System: Please select
How change X-axis range in Spectrum Analysis Plot
Hello,
I am analysing some noise from industrial equipment and have been asked by a noise expert to do the spectrum analysis with a linear scale on the x-axis such that harmonics are more easily recognisable. At the moment the range goes to 40,000Hz while I'm only interested in <500Hz. Is this possible to do ?!
Thanks.........Steve
I am analysing some noise from industrial equipment and have been asked by a noise expert to do the spectrum analysis with a linear scale on the x-axis such that harmonics are more easily recognisable. At the moment the range goes to 40,000Hz while I'm only interested in <500Hz. Is this possible to do ?!
Thanks.........Steve
-
kozikowski
- Forum Staff
- Posts: 68941
- Joined: Thu Aug 02, 2007 5:57 pm
- Operating System: macOS 10.13 High Sierra
Re: How change X-axis range in Spectrum Analysis Plot
Zoom In to a spectrum analysis is a Feature Request.
The work-around, since the accuracy of the display goes up as the dragged size of the window goes up is to repeatedly drag the window larger and push it off the left of the screen as you go. Then reposition the window so the portion of interest is in screen center.
Koz
The work-around, since the accuracy of the display goes up as the dragged size of the window goes up is to repeatedly drag the window larger and push it off the left of the screen as you go. Then reposition the window so the portion of interest is in screen center.
Koz
Re: How change X-axis range in Spectrum Analysis Plot
Using the log(arithmic) scale makes the lower frequencies more conspicuous ...
Re: How change X-axis range in Spectrum Analysis Plot
Note also that selecting a higher "Size" setting will show more detail in the low frequency range.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
-
Spriter1275
- Posts: 20
- Joined: Fri Apr 18, 2014 7:54 pm
- Operating System: Please select
Re: How change X-axis range in Spectrum Analysis Plot
OK, thanks. Using Trebor's pictures it does look like the harmonics are easier to pick out with the linear plot which I think is what the acoustics guy suggested. I've just spent an hour downloading other software to try and achieve this with no success. Unfortunately I can't zoom in and get the definition between the frequencies I'm interested in with Audacity on the linear scale so guess I'm stuck with using the log scales which I daresay will be OK..........
Re: How change X-axis range in Spectrum Analysis Plot
If you re-sample a copy of your audio by dividing its sample-rate by four,
that will effectively allow you to zoom-in on the lower frequencies on the spectrogram ...
[click on this image to see it in its entirety].
NB: you'll have to click-on "replot" after resampling , (as the frequency analysis won't automatically update itself).
that will effectively allow you to zoom-in on the lower frequencies on the spectrogram ...
[click on this image to see it in its entirety].
NB: you'll have to click-on "replot" after resampling , (as the frequency analysis won't automatically update itself).
Last edited by Trebor on Sat May 03, 2014 4:12 pm, edited 1 time in total.
-
Spriter1275
- Posts: 20
- Joined: Fri Apr 18, 2014 7:54 pm
- Operating System: Please select
Re: How change X-axis range in Spectrum Analysis Plot
OK, thanks, re-sampling and trying to extend the window gives a better linear plot with a reduced x axis. Not great though but may be usable.......
Re: How change X-axis range in Spectrum Analysis Plot
IIRC the spectrograms generated by the free program SoX allow you to specify a frequency window.
[ but SoX is not very user-friendly : is has a command line interface ]
[ but SoX is not very user-friendly : is has a command line interface ]
Re: How change X-axis range in Spectrum Analysis Plot
SoX has nice spectrogram plotting feature.Trebor wrote:IIRC the spectrograms generated by the free program SoX allow you to specify a frequency window.
SoX does not have an equivalent to Audacity's "Plot Spectrum", but it does have "stat" and "stats" effects that can output a wide range of statistical data.
SoX is documented here: http://sox.sourceforge.net/sox.html
The basic syntax for a spectrogram is:
Code: Select all
sox my.wav −n spectrogramTo plot a spectrum up to, say, 500 Hz with SoX:
Code: Select all
sox my.wav −n rate 1k spectrogramHere is an example output from the above command:
The same idea can be used with Audacity's Plot Spectrum. Here I have resampled a file to 1 kHz (using "Tracks > Resample")
Note that "Plot Spectrum" in Audacity can output the analysed data as a text file, which can then be imported into any suitable graph plotting application to create custom graphs.
http://manual.audacityteam.org/o/man/plot_spectrum.html
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
-
Spriter1275
- Posts: 20
- Joined: Fri Apr 18, 2014 7:54 pm
- Operating System: Please select
Re: How change X-axis range in Spectrum Analysis Plot
OK, thanks.
I haven't managed to get SOX working in Windows 7 but the export function and then graphing in excel works really well although quite time consuming. Plus the resampling rate also works but I find I have to use a value of 3500 rather than 1000 otherwise I get an error message saying there is not enough data. My recordings are ~20 seconds and done in wav 24bit 96k format.
I haven't managed to get SOX working in Windows 7 but the export function and then graphing in excel works really well although quite time consuming. Plus the resampling rate also works but I find I have to use a value of 3500 rather than 1000 otherwise I get an error message saying there is not enough data. My recordings are ~20 seconds and done in wav 24bit 96k format.