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, 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. 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:
After successful 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.
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
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:
(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.
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
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
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
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 "" 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 will be different on your machine !):
C:\Programs\SpecLab\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