Wave File Logging and -Analysis

Spectrum Lab is designed for real-time analysis of audio data. But you can also "post-process" data which are saved in a wave-file, and you can save the incoming (or outgoing) audio stream in a wave-file without interrupting the analysis. This chapter covers:

See also: Triggered Audio Recorder; Spectrum Lab's main index .


Wave File Logging

While audio samples are analyzed in real time, you can write them into a wave file (for "logging", "archiving" etc).

You can either log the "input" or the "output" in a wave file (but currently not both at the same time). A look at the circuit window shows the "input" at the left and the "output" at the right side. For most applications you will save the incoming audio stream ("input") as a wave file to have all opportunities for later post-processing.

You don't necessarily have to save the wave file data with the same sample rate as the ADC. Instead, you can use the lowest possible sample rate for the wave file to save a lot of disk space... consider this: A software VLF radio uses an ADC running at 44.1ksamples/second, and converts the signal down to 650 Hz, filtered to a bandwidth of 100Hz. Practically, it would be enough here to save the "downconverted" signal with 5512 samples/second which occupies only 12.5 % of the disk space. (5512 is the lowest "standardized" sample rate supported by all soundcards)

The settings for wave file logging can be modified in the configuration dialog. To starting or stop logging use either the file menu, or one of Spectrum Lab's interpreter commands.

While saving the audio stream in a wave file, the progress button will tell you how many kBytes are already written to the file. Be careful not to run out of disk space while logging, because Windows may crash in that case. If this is an issue, use a different partition of even a different harddisk to record wave files.

back to top


Triggered Audio Recorder

As an alternative to the "normal" logging of wave files as explained in the previous chapter, the recording of audio files can also be started automatically (without using the FILE menu, and without the help of the interpreter). For example, you want to record the raw input only if "something interesting" happens (for example, the call of a bat in a certain frequency range). You may also want to record a few seconds before the event actually happened, and a only few seconds after that (to avoid filling the harddisk with useless data).

To configure the triggered recoder, select Options..Wave File Settings in SpecLab's main menu, on the panel labelled Triggered Audio Recorder (details in an extra document, please follow the link).

back to top


Wave File Analysis

To start or stop wave file analysis, use Spectrum Lab's main menu (under "file").

Decide which of this file analysis modes you want to use by choosing the corresponding submenu. Then a file selector box opens in which you can select the audio file.

Note:
To analyze more than one file in a single over, use the CTRL- or shift-key in the file selector. This way you can select more than one file, like a little "play list".

After selecting one or more wave-file to be analysed, a dialog window appears where some parameters of the wave file are displayed. Some parameters (like the sample rate) can be adjusted for the following analysis.

The sample rate in a file is often different from the sample rate of the soundcard. For ELF work, the wave files are often decimated to a low sample rate to save disk space. For this reason, you often need a different FFT size to analyze files than for real-time analysis with the soundcard. Before the above dialog opens, the program calculates the best FFT size to achieve a similar frequency resolution as for real-time analysis. The resulting resolution is shown in the audio file analysis dialog (see screenshot above). If you are not satisfied with the FFT settings, you can modify the settings before clicking "OK" to start the file analysis.

While the analysis runs, the progress button will tell you how many kBytes from the file are already analyzed.

Note: The file analysis without playback runs much faster than the real-time analysis. You can select "slow","medium" and "fast" analysis in the dialog, or on the "Wave Files" tab in the configuration dialog. The different "speeds" have the following effects (in fast file analysis mode only !):

Note: The option 'plotting the result in fast file analysis mode' was implemented in October 2004. It didn't work in older versions !

When finishing Fast File Analysis, the program will not automatically switch back to real-time operation (analyze samples from the soundcard), because you may want to analyze other files too, and see the result in the same spectrogram and/or plot of analyzed data. To return to real-time processing with the soundcard, use the main menu, "Start/Stop"..."Start Audio Thread".

back to top


Last modified: October 1st, 2004.

back to top