Spectrum Lab Installation and Program Start
Contents
Special topics:
See also: Spectrum Lab's main index
You will need the following to use "SpecLab":
- a PC with Win95, Win98, WinME, Win2k, WinXP, 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)
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 is C:\Spectrum . If not absolutely necessary, don't change this because some of the example settings contain absolute path names. Don't install the program in the crazy windoze 'Programs' directory. Some subdirectories will also be created:
After successful installation, you may optimize some parameters for your requirements. You should (but you don't have to).....
By default, Spectrum Lab uses the windows multimedia system for audio input and -output. Details on setting up the soundcard properly are here (in a separate file).
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 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).
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:
In May 2004 the author played with his new Soundblaster 2 ZS (by Creative Labs), because this card really supports analog sampling at 96 kHz (unlike some previous cards... but that's another story). Some first impressions...
Unlike many other soundcards, there is no extra mute-control for the "Line-In" input for the speaker outputs (which they call "Quelle" in german). Even the good old SoundVol32.exe (part of windows) does NOT show a "Line-In" volume slider or select/mute control, but only an "Analog Mix" control. To make a long story shorter, I tried a lot with SoundVol32.exe and CL's "Surround Mixer" (SurMixer.exe) but always had this annoying bypass. Some web research revealed this solution, found in a newsgroup on the Creative Labs website when searching for "Audigy Line-In recording with Wave playback".
The question was:
> I have only Mic/Analog Mixer selector in Windows2000 record selector
panel.
> Moreover, I can only record signal from LineIn only if I also select
LineIn in Playback mixer.
> Does Audigy really has such kind of limitation?
An answer from "Sicabol":
> [...]
> You have to create a new EAX effect. Open the EAX Control Panel (in
AudioHQ),
> click the Source tab. You will see a listbox with all the different
sources which are playing now...
> Desactivate the sources you don't want to play by setting 0% to
their original sound.
> I advise you to save your new setting.
> If you want to have the default settings back (after your recording),
> click "Reinitialisate the mixer" in the Creative taskbar.
> [...]
This answer was also very helpful for my application. But still, with the utilities from Creative it's complicated enough (I wonder if it's so unusual to let only the output from the D/A converter go to the output and nothing else ? .. anyway). You need the "EAX Console", which is only on the CDROM which comes with the Audigy (not just the drivers). Here is the step-by-step procedure, which I used on a German PC:
Gone through all this ? Start SpecLab again, feed a signal into the Audigy's line-input. From SpecLab's main menu, select "Option"..."Volume control for RECORD". This opens the standard volume control program (which belongs to windows, not SpecLab, and not Creative Labs). Only the "Analog Mix" must be active as recording source. Because of the "EAX Effect" configured above, the "Analog Mix" is only the analog input (line-in) but no other fancy stuff. You should now see the spectrum of the input signal in the waterfall and/or spectrum graph, but not hear that signal (which you feed to the line-input) in the speakers. Next, connect the test signal generator to the output (in SL's "Components"-window), and turn the generator on to produce an audible sine wave. You should hear only the tone from the test signal generator in the speakers or headphones, but not see it in the spectrum display ! (otherwise, you still have that unwanted internal connection between A/D- and D/A-converter, which drove me nuts for several hours..). If you don't hear the test tone in the output, select "Options" in SL's main menu, and "Volume control for PLAY". Make sure the output to "Wave" is enabled (not muted), but that is usually the case by default.
(just a loose compilation of feedback from other Spectrum Lab users)
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
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.
/nomenu : hides the main menu (and the window borders) after launching the program. To restore the main menu, press ESCAPE.
/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") :
21:22:27.5 checking instance... 21:22:27.5 init application... 21:22:27.5 creating main form... 21:22:27.5 Constructing main form 21:22:27.5 initialising ASIO wrapper 21:22:27.5 initialising SDR-14 / SDR-IQ control 21:22:27.5 creating CSound object (... a lot of messages removed here ...) 21:23:09.2 Closing I/O-port driver 21:23:09.2 Destroying COMM window 21:23:09.2 FormClose done (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. Maybe I can fix it...
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.
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"
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: