Contents of this chapter / file 'startins.htm'
Special topics ('after installation') :
See also: Spectrum Lab's main index
You will need the following to use "SpecLab":
- a PC with Win95, Win98, WinME, Win2k, WinXP, Windows 7 / 8, or Linux+Wine
- a soundcard with an audio input resolution of 16 bits
- a color graphics mode with at least 800*600 pixels with 256 colors
(a graphics mode with higher resolution and "true color" is preferred, and even required under WinXP and any later version of Windows)
back to top
To install the program on your PC, follow the instructions of the installation program. An uninstaller will be configured too, so you can remove this software easily if you don't need it any longer.
The default directory for the installation is C:\Spectrum.
It is recommended not to install SL in the Windows 'Programs'
folder (whatever that 'Programs' folder may be) because you will run into all kinds
of trouble with windows "Vista", Windows 7 / 8, and whatever comes next because
programs installed in the Windows 'Programs' folder often don't have write permission
for the files located there (including subdirectories).
Some subdirectories will also be created by the installer:
After "installation", you may optimize some parameters for your requirements. You should (but you don't have to).....
back to top
By default, Spectrum Lab uses the windows multimedia system for audio input and -output. Details on setting up the soundcard properly are here (separate file; link doesn't work in the PDF).
If your soundcard (or similar audio device) supports ASIO, look here because ASIO works better with some cards (especially at sampling rates above 48 kHz and resolutions above 16 bit).
To use SL with SDR-IQ or SDR-14 (by RFSPACE), install SpectraVue too. This will install the necessary USB drivers (by FTDI) which are not included in SL. Alternatively (when available for your radio and OS), you could use a Winrad-compatible ExtIO-DLL as interface (applies to many other radios, too).
To use SL with PERSEUS (by Microtelecom s.r.l), install the Perseus software, and the WinUSB drivers for your particular OS. More details here .
To use SL with SDRplay's RSP (Radio Spectrum Processor, for 100 kHz .. 2 GHz), download and install their ExtIO-compatible interface from the Plugins page. Then (as for other SDRs), select the DLL as input device in Spectrum Lab as described here.
To process samples from your own A/D converter, consider using the file-based audio input, or send the audio stream towards SpecLab via UDP or TCP/IP (UDP is best suited for simple microcontrollers with Ethernet interface).
back to top
For real-time signal processing with SpecLab's internal DSP functions, an analog audio signal must get into the PC somehow, and to make to processed signal audible it must get out of the PC so we can listen to it with headphones or external speakers. This should be no big problem nowadays, because modern cards support "full duplex" operation, which means their analog-to-digital converter (ADC) and digital-to-analog converter (DAC) can run simultaneously. So we can use the DAC to produce test signals, and the ADC to analyze a different signal at the same time. Or we can use the ADC to digitize a signal, run it through some digital processing algorithm, and convert it back into an analog signal in real-time.
Sounds easy, because our brand-new soundcard has two audio jacks for this purpose, labelled "Line-In" and "Line-Out". So what's the point ?
Often things are not that easy. There are a lot of different signal paths inside a soundcard, different sources and destinations, and very different (and incompatible) ways to connect all these. The default settings of many cards are not suitable for us, because they feed the signal which enters the card through the "Line-In" port directly to the "Line-Out" port, for whatever reason. This is not very helpful here, because we only want the PROCESSED signal to appear at the "Line-Out" port. We also do not want the signal at "Line-Out" to be fed back into the analog-to-digital converter, because this may cause heavy feedback or heavy oscillation (making the stereo speakers jump through the living room !). Too bad ! Both situations must be avoided. In other words:
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. The standard audio volume control program (SoundVol32.exe) is often all we have. If can be launched from SpecLab's Options menu, to show the settings for "recording" (analog-to-digital conversion) and "replay" (digital-to-analog conversion). Just a few points to be aware of:
On a heavily loaded system (soundcard running at circa 192 kSamples/second, GPS-stabilized sample rate,
GPS-based resampling to exactly 192.00000 kS/sec, etc), the following strange symptom happened,
which may be a showcase how to avoid such problems.
While SL was running, causing almost 90 % CPU usage, the 'ADC' function block (in SL's circuit window) occasionally turned yellow and green again when rapidly scrolling a large HTML document in Firefox !
The reason was a sporadic overflow of the soundcard input buffers, which in turn was caused by SL not being able to drain those buffers fast enough (in the real-time audio processing thread). The problem could be fixed as follows:
Windows 7 (and possibly any later version) has the bad habit to 'hide' installed audio hardware
when nothing is plugged into the devices' audio jack.
Even when properly installed, such devices do not appear in SL's audio device list (under Windows 7, etc). A solution was found in the internet by searching for 'disable windows sound card jack sensing'.
Found in various forums on the subjects :
(just a loose compilation of feedback from other Spectrum Lab users)
(Screenshot of the 'Microphone Properties' panel on a netbook with 'german' windows 7.
Surprise surprise .. the X61s' onboard audio device really supports 192 kHz sampling ! )
... has been moved to a separate file (qrss_quickstart.htm) ...
For special purposes, you can pass a command line to the program when starting it. This is required only if you...
An overview of parameters which can be set through the command line is here.
If you only have a single soundcard on your system, or only need a single configuration, don't read any further on this page. It may be getting complicated.
The general syntax to start Spectrum Lab with command line arguments is like this:
SpecLab.exe <Machine-Config> <User-Config> [ <"Main Window Title"> ]
There are also some command line switches (options) which will be explained later.
Without using command line arguments, all parameters are saved in an old style INI-file named "SETTINGS.INI" in the current directory of the spectrum analyzer.
Usually, in this file both machine- and user-dependent data are saved.
To have multiple instances of the program running at the same time, using different configurations, you can tell the program which configuration file shall be used (instead of the default filename "SETTINGS.INI"). If you don't specify the name of the configuration file in the command line, the program uses "SETTINGS.INI" for the first running instance, "SETTING2.INI" for the second and "SETTING3.INI" for any further instance.
This can be achieved by passing one or more arguments to Spectrum Lab during program start. The first character in each argument must be a lower case letter defining the type of the argument, followed by a '='-character and the assigned value (e.g. a filename). Example:
SpecLab.exe m=Machine1.ini u=BandView.ini "t=Full Range Band View"
This will force Spectrum Lab to load the machine configuration data from "Machine1.ini" and the user configuration data from "BandView.ini". The main window will have the title "Full Range Band View".
A more-or-less complete overview of command line parameters is in the
Command line parameters prefixed with a slash, which are not listed below, will be passed on to Spectrum Lab's internal command interpreter (see the "capture"-example below).
Using a <key>=<value> syntax explained further below,
Spectrum Lab can be instructed to use a different window title, load a certain configuration, etc.
For special purposes, a few more command line options were implemented . There are:
Some special examples:
See also: Communication with external programs,
Audio Clients and Servers,
Using a system with more than one audio device,
Overwiev of command line parameters,
Running multiple instances (with different configurations),
Creating shortcuts for different configurations,
back to top
m= sets the name of the machine configuration file
u= sets the name of the user configuration file
t= sets a new title for Spectrum Lab's main window only
T= sets a new title for the main window
and the text in the windows task bar.
Example (see screenshot on the right):
SpecLab.exe "T=VLF Spectrogram"
The following command line switches are prefixed with a slash character (or backslash). Most of them do not use a <key>=<value> syntax:
/si : option (switch) to send the rest of the command line to the first running instance. Explained here in detail.
/q : quit option. Instructs the program to terminate itself when "finished", usually with playing a wave file etc.
/w : wait option. Waits for file analysis, before the rest of the command line is executed. Details here .
/nomenu : hides the main menu (and the window borders) after launching the program. To restore the main menu, press ESCAPE.
/inst=N : overrides the instance-detection, and instructs the program to run as the N-th instance (N=1 to 6) .
/noasio : Do not use ASIO drivers (only standard multimedia drivers).
Implemented 2011-08-09 when the program seemed to crash while trying to enumerate the available ASIO drivers.
/debug : For debugging purposes, specifiy the option
/debug on the command line when launching
Spectrum Lab. The program will write a file named "debug_run_log.txt" into
the current directory, which may help me tracing bugs (answering
questions like "how far did it get" - "where did it crash" - "why did it
load so slow" - etc ).
This proved to be a very helpful debugging aid, when the program crashed on certain machines, using a certain windows version, a certain soundcard, etc. The contents of this debug log may look like this (just an example, when the program terminated "normally") :
19:38:45.9 Logfile created, date 2012-10-15 19:38:45.9 checking instance... 19:38:45.9 Executable: c:\Spectrum\SpecLab.exe 19:38:45.9 Compiled : Oct 15 2012 19:38:45.9 Data Files: c:\Spectrum 19:38:45.9 init application... ... (many lines removed here) ... 19:38:55.7 Beginning to close .... ... (many lines removed here as well) ... 19:38:59.4 Deleting SPECTRUM objects 19:38:59.4 Deleting other buffers 19:38:59.4 FormClose done 19:38:59.4 Ok, all 85 dynamic memory blocks were freed. 19:38:59.4 Reached last termination step; closing logfile. (this message indicates that the program closed "as it should")
If you find any messages like "Serious Bug", "Fatal Error", "Allocation Error",
"Application Error" etc in that list, please let me know.
More details about running Spectrum Lab in 'debug' mode, and how/where to report bugs, is in the 'Troubleshooting' notes.
back to top
If is possible to have more than one instance of Spectrum Lab running at
the same time on a single PC. The number of instances depends on the CPU speed
and amount of installed RAM.
In the "old days", a single soundcard could only be opened by a single program, but these days (unless you need to use an ASIO driver) a single soundcard can be used by multiple programs, preferrably all using the same sampling rate. See "Using a system with more than one audio device" in the description of the configuration dialog.
If two instances of Spectrum Lab run side-by-side on the same PC, the program ensures that different configuration files are used as described above.(at least for the first and second started instance). This allows you to start two instances with the same shortcut icon on the desktop. Even different window positions and sizes are saved in the configuration files. During program start, Spectrum Lab checks if it "already runs" in another instance. If so, the title of the 2nd instance's main window will display something like this to avoid confusion:
The "" in the window title also appears on some of the second instance's child windows.
back to top
You can create a shortcut ICON with command line arguments / parameters. Right-Click on an empty space of the desktop, then select "New..Shortcut (?? on a german PC: "Verknüpfung"), then find your way to the directory where SpecLab is installed, and append the command line parameters (using hyphens). The complete string should look like this (just an example, the path may be different on your machine !):
C:\Spectrum\SpecLab.exe "m=Machine1.ini" "u=BandView.ini" "t=My Title"
back to top
A lot(!) of configuration parameters are saved between to SpecLab sessions in old-fashioned INI files (not in the registry ! ). One contains only machine-specific data (and should not be copied from one PC to another), the other only stores application-specific data (and can safely be copied from one PC to another, to run the program with the same settings there).
The machine configuration data contain:
The user configuration data contain:
back to top