Main window: Standard and Floating

About  Visual Analyser (VA) and its author
(skip this section if you are interested only in the description of the main window and related functions)

VA is a real time program which simulates a set of electronic instruments, such as:

•	 Oscilloscope (dual channel, xy, time division, trigger);
•	 Spectrum Analyser with amplitude and phase display (linear, log, lines, bar, octaves band analysis 1/3, 1/6, 1/9)  ; 
•	 Wave-form generator with "custom functions", triangular, square, sinus, white noise and pulse generation (NO ALIASING);
•	 Frequency meter (in time and frequency domain) and counter;
•	 Volt meter with rms and peak to peak display;
•	 Filtering (low pass, hi pass, band pass, band reject, notch, "diode", DC removal);
•	 Memo windows for analysis and file saving of time and spectrum displays;
•	 A true software digital - analog conversion (for complete signal reconstruction);
•	..and more

  I love electronics, and I have been working for years in commercial companies as software/firmware engineer and software designer.  I've been writing programs for embedded systems (with DSP and MICROCONTROLLERS), for PC, for avionic computers and even for mainframes, using C, C++, Pascal, Ada and assembly.   I write VA during my free time just for fun.  The program is completely FREE.

  Many people do not have the money to buy an expensive Oscilloscope or a Spectrum Analyser.  Or simply they do not want to invest money for something they will use rarely. Nevertheless they love to build and test audio amplifiers or other kinds of simple circuits, and are only interested in the range of audio frequencies. So, a good soundcard could be all the hardware they need. A newer soundcard with a sampling frequency of 96 or even 192 Khz will allows to manage frequencies up to almost 100 Khz ( well beyond the audio frequencies)  transforming VA in a powerful set of instruments for general electronics. Latest versions of VA are able to manage also the 24 bit soundcard capabilities; if you are using a 16 bit soundcard, you'll be able the same  to select the 24 bit modalities; in that case the resolution will be 16 bit shifted to the left of 8 bits (i.e. is the same to multiply the sample value for 256).

  The idea of using the soundcard of a PC is not a new one (there are many of programs like VA) but I tried to write a program made for the analysis of audio circuits for the electronics hobbyist.  I think VA is probably less "extravagant" than other (i.e. less windows and frills) but full of substance and even a lot of original idea.

Introduction

There are two ways of using VA. The "Standard" and "Floating" mode. The first time you run VA, after installation, it will run in "standard" mode. The VA.INI file does not exist yet (see warning at the end of this file), and so VA runs with  default settings  (i.e. in  standard mode). If VA.INI is not present in the execution directory it will be automatically created.

Standard mode 
Standard mode means that VA is full-contained in a big main window of fixed minimum dimension of 790x637 pixel and freely sizeable over this minimum dimension. The main window contain the scope & spectrum windows plus a subset of the commands you can find  in settings window.  Other commands and options are contained only in settings window, because less frequently used, although very powerful (example: the calibration function). The other windows (i.e. the frequency meter or the volt meter) are separate from the main window and in some case freely resizeable. This separate windows will be visible only if the appropriate checkbox has been checked  or the corrispondent button (just under the caption of VA) pressed.  

Floating mode 
Floating mode means that the main windows is reduced  to a sort of command bar with a series of button, a "led" and a combobox for the selection of the input source (enabled only if  the checkbox "apply calibration" in Setting/Calibrate has not been  checked). In floating mode you can freely select the windows of your interest, in this way you can personalize VA according your needs.  In floating mode all the windows are  all freely sizeable (except the wave generator window and the setting window itself) and completely separate from the main window/command bar. In other words, if you, for example,  need only a scope, simply press the button "scope", then resize the windows (full screen if you want...) and VA will be only a scope. Due to the automatic configuration saving, each time you run VA you'll find exacltly the last configuration (see warning below). The scope and spectrum windows are provided of a "command bar"  which contains some "shortcut" to the commands most frequently used (autoscale, average, logx/y etc.).

WARNING:
The configuration of VA is automatically saved in a files named VA.INI, saved in the execution directory of VA (normally c:\programs\VA); this means that when you start VA, you'll find exactly the same configuration you left the last time at the end of the program. "Configuration" means the postion and dimension of all the windows (except for settings window) and all the choice you made (ex. square wave in wave generator, A + B channels in spectrum/scope , trigger ON for left channel etc.). If you need to return at the default configuration you have two choice: (1) delete VA.INI (2) press the "default" button in Settings windows. If you need to save a particular configuration (to use  at a later time for a particular purpose: for example determining the frequency response of your HiFi amplifier), you can save the configuration in a different INI file pressing the button "save as" in Settings window and then defining a new name for the current INI file. To open this configuration file at a later time you should press  the  "Open config" button in Settings window and then select the desired INI file. Be careful that at the end of the program the new configuration will be saved in the current INI file, that is, the INI file indicated in the caption of VA or in the "info" windows.

The main window

The main window (standard mode) contains:

•	Oscilloscope
•	Spectrum Analyser
•	Main commands

The upper border of the main window contains the buttons (both in standard and floating mode):

•	On
•	Off
•	Setting
•	Scope
•	Spectrum
•	Phase
•	Wave
•	Freq. meter
•	Filters
•	Floating Windows mode
•	Help

and the listbox for the selection of the input source. This listbox is directly related to the selected soundboard, when you select an input is exactly the same of selecting the input source by means of the Windows Volume control. You can invoke the original windows volume control opening the "Setting" window (click Settings button) and selecting the "calibrate" option. Then you need to press the "Windows volume" button.  Warning: for some PC configuration with old or not properly installed sounboard the input listbox may appear disabled. Use original windows volume control or install the updated driver for your soundcard.

Let now examine the function selected with the above buttons.

The ON buttons allows to start  VA. VA is a real time program, it reads the samples directly form the selected soundboard by means of API calls. There are mainly three task. One read the samples from a buffer of selected dimension (a power of two, typical 4096 points)  and store it in an internal  dynamic buffer. After a read it will be suspended waiting for a new buffer. You can select the dimension of the buffer selecting it in the "settings" window  (see next sections). The more points you select the more resolution you get but conversely VA need more time to compute the Spectrum. 

 The second task get the dynamic buffer and compute the Spectrum by means of the well-known alghorithm FFT (fast fourier transform), and then plot it on the screen in the spectrum window together with the scope window.

 The third task is completely dedicated to the user interface (buttons, listbox, etc.)

The OFF button is the opposite of the On button. Normally you can even change the settings of VA while it is running. The settings you can't modify during run will be disabled or may cause a temporary stop of VA (automatically)

The Setting button allows to invoke the settings window. This window allows to issue all the commands to VA plus the settings for the Soundcard and colors. You can use it for example when you're using VA in "floating mode"; in fact, the most common commands are directly available in the floating windows itself, but not all. So, if you need you can invoke the settings window, and put it in a preferred position on the screen using it as a command-center. See help on setting window for further details (open the settings window and click the help button in the page you want help about).

The Scope button allows to invoke the floating scope window, allowing you to use the scope function. You can freely resize it up to the maximum screen resolution, using VA as it were only a scope. Or you can use it together with other windows (for example the frequency meter window or the spectrum window). A useful sub menu will appear in the scope window by clicking the right mouse button.  The Scope button will appear disabled if the Standard mode is selected. See scope window help for further details about the scope window (open scope window, right mouse click and select the help item).

The Spectrum button allows to invoke the floating spectrum windows; this button will be disabled when the standard mode is selected. The spectrum window, as the scope window, allows you to freely resize the dimension up to the maximum screen resolution; also for this window a quick menù will be available by clicking the right mouse button; in that menu you can select the help button for further details about the floating spectrum window.

The Phase button, allows to invoke the phase window. This is a window not normally displayed during the standard mode use of VA, i.e. not directly visible in the main window of VA. This window allows to visualize the phase of the signal(s) currently visualized in the spectrum and scope window. The phase will be normally visualized in degree, and you may want visualize it together with the spectrum window. The X scale is the same of the X scale for spectrum window, allowing you to tile the two windows for visualizing a complete "bode diagram". Also this window is freely resizeable, allowing you to resize up to the maximum screen resolution. A quick menu is available by right clicking the mouse, with an help item to get further details about the phase window itself. NOTE: this window is intended to be still a beta version. No valid feedback for now... 

The Wave button allows to invoke the wave generator window; this is one of the most powerful function of VA. It cannot be freely resized, and can be closed while running without affecting the selected function ; the "on" button can be invoked directly from the main window, for simplicity of use. That is, you can invoke the wave window, select the function of interest, then close the wave window and subsequently start/stop the wave generation from the main window (by clicking  the on button between the "capture scope" button and the "wave gen" checkbox). This will not be possible if you are in floating windows mode, altought you can still close the window without stopping the function generation (if on selected). See the help included in the window itself for further details.

The Freq. Meter button allows to invoke the frequency meter window. This is a window not normally displayed during the standard mode use of VA, i.e. not directly visible in the main window of VA. This window allows to detect the frequency of the harmonic with the maximun amplitude in the whole spectrum of the input signal, as a true frequency meter. This window starts  a new dedicated thread; the red flashing indicator in the upper left corner of the window indicate  the moment  in which frequency meter is reading data from the spectrum; the frequency will be computed between two red flashing. Click the help button in frequency meter window for further details about the frequency meter.

The Filter button allows to invoke the settings window, opening directly the subsection "filters". See help on settings window for further details. 

The Floating windows mode / Standard mode button allows to switch between the two modalities "floating" and "standard". Normally, the default mode for VA is "standard mode", that is, the button will indicate "Floating windows mode"; conversely, after the switch in floating windows mode the button will indicate "Standard mode".

The Help button will invoke this text

The last control on the main command bar is a listbox with a complete list retrieved by the mixer of the selected input device. In other words, you can select the desided input line of the selected soundcard. To modify the input sensivity, open setting/calibrate and use the trackbar.