How to do Spectral Analysis (Spectrograms) [Guide]

 

Making Spectrograms

There are many programs available for creating spectrograms, but we recommend that you use SoX or Adobe Audition, and if neither are available, Audacity. Other tools, such as Spek, lack certain features and characteristics which the above three possess. Spek has poor sensitivity and does not allow for a zoomed view of a track; therefore, it is only useful for analyzing blatant transcodes with obvious lossy cutoffs.
Audition and Audacity are both GUI programs which allow for manual zooming of a track and frequency analysis plots. Audition is paid but can be pirated, while Audacity is free. SoX is a command line tool with spectral generation functionality. It is free and allows for easy automation of spectral generation.

Audacity is decent at creating spectrals, but the spectrals it creates look like medical scans. The resultant spectrals are more difficult to read than those created by SoX or Audition, which is why SoX and Audition are preferred.


Installation and Setup (Windows)

Audacity:
Go to https://www.audacityteam.org/download/windows/ (there's a Mac version too which can be installed in the habitual OSX way by unpacking and dropping into Applications. Set up is about the same regarding parameters and values)

Download the installer (Audacity 2.1.2 installer) or portable (Audacity 2.1.2 zip file) version.

The portable version is smaller and contains no help files.

Install or unpack Audacity to the desired location.

Of the audio filetypes allowed on Redacted, only FLAC and MP3 are natively supported by Audacity. To add support for AAC, AC3 and DTS files, you must also install the FFmpeg library. Follow the instructions here to download and install it:
https://manual.audacityteam.org/man/faq_installation_and_plug_ins.html#ffdown

Once you've installed both Audacity and the FFmpeg library, launch Audacity.

Open the preferences. Click Edit, then Preferences... (Or press Ctrl+P):



In the treebar on the left, click Tracks.

Check the box "Automatically fit tracks vertically zoomed"
Change the Default View Mode dropdown from Waveform to Spectrogram. (This is optional, but will eliminate the need to manually select Spectrogram from the file menu every time you open a track.)
Check the box "Select all audio in project, if none selected"



In the treebar on the left, click Spectrograms.

Change the options on this screen to the following:
Scale: Linear
Minimum Frequency: 0
Maximum Frequency: 23000
Gain: 20
Range: 110 but it'd be preferable 130.
Frequency gain: 0
Algorithm: Frequencies
Window size: 1024
Window type: Blackman-Harris
Zero padding factor: 1

Click Apply.



In the treebar on the left, click Import / Export.

Under "When importing audio files" make sure the radio button is selected for the option "Make a copy of uncompressed audio files before editing (safer)"



In the treebar on the left, click Libraries.

If under "FFmpeg Library Import/Export" you do not see "FFmpeg Library Version: FFmpeg library not found" but some version numbers instead, then you should be done setting up Audacity. Click OK to save/close the Preferences window.




Then click the Locate... button next to "FFmpeg Library."

Hopefully, you'll get a popup message of "Success - Audacity has successfully detected valid FFmpeg libraries..." in which case, click No.



Otherwise, click Browse..., navigate to the folder where you installed FFmpeg for Audacity.



Select the avformat-55.dll file, then click Open, and click OK.



You should be done setting up Audacity. Click OK to save/close the Preferences window.
Audition:
Adobe Audition is not free, so you must either use the trial version, pay for a license, or find a cracked copy to install. The trial and paid versions can be downloaded here: https://www.adobe.com/products/audition.html

Installing the cracked version can be rather challenging if you are unused to installing cracked software with complicated installation/cracking procedures. Make sure you carefully follow the installation instructions included with the cracked software.

Once you've installed Audition, go ahead and launch it. The example screenshots and instructions below pertain to Audition CC 2015.0, but should generally be applicable/similar to other versions. As a matter of fact the OSX version looks very alike.

When Audition first loads, it should look something like this:



We want the spectrogram to take up as much space as possible, and most of the displayed items are irrelevant, so click on the  button next to the panel name on the tab on each unwanted panel and click on Close Panel. Remove all the panels with red highlights (Files, Favorites, Media Browser, Effects Rack, Markers, History, Video, Mixer and Levels). Do not close the Editor or Selection/View panels.




Click on View and click on Show Editor Panel Controls to remove it.



Click on Window and click on Tools to remove it. Click Windows again and click on Zoom to add it.



Now click and hold down the left mouse button on the tabs for the Selection/View and Zoom panels and drag them above the Properties panel:





Move the mouse over the panel borders and click/hold to drag them around to reposition them, like this:



Click on Window and click on Frequency Analysis.



Click/hold the left mouse button and drag the Frequency Analysis panel onto the same row as the Editor, then release it:



Then close the Frequency Analysis panel:



Click on EditPreferences and Spectral Displays.



Select the following settings:
Windowing Function: Blackman-Harris
Spectral Resolution: 1024
Decibel Range: between 160 and 180
Show gridlines: unchecked



Press OK. Drag/drop an audio file onto Audition. You'll probably see something like this:



Click on View and click on Show Spectral Frequency Display. You can toggle between the spectrogram and waveform views with Ctrl+D.




Click on View and Show HUD to hide it.



If the spectral view displays a second pair of waveforms above the spectrograms, below the thin waveforms on top, click on and drag the divider up until they're hidden.



Right-click the frequency scale on the right side of the screen, and click on Full Linear if it is not greyed out (if it is, just click outside the menu.) Make sure that Hertz is selected rather than Notes.



Right-click the time scale above the spectrogram, and click on Time Display and on Decimal (mm:ss.ddd)



You should be done setting up Audition. Go ahead and close the file without saving it.
Screenshot Procedure (Windows)

Audacity:
Launch Audacity. In OSX it's very much the same. You may need to use CMD+Shift+4 to select the screen area you want to capture, the result will appear as a .png file in your desktop.

Click File and Open... - do not drag/drop the files onto Audacity, and do not use File > Import > Audio..., as both of these will cause all the tracks to open in one window. File/Open opens them each in a separate window, so they properly fill the window.

In the popup window, navigate to the folder where the audio files are located, and select them all, then click Open.



If you did not change the Default View Mode setting from Waveform to Spectrogram in the setup, then it will display the waveform. Switch to the spectrogram by clicking the down-arrow in the upper left corner next to the file name, and select Spectrogram from the drop-down menu.



Move the mouse between the top and bottom channels, and hold the button down as you drag it all the way to the bottom, then release it.



Take a screenshot of this view. Click Help and then Screenshot Tools...


On the Screen Capture Frame window, change the "Save images to" field to wherever you want to save them, then click Capture Window Only.



If Audacity does not generate proper screenshots for some reason, use a third-party program for screen captures, or press Alt+PrtScn to copy the focused window to the clipboard, and paste the clipboard into Paint and save. Always save images as PNGs (which are lossless images) rather than JPGs (which are lossy.)

Now select a position to zoom in on. Click and hold down at the beginning position, and then drag the mouse right until you've selected roughly two seconds of audio - look at the Selection Toolbar below the spectrogram, and look at the time in the middle. If End is selected, click on Length instead.

Alternatively, you can click once at the beginning of the passage, then click on the ones digit for seconds in the middle time display, press 2 and then Enter. This will select exactly two seconds.



Once you've selected the portion to zoom in on, click View and Zoom to Selection (or press Ctrl+E.)

Once you've zoomed in, click EditSelect and None (or press Ctrl+Shift+A.)

Take another screenshot, of this zoomed view.



If you wish to also include a Frequency Analysis plot, re-select the zoomed portion. Move the mouse as close to the scale on the left edge of the spectrogram without turning the cursor into a magnifying glass, then hold down the left button and drag across to the right edge, stopping when you reach it (don't worry if you scroll it right a little bit.) Release the button, then click Analyze and Plot Spectrum...



Take another screenshot, of the plot. Then click Close.



You're done. Click File and Close, and click No on the save prompt.

Continue with the rest of the tracks until you're finished with the release.
Audition:
Launch Audition.

In Explorer, select the file(s) you wish to examine and/or generate spectrograms for. Drag/drop them into Audition, and wait for them to finish loading.

Click Edit and Extract Channels to Mono Files.



Take a screenshot of this window - either use a third-party program, or press Alt+PrtScrn to copy the window to your clipboard, and paste your clipboard into Paint and save. Always save images as PNGs (which are lossless images) rather than JPGs (which are lossy.)

Now select a position to zoom in on. Click and hold down at the beginning position, and then drag the mouse right until you've selected roughly two seconds of audio - look at the Selection/View panel in the upper left, and look at the Duration time below Selection.

Alternatively, you can click once at the beginning of the passage, then click on the Duration time below Selection in the Selection/View panel to edit it, press 2 and then Enter. This will select exactly two seconds.

Once you've selected the portion to zoom in on, in the Zoom panel click on the Zoom To Selection button.



Once you've zoomed in, click on EditSelect and Deselect All.



Take another screenshot, of this zoomed view.

If you wish to also include a Frequency Analysis plot, re-select the zoomed portion by clicking on EditSelect and Select Current Time View.



Then click Window and Frequency Analysis.



On the Frequency Analysis panel, click the Scan Selection button at the bottom.



After it refreshes, take another screenshot, of the plot. Then click Window and Frequency Analysis to close it.

You're done. Click File and Close, and click No on the save prompt. Audition will revert back to the stereo track you extracted the mono track from; close this stereo track too, and Audition should move on to the next stereo track in the queue.

Continue with the rest of the tracks until you're finished with the release. If you extracted any tracks to mono channels, then after closing the last stereo track, you'll have a bunch of left-channel mono tracks left over, which you can close without saving as well.

Post a Comment

Previous Post Next Post