Spectrum Lab Installation and Program Start

Contents of this chapter / file 'startins.htm'

  1. System Requirements
  2. Installation and directory structure
  3. Setting up the soundcard
  4. Quickstart for QRSS (very slow Morse code viewer)
  5. Program start with command line arguments
  6. Configuration data files
  7. Running multiple instances of the program
  8. Creating shortcuts for different configurations

Special topics ('after installation') :

  1. Running SL 'as administrator', if certain functions don't work properly
  2. How to avoid the audio bypass from 'Line-In' to 'Line-Out' in the soundcard
  3. Selecting higher sampling rates under Windows 7 (separate file)
  4. How to install and run Spectrum Lab under Linux / Wine
  5. How to use SL with software-defined radios like SDR-IQ or PERSEUS

See also: Spectrum Lab's main index


System Requirements

You will need the following to use "SpecLab":

- a PC with Win95, Win98, WinME, Win2k, WinXP, Windows 7, 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


Installation and directory structure

To install the program on your PC, follow the instructions of the installation program. If the program requires special DLLs, they will be installed automatically. 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 was once C:\Spectrum, but in the days of windows Vista and Windows 7 this may have been changed - the installer will suggest to place the program somewhere in the 'Programs' directory, whereever that may be on your machine. If not absolutely necessary, don't change this because some of the example settings contain absolute path names. Some subdirectories will also be created by the installer:

..\Data\
default directory for data files, like logged data files from long-term observations etc.
Because Spectrum Lab must have write-access permission for this directoy, the installer may have to place it somewhere else (very annoying, but that's what windows Vista wants..).
To simplify the task of 'finding' this (and other) writeable directories, the installer will write a short text file which contains the DIRECTORY PATHS to all 'writeable' directories ... thanks Microsoft for changing this over and over ... the ugly details are here ("data folders").
..\Export\
contains some export file definitions and example user settings. Beginning with Windows Vista and Windows 7, the directory path for this folder also had to be moved somewhere else (because any folder under 'Programs' doesn't have write permission by default) - more details here ("data folders").
..\Goodies\
contains additional information and special files. More info in a readme-file in the subdirectory.
..\Html\
contains the online help system.

After successful installation, you may optimize some parameters for your requirements. You should (but you don't have to).....

back to top


Setting up the soundcard (or other input devices)

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.

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 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


Unintended audio bypass between the soundcard's Line-In and -Output

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:


Notes on various soundcards

(just a loose compilation of feedback from other Spectrum Lab users)


Quickstart for QRSS (very slow Morse code viewer)

... has been moved to a separate file (qrss_quickstart.htm) ...


Running SL 'as administrator', if certain functions don't work properly


Under Windows 7, certain functions didn't seem to work properly when running SL without administrator privileges. The following list is most likely incomplete:

Functions which did not work properly without admin privileges, and required 'Run as Administrator' : Here's how to run SL as administrator (by modifying its desktop icon under Windows 7 - thanks Rob ! ):
  1. Right click desktop shortcut icon
  2. Select properties
  3. Click 'Advanced' button
  4. tick box for Run as Administrator
  5. Close up
  6. Click apply
  7. Close up
This will set Spectrum Lab with administrator permission until the checkbox is unticked again if you so wish.


Program Start with Command Line Arguments

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.

If you want to have multiple instances of the program running at the time using different configurations, can tell the program which configuration file shall be used instead of the default "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 next chapter.
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).

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 ,   back to top


Overwiev of command line parameters

m= sets the name of the machine configuration file

u= sets the name of the user configuration file

t= sets a new title for the main windows

/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:\cbproj\SpecLab\SpecLab.exe
19:38:45.9 Compiled  : Oct 15 2012
19:38:45.9 Data Files: c:\cbproj\SpecLab
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


Running multiple instances of the program

If is possible to have more than one instance of Spectrum Lab running at the same time on a single PC (if it's fast enough). Please don't try to let more than two instances run on one computer at the same time, unless you have a really powerful CPU (i never tried it on my 266MHz-P2). Because a single soundcard can only be opened by a single user, the second instance of Spectrum Lab will not be able to open the same audio device as the first. 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 "[2]" in the window title also appears on some of the second instance's child windows.

Programmer's Information:
The detection of other instances uses mutexes. The first instance creates a mutex called "SpecLab1", the second a mutex "SpecLab2". This is also a  way to detect the presence of Spectrum Lab for other programs.
To bypass the instance-detection (which may be necessary in very rare cases), use the /inst=N command line option (N=1...6) .

back to top


Creating shortcuts for different configurations

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 will be different on your machine !):

C:\Programs\SpecLab\SpecLab.exe "m=Machine1.ini" "u=BandView.ini" "t=My Title"

back to top 


Configuration data files

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 


See also: Spectrum Lab's main index