Spectrum Lab Configuration Dialog
From SL's main menu, select 'Options' to open the configuration dialog. There are multiple tabs for the topics described in this document:
- System Settings
- Audio Settings and 'special' input devices
- Adding a special driver for other audio input devices
- The Audio I/O DLLs
- Using in_AudioIO.dll to stream audio into Winamp
- Using in_AudioIO.dll to stream audio from one SL instance to another
- Using a Winrad-compatible ExtIO-DLL for input
- FiFi SDR
- RTL-SDR (for example, "DAB sticks" and similar devices)
- SDRplay (RSP1/1A/2/duo,..., useable via ExtIO DLL)
- Audio File Servers and Clients
- Audio via COM port
- Audio via UDP (in the local network)
- Sending and receiving audio through WM_COPYDATA messages
- Audio output resampling
- Multiple soundcards in one system
- Unexpected aliasing and soundcard trouble under Windows 7/8/10
- FFT Settings : Size, Window function, ...
- Spectrum Display Settings
- Spectrum Buffer Settings
- Display Colours and Font Settings
- Frequency Marker Settings
- Colour Direction Finder (a waterfall-based radio direction finder)
- Audio File Settings (formerly 'Wave File Settings')
- Amplitude Calibration
- Settings and Configuration files
The 'Configuration and Display Control' panel is a tabbed window, which can be opened from SL's main window through the main window. For example, Options ... FFT Settings in the main menu will take you directly to the 'FFT' tab visible in the screenshow below.
The config window can optionally stay on top of other windows, even if it
doesn't have the focus. To achieve this, click on the icon in the upper left
corner to open a small popup menu, and check the item 'Stay on top'.
See also: Spectrum Lab's main index, 'A to Z',
user-defined menus , test
circuit , installation hints ,
troubleshooting ,
some applications .
System Settings
Most of the 'system settings' are not saved in the normal user configuration
file - instead, they are considered to be 'machine' but not 'application'
dependent.
To modify them, select 'Options' ... 'System Settings' in Spectrum Lab's
main menu. Most items listed below can be reached through submenus, or by
picking one of the tabsheets on the configuration screen.
Memory and spectrum file buffers
On the tabsheet shown below, you can define the number of spectrogram lines buffered in RAM (for scrolling back the spectrogram display), and the option to use a FILE instead of RAM for buffering the spectrogram data (i.e. Fourier-transformed blocks or 'spectra').
More details
here.
Timezone
Difference between local time MINUS UTC(GMT).
A few examples:
- enter "2" if you are in Germany, BeNeLux, France, and windoze has adjusted your PC's clock for daylight saving time (MESZ)
- enter "1" if you are in Germany, ... , and windoze has adjusted your PC's clock for winter time (MEZ)
- enter "0" if you are in Great Britain, Portugal, etc; it's winter time or if you have convinced windoze not to fool around with your PC's clock in October
- enter "-5" if you are on the east coast of Canada or the USA (EST).
Alternatively, Spectrum Lab can ask the operating system for your timezone.
If the 'timezone' information on your PC, including daylight saving time,
is configured correctly, set the checkmark labelled
[ ] get time zone information from system .
With this setting, you don't need to care about the offset between UTC
and your 'local' time (with or without daylight saving).
Geographic Location
Enter your own location here, using the Maidenhead locator system,
or by latitude / longitude lin degrees, minutes, and seconds .
This information will used in some exported files (for example, in
wave files) if no
GPS receiver is available. Used for radio direction
finding.
Timer Calibration
In this edit field, the precise frequency of a CPU-internal timer can be defined.
This timer is used as a "high-resolution" timebase. Its frequeny is often
3.58 MHz, in some PCs only 1.79 MHz. The nominal value is queried automatically,
but for some special applications you can enter the precise frequency here.
Source (clock) for timestamps
This field defines the source for timestamps (in spectra, waterfall time grid, and the "time"-function which is used in export data definitions). These options (and maybe more..) are avaliable:
- Use audio sampling clock only: Gives the best resolution and almost no 'jitter' because the time is calculated from the count of audio samples, plus an "offset" to get date+time. If you use a 'calibrated' sampling rate, or even an external A/D converter, this option is the best choice.
- Slowly pull towards PC's real-time clock: Provides a better long-term accuracy in some cases, especially if the audio sampling rate is drifting or not calibrated. With this option, the timestamps are always very close to the PC's real-time clock (usually one second or less).
(temporarily removed:)
Daily clock
error :
The daily drift of your PC's "real time clock". Unit is
seconds per day. Use the DCF77-decoder, a radio-controlled
clock or the evening news on TV to find this value. Use this feature only
if you really need it, and only if your PC runs in a thermally stable environment
for a long time. If your PC's RTC is too slow, the value must be
negative. The Reset button clears the number of accumulated
'compensation' seconds. Use this button after correcting the PC's clock from
an external program. Internally, the program keeps a copy of the time when
the clock error was zero.
Filenames and Directories
Defines where certain files shall be saved. Beginning with Vista and Windows
7, you don't have the freedom to chose arbitrary directories (folders) because
the Spectrum Lab installation directory, which is located somewhere in the
'Programs' folder, will only have read permission, including all its
subdirectories. See the external document called
'Data Folders' for details about how the Spectrum
Lab installer will deal with this problem.
To modify the currently active directories (within the data folders), select
Options .. System Settings .. Filenames and
Directories in SL's main menu. This opens the configuration window
and switches to the tabsheet shown below.
(screenshot of the 'Filenames' tab)
-
[ ] use relative path if possible, base: c:\Programme\Spectrum (just an example,
depends on the windows version).
This option should always be checked. The base path cannot be modified here, in fact, it is the path for all 'data files' specified in data_file_paths.txt (a file which has been written by the installer). It cannot be modified by Spectrum Lab under certain windows variants because it's in the same folder as the executable, aka the "install directory", and all these folders only have read- but not write-permission under Vista & Co. If necessary, you can modifiy data_file_paths.txt with a text editor, but you will need an admin account (at least under Vista and Windows 7). More details about data folders with write permission are here . -
Machine Config: MCONFIG.INI
This is the default location for all machine-dependent settings for Spectum Lab, for example the soundcard sampling rate calibration table.
Since SpecLab Version 3, everything that used to be in the 'Machine Configuration' file, can now optionally be stored in the 'User Configuration' (SETTINGS.INI or user-defined *.USR) by checking 'no extra file' right next to the input field for the 'Machine Configuration' file. -
User Config: SETTINGS.INI
This is the place where all settings of the current session are saved. For details, see Settings and Configuration Files. -
Spectrum Ref (Spectrum reference):
A reference curve which can be displayed in the spectrum graph window. Details are here. - Capture Image: Filename (base, without the index, and without extension) for the screen capture aka screenshot. Destination folder may vary, but "thanks" to Vista & Co, must be within the data folder (with write permission).
- Command File: File loaded into the command interpreter window during program start.
-
Audio recorder: Path and file mask (with
nnnn for the serial) for the internal audio
recorder.
The meaning of the 'template' option is explained here (in the document about the triggered audio recorder). Basically, it the 'template' checkmark is set, certain characters in the filename will be replaced by date and/or time later (when recording starts), like:
YYYY = year (4 digits), MM = month (2 digits), DD = day (2 digits), hh = hour (2 digits), mm = minute (2 digits), ss = seconds (2 digits).
Three or more lower case 'n's will always be replaced with the file sequence number (regardless of the 'template' option). -
Radio Station List: Path and filename for the radio
station list which can be displayed in the spectrum window.
By default, the installer places only a few sample files in the 'frequencies' folder within the data file directory. They can be modified with a text editor. - 'Input Stream Log' / '☑ active':
In older versions, the path and filename to log the input from a 'Web Audio' stream as a file (so far, only *.ogg because of the lack of built-in support for mp3-encoded compressed streams).
Since 2023-10 (V3), Spectrum Lab can also log the input received from a serial port ("Audio-via-COM"), non-compressed / 'raw' samples from UDP ("Audio-via-UDP") or TCP/IP ("Audio-via-TCP"). This feature is only intended for troubleshooting ("to see what arrived from a microcontroller- driven A/D converter" on any of these port types).
- 'Output Stream Log' / '☑ active':
Similar as above, but for the output ('web stream', or Audio-via-COM/UDP/TCP on the local machine or local network).
Transceiver- and PTT control interfaces, CAT control (CI-V)
This item in the Setup dialog is used to define the COM port number where
a "RX/TX" (=PTT) line and other control signals can be connected.
Since Version 2.94, Spectrum Lab can also use the 'Transceiver Interface'
to read 'Scope waveform data' from certain Icom radios as explained below.
The 'serial port' may even be a virtual COM port, aka 'Null-modem emulator'.
Some radios (like recent Icom rigs) can use the same USB port for
audio (in/out), CAT control (computer aided transceiver or tuning)
/ "CI-V" (Icom's proprietary CAT protocol), etc.
If not used as normal serial interface lines, some of the
serial port pins
can be used as discrete switching signals:
The rest of this chapter has been moved into a separate document (RigControl.htm):
See also (related with transceiver control) :
CAT traffic monitor with examples of 'typical' CI-V messages,
Displaying Icom's broadband spectrum scope in Spectrum Lab's main window,
Remote Control Functions / Commands (in the interpreter),
Synchronizing SpecLab with a radio's VFO via CAT (works both ways, from SL to the radio, and from radio's "VFO knob" to SL)
back to top
Audio Settings and 'special' input devices
To open the audio settings dialog, select "Options"..."Audio Settings" from Spectrum Lab's main menu. Some of the parameters are explained here:
- Audio Input Device, Audio Output Device:
-
Select which audio device (e.g. "soundcard") shall be used for input or output.
These combo boxes contain all available soundcards, ASIO drivers, and more
exotic devices which may be used as input or output for the digitized samples.
In most cases, you will use these controls if your system really has
more than one soundcard.
The audio device selection boxes may appear disabled if the audio stream comes from (or goes to) an external audio server. The audio server may be a simple interface program which reads analog samples from an external A/D converter, or one of the Audio I/O DLLs (explained in a later chapter). Last not least, the 'Input Device' may be a pseudo-URL for Audio via UDP like "udp://localhost:6999".
(Screenshot of SL's audio settings tab, with different input devices)Entries beginning with a number are standard multimedia drivers (not ASIO). If you miss your soundcard in this part of the list (on a Win7 / Win8 machine), the reason may be another bad habit of the operating system (automatic "jack detection" - details on that here), which prevents detection of audio devices just because no audio connector is currently plugged in. Also, since each version of Windows seems to be more paranoid than its predecessor, don't expect anything to work right out of the box (see notes on Windows 10 camera, microphone, and privacy).
Entries beginning with an A: (but not a device number) are ASIO drivers. If an ASIO driver is selected as the INPUT device, the selection for the OUTPUT device is disabled, because in this case the same ASIO driver will be used for in- and output. ASIO provides a lower latency between in- and output, but is not available on all systems. Clicking the 'Ctrl' button will open the ASIO driver's channel selector.
Input devices like "SDR-IQ / SDR-14" (-2) or PERSEUS (-3) require an extra hardware on the USB port, or a TCP/IP connection to a server running a USB/TCP-IP gateway. More info on using SpecLab with SDR-IQ is available in an extra document. If you want to use SL with PERSEUS, read this document. Last not least, a few radios with a LAN interface (e.g. IC-9700) or WLAN (IC-705) can be directly used as 'input devices' for Spectrum Lab as described here.
In addition to the input devices listed above (standard soundcards, ASIO, and the two natively supported Software Defined Radios), you can add support for other 'special devices', if you have a suitable "driver" (interface DLL) for it. Details about selecting / "installing" such an interface are in another chapter. After installation, such drivers are either listed by their filename, or (depending on the type) by a short name after a prefix D: ("Driver").
Last not least, to connect external A/D conversion hardware (most likely driven by a simple microcontroller) via serial port ("COM port" or "Virtual COM Port", a USB device class), Spectrum Lab also lists the (short) names of all COM ports currently availabe in the list of audio devices(!). For details, see 'Audio via COM port (or UDP)'.
For some of these devices, additional settings may be necessary. Use the 'Ctrl' button after selecting the type of the device. Depending on the device type, the 'Ctrl' button may open the standard soundcard volume control panel (for the selected WAVE audio device, but not under Windows 7), or a special SDR control panel (for SDR-IQ and Perseus), or a special control panel to select & or configure an audio I/O DLL, or open the control panel of a Winrad-compatible ExtIO-DLL.
To exchange uncompressed audio streams with other applications (for example, Winamp(tm) ), you can select also select the Audio-I/O-library (a special DLL) instead of the soundcard.
For absolute measurements, the input amplitudes must be calibrated. Amplitude display units like Volts or dBuV only make sense if the relationship between A/D converter value and absolute input voltage is known. Otherwise, stick to the default amplitude display unit which is "dBfs" (dB relative to full scale) .
- Other sources, other destinations :
-
These links take you to another tab of the configuration dialog, where
alternative sources and destinations for digitized audio (or quadrature IF
streams) can be configured. This includes audio servers
and -clients, which can be connected through different ways (TCP/IP,
WM_COPYDATA messages, periodically written audio files, etc). The
WM_COPYDATA method was, for example, used to receive data from the
"winamp-to-SpecLab" plugin, which is described
here.
If the "local" soundcard is used for in- and possibly output, you don't need to care about these other sources and destinations.
- Sampling Rate:
-
The nominal audio sample rate of the soundcard, which is the number of samples
per second read from the analog/digital converter.
Both sound-input and -output use the same sampling rate (dictated by hardware). You should use the lowest possible sample rate allowed by Shannon's theorem: With 8000 samples per second, you can process signals up to 4000 Hz. Don't use higher sample rates just because your soundcard supports them ! Only for very special applications (like the "VLF radio"), sample rates up to 192 kHz may be necessary. SpecLab works with sampling rates up to 192kHz, but only a few cards really support such high sampling rates. Caution, the windows multimedia driver will happily deliver any sampling rate - even if the hardware doesn't support it (it will be interpolated then, which is not really helpful).
Some cards can play dirty tricks when you use 48000 samples per second (because they don't support 48000 sampling), which leads to "phantom signals" on the waterfall. See the notes in the "VLF Radio" application.
Some other cards play dirty tricks when running in full duplex (which means input + output running at the same time): For example, the input- and the output sampling rate may be slightly different. More details in the chapter about output resampling. (use a different output sample rate; any ratio between 0.5 and 2.0 is possible).
Other stupid soundcards don't support 44100 Hz (which is surprising because that's the Audio CD standard).
If you are running Windows 7 (and most likely any later windows version), and want to use the soundcard at 48 kSamples/second and more, don't miss this note (defeat anti-aliasing through the windows system control), and this important note about selecting the soundcard's sampling rate in the umpteenth little-known and hard-to-find configuration screen of Windows 7 !
Also don't miss the sampling rate calibration if you use the program for the first time, or have installed a new soundcard.
If a soundcard really supports a certain sampling rate (like 48000 Hz / x or 44100 Hz /x) is not always easy to tell, because if the sampling rate 'requested' by the application is not really supported by the hardware, the driver software (or the windows multimedia system) jumps in, and tries to interpolate / extrapolate to realize the sampling rate by software. Unfortunately, Windows does a really bad job on some machines. For example, on one of the author's PCs (a Lenovo Z61m), when trying to run the onboard audio device at 12000 samples/second, the signal sounded 'distorted', and the CPU load caused by the 'SYSTEM' process (indicated in the Windows Task manager) went up to 5 Percent, as long as the audio input was running. Switching back to 11025 samples/second cured this problem, the audio sounded 'clean' again, and the CPU load caused by the 'SYSTEM' process went back to zero.
Again, it's not easy to tell which sampling rates are really supported, so if you find strange effects / poor audio quality / dropouts / unexplainably high CPU load, try a different sampling rate - first try a fraction or multiple of 48000 Hz (like 12000, 16000, 32000, 480000, 96000). If that doesn't work well enough, try a fraction or multiple of 44100 Hz (like 11024, 22050, or 44100), especially on 'old' machines because sampling rates of 44100/N were the standard in the age of Soundblaster and Co.
Last not least, it's possible to compensate the sample rate drift continuously, for example for phase measurements or high-accurary frequency measurements.
- Sampling Rate Divisor:
-
Defines the decimation ratio between the analog/digital conversion rate and
the processing rate of all following stages (which you can see in the component
window, for example frequency converter, digital filter, but also the Spectrum
Analyzer).
Reducing the sample rate at this early stage is especially helpful if you run out of CPU power, because -depending on what you are doing- the real-time sound processing threadwhats_a_thread can 'eat up' a lot of the available CPU time. The internal processing rate is:
<Sampling Rate> divided by <Sample Rate Divisor>
, for example:
11025 samples per second, divisor set to "2" will give an internal processing rate of 5512.5 samples per second. This would be enough to process audio signals below 2kHz (theoretically 2756 Hz, but this is impossible because of the anti-alias-filter's roll-off).
Note: After this decimation stage, and before the FFT calculation, there may be more decimation stages. See 'FFT Settings'.
- Bits per sample
-
Defines the resolution of the A/D converter. Usually 16 bits per sample.
A few cards also support 24 bits per sample, resulting in more dynamic range
(only required in rare cases though). Has only been tested -with positive
result- with the Soundblaster Audigy 2 ZS, but the difference between 16
and 24 bit per sample can only bee seen if the input signal is *very* weak.
With most 'real-world signals' you won't see a difference in the spectrum,
unless you have the ultimately pure sine wave generator on your workbench.
The theoretic dynamic range with 24 bits is somewhere near 20*log(2^24) =
144 dB, more realistic are 108 dB as specified for the Audigy 2 card.
For most applications, stick to a resolution of 16 bits per sample. - Use anti-alias filter
-
has no effect at the moment, because the anti-alias filter is always enabled
if the Input Sample Rate Divisor is set to 2 or higher.
The anti-alias filter's length may be adjustable in future releases.
- I/Q input adjustment
-
Switches to a submenu of the circuit window, where the gain balance and phase
errors from an image-cancelling direct conversion receiver can be compensated.
More details can be found in a separate
document (if you don't know what a direct conversion receiver is, you
don't need it anyway.. )
- Sample Rate Calibration Table
-
Because the true sample rates used by some soundcards (also expensive ones!)
differs significantly from the 'nominal' value, you can enter the true values
for a number of standard 'nominal' rates in this table. The "one-time" sampling
rate calibration procedure is explained in another
file. For normal audio applications, you don't need this.
In rare cases (depending on the soundcard), the conversion rate of the ADC and the DAC can be different. Since Version 2.7, Spectrum Lab contains a resampling function which can cope with this problem, but it requires some additional CPU power (see the notes about soundcards with slightly different sampling rates in the next chapter).
If you are looking for extreme frequency accuracy, it is possible to continuously 'detect' or 'calibrate' the sample rate but you need a stable reference signal).
Some soundcard oscillator drift tests can be found here .
Note: Besides these settings, be prepared to spend a few hours playing with
your soundcard's own "volume control panel" (or whatever the manufacturer
called it), until you managed that the audio input (from the "line-in" jack)
only(!!) goes into the A/D converter, and the card's audio
output (the "line-out" jack) is only fed from the D/A converter,
without annoying bypass. Read more about this in the
document about SL's
installation.
back to top
Adding a special driver for other audio input devices
In addition to soundcards, Software Defined Radios like SDR-IQ, Perseus, FiFi-SDR, and COM ports,
certain interface DLLs (Dynamic Link Libraries) can be added to the list of
input devices (see previous chapter).
Click the "..."-button next to the input device combo (with soundcards, ASIO devices, certain SDRs, etc).
The principle to "install" such a "driver" (actually, just select the driver's interface DLL for input) is described here. The same method is used for Audio-I/O-DLLs and for Winrad-compatible ExtIO-DLLs. Note: No other kind of DLL (besides ExtIO and Audio-I/O-compatible DLLs) can be "installed" this way.
After installation, such drivers are either listed with their complete path and filename (typically beginning with drive name C:/) , or -depending on the type- with a short name after a prefix D: ("Driver DLL"). Note that file paths never have a space after the drive name, which distinguishes them from ASIO drivers (prefix "A: " - note the space after the colon) and the short name of a Driver DLL (prefix "D: ").
The 'Audio I/O Libraries' (see next chapter) are just ONE example of such a 'special driver'. There may be other, hardware-specific drivers (or at least interface-DLLs to the real driver) which can be installed in a similar fashion.
The Audio I/O DLLs
( 2011-08-14: This function has been
re-written, the new DLL is incompatible with older audio-I/O libs !
Older libs didn't support timestamped streams.
Details are in the Manual for the Audio I/O libraries
(PDF available on-line, not contained in the spectrum lab installer. )
To exchange uncompressed audio streams with other applications, you can select
select the Audio-I/O-library (which is a special DLL) instead of the soundcard.
For 'normal' applications which only use a soundcard for input and/or output,
the rest of this chapter will not be worth reading for you... so skip this
chapter if you intend to use SL with a soundcard.
Originally, the Audio I/O library (in the form of in_Audio.dll) was intended
as an "audio output" from Spectrum Lab's point of view, and as an "audio
input" for Winamp(tm), for the sole purpose of streaming audio
from Spectrum Lab via Winamp. Details about
in_AudioIO.dll and winamp at the end of this chapter.
Since then, the audio I/O library (at least in_AudioIO.dll) has turned from
a simple 'input plugin' for Winamp into a general-purpose 'audio bridge'
for various applications. For example, it can also be used to connect two
(or more) instances of Spectrum Lab, with pre-processed data passed from
one instance of the program to another.
To 'install' an audio I/O library as an input device, add it to the list
of devices as explained under 'Adding a special driver for other audio input devices'.
Then, select the DLL as the new 'Audio Input Device' on the Audio
Settings tab as in the example below:
Depending on the DLL, additional settings may be necessary. To do this, click on the "Ctrl"-button in the 'Audio Input Device' panel (see the small screenshot above). This opens a new control panel, in which you can select the directory paths and stream identifiers (more on that later):
Since August 2012, Spectrum Lab supports I2PHD's Winrad-compatible 'ExtIO'-DLLs
besides its own Audio-I/O-DLLs. The concepts are similar, and the DLL-host
implemented in Spectrum Lab will automatically detect which kind of DLL is selected
for input.
If only a filename without a path to the audio-I/O-DLL is specified, Spectrum
Lab will try load the library from the following places, in the sequence
specified below. However it's highly recommended to specify a full path,
because with each new major version of windows, we are urged to install programs
(and/or their plugins) in different folders !
- C:\Program Files\Winamp\Plugins\in_AudioIO.dll (*)
- C:\Programme\Winamp\Plugins\in_AudioIO.dll (default path for a 'German PC')
- C:\Programmi\Winamp\Plugins\in_AudioIO.dll (default path for an 'Italian PC')
-
in_AudioIO.dll in the "current working directory" (CWD) ,whatever that is...
(the concept of the 'current working directory', as implemented in windows, is quite broken because the file selector box (a windows dialog) modifies it by its own gusto, even when told by the application not to do so, so don't rely on it. Spectrum Lab tries to set to set the CWD back to where it should be (as displayed on the 'filenames' tab) after opening a file selector, but this isn't bullet-proof. Select the DLL manually in this case, and make sure you pick the correct, and full path ! )
(*) If the Audio I/O
Library is used as a gateway between Spectrum Lab and winamp, it MUST be
loaded from winamp's "Plugins" directory. Most applications (like streaming to the internet)
don't require Winamp anymore; and in that case you can install the DLL in other folders.
Don't be confused by the name "in_AudioIO.dll" - the prefix
"in_" must be seen from Winamp's point of view : For winamp, it's an input
plugin. For Spectrum Lab, it's an output device, but it can
also be used as a link between an audio-producer and an audio-consumer. Thus
"in_AudioIO.dll" can be used either as an audio input, or an output, but
not both at the same time in one program instance.
Optionally, you can specify a unique 'Stream ID' in the Audio-I/O-selection
dialog. This is necessary if there are multiple instances of the
'Audio-I/O-DLL' running on your PC at the same time. For example, there may
be one program providing a stream named "VLF", and another (or the
same) program providing a different stream named "VLF_2". If both using
the same Audio-I/O DLL for distribution, you must fill out the 'Stream ID'
field to connect to the wanted channel.
Any further configuration of the audio I/O library is beyond Spectrum Lab's
control. As shown in the screenshot of the 'Audio I/O-DLL Selection for Spectrum
Lab' above, there is a button with the 'hand pointing right' :
It usually opens a special configuration
screen in the DLL (if the DLL supports it). The sample DLL ("in_AudioIO.dll")
which is contained in SpectrumLab's installer will show something like this:
- Hint:
- If an audio-IO-DLL is already selected as the 'input' in Spectrum Lab,
you can open the DLL's control panel through SL's main menu:
Options ... Show Control Panel for audio-input-DLL. The same applies to Audio-I/O and ExtIO.
There may be other 'Audio-I/O-DLLs' available - for example, DLLs
used as drivers for 'exotic hardware'. The above screenshot is just an example
for such a DLL. Actually,
"in_AudioIO.dll"
can be used to distribute a gapless, uncompressed audio stream from one source
to multiple destinations ("readers"), which are listed on the DLL's control
panel. Winamp may be one of those destinations (from Winamp's point of view,
this DLL is an "input plugin"). The control panels of other I/O-DLLs may
look completely different, and it's unlikely that they will also operate
as Winamp input plugins.
Again, details about the Audio-I/O-DLLs are available online (as PDF) in the
Manual for the Audio I/O libraries.
Using in_AudioIO.dll to stream audio into Winamp
Originally, the Audio I/O library (in the form of in_AudioIO.dll) was intended
as an "audio output" from Spectrum Lab's point of view, and as an "audio
input" for Winamp(tm), for the sole purpose of streaming audio
from Spectrum Lab (acually a filtered VLF Natural Radio stream) via Winamp,
and the Oddcast plugin, to an internet audio server (Icecast). Details about
that are beyond the scope of the Spectrum Lab help system; you can find more
info about using the
Audio-I/O-library to connect Spectrum Lab to Winamp here (external weblink,
requires an internet connection, and describes the configuration of Spectrum
Lab, Winamp, Oddcast, and Icecast. Unfortunately, the development of Oddcast
or "Edcast" seems to have stopped.... see
http://www.oddsock.org/ ).
For audio streaming applications, consider using Ogg/Vorbis instead of in_AudioIO.dll .
Support for outbound Ogg/Vorbis audio streams is integrated in Spectrum Lab; MP3 is not .
Using in_AudioIO.dll to stream audio from one SL instance to another
For this application, it's not necessary to copy the in_AudioIO.dll
into the winamp plugin folder, but recommended. If you don't have winamp
installed on your system, unpack in_AudioIO.dll into the spectrum lab folder.
This way, SL will find it automatically even if you didn't specify a full
path.
The library 'in_AudioIO.dll' can be used to feed digitized audio from one
writer (source) to multiple readers (destinations). Example:
- The first instance (of Spectrum Lab) reads samples from the soundcard, resamples them to the precise nominal sampling rate (using the SR calibrator) and sends the processed samples to the audio-I/O DLL. For this purpose, the configuration of the 1st instance has the 'Audio Input Device' set to the soundcard (-1 = default wave input), and the 'Audio Output Device' is an 'Audio I/O DLL' .
-
The second instance (of Spectrum Lab) has the 'Audio Input Device' set to
the same 'Audio I/O DLL' (same path, same file).
-
The third, and any other instance (of Spectrum Lab) have their 'Audio Input
Devices' also set to the same 'Audio I/O DLL' . Thus the same signal (produced
by the 1st instance) can be processed by multiple other instances of Spectrum
Lab, without the need for a 'virtual audio cable' or multiple soundcards
connected to each other.
This is possible because the audio I/O libraries (at least "in_AudioIO.dll") support multiple readers. - The same DLL (in the same folder) can also be loaded by other applications at the same time, besides Spectrum Lab. This is possible because the DLL uses shared memory to distribute the digitized audio stream. Details on how to use the audio I/O DLL in your own application are here (external link).
See also: Audio streaming, SL Audio Settings, Sending audio from SL to Winamp, Winamp Plugins, Details about Audio I/O DLLs (web link), Overview (index).
Using a Winrad-compatible ExtIO-DLL for input
Since August 2012, Spectrum Lab supports I2PHD's Winrad-compatible 'ExtIO'-DLLs besides its own Audio-I/O-DLLs. The concepts are similar, but the API is very incompatible. Fortunately the DLL-host implemented in Spectrum Lab will automatically detect which kind of DLL is selected for input. You may find an ExtIO-DLL for 'your' radio at winrad.org/. For SDR-IQ and Perseus, this is not required because these two radios are supported natively by Spectrum Lab.To 'install' an ExtIO-DLL ("driver") for input in Spectrum Lab, select "Options" .. "Audio Settings" in SL's main menu.
Then, click on the three-dotted button to select a driver for the new input device:
Here, for example, the ExtIO-DLL to control PERSEUS:
Spectrum Lab will add the complete path to the DLL in its list of "input devices" now, so you can easily select it (or any other device) quickly by picking it from the list. There is also a button ("Hand pointing right") on SL's audio input panel (see screenshot) which may take you to a hardware-specific control panel.
See also: Audio Settings, Audio-I/O-Libraries .
FiFi SDR
The FiFi-SDR is a small software defined radio with an integrated USB soundcard. It contains a programmable VFO, using the Si570 (programmable oscillator chip). As an (almost) fully assembled kit, including the preselector board, the SDR was available for 130 Euros in 2012 at the german Funkamateur Verlag:
To control this cigarette-box sized HF receiver from Spectrum Lab, you will need a special ExtIO by Fred, PE0FKO, filename 'ExtIO_Si570.dll'.
Do a web search for 'SoftRock Ensemble Configuration Tool'. The installer for Fred's 'driver DLL' used to be at pe0fko.nl/CFGSR/, along with a nice tutorial. Note that the FiFi-SDR is only one of a couple of Si570-based radios supported by this DLL.
A similar ExtIO-compatible interface for the FiFi-SDR may work, too; but none (besides Fred's) was completely tested by the author of Spectrum Lab.
An alternative DLL named 'ExtIO_FiFi' was found somewhere, which seemed to work for a while, but it always crashed when trying to open the control panel (ExtIO: "ShowGUI"). The DLL was dumped for that reason.
Details about the FiFi-SDR, developed by German radio amateurs (on their 'FichtenFieldDay', thus the name) used to be at o28.sischa.net/fifisdr/trac and www.ov-lennestadt.de/.
Unfortunately, the FiFi-SDR hardware seems to be better than the control software. On the author's PC, controlling the VFO frequency (through ExtIO_Si570.dll) often stalled. If 'your' FiFi-SDR also doesn't react on changes in the VFO frequency, don't make the same mistake by changing the settings on the ExtIO_Si570 control panel ! Instead, unplug and re-plug the USB connection. In most (if not all) cases, the VFO worked properly again afterwards.
Here are the settings used for the FiFi-SDR, on the ExtIO_Si570 control panel:
Another note about the FiFi-SDR: On a PC running trusty old Windows XP, the FiFi-SDR's soundcard immediately delivered 96 kSamples/second (right out of the box), and the observable bandwidth was 96 kHz (but with severe aliasing effects at the extreme edges, which is possibly caused by a poor audio codec).
On a PC with Windows 7, 32 bit, "Home Premium", and later on Windows 8.1, the very same device, same soundcard, only showed a 48 kHz wide band even when the sampling rate (configured in SL's 'Audio Settings' panel) was also set to 96000.
How to cure this annoyance is shown below; if you have an EASIER way to get the FiFi-SDR running at a 'true' sampling rate of 96000 Samples/second under Windows 7, please let me know. Here's what the author tried on a german Windows 7 machine:
- Open the system control ("Systemsteuerung"), switch the display from "Kategorie" ('Category' ?) to "Kleine Symbole" ('Small Icons' ?). On a german PC, this window was titled "Alle Steuerungselemente", if that means anything to you.
- Click on the 'Sound' icon (loudspeaker symbol) .
- Switch to the tabsheet "Aufname" ('Recording' ?)
- With a bit of luck, you will find a 'Microphone' there, followed by the name 'FiFiSDR Soundcard' (stupid, isn't it ?).
Click on that device to select it for the changes below. - Click on the button labelled "Eigenschaften" ('Properties' ?). Do not click on "Konfigurieren" ('Configure' ?).
With even more luck than you already had, this button opens yet another well-hidden propery panel. - On the german PC, the control panel had the stupid title "Eigenschaften von Mikrofon" ('Properties of Microphone' ?)
(Microsoft seems to think that every audio source connected to a soundcard's is a 'microphone', but you can change the text from 'Mikrofon' to something like 'SDR', and pick another symbol for the device) - On the tabsheet 'Erweitert', 'Standardformat', 'Wählen Sie die Abtastrate und die Bittiefe aus'...
(Something like 'Extended' (?), 'Standard format' (?), 'Select sampling rate and bits per sample' (?) ) - Switch from '2 Kanal, 16 Bit, 48000 Hz (DVD Qualität)
to '2 Kanal, 16 Bit, 96000 Hz (Studioqualität)' .
Fred's ExtIO_Si570.dll was manually installed into C:\afusoft\FiFi-SDR\ExtIO_Si570.dll . This full path must be added to Spectrum Lab's list of audio devices (under 'Options'..'Audio Settings', click on the three-dotted button to select the file). After that, SL's Audio I/O configuration tab should look like this:
With the ExtIO_Si570 loaded, Spectrum Lab will look for a name like 'FiFiSDR Soundcard' in the list of 'audio devices' offered by the windows multimedia API. If that doesn't work (because on your PC the 'FiFiSDR Soundcard' has a different name), declare the FiFiSDR Soundcard as the 'default audio input device' for windows. That way, if SL doesn't find a device which looks like a FiFiSDR (soundcard), it will use the default WAVE input (device "-1").
This is necessary because unlike most other 'ExtIO'-DLLs, ExtIO_Si570 doesn't deliver the digitized I/Q samples from the radio. ExtIO_Si570 only controls the radio's VFO (it doesn't even control the nice bandpass filters aka "Preselector Board" in the FiFiSDR, at least not in ExtIO_Si570 V2.6 which was the version used for these tests).
Getting "FiFi-SDR" running on a new PC with Windows 8.1
When trying to get the FiFi-SDR running on a new PC with Windows 8.1, the old USB-related trouble started again. The drivers shipped with the radio years ago didn't work (no big surprise), and in the (Win8.1-) system control / device manager (in german: "Systemsteuerung / Geräte-Manager"), the FiFi-SDR didn't show up as is used to on the old machine. Instead, it now showed up as 'other device' ("Andere Geräte"), "SoftRock SDR" (!?!), garnished with a yellow exclamation mark which usually indicates a problem with the device driver.
In this case (on a PC with german user interface), the only explanation displayed was the usual mumbo-jumbo:
Die Treiber für dieses Gerät wurden nicht installiert. (Code 28)
Es sind keine kompatiblen Treiber für dieses Gerät vorhanden.
Klicken Sie auf "Treiber aktualisieren", um einen Treiber für dieses Gerät zu finden.
Of course, and 'as usual' for exotic hardware, windows was not able to find a function driver
for the USB interface (neither 'automatic' nor 'on the computer' - what else would you expect ?An updated driver (which should work under Windows 8 as well) was finally found at
http://o28.sischa.net/fifisdr/trac/wiki/Windows#Download . The file actually installed (BEFORE connecting the SDR to the PC) was 'O28_20130929_Win7_Win8_only.zip' .
AFTER that, the FiFi-SDR was connected to a USB port, and appeared as 'Mikrofon (FiFiSDR Soundcard)' in the device manager.
And, again AFTER that, PE0FKO's 'SoftRock Ensemble Configuration Tool' had to be installed, to control the VFO frequency in the Si570 synthesizer as already explained above. This included installing another bulky dot-net-something package, and 'clicking away' half a dozen of security warnings, before finally the CFGSR utility was sucessfully installed.
After that, the ExtIO-interface-DLL (which is required for Spectrum Lab to set the radio's VFO frequency) was found in C:\Program Files (x86)\CFGSR\ExtIO_Si570\ExtIO_Si570.dll .
Beside selecting 'ExtIO_Si570.dll' as input device, type 'FiFiSDR Soundcard' (without quotes) into the 'Params'-field, because Spectrum Lab needs to know the name of the audio device because in this special case the DLL does not deliver digitized samples, but only controls the VFO. More on selecting ExtIO-DLLs as input device in Spectrum Lab here .
After that, Windows needed another kick (not in the a.. but in the system control) to allow using FiFi with a 96 kHz sampling rate. Surprisingly, the way to get it running at 96 kHz was almost the same as already described here for Windows 7.
If you use Windows 10, you're completely on your own at this point...
RTL-SDR (for example, "DAB sticks" and similar devices)
After struggling a bit with a stubborn operating system, unreliable USB drivers, poor documentation, etc, the author finally managed to get a 'Noxon' DAB Stick running properly (well, half way) using the "ExtIO_USRP+FCD+RTL282+BorIP" package from wiki.spench.net/wiki/USRP_Interfaces.From Spectrum Lab's point of view, the interface DLL (ExtIO_USRP.dll) is selected as an input device like any other ExtIO-DLL (details here), and -in contrast to the note from the ExtIO_USRP installer- it is not necessary (and not advisable) to clutter the Spectrum Lab installation folder with the stuff from the "ExtIO_USRP+FCD+RTL2832U+BorIP_Setup" (like many others, the website seems to have gone 'QRT', so you're on your own now).
Getting the 'Noxon' stick running was a painful experience (basicallly, nothing seemed to work right out of the box).
- After updating 'Zadig' to Version 2.1.2, no devices were found, even with the DAB stick plugged in.
- After selecting 'Options'..'List all devices', a 'DAB Stick' appeared.
- 'DAB Stick' was then selected in Zadig's combo list, and 'WinUSB v6.17600.16385' installed (in december 2015).
After that, the status line in Zadig showed 'Driver Installation: SUCCESS'. - The website mentions that 'Legacy' is more stable than 'UHD',
but no control was found (at least not in the 'Zadig' control panel) where one or the other could be selected.
- The 'USRP Interfaces' wiki mentions the need for a
'Device hint', to be entered in the 'ExtIO: USRP' control panel.
For the 'Noxon DAB Stick', that device hint is "RTL" (without the double quotes, of course). - After entering the right 'Device hint', and clicking on 'Create' right next to the input field
seemed to kick the ExtIO-control-DLL alive, and it recognized a device titled
'Terratec NOXON (rev 1) (Fitipower FC0013)'. This name was shown in title of the DLL's own control panel. - If you successfully got to that point (with a similar device):
Contratulations, you're half-way done. Change the sampling rate, but beware, the 'Sample' combo seemed to contain sampling rates which -at least with the Noxon stick- did not work. 1 Msps seemed to work, and the ADC function block (in Spectrum Lab's circuit window) turned green.
- You can now close the ExtIO-DLL's control panel. The VFO frequency can be controlled from SL's own input field.
- During the author's test, the signal levels delivered by the Noxon stick were extremely weak. Even the local FM station appeared at about -100 dBfs (dB "over full scale"), using a quarterwave antenna. Due to the mediocre performance of this "radio", further tests were abandoned.
The configuration 'RTL_SDR_WFM_Test.usr' (contained in the installer) uses several stages of decimation and resampling:
- I/Q input from the DAB stick with 1.6 MSamples (signal at labels L0 / R0 in the circuit window)
- input pre-processor decimates by 8 -> still an I/Q signal at L1 / R1, but fsample = 200 kHz
- wideband FM demodulator between L1/R1 and L2 (demodulated output still at fsample = 200 kHz)
- output post-processor resamples 200 kHz with a 'factor' of 0.22050, result: fsample = 44.1 kHz at L6
SDRplay (RSP1/1A/2/duo,..., useable via ExtIO DLL)
Spectrum Lab was tested for compatibility with SDRplay's ExtIO (interface DLL), Version 1.2, available at www.sdrplay.com/downloads.- Note:
- Even though the SDRplay 'EXTIO PLUGINS' installer (SDRplay_ExtIO_Installer_1.2.exe
at the time of this writing) supports multiple radios by SDRplay,
it doesn't support the 'dual' receiver option for the RSPduo,
so if you use the RSPduo, pick the SDRplay 'RSPDUO EXTIO PLUGIN'
installer (SDRplay_ExtIO_RSPduo_Installer_1.2.exe at this writing) !
PLEASE MAKE SURE THERE ARE NO RSPs CONNECTED
TO THE MACHINE BEFORE CONTINUING
Note: You must select the SDR application installation directory
on the next screen to put the SDRplay EXTIO plugins into.
Setup will install EXTIO into the following folder ...
C:\Program Files (x86)\SDRplay
I decided not to install SDRplay ExtIO DLL into the Spectrum Lab folder
(which would have been the 'SDR application installation directory'),
beause the SDRplay_ExtIO_Installer_1.2.exe not only copied the DLL file,
it also placed an uninstaller (anonymous name 'unins000.exe'),
which I did not want to have in the Spectrum Lab folder.The SDRplay ExtIO installer also asked for a destination location for the 'API'. The default folder was C:\Program Files\SDRplay; I decided to install the 'API' into K:\SDRplay_API instead. It turned out the 'API' actually installed the USB drivers, along with a documentation for developers.
At some point, you will be prompted with a message like this:
CONNECT YOUR RSP AND ALLOW DRIVER INSTALL
TO COMPLETE BEFORE USING THE API
When installing the device driver, Windows pops up the usual warning about security. Accept it, otherwise you won't get the SDR running:
'Do you really want to install the device driver ?' -
here on a Windows 8.1 machine in german language.
For the SDRplay receivers, select the DLL file for your receiver, e.g.:
- ExtIO_SDRplay_RSP1.dll
- ExtIO_SDRplay_RSP1A.dll
- ExtIO_SDRplay_RSP2.dll
- ExtIO_SDRplay_RSPduo.dll
Like most other SDRs (with USB or Ethernet interface), the SDRplay receivers deliver an I/Q stream, so start with one of the preconfigured configurations for 'SDR and Image-cancelling DC receivers (I/Q)' under the 'Quick Settings' menu.
Note: Since 2020-01, Spectrum Lab doesn't select a different input device if the input device is already an SDR (software defined radio), even when picking one of the configurations that were originally prepared for a certain SDR, e.g.
"Quick Settings" -
"SDR and Image-cancelling DC receivers (I/Q)"
"SDR-IQ, 37 kHz sampling rate, downconverter, adjustable filter"
Audio File Servers and Clients
Note: Most of the 'audio file' based methods to distribute audio in 'almost real time', described further below in this chapter, have been superseded by sending Audio via UDP (in the local network, via LAN (Ethernet) or WLAN ("Wi-Fi"), or even between multiple instances running on the same PC via "localhost").
It is possible to connect Spectrum Lab to an other application which serves as "remote Analog/Digital converter" or "Digital/Analog coverter". The other application then acts as "Audio File Server" to replace the audio input (ADC) and/or output (DAC). This may be used as an interface to any kind of exotic audio hardware. (Note: You don't need this if SL shall analyze the audio input from your "local" soundcard !)
To establish a link between an audio client and an audio server, the audio client (which is Spectrum Lab) must know the name of the audio server, or at least the name of the file produced or consumed by the server. All this can be configured in Spectrum Lab's "Audio File Server" menu:
For example the program may receive audio data from an audio server called
"SndInput.exe" and sends sound data to "SndOutpt.exe". (These are just
examples, I use these two programs myself. Instead of SndInput.exe
use SerInput.exe if you have an external A/D converter on the serial port.
See notes below)
In this case, simple disk files are used to exchange audio data from "producer"
to "consumer". The audio file transfer protocol is very simple (not "FTP"
for heaven's sake :-), it is described in a file which is available from
the author of Spectrum Lab (part of the sound utility package, files
"SoundUtilityInfo_01.txt" (english) and "SoundUtilityInfo_49.txt" (german).
Two sample programs which use the soundcard are written in plain "C", and
are available on the DL4YHF website. They can easily be adapted to drive
any external A/D or D/A hardware. To drive the author's PIC-based A/D converter
(connected to the serial port), use the serial
input utility mentioned further below.
To use an external A/D or D/A "server" program, fill out these fields in
Spectrum Lab's setup dialog:
- "consume ADC file"
-
Activate this checkmark if you want to use an external audio file server
instead of your soundcard's analog/digital converter,
and enter the name of the file which will be produced by the audio server.
Example: ..\SoundUtl\audio.dat
- "to start A/D server"
-
This is an optional service if you want to start your A/D server automatically
from SpecLab (only possible when the audio server runs on the same PC as
SpecLab, otherwise you will have to start the server manually). Example:
Example:C:\SoundUtl\SndInput.exe /of=audio.dat /sr=11025 /ch=1 /dt=1
(Look into the A/D server's manual for the necessary command line parameters ! The command line may be added automatically after you selected the server by clicking on the [...] button ) - "to stop A/D server"
-
This is a similar command line as the one above, but to stop the A/D file
server (and terminate itself, usually..). The command line argument for both
SndInput.exe and SerInput.exe is
/quit
. - "produce DAC file"
-
Activate this checkmark if you want to use an external audio file server
instead of your soundcard's analog/digital converter,
and enter the name of the file which will be produced by the audio server.
Example: ..\SoundUtl\to_dac.dat - "to start D/A server"
- Works like "to start A/D server" (described above) if you want to start the D/A-conversion server automatically from SpecLab.
Besides web streams and the "file-based" audio interface, it is possible to send and receive uncompressed audio through other means:
-
Receive audio data through
WM_COPYDATA messages
Select this option to receive audio data from the "Winamp-to-SpecLab"-plugin. - Receive and send audio through an 'Audio I/O DLL' with shared memory (details at www.qsl.net/d/dl4yhf/AudioIO/index.html).
Notes:
- While the "A/D" server is in use, the message "File doesn't exist" may appear on the tabsheet "A/D D/A Server". This is not an error. It only means that SpecLab looked for the audio exchange file and didn't find it, because the server has not produced a new file since SL last deleted it. Under normal conditions, the message toggles between "no error" and "file not found". If the "file not found"-message never disappears, make sure the filenames are correct, and the A/D server writes the file into the directory where SL expects it. It may be helpful to specify the full path for the audio file, not just the pure filename (something like "c:\temp\audio.dat" instead of just "audio.dat").
- SL uses 16-bit integer values (by default) to communicate with "audio file servers". This may be different if decimated I/Q sample pairs are used.
- For more information about the "sound input" and "sound output" utilities, look into the file ?..\..\SoundUtl\SoundUtilityInfo_49.txt (in german) or ?..\..\SoundUtl\SoundUtilityInfo_01.txt after downloading and unpacking the "sound/audio utilities" from DL4YHF's website. If you already have a copy of DL4YHF's "Sound Utilities" on your harddisk: The SoundUtilityInfo-links only work if you have downloaded these utilities and copied them into the same directory structure as in my original "source files".
Audio via COM port (and other 'exotic' ways to feed audio in real time)
Since October 2002, a firmware is available for a PIC12F675 microcontroller
which can be used as an external A/D converter for 2 channels at exactly
2500 samples per second. Data are sent to the PC through the serial port
("COM1" or "COM2"). PIC-Firmware and "interface driver" program ("SerInput.exe")
can be obtained from the author, or downloaded from DL4YHF's homepage. The
"interface driver" program is implemented as an audio
server for Spectrum Lab (and almost any other application, written in
any programming language which can access simple disk files). See
hardware desription for the PIC-based serial A/D
converter for more details.
Later (in 2023-08), a packet-based 'protocol' to exchange audio with any number of
'bits per sample', and any number of 'channels per sampling point' via the serial
port was added. Sourcecode is provided (in plain C, suitable for microcontrollers),
along with the 'Seven-Bit Packet' specifcation.
Due to the complexity and the size of it, the rest of this chapter
has been moved into another file.
Please see SpecLab/html/audio_via_COM_or_UDP.htm for details
about how to configure Spectrum Lab to receive digitized audio (or similar sampled streams)
via the PC's serial port.
This especially applies to the important
'params:' field
(highlighted in the screenshot below), in this case beginning with the
baudrate and serial data format (e.g. "115200,8-N-1"), and followed
by the sample packet format. Items in the 'params:' field are separated
by comma, thus a complete example would be:
921600,8-N-1,PACK7 (full explanation
here)
→
Audio via UDP
Most of the audio-file-based methods described in this chapter, and the WM_COPYDATA-based method to distribute audio between multiple instances running on the same machine have been superseded by sending Audio via UDP (in the local network, via LAN (Ethernet) or WLAN ("Wi-Fi").Details about Audio-via-UDP have been moved into a separate document (Audio via "COM"- or UDP port) since this document got too large for this 'special topic'.
Sending and receiving audio through WM_COPYDATA messages (deprecated)
Different audio-processing programs running on the same computer can send
audio in real-time to other applications without the need for an extra soundcard,
or a virtual audio cable. Spectrum Lab (and a few other applications written
by its author) can use WM_COPYDATA messages. Details about the principle
are here. One application
which uses this feature is an output-plugin for Winamp, which allows you
to play MP3 files (and audio streams received from the internet) directly
into Spectrum Lab. Details about the Winamp-to-SpecLab plugin are
here.
Because exchanging audio data via WM_COPYDATA suffered from occasional audio drop-outs
if the CPU is heavily loaded, it's deprecated, and should be replaced by
Audio-via-UDP as explained
in the previous chapter to exchange audio between applications, and (as a "bonus")
also works between different machines in the same local network with almost
no overhead / additional CPU load.
Audio output resampling
In certain cases, the sampling rate of the audio output (DAC) may be different
from the sampling rate of the input (ADC).
Example:
- The input comes from an external "box" (for example, an SDR), which uses an exotic sampling rate that is not an integer multiple of your computer's soundcard,
- your computer's soundcard uses slightly different sample rates for the in- and the output (this happened, for example, with the integrated audio device in Thinkpad notebook). How to notice this is explained further below.
- you want to connect an exotic audio output device to the computer, which doesn't use one of the 'standard' audio sampling rates
In these cases, open the "Audio I/O" tab in SpecLab's configuration dialog. Set the checkmark "use different output sample rate", and enter the nominal sampling rate. For example:
[v] use different output sample rate:
nominal : 22050 Hz
SL will try to lookup the precise sample rate in the sample rate calibration table.
The "precise" sampling rate for the output may be a bit difficult to find out if you don't have a hardware frequency counter, but there is a trick how to do this below. SpectrumLab needs to know this "real" output sampling rate to calculate the precise resampling ratio, which may be any fractional number (thanks to an algorithm similar to those explained at http://www-ccrma.stanford.edu/~jos/resample/ ).
Bad soundcards with different sample rates for ADC and DAC
A quick check to see if the input- and output sampling rate of your soundcard are exactly equal (as they should, in a 'good' soundcard) :
- Turn the option "use different output sample rate" off (see above)
- Turn on both ADC and DAC in the circuit window (so the soundcard runs in full duplex mode)
- Turn on one of the sine waves in the test signal generator, and connect it to the output
- Let the generator run for several minutes, and listen to the tone. If you hear a clean note without any gaps (popping or clicking sounds), you don't need different input- and output sample rates !
Otherwise, in the main menu, select "View/Windows"..."Debugging Window".
On the Debug tab, there are indicators for the input- and the output buffer
usages. Watch the display for "OutBuf=XX %" and "InBuff=XX %". Typically
(if all works well in full duplex mode), the output buffer is filled to 40
.. 60 percent, and the input buffer is filled to 0 percent. Why ? As soon
as input samples are received from the soundcard, they are processed; so
the input buffer is ideally empty most of the time. On the other hand, the
output buffer must not run empty - otherwise, there is the chance of interrupted
audio output (which you hear as "popping" or "clicking" sounds). When the
audio processing starts, the output buffer is filled to about 50 percent
of the available space.
If the "OutBuff" percentage slowly decreases, the true output sampling rate
is higher than the nominal value (as in the example shown above).
If the "OutBuff" percentage slowly increases (or the "InBuf"-percentage
increases), the true output sampling rate is smaller than the nominal value.
If you have a frequency counter, you can easily find the correct value for
the true ("real") output sample rate: Use SL's test signal generator to produce
a 1000 Hz tone, measure it with a frequency counter, and calculate the "real"
sample rate as below:
f_sample_real = f_sample_nominal * f_test_measured / f_test .
Example: f_sample_nominal = 22050 Hz, f_test = 1000 Hz, f_test_measured =
1006.8 Hz
-> f_sample_real = 22050 Hz * 1006.8 / 1000 = 22199.94 Hz .
After this, there should be no more input buffer overruns, or output buffer
underruns... until you install another soundcard !
Multiple soundcards in one system
If you have more than one audio device (soundcards eg) in your system, you can select the audio input and output which shall be used by Spectrum Lab in the audio settings.
Beware: The names which appear in the selection list are sometimes quite
cryptic, like "Nr. 3 = Hochwertiges Bluetooth-Audio" on the author's machine.
If there's only soundcard installed on the PC, leave both "Audio Input Device"
and "Audio Output Device" set to the default value (-1 = default WAVE
input / output). The program will then use the first available
soundcard, which is usually correct.
Entries in the device selection lists which do not begin with a number are
ASIO drivers. More information on how to use ASIO is in
this separate document .
See also: audio servers, audio I/O
DLLs, ExtIO-DLLs,
program start with command line
parameters .
back to top
Unexpected aliasing and soundcard trouble under Windows 7/8/10
Unexpected aliasing under Windows 7
The following was suggested by a member of the Spectrum Lab user's group (- thanks Ed -) to eliminate aliasing effects when trying to run the soundcard at 48000 samples/second or more under Windows 7 :
-
Look into the sample-rate setting under the 'Advanced' setup in the properties
of the sound recording device.
(Control Panel > Sound > Recording tab, highlight your device and click Properties, then the Advanced tab). -
You may find that W7 is setting your card up at the default 44.1, and everything
else is resampled.
I see this with my Gigabyte onboard Realtek 889, W7 32-bit.
Tell W7 to use 48k and all will be well.
So, even though the audio hardware supported 48000 samples per second, and
the application (Spectrum Lab) requested 48000 samples per second from the
"operating system", Windows 7 stupidly resampled from 44100 to 48000
samples/second, causing signals above 22050 Hz to "fold back" at the Nyquist
frequency (= half sampling rate).
Most likely, the same also applies to higher sampling rates (96 or even 192
k, if the audio hardware supports it).
Trouble with Windows 7 / missing 'Wave Out Mix' device
In the soundcard Mixer Control of Windows 7, input controls like "Master
record" and "Wave Mix " seem to be missing. It seems to be impossible to
select "what you hear" for input.
If you also miss these important 'mixer controls' under Windows 7, here's
where to find them (thanks Chris for answering the question in the Spectrum
Lab User's group !) :
> If the 'Wave Out Mix' is hidden and not made obvious at all, try this:
- Select sound from the control panel.
- Select the recording tab.
- Right click on the background of the tab and choose "show disabled devices."
- Right click on Wave Out Mix and click enable.
- Now it should work the same way as Wave Out Mix in Windows XP, allowing you to record any sound your computer makes.
In other cases (reported in the Spectrum Lab Users group), input devices did not appear in Spectrum Lab's list of audio input devices, as long as nothing was plugged into the 3.5mm audio jack !
Connecting a dummy plug into the PC's 'line input' made the device appear in the stupid list of audio devices reported by windows.
Selecting higher sampling rates under Windows 7
On some machines (running Windows 7), it required some additional work to get the soundcard running at the 'desired' sampling rate. It's a mystery why windows doesn't automatically switch the soundcard to say 96 kHz when the application (here: Spectrum Lab) 'asks' for it; especially when no other program uses the card. But there you are.. windows cannot be explained by logic.Here's how the author got an onboard audio devive running at 96 kSamples/second, or even more. In this case, a Lenovo X61s also supported 192 kSamples/second:
First, open the 'Sound' control panel, and switch to the 'Recording' tab ('Aufnahme' in German)...
(depending on window's mood, this screen can be opened through Spectrum Lab's
main menu : Options ... Volume Control for Record (audio in) ... at least in Windows 7)
This opens yet another dialog window, titled 'Eigenschaften von Mikrofon' / 'Properties of Microphone' (?).
Switch to 'Erweitert' ('Extended'?) on that tab. If you're lucky, there is combo box which can be expanded into a long list of different 'qualities', with different bit depths and sampling rates:
See also (related subjects; trouble with more recent Windows version):
Troubleshooting, known bugs and more
More "fun" with Windows 10 : USB audio devices are DISABLED and no longer displayed
Even more "fun" with Windows 10 : No more audio from the soundcard due to 'Privacy Settings'
back to top
FFT settings
The FFT settings are on one tab of the Configuration and Display Control
dialog. It can be opened from the menu "Options ... FFT Settings". The following
parameters can be adjusted :
- Decimate FFT Input (formerly: Sample Rate Divisor)
-
An internal "sample rate divisor". This parameter is used to decimate the
samples before the FFT calculation. If the audio processing rate is 8000,
and (for example) the "Rate Divisor" is set to 4, the 'internal' sample rate
for the FFT input is only (8000/4=) 2000 samples per second, reducing the
CPU power and increasing the FFT resolution.
Thus, the FFT's input decimation is actually a multiplier for the FFT input length. This is what other authors later called 'Zoom FFT'.
BUT: The higher the decimation (divisor for the FFT's input sampling rate), the lower the maximum frequency that can be detected with the FFT.
Note: The sample rate may have already been decimated at an earlier stage ! See 'Audio Settings'.
Together with the option 'complex input for the FFT with internal frequency shift' (under FFT input type), the center frequency can be set anywhere between 0 Hz and the half input sampling rate, or (for I/Q input) between - 0.5 * f_sample to 0.5 * f_sample.
- FFT input size
-
The number of samples that are processed by a single FFT calculation. Must
be a power of 2. This parameter influences the frequency
resolution in the FFT output.
Since program version V1.2, the FFT Size does no longer define the speed of the scrolling waterfall !
The higher you set the FFT size, the more frequency esolution you will get, but the longer it will take to calculate an FFT. On slow PCs (<100MHz), you should leave the FFT input size below 16384 samples. If the CPU is too slow, the waterfall will scroll slower than it should !
A detailed discussion of FFT input size, decimation, sample rate and frequency resolution is here.
- FFT window function
-
Selects the windowing function for the samples in the time domain. Each block
of samples which enters the FFT will be multiplied with this function, which
usually has a shape of a raised sine wave, with values near zero at the edges
of the window, and one in the center. For most applications, the Hann window
(mistakingly called "Hanning") is often the best choice because it has
a good dynamic range (suppression of sidelobes) while maintaining a low
equivalent noise bandwidth. For details, search Wikipedia on "window function"
(used to be on en.wikipedia.org/wiki/Window_function). The window functions
implemented in SL are:
Rectangle, Hamming, Hann, Gauss, Nuttall, and various Flat Top windows. They can also be set through the interpreter.
Notes on the FFT windowing functions:
- The equivalent noise bandwidth for the currently selected FFT parameters is displayed in the info box below the FFT settings.
- The formulas of the FFT windowing functions are contained in the SL installation archive, in the file 'Goodies/fft_windows.txt'. You can load that file with DL4YHF's "CalcEd" ("calculating editor") to plot the windowing functions in a graphic window.
- for the experimental correlogram display, you may have to use the rectangular window .
Details about 'new' FFT windowing functions (added May 2014) are here.
- FFT Input Type
-
"Real-number FFT": Preferred type for all broadband applications,
where the displayed frequency range shall start at "DC" (0 Hz). No frequency
conversion inside the spectrum analyser.
"Complex input with internal frequency shift": For narrow-band applications, if only a small frequency range (centered around any audio frequency) is of interest. This only works together with a decimation factor of 4 or higher. Internally, the analysed signal is multiplied with a complex oscillator signal (the "center frequency"). The complex signal (with "I"- and "Q"-branch) is then decimated, and the decimated signal (with a low sampling rate) is fed into a complex FFT.
"Complex input with separate I/Q channels": also a complex FFT, but no oscillator and complex I/Q multiplier inside the frequency analyser. Instead, the I- and Q-branch is fed into the analyser via two separate input channels. These two channels can be the LEFT and RIGHT input of a soundcard running in stereo mode, or an external two-channel A/D converter. More information about I/Q processing with Spectrum Lab is here.
- Include F.O. calibrator (Frequeny Offset Calibrator)
-
This is only possible if the FFT type is set to "complex input with frequency
shift". With this option, the frequency error (measured by the
frequency offset detector)
is subtracted from the complex oscillator frequency as explained in the previous
paragraph.
-
Zero-pad input if not enough samples available yet -
If this option (checkmark) is set, the FFT input will be padded with zeroes as long as not enough samples are available for input yet.
This option can help to 'see something quickly' if the FFT size (length * decimator) is very large, as in the 'very slow QRSS modes'.
- FFT output unit
-
Select the display unit for the FFT results (for spectrum graph and
waterfall):
V (volts), W (power in watt), and several logarithmic scales (dB, dBuV, etc).
The linear scales (voltage or power) are sometimes better to detect very weak signals in the waterfall display, expecially with high noise floor.
The logarithmic scales ("dB" with different reference levels) are more common if the input signal has a high dynamic range.
Absolute unites (like V, dBuV and a few others) only make sense after an amplitude 'calibration' as explained here.
Hint: You can compare signal amplitudes directly in decibels with the "readout cursor" in the spectrum display. The cursor function also uses the "FFT output unit" for display, so this name is a bit misleading.
- FFT internal average
-
This parameter may be important if you try to 'dig' very weak signals out
of the noise.
A value of 0 will give no averaging, a value of 3 will already reduce the random noise a bit, and will make the spectrum look smoother, so weak coherent signals crawl out of the noise on the spectrogram display. The higher the average value, the greater the smoothing effect, but if the value is too high the spectrum (and spectrogram) will react too sluggish. See also: Overwiev of different averaging- and smoothing options.
- FFT smoothing (parameter: number of neighbour bins)
-
This option can help to detect very weak, but relatively "broad" signals.
The smoothing parameter are the number of "neighbour" bins in the FFT which
are averaged to form the smoothed spectrum. Internally, a Gaussian kernel
is used. Unlike FFT averaging (which operates on consecutive FFTs), the smoothing
option affects the shape of a signal (for example, it turns a 'sharp peak'
from a coherent signal into a wider (Gaussian) 'hump'. But if the signal
is already a hump with a certain bandwidth anyway, this option can help to
squeeze the last fraction of a decibel out, so a signal becomes visible in
the spectrum display. Try to match the smoothed bandwidth to your observed
signal to get the best result with this function .. it may require some
trial-and-error. The FFT Smoothing was revived in SpecLab for the
EVE experiment.
- FFT output type
-
Set to "Normal (amplitude only)" for a normal spectrogram without phase (or
radio-direction) information,
- or to "Complex (real + imaginary part)" for special applications - for example phase analysis,
or to "Radio Direction Finder" for a radio-direction-finding spectrogram where the colour indicates the azimuth angle.
Note 1 : Some FFT output types don't affect the waterfall display, but only the FFT export (as file) !
Note 2 : The spectrum replay function (which transforms spectra back into audible signals) only works if the FFT output is set to "complex", otherwise the phase information in the original signal gets lost.
Note 3 : The triggered averaged spectrogram (with one average buffer for each of the spectrogram lines) only works if the FFT output type is set to "Normal (amplitude only)". - or to "Complex (real + imaginary part)" for special applications - for example phase analysis,
New FFT windowing functions
Since May 2014, a few new 'flat top' windowing functions were added in Spectrum Lab,
mainly out of curiosity, and to find out if they made a difference with 'real-world radio signals'.
Screenshot with a few 'classic' and 'new' FFT windowing functions.
'HFT248D' is one of the new functions ('Flattop with 248 dB sidelobe suppression').
The following windowing functions can be selected on the 'FFT settings' panel
(besides the classic Rectangle, Hann, Hamming, and Gauss window).
The new functions were implemented according to a publication by the Max-Planck-Institut für Gravitationsphysik (Teilinstitut Hannover),
written by G. Heinzel, A. Rüdiger and R. Schilling:
Spectrum and spectral density estimation by the Discrete Fourier transform (DFT),
including a comprehensive list of window functions and some new flat-top windows.
The article was publicly available as PDF at http://edoc.mpg.de/395068.
If you really need such 'high dynamic range spectra' (at the expense of equivalent noise bandwidth),
read that article to decide which of the following windowing functions is best suited for your application !
Also consider that the normal compilations of Spectrum Lab use 32-bit floating point numbers
(with 24-bit mantissa), thus you won't see much difference between FFT windows with 196 dB or even more suppression of the sidelobes (see screenshots further below).
- Nuttall '4 B' :
- Low frequency resolution but large dynamic range (sidelobes 93 dB below the main lobe),
NENBW (Normalized Equivalent Noise BandWidth) = 2.0212 frequency bins
(for comparison, Hann-window: NENBW = 1.5 bins, sidelobes 31.5 dB below the main lobe)
- Flattop '5 F' : Fast decaying 5-term flat top window
- Low frequency resolution but fast decay of sidelobes.
NENBW = 4.3412 bins
highest sidelobe at -57.3 dB, located +/- 5.31 bins from the peak
- Flattop '5 M' : Minimum sidelobe 5-term flat top window
- Low frequency resolution but good attenuation of sidelobes.
NENBW = 3.8852 bins
highest sidelobe at -89.9 dB, located +/- 5.12 bins from the peak
- Flattop -95 dB : Flat top window with -95 dB sidelobes (by G. Heinzel: "HFT95", D.3.2)
- NENBW = 3.8112 bins
highest sidelobe at -95.0 dB, located +/- 7.49 bins from the peak
- Flattop -144 dB : Flat top window with -144 dB sidelobes (by G. Heinzel: "HFT144D", D.3.5)
- NENBW = 4.5386 bins
highest sidelobe at -144.1 dB, located +/- 7.07 bins from the peak
- Flattop -196 dB : Flat top window with -196 dB sidelobes (by G. Heinzel: "HFT196D", D.3.6)
- NENBW = 4.8347 bins
highest sidelobe at -169.6 dB, located +/- 10.41 bins from the peak.
Note: This sidelobe attenuation reaches the dynamic range of 32-bit 'single-precision' floating point numbers.
- Flattop -248 dB : Flat top window with -248 dB sidelobes (by G. Heinzel: "HFT248D", D.3.9)
- NENBW = 5.6512 bins
highest sidelobe at -248.4 dB (theoretically!), +/- 13.37 bins from the peak.
Note: This exceeds the dynamic of 32-bit 'single-precision' floating point numbers (as used for the FFT in Spectrum Lab),
so you will hardly see the sidelobes with this windowing function at all.
This windowing function was only implemented in SL to see if it 'makes a significant difference' compared with the 'Flattop -196 dB' window. Without using 64-bit 'double precision' floats for the entire processing chain, it didn't. The screenshot of a 'pure sinewave' spectrum with this window, shown below, was made with a special compilation of spectrum lab using 64-bit floating point samples.
Examples: 40 kHz sinewave from SL's test signal generator, 96 kSamples per second, 512*1024 point FFT, using different FFT windowing functions:
Spectrum of a pure sinewave, Hann window.
Often a good compromise between frequency resolution and dynamic range,
but in this example, the dynamic range is not sufficient to reveal
the 'purity' of the test signal (phase noise, etc).
Spectrum of a pure sinewave, Flattop window with sidelobes at -144 dB.
Wider peak (due to the 'flat top' with NENBW = 4.5386 bins) but more dynamic range.
Spectrum of a pure sinewave, Flattop window with sidelobes at -196 dB,
using single precision floating point numbers (32-bit, normal compilation).
The sidelobes are buried in rounding noise ('grass') at -195 dBfs.
Spectrum of a very pure synthetic sinewave, Flattop window with sidelobes at -248 dB,
using a special compilation of Spectrum Lab with double precision floating point numbers.
This dynamic range is hardly necessary for 'real world' signals from any A/D converter !
Spectrum Display Settings
These settings are part of the Setup Dialog which can be opened from SL's main menu via "Options".."Spectrum Display Settings". Here just some parameters which need explanation. Parameters with a (2) are located on the second part of the spectrum display settings (etc), because the space on the first tab was not sufficient.
Spectrum Display Options, Part 1 (first tabsheet)
- Vertical Frequency Axis
-
Affects the layout of the
spectrum/spectrogram screen. The classic waterfall display scrolls from TOP
to BOTTOM, so the time axis is vertical and the frequency axis is horizontal.
If the option "Vertical Frequency Axis" is checked, the frequency axis will
be rotated by 90 degrees and the waterfall will scroll from RIGHT to LEFT
(which is better for HELL modes and for visual decoding of slow CW).
- Logarithmic frequency scale (2)
-
With this checkmark set, the frequency scale for both waterfall and spectrum
graph will be logarithmically scaled (which is preferred by musicians). Otherwise
the frequency scaling is linear.
- Mirror for Lower Side Band (2)
-
Usually the lower frequency will be on the LEFT or LOWER side of the frequency
axis. With this option set ("checked"), the frequency axis will be mirrored
so the lower frequency will be on the RIGHT or UPPER side of the frequency
axis (depending on the "Rotation" of the frequency axis).
- Amplitude grid
-
activates a grid (overlay) for the spectrum graph, usually in 10- or 20-dB
steps (depends on display unit and height of the graph area).
- Double-width waterfall lines
-
is an option added for high-resolution screens. With this option, each new
line of the spectrogram is drawn twice on the screen. If you have a monitor
with a vertical resolution of 1536 pixels, try this option if you cannot
see individual lines in the spectrogram. The option is also good for fast
non-scrolling spectrograms (waterfalls) without causing unnecessary CPU load
(because it halves the number of FFTs calculated per screen sweep).
- One pixel per FFT bin
-
With this option enabled, the frequency scale will always be stretched so
one screen pixel (along the frequency scale) will represent exactly one FFT
bin. The 'Max' frequency field on the control panel on the left side of the
main window will be disabled if this option is active (you can only enter
both 'Min' and 'Max' frequency if the 'one pixel per bin' option is off).
The benefit of this option is that you always see the maximum frequency
resolution for a given FFT size on the screen (but you may have to pan the
frequency scale around to see different frequency ranges).
Tip: There is an option to zoom into the spectrum with exactly 'one pixel per bin' in the popup menu of the main frequency scale.
-
- Optimum waterfall average
-
Is especially useful for slow waterfalls. With this option, as many FFT's
as possible are calculated and summed up before they go into one line of
the waterfall. This greatly smoothes the noise for 'overnight recordings'
or if you want to get a nice curve of your receiver's passband. The number
of FFTs added for one waterfall line can be examined in the Debugging Window
("Waterfall average count"). It depends on the waterfall scroll interval
and the time required to collect enough audio samples for one FFT.
- Multi-Strip Waterfall (with "number of pixels per strip")
-
Speciality for long-term observations. If this option is enabled, the spectrogram
screen will be divided into a number of vertically (or horizontally) stacked
"strips" which will show the history of a long time on a single screen -
for the expense of the displayed frequency range, or frequency resolution.
The parameter "number of pixels per strip" defines the height of each strip,
if the frequency scale runs vertically, othewise its width.
- Triggered Spectrum (should read "Triggered Spectrogram" but there wasn't enough space ! )
-
Only for "very special" applications. If this checkmark is not set, the spectrum
runs 'free' (without the need for a 'trigger', only controlled by the waterfall
scroll interval). Otherwise, new spectra are calculated only after a certain
"trigger" event. More details are
here.
- Non-Scrolling Waterfall ("Radar-like" view)
-
.. may be more friendly to the eye for very fast spectrograms (short "scroll"
intervals, which do not really scroll in this mode).
An example for this option can be recalled from the "Quick Settings" menu: select "Natural Radio"..."Sferics and Tweeks". It uses a 2-millisecond drawing interval - quite impossible to see any details if the image scrolls 500 times a second !
In non-scrolling waterfall mode, the spectrogram can be triggered (i.e. start one sweep across the display on a configurable trigger condition, then stop and wait for the next trigger event).
- Peak Detecting Cursor
-
Sets the mode of the frequency/amplitude readout cursor. When you move the
mouse across the waterfall or the spectrum, the displayed frequency and amplitude
is the PEAK value, and the frequency resolution of the displayed value is
much higher than the FFT bin width (thanks to an interpolating algorithm
which was suggested by DF6NM. Works best when FFT windowing is set to "Hanning".
Readings with a milli-Hertz accuracy (not just
resolution) can be taken after
calibrating the soundcard's sampling rate.
- Peak-holding spectrum graph
-
If this option is set, the spectrum graph shows an additional curve with
the peak value of the previous N seconds. The number of seconds can be set
between 0.5 and 60 . This function is good for reading the amplitudes of
"short tone bursts" or similar, or to display the result of a frequency sweep.
For this reason, the peak values can be cleared and "frozen" via interpreter
command too.
The colour of the peak curve in the spectrum graph can be modified here.
Note: The actual peak detection is done more frequently than the display update ! Some "peaks" may have such a short duration, that you won't recognize them in the momentary spectrum graph, but only in this peak indicator.
- Long-term average spectrum graph (over a range of spectra from the spectrogram screen)
-
If this option is set, the spectrum graph shows yet another curve : a 'long-term
average graph'. This option was added in 2007 for an "extreme" weak signal
test (Venus radar), which required an extra long integration. Details about
the long-term average spectrum
display are here (in another document).
Right next to the checkmark to enable the long-term average display, there's a small button labelled "clr". You can use this button to clear the average buffer (to start an all-new average calculation).
Just below the checkmark you can specifiy an optional half-life time. If non-zero, this interval specifies the time after which the values in the long-term average buffer have decayed to 50 % (i.e. half values). The decay is exponential; i.e. the values will never drop to zero (like a radioactive decay).
- Don't redraw waterfall after modifying settings
-
Disables automatic refresh of the waterfall after changing parameters that may
affect the display, e.g. contrast, brightness, displayed frequency range.
If the option (checkmark) is set, old parts of the waterfall remain unchanged, and only the new parts are drawn with the current settings.
- Emphasize MIN+MAX values
-
With this box checked, both min- and max values will be displayed in the
spectrum graph. Actually, the area between min- and max value which
occurred within one
- Show Spectrum as Bargraph
-
Normally, the spectrum graph is drawn as a thin curve. With this option,
it is painted using solid bars, which are better visible from a distance
(looks a bit like a colourful level indicator of a graphic equalizer, because
the colours of the bars indicate the amplitude since they use the colour
from the waterfall palette).
- Show... (selection combo)
-
This combo box defines whether the
spectrum graph and/or the
spectrogram (aka waterfall), or the
3D spectrum is visible in the main
window. Futhermore (if the frequency axis shall be vertical) it defines if
the spectrum graph shall be on the left or on the right side of the screen
("show both / plot on the right" means "show both spectrum graph and
waterfall, with the graph on the right side").
- Show Amplitude Bar
-
This 'amplitude bar' is the blue strip which runs along the spectrogram
(optionally). The white line inside it shows the (broadband-) amplitude present
at the input of the spectrum analyser, measured at the same time when the
data for the FFT were calculated. The amplitude bar can be parametrized on
the second part of the 'Spectrum Display Setting' - see next chapter. The
"..visible"-checkmark only turns the bar on and off (if you don't need it).
- Mathematics
-
Usually set to "none", if one or two independent channels shall be displayed
in the spectrum window. The other options only work if two input channels
are connected to the main spectrum analyser:
"CH1 - CH2" = calculate spectra for both channels, subtract the 2nd from the 1st channel, and only show the difference
"CH2 - CH1" = simular as above, but subtract the spectrum of channel 1 from the spectrum of channel 2.
An example can be found in the preconfigured setting "SpecDiff.usr", where CH1 is the test signal for a filter, CH2 is the filter output, and the display shows "CH2 - CH1". In that example, that's the filter's frequency response, because the filter is fed with broadband noise from the test signal generator.
- Spectrum Graph Area (pixels)
-
Defines how large the spectrum graph area shall be, if both graph and spectrogram
(waterfall) shall be visible at the same time. The default value is 100 pixels.
- Channels / Connections
-
This button takes you to the circuit window where
you can select the input channels for the spectrum analyser (which can be
connected to different "taps" within the test circuit; not only to the inputs
from the soundcard).
- Waterfall Scroll Interval
-
Defines how much time passes between two steps of the waterfall. If the option
"Optimum Waterfall Average" is not set, this parameter also defines the time
between two FFT calculations. Be careful not to make this value too low,
unless you have a quite fast PC. Don't expect your 50MHz-486 to do five
FFT-calculations with 32768 input samples per second - this example requires
a 266MHz-P2. A modern machine by today's standards does a lot more of
course.
With the "automatic" option, the waterfall scroll interval will be automatically selected, depending on the current FFT size, for a 50 percent overlap (which makes sense due to the FFT windowing).
Note 1: The spectrum replay function only works if the scroll interval is set to "automatic, for 50 percent overlap".
Note 2: For the reassigned spectrogram display, overlaps of 50, 75, or 87.5 % worked best.
Note 3: The "scroll interval" has no effect if the option "triggered spectrum" is enabled and set to "trigger for ONE LINE of the spectrogram". This gives you the opportunity to control the waterfall scroll interval through an external sync signal (it was used for a doppler radar experiment once).
- Waterfall Time Grid
-
Produces an overlay in the spectrogram with periodic time markers. As long
as the 'Source' field is empty, the 'Interval' field usually defines the
number of seconds (or minutes) between to time ticks. "Style" defines how
the time markers shall be drawn over the spectrogram (as dotted line, solid
line, or just a small "tick"). Each marker can optionally be labelled in
a selectable format, or user-defined formatted text. If the "Label" combo
set to "User Defined", you can define the format string for the time label
in the field "user-defined time label format". Some examples for suitable
format strings are here . Since 2006-10,
the user-defined label may even be a variable string expression (evaluated
by the interpreter before printing the label) like the following example
(caution, for advanced users and 'special applications' only) :
str("## dB",peak_a(500,3000))
The str()-function used in this example does is explained here (it converts a numeric value into a string). Some black magic lets the peak-function in this example use the spectrum "under" the time marker to calculate the peak amplitude in the specified frequency range.
The 'Source' field inside the group 'Waterfall Time Grid' can be used for special applications, where the source for the time markers shall not be the time, but something else. For this purpose, any numeric expression can be entered in this field. The result from this expression will tell where the markers are placed (in combination with the 'Interval' field: Whenever the value calculated from the 'Source' expression, divided by 'Interval', truncated to an integer number, gives a new value, a new marker will be painted on the waterfall. Too complicated ? Here's a simple example: With 'Source' set to water.lines - 1 - water.line_nr, the timescale will not show a count of seconds, but the current pixel position.
By default, the time markers painted near the waterfall time grid will show the current date and time, or (while a file analysis is in progress) the time-of-recording. You can change this time in the file analysis dialog.
Note: If a GPS receiver is connected, and SL's GPS / NMEA decoder properly configured, the waterfall time labels may also show the current geographic location. Details on that in an extra document (option 'show position in spectrogram'). The position is appended to the time, in text form.
The appearance (font, colours, transparency) for waterfall time labels and other text labels ("printed" into the spectrogram via command) can be controlled on the 3rd tab of the 'Display' settings, as explained further below.
Spectrum Display Options, Part 2 (second tabsheet)
- Amplitude Range and Spectrogram Options (...on tab 2 of the 'Spectrum' settings...)
-
Allows you to reduce the displayed amplitude range for the waterfall and
spectrum graph. The default settings cover a large dynamic range (like -120
dB to 0 dB). If, for example, you are only interested in weak signals between
-60 and -50 dB, adjust this range accordingly.
The 'Offset' can be used to modify the displayed decibel scale. It is not necessarily a fixed value, but a numeric expression which will be periodically evaluated by SpecLab's interpreter. The gray field right next to the input field shows the current value. This feature was used to take the automatic gain of a "real" receiver into consideration when displaying "absolute" voltage readings in the spectrum graph.
Note: Of course, you can adjust the waterfall colour palette with the 'contrast' and 'brightness' sliders, so everything below -60 dB will be black for example, and everything above -50 dB will be white; but reducing the displayed amplitude range here will also make the spectrum graph look better.
Additional, the visual AGC function can be turned on for the spectrogram display. Details about the visual AGC are here.
- Amplitude Bar (...still on tab 2 of the 'Spectrum' settings...)
-
Shows the total amplitude in a coloured bar, running alongside the
spectrogram display. In contrast
to the spectrogram, the amplitude bar doesn't depend on frequencies. The
size and display range of the amplitude bar can be defined independently
in its control panel (regardless of the "Displayed Amplitude Range" for the
spectrum / spectrogram). The following controls can be found in the group
"Amplitude Bar", which is on the second part of the spectrum display
configuration screen:
- visible : turns the amplitude bar on/off
- with scale: means a scale (in percent) shall be visible near the amplitude bar, covering a part of the frequency scale
- size: displays the width or height of the amplitude bar in pixels (whether this is "width" or "height" depends on the screen layout / rotation )
- show channels from watch window: defines which of the channels of the watch window shall also be plotted into the amplitude bar. These are decimal channel numbers, separated by comma. For example: 1,2,3 means "plot the plotter-channels number one, two, and three also into the amplitude bar".
- display range: Defines the amplitude scaling for the amplitude bars (the "seismogram"), in percents of the maximum analog/digital converter's input.
100 % means the display range of the amplitude bar covers the full ADC swing (the point of clipping, which should be avoided). 10 % display range is more suited for most applications. Note: The additional channels which can be plotted into the amplitude bar are not affected by this parameter. They are entirely controlled by the "min" and "max" values entered in the watch-window.
- Spectrum Display Widths (percentages along the frequency scale for 'Ch1' to 'Ch4')
- Adjust the relative widths for each part of the spectrum display,
along the frequency scale (in older versions, this could only be done by
grabbing a 'splitter' on the frequency scale with the mouse and moving it
sideways, while holding the mouse button pressed. This got too
complicated when even more spectrum analyser channels were added
in 2022).
Definition of Spectrum Display Widths in the 'Spectrum Display Settings'.
The sum doesn't need to be 100 [percent], because the program
will automatically scale the widths in pixels to fit the screen.
- Note:
- The width of the optional amplitude bar is specified in pixels,
thus in contrast to the above parts of the 'split frequency scale'
(scaled in percents), the width of the 'amplitude bar'
doesn't change when the spectrum analyser window is resized.
How many spectrum analyser channels are actually displayed depends solely on the input channel assignment, as described here.
Spectrum Analyser 'input selectors' in the circuit window.
Upper row: Ch1 is connected to circuit node 'L1', Ch2 to 'L5'.
Lower row: Ch3 and Ch4 are not connected, and thus 'off' here.
- Special display options (...still on tab 2 of the 'Spectrum' settings...)
-
- Show REMOTE spectrum (via CI-V):
Only for brave-hearted users of certain Icom radios (IC-7300, IC-9700, IC-705).
Details about the 'remote spectrum' are in this separate file.
- Stereo-color" waterfall for dual input:
One input channel (FFT) sets the red colour component, the other channel adds the cyan component (blue+green). If both inputs have the same level (for an FFT frequency bin), the resulting pixel in the 'stereo-color' display is a shade of gray.
- Show Correlation ("Correlogram"): details here.
- Show labels like 'Ch1', 'Ch2', 'Correlation':
Adds small labels in the upper left corner of each part of the spectrum / spectrogram display, to indicate the channel name or special function.
- TIME-reassigned spectogram display [checkmark],
- FREQUENCY-reassigned display [checkmark]:
Details about these rarely used special spectrogram display modes here.
- Show REMOTE spectrum (via CI-V):
- Options for the frequency axis (...still on tab 2... unless running out of screen space again)
-
Contains the following checkboxes, which were once on the first tabsheet
(before running out of space there). This group contains the following options,
which should speak for themselves:
- show grid in spectrum graph
- show grid in waterfall display
- use dotted grid in waterfall (note, this applies to the FREQUENCY scale only)
- split frequency scale (explained further below)
- logarithmic frequency scale
- mirror for lower side band
- Radio Frequency Offset: Added to the displayed frequencies, usable for external (fixed) frequency converters, in addition to the 'VFO frequency' (the latter being controlled by Spectrum Lab, for software defined radios and similar).
- show grid in spectrum graph
- Split frequency scale
-
Allows to split the frequency scale
for the waterfall and spectrum graph into two sections,
even if there is only a single active channel (input). The frequency
ranges of both settings can be defined independently. If the "split frequency
axis" is enabled, you can divide the screen area with the mouse on the small
'gap' between both parts on the frequency scale. When the mouse cursor is
replaced with the splitter symbol, hold the left button pressed and move
the mouse.
This option can also be activated from a popup menu on the frequency scale (use the right mouse button to open a popup menu, while the mouse cursor is on a certain screen element).
Alternatively, the relative widths of each part of the waterfall/spectrum along the frequency axis can be entered in numeric form (as percentage of the total frequency width) as explained below.
Spectrum Display Options, Part 3 (third tabsheet)
- Options for Triggered Spectrogram (3)
-
- Triggered Spectrum / Triggered Spectrogram
-
If the option 'Triggered Spectrum' is set, the
universal trigger function can be used
to trigger the acquisition of data for the next FFT (=a single waterfall
line) or a complete spectrogram sweep (= a complete waterfall screen). With
this option, you can -for example- realize an external trigger if you connect
the trigger to one channel of the soundcard, and the spectrum analyser itself
to another channel. See example in the next paragraph.
Note: The triggered spectrogram only makes sense in 'Non-Scrolling' Waterfall mode. One trigger starts a full sweep across the spectrogram. When the spectrogram is complete, the spectrogram is paused, and the program waits for the next trigger. This mode is often used along with the average function explained in the next paragraph.
- Triggered Spectrogram Average
-
Only works if :
- FFT output type is set to 'Normal (Amplitude Only)', i.e. not complex.
- together with the 'non-scrolling waterfall option'
The triggered spectrogram, together with this special 'Average' option, it can be used to dig weak but periodic signals ("pings") out of the noise, as explained in this example. In that mode, there are individual average buffers for every spectrogram line. The "Reset" button on this panel can be used to erase those average buffers to start an all-new reception cycle. The field labelled 'Averages (one per line)' defines how many spectrogram sweeps shall be accumulated.
An overview of the various AVERAGING modes is here .
- Fonts
- Select font names and -sizes for the frequency scale, waterfall (text labels),
spectrum graph (axises and radio station display) here.
- Display Colours / Pens
- Select colours for the spectrum display (background), plotter pens,
radio station frequency markers, frequency scale, etc here.
See also : Display Colour- and Font Settings (in a later chapter).
- Note:
-
Some of the settings explained above apply to the currently selected channel
of a spectrum analyser, but most of them are common of all channels. To toggle
the channel number, click the button labelled
"Shown: Settings for Analyser 1, channel 1" or "Shown: Settings for Analyser 1, channel 2" ... etc
Every click on this button toggles the channel number.
Spectrum Buffer Settings
To scroll the waterfall (spectrogram) back
in time, a large buffer can be used, which stores a lot of calculated
spectra (more or less, the results of the FFT calculations). The contents
of this buffer can be browsed with the
'buffer overview' in the control
bar on the bottom of the main window.
This buffer is in RAM, but can -optionally- also be a large disk file. Which
is best for you, depends on your application. If you don't need to scroll
back in time, only use a small RAM buffer (which is required for repainting
the spectrogram, after changing the contrast/brightness values, zooming into
certain frequency ranges, etc).
The following 'Spectrum Buffer Settings' can be modified on the configuration
screen:
- Buffered lines in RAM
-
This edit field is used to define the maximum count of spectrum lines buffered
in the PC's main memory. The spectrum buffer is required to be able to "scroll
back in time" while recording new spectrum samples.
If you experience periodic hard disk accesses after every FFT (or waterfall step), you should reduce this value because your PC runs out of "real" RAM and starts swapping memory from RAM to disk.
A value of 200 is ok for all PCs even with only 16MB RAM (if not too many other programs are running).
On machines with 128MB RAM and more, use 400 lines.
If you have 256 MB RAM or more, use 800 lines so the full screen can be repainted after zooming or modifying the waterfall colours.
This parameter will be effective only after exiting and restarting the program because the buffer is allocated only once during program initialization.
- Use file buffer
-
A file can be used as an extra large display buffer. Also enter the name
of the disk file here, so you can have different buffers for different
applications. Switching from one file name to another sometimes requires
exiting and restarting the program.
- Max. FFT bins in file
-
To make more efficient use of the buffer file, you can define how many FFT
bins (frequency samples) shall be written into the file. If, for example,
the spectrum analyzer uses an FFT size of 65536 points, but you are only
interested in a small portion of the spectrum (say a quarter of the bandwidth
covered by the soundcard), enter "16384" here, or even less:
In an other "extreme" case, you may only want to observe 19.5 to 22.5 kHz while your soundcard runs at 96 kHz (so the FFT covers 0..48 kHz). To save space in the buffer file, you only record (22.5-19.5)kHz / 48kHz = 6.25% of the total bandwidth. From a 65536-point FFT, you only need 65536 * 0.0625 = 4096 bins. This is the value to be entered in the field "Max FFT bins in file". (Why so complicated ? All entries in the file buffers have the same size for simplicity, and the buffer does not change its file structure automatically when you select another FFT resolution).
The "center" of the frequency range which will be written into the spectrum file buffer will be taken from the "center frequency" of the main spectrogram. If you zoom out of the narrow frequency display, parts of the waterfall which are no longer present in the RAM buffer will remain black if they are not contained in the buffer file.
If the currently used FFT size greater than the count of bins in a buffer file entry, a warning message will be displayed in the setup screen, like this:
WARNING: The FFT size (65536 bins) exceeds the currently used buffer (4096 bins). |
-
Having read the explanations above, you can decide to accept recording only a part of the input spectrum in the buffer, or to change the buffer settings (set the number of bins in the buffer to the same value as currently used under FFT settings. But, to make the changes effective, the old buffer file must be discarded, and a new one (with different structure) must be written.
- Max buffer file size
-
Limits the size of the spectrum buffer file (if such a file is used at all).
Helps to reduce the risk of running out of harddisk space, which will cause
problems under windows. For most applications, a buffer size of 200...2000
MByte is sufficient, and most modern HD's have many gigabytes more than
this.
See also:
- Spectrogram display ("waterfall")
- FFT Settings
- Spectrum buffer overview
- Spectrum replay function (transforms data from the spectrum buffer back into audible signals)
Display Colour- and Font Settings
These settings are part of the Setup Dialog, now on the 3rd part of the
"Spectrum" display settings.
- Colours:
-
Used to customize some colours used for grids, graphs, scales, text labels,
etc. (this does not include the color palette
for the waterfall)
- Spectrum graph background, Spectrum graph grid, Pens1 ... 4 :
-
Click on one of these panels to modify the color used to display these parts
of the "spectrum graph".
Pen 1 is used to draw the current or averaged spectrum,
Pen 2 for a temporary (instantaneous) spectrum which will be added to the average spectrum (if averaging is ON),
Pen 3 is used for the peak hold indicator (if enabled),
Pen 4 is used for the FFT-based filter's frequency response (and other optional elements like the spectrum alert function) .
Note: The pen colour for the reference spectrum curve is defined on the "Reference Spectrum / Frequency Response" tab of the configuration window.
- Frequency scale background, Frequency scale foreground:
-
Set the colours of the frequency scale between spectrum graph and waterfall
(which was black on orange in earlier versions).
- Waterfall grid, Waterfall Label Text, transparent waterfall label:
-
Color for the waterfall grid, text on scales and transparancy of the text.
Some users prefer transparent text, others opaque. If the checkmark
for "transparent" is off, the text will be opaque (it appears in a solid
rectangular box with the waterfall grid color). The text itself always appears
in the "Label Text" color. Do not use the same colours for "Waterfall grid"
and "Label Text" if the text is not transparent !
The waterfall frequency grid can either be a solid or dotted line; individual frequency grid lines can be added or suppressed with the user-defineable frequency markers.
The waterfall's "Label Text" settings (font name, font size, font colour, and background colour) are also used as default for the spectrum.print command, unless specified in the command's argument list. - Fonts
- Click on one of these panels to select a different font, or font settings,
for different parts of the spectrum display window:
Spec.graph : Font used for the amplitude grid labels (e.g. "dB" values, when enabled)
Freq.scale : Font used for the labels on the main frequency display
Waterfall : Font used for time labels, scrolling along with the waterfall (aka spectrogram)
For some of the above fonts, you can also use different font styles like bold, italic, underlined.
Note: Certain fonts cannot be rotated by 90° for the display, so pick a suitable one !
Frequency Marker Settings
Up to twenty(?) frequency markers can be displayed on the frequency scale (for waterfall and spectrum graph). A table like this is used to "connect" the marker either to a fixed frequency or to any "frequency-dependent" parameter:
(screenshot "Markers" in the Configuration
and Display Control window)
A name must be supplied for every marker which shall be visible on
the frequency axis or in the waterfall diagram. Lines in the marker definition
table are treated as 'unused entries'. A every frequency marker's name
will be displayed as a "hint" when the user moves the mouse across the marker
on the frequency scale.
The value column shows the current position of the marker (frequency in Hz,
with or without "RF" offset - see below). For all markers, this will be the
last position to which the 'operator' dragged the marker via mouse... unless
one of the functions presented below doesn't prevent that.
The type of a marker defines how it shall appear on the screen. It
is defined as a combination of letters which will be explained in the
following section in detail. The type
is optional. By default, a marker only appears as a diamond-shaped icon on
the main frequency axis.
The color of a marker can be modified by clicking on the panel in
the lower left corner of the dialog window. Additionally, this column in
the definition table may include a combination of the "flags" shown just
below the table.
The marker's RF-flag defines if this marker displays a RADIO-FREQUENCY
(RF=1) or a BASEBAND-FREQUENCY (or "AUDIO-FREQUENCY"; RF=0). A radio frequency
includes the current VFO-frequency, which is added to the baseband frequency
for the display. Details about BASEBAND- and RADIO frequencies are
here.
The set procedure is an interpreter command which will be executed
whenever the user tries to move the position of the marker with the left
mouse button held down. The new frequency value is passed to this command
on the local variable "x". If you use this feature, you can use the frequency
marker like a slider.
The read function is a numeric expression (see examples) which is
periodically evaluated (every 500ms or so). This is done because a frequency
marker can be connected to something which changes its value by itself, for
example the AFC center frequency of the digimode decoder during receive.
If the result of the read function changes, the marker will automatically
move along the frequency scale. If no read-function is specified for a marker,
its position is freely movable with the mouse, and it's frequency ("value")
will be saved between two SpecLab sessions. Thus, a marker can be used like
a "variable" to store a single frequency value. To markers can be used to
store a frequency range, etc.
Some examples for the use of frequency markers as sliders (to control a few
of Spectrum Lab's components):
Set Procecure | Read Function | Remarks |
generator[0].freq=x | generator[0].freq | display and modify the frequency of the first sine wave generator |
circuit.osc.freq=x-650.0 | circuit.osc.freq+650.0 | Used for the VFO in the VLF software radio with 650 Hz "audio IF" |
filter[0].fft.fc=x | filter[0].fft.fc | reads or modifies the center frequency ("fc") of the FFT-based filter. |
filter[0].fft.fs=x | filter[0].fft.fs | reads or modifies the frequency shift ("fs") of the
FFT-based filter. Often used as a software "beat frequency oscillator" in software-defined radios. |
Since 2009-06, frequency markers can also be used -a bit easier- without
having to define a special "set"- and "get"-function. If a frequency marker
does *NOT* have a special 'read function' (as explained above), it can still
be moved on the main frequency scale with the mouse, and the current value
(frequency) of a frequency marker can be polled from the interpreter using
one of the functions listed further below.
An overview of Spectrum Lab's interpreter functions is
here.
An alternative to frequency markers (but no interactive control elements)
is the 'Radio Station' frequency list, which you
can use to 'mark frequencies' as well. Those frequencies don't have to
be 'Radio Stations'; in fact they may be musical notes, or anything that
shall be marked on the frequency scale or in the spectrum.
Functions (and -commands) to access frequency markers through the interpreter
Frequency markers are numbered from N=1 to 10, like in the 'frequency marker definition' table shown above. The frequency, and possibly some other properties of a frequency marker, can be accessed through the interpreter using the following commands (or functions):
-
fmarker[N].freq
-
returns (or sets) the current frequency of a marker. Unit is Hz.
-
fmarker[N].name
-
returns (or sets) the name of the N-th marker. A marker's name is shown as a 'hint' when pointing
on it with the mouse, in the main frequency scale. The name may be a string, up to 20 characters long.
Examples:
- "f="+str(fmarker[1].freq)+" Hz, a="+str("##",peak_a(fmarker[1].freq-50,fmarker[1].freq+50))+" dB"
-
(used in any of the programmable
buttons, "variable expression" field)
Displays the frequency of that marker (in Hz), and the peak amplitude in a frequency range "near" that marker.
Frequency marker types
The type of a frequency marker defines how and where a frequency marker appears on the frequency scale and/or on the waterfall. The following marker types can be used, also as combinations of these lower case letters:
- s (frequency marker type 'scale')
-
Marker appears on the main frequency scale.
Without this flag ('s'), a marker does not appear on the main frequency scale.
- w (frequency marker type 'waterfall grid line')
-
A thin grid line at the marker's programmed frequency appears in the waterfall,
using the marker's color which can be defined on the
'marker settings' tab. This makes it possible
to have additional lines in the waterfall's frequency grid. You can use to
mark odd frequencies like 15.625kHz in the waterfall which would usually
not appear on the automatically generated grid (which can be enabled and
disabled on the 'display settings' tab).
If the 'frequency grid' option isn't set for the waterfall display, even a marker with the 'w' flag won't appear there.
- d (frequency marker type 'disable frequency grid line')
- Suppresses one of the frequency grid lines on the waterfall. For example, there may be a frequency scale from 10..20kHz with visible grid lines on the waterfall spaced 1kHz. You have an interesting signal at 16 kHz (let's call it GBR) and don't want to have this particular frequency covered by a frequency grid line. Define a marker named "GBR" with the type "d" or even "sd" (so you can see it on the frequency scale). From now on, the 16kHz-line is ommitted (excluded) in the frequency grid.
Radio- vs Baseband frequencies
As noted in the frequency marker settings, a marker can be programmed to use either the baseband- or the radio-frequency.
- A radio frequency includes the VFO frequency (= "the frequency to which the external radio, or downconverter, is tuned to").
- A baseband frequency does not include that frequency offset.
For example, let's assume Spectrum Lab is connected to a software-defined
receiver (SDR), which is tuned to a center frequency of 7.03 MHz ( = "VFO
frequency" displayed on the SDR control panel). The quadrature IF (intermediate
frequency) output is sampled 44100 times per second (f_sample=44.1 kHz).
This means, the I/Q stream covers a baseband frequency range of
-f_sample/2 to +f_sample = -22050 Hz to +22100 Hz.
An audio tone appearing in the baseband at 1000 Hz corresponds to
a radio frequency of 7.031 MHz .
- to tune the radio (VFO control)
- to show the frequency of radio stations in the frequency scale
Markers displaying BASEBAND frequencies are better suited ...
- to adjust the "audio filter" (bandwidth and center frequency; or lower and upper cutoff frequency)
- to indicate certain frequencies which are *not* related to the VFO tuning frequency, for example the receiver's audio passband, FM stereo pilot tones, etc.
- to control the test signal generator in Spectrum Lab (because the test signal generator produces baseband signals, not radio frequencies)
Colour Direction Finder (a waterfall-based radio direction finder)
.. has been moved into a separate document.Audio File Settings (formerly 'Wave File Settings')
The wave file setting dialog can be opened through the main menu; select Options ... Audio file settings (formerly Wave file settings).
Save Options : Options to save incoming or outgoing audio as a file (*.wav or *.ogg).
- 'Use RAW file instead of WAVE-format'
- The default format (which should be sufficient for most applications) is
WAVE audio - not 'raw' audio.
When starting to save audio via the file menu (File..Audio Files and Streams..Save XYZ as audio file),
the file type can actually be selected through the file selector dialog).
- 'Allow extra chunks in headers'
- This option should be set for accurate post-processing
- it uses additional 'chunks' in the RIFF wave header, for example a precise timestamp for the first sample in the file, and possibly some other specialities. Well-behaving programs will not have any difficulty to skip these non-standard chunks... otherwise, turn off this option, but then you will not have accurate timestamps, GPS data, or other parameters available for post-processing.
- 'Don't save until timestamps are valid'
- If this option is checked, the audio-saving process won't start
until accurate timestamps are available (from a GPS receiver or similar).
This is important only for very special applications, for example
when recordings from different sites are to be aligned / combined by the
timestamps (in the sampled data). This option prevents recording 'useless'
data, for example if audio samples are available, but the GPS receiver
has not locked in yet.
- 'Save extra data in auxiliary files'
- Saves some 'extra' data (timestamps, GPS data, etc) in an extra file.
Only necessary when the post-processing software is unable to process
wave-files which contain additonal information (besides the sampled data).
- 'Decimate saved audio samples to NNNN samples/second'
- Helps to reduce the size of logged audio files, if the logged bandwidth
doesn't need to be as large as the bandwidth covered by the audio input device.
But since the support for Ogg/Vorbis, you'd better use this file format
to reduce the disk space usage (because Ogg/Vorbis is a compressing
audio format, which the normal 'wave audio' format is not).
- 16 or 24 bits per sample
- Only applies to wave files, but not for Ogg/Vorbis.
More about using wave files for logging and analysis can be found here . If you wonder about 'auxiliary' files (*.aux) being written along with wave files (*.wav), read this note about GPS data logging (to turn off AUX files, the GPS-'emission'-interval must be set to zero).
back to top
Amplitude Calibration
To realize absolute voltage readings, level readings in
dBuV, etc, the program needs to know the relation
between input voltage and A/D converter value. For example, a 16-bit
analog-to-digital converter may reach the maximum positive output value of
32767 at an input voltage of 200 mV. This value (input voltage for the maximum
ADC value) can be entered in the setup window (from the main menu:
Options ... System Settings .. Amplitude
Calibration . It doesn't matter what hardware is actually used - it
may be a soundcard, an external A/D converter on the serial port, a software
defined radio (like SDR-IQ or Perseus).
The value entered in the field labelled max ADC input voltage
is the single peak voltage ("Vpk" - not the peak-to-peak
voltage) fed into the soundcard, SDR, or whatever. You can measure the single
peak voltage with an oscilloscope if you have. The typical procedure to determine
this value is as follows:
- Connect a signal generator set to sine wave output, with adjustable amplitude to the analog input of the soundcard / SDR / etc. Turn the output voltage low initially to avoid damage to the receiver !
- Open the "input monitor scope" in Spectrum Lab, and set the vertical magnification to 1 (which is the default)
-
Slowly increase the signal generator's output amplitude, until the sine wave
in the input monitor reaches the clipping point (i.e. touches the upper and
lower edge of th scope display).
- Measure the peak voltage of the signal generator (with a real oscilloscope).
-
Enter that value in the input field mentioned above ("max ADC input
voltage").
Note You can use the 'technical' notation like 20m (m=milli) instead of 0.02 in this field. After clicking "Apply", SL will convert the entered value into the default format.
Typical values for software defined radios (giving values for soundcards is pretty useless here, because those figures will always depend on the ever-changing soundcard settings):
- SDR-IQ near 1 MHz, bw=50 kHz, RF gain +10 dB, IF gain +24 dB : Vin_peak_max = 22 mV (*)
- SDR-IQ near 1 MHz, bw=50 kHz, RF gain +0 dB, IF gain +24 dB : Vin_peak_max = 58 mV (?)
- SDR-IQ near 1 MHz, bw=50 kHz, RF gain -10 dB, IF gain +24 dB : Vin_peak_max = 172 mV
- SDR-IQ near 1 MHz, bw=50 kHz, RF gain -10 dB, IF gain +18 dB : Vin_peak_max = 346 mV
(*) Peak values measured with a TDS 210 oscilloscope with 1:1 probe, using
the scopes "Pk-Pk" measurement, divided by two.
(?) - Check this: 20 * log10( 58 / 22 ) = 8.4 dB ; 20 * log10( 172
/ 58 ) = 9.4 dB . Either the author's measurements, or the preamp gain is
inaccurate...
See also: Spectrum reference,
Audio settings ; back
to top .
Settings and Configuration Files
All parameters are (by default) saved in an old-fashioned INI-file named
"SETTINGS.INI" which will be created in the current directory of the spectrum
analyzer. These files can -if necessary- be loaded with a text editor (a
nice way to copy a group of parameters from one file to another if you know
what you're doing). Since SL doesn't use the registry to store session data,
there's no need to put your system at risk by butchering around with the windows
'Registry Editor'. To restore the default settings, simply delete the file SETTINGS.INI.
In really tough cases, also delete the file MCONFIG.INI in the Spectrum Lab folder
(that's where the machine-specific configuration, for example the name of the
soundcards used by Spectrum Lab for in- and output, are stored). Those filenames
(and directory paths) can be examined or modified on the Filenames tab
in the configuration window.
Since Spectrum Lab Version 3, 'Machine dependent' and 'User Configuration'
can be stored in the same file, e.g. "SETTINGS.INI" or any
user defined configuration file (*.USR). This option can be configured
on the 'Filenames' tab (checkmark labelled 'no extra file' right
next to the edit field for the name of the 'Machine Config' field,
e.g. 'MCONFIG.INI' for the former 'machine-dependent part of the configuration').
This option was added to simplify the exchange of configuration files
for a special purposes, for example when the input device wasn't a
locally installed audio device ("soundcard" with a "line input") but
e.g. UDP on a local network, or TCP via internet. In the latter case,
the input device (and/or output device) isn't really 'Machine dependent'
but 'Application dependent'.
With '☑ no extra file' checked, ...
- Names of audio devices
- Names (URLs) of audio streams
- Soundcard- or Software Defined Radio settings (from various file sections like [SOUNDCARD], [EXTRA_INPUT_DEVICES], [EXTRA_OUTPUT_DEVICES], etc)
- Frequency- and sampling rate calibration
UserConfigAndMachineConfigInOneFile
in the file's
[GENERAL] section.
With UserConfigAndMachineConfigInOneFile=0 (or if that key doesn't exist at all), Spectrum Lab will ignore certain sections in the USR file (all sections that used to be stored in SpecLab/MCONFIG.INI (*) only, loaded once when SL starts, before loading anything else). Thus, to turn a *.usr with WITH 'machine dependent' settings into one WITHOUT, it's not necessary to remove unwanted sections with a text editor - it's sufficient to change the value of UserConfigAndMachineConfigInOneFile from 1 (one) to 0 (zero).
To run multiple instances of the program at the same time, you can either provide the name of the settings file in the command line, or let Spectrum Lab use the default names ("SETTINGS.INI", "SETTING2.INI", "SETTING3.INI", etc; as explained here in detail). Each instance will store its configration in a different file this way, so there is no need to install SL into different folders just for the sake of running multiple instances with different configurations.
To make changes in the "Setup"-window effective, click the "Apply!"-button. Clicking the "Close"-button without "Apply" will close this control window without using the new settings.
After making changes to the settings, you can define them as a new entry in the "Quick Settings" menu. See user defined menus for details.
Location of SL's "machine configuration" file
As explained in the previous chapters, Spectrum Lab loads the 'machine dependent'
part of the configuration for the first running instance from
MCONFIG.INI, the second running instance from MCONFIG2.INI, and so on.
Unless the directory path to those files have been specified on the command
line, the program will look for those files in its own directory (where also the
executable file is located; a concept formerly known as 'current working directory').
The development of Spectrum Lab started in the days of DOS (the old ones will remember),
long before Microsoft changed the rules (for windows) and introduced
ever-changing places where they think program data, program configurations,
user data, user "documents" (what the heck is that), user configurations, etc should
be stored - some of that in INI files, later in the Windows registry, or in funny
places like c:\Users\Blabla\Documents, c:\Users\Blabla\AppData\..., etc etc.
In Spectrum Lab, the full directory path for MCONFIG[2/3/4/..].INI is displayed
in the main menu via 'Help'(!) .. 'About', along with the full path of the
executable file. Example:
Exec: C:\SpecLab\SpecLab.exe (that's the full path of the executable)
Data: C:\SpecLab (amongst others, that's the directory with MCONFIG.INI))
The 'Data' path is also the root for relative file paths shown on the
Filenames and Directories tab in the Configuration window.
See also:
Program Start with Command Line Arguments,
Creating shortcuts for different configurations,
Main index,
Sample applications (configurations).
back to top
Last modified : 2024-09-16
Benötigen Sie eine deutsche Übersetzung ? Vielleicht hilft dieser Übersetzer (Google Translate) !
Avez-vous besoin d'une traduction en français ? Peut-être que ce traducteur vous aidera !