Test your Ears:   VB-software


This document describes the software architecture for the TestYourEars PC-program. 

The program is written in Microsoft Visual Basic Version 6, and uses only Forms and Modules.

Module / Form name Function
TyE_ModMain.BASStartup routines work in close co-operation with the System Form. 
TyE_Frm_System.FRM Initialisations. System settings.
Language selection
, Job selection.
TyE_FrmAttenuatorPanel.FRM Communication with the Attenuator Unit.
Other modules communicate by setting / inspecting global variables.
This form normally does not show. It can be used for diagnostics of the hardware / firmware of the Attenuator Unit.
TyE_FrmDirSelection.FRM Lets the user select a directory path.
TyE_FrmTestComPort.FRM Tests the existence of a serial com-port. Never shows.
Keep in mind that USB serial ports only exist when the USB device is connected
TyE_FrmLogDisplay.FRM Graphic display with 3-decade logarithmic frequency axis and lineair vertical scale. 
Used for the test of the Hearing Threshold.
TyE_FrmThreshold.FRM Performs the tests for the Hearing Threshold.
TyE_FrmAbxTest.FRM Performs an A-B-X test between 2 arbitrary sound files.
TyE_ModIniFile.BAS Read/write Init-file, Logfile, Calibration file. Contains declarations for the variables that are to be saved in the Ini-file.
TyE_ModGlobals.BAS Variables and types that need to be global.
TyE_ModMath.BAS Some Math functions.
TyE_ModLanguage.BAS Reads the selected language file.
Can be queried for textual messages in the selected language.
TyE_ModLogging.BASPerforms the logging operations.
TyE_ModWaves.BAS Routines to generate sound files in .WAV format.
TyE_Init.TXT
Initialisation file. Will be written on program exit. Most settings will be retained for the next use of the program.
TyE_Standard Threshold.TXT Data for the standard Human Hearing Threshold.
File format: Per line comma separated: Frequency, value in dB.
xxx.calHeadphones Calibration File.  xxx may be any name.
File format: Per line comma separated: Frequency, value in dB
TyE_Lang_Eng.LNG Language file English (USA-UK)
TyE_Lang_NL.LNG Language file Dutch (Netherlands)
Test.WAV Temporary sound file for the Hearing Threshold test. Will be removed on program exit.
TestYourEars.EXE The executable file.
02.icoThe icon used on the forms.
jjjj-mm-dd-hh-mm-ss.LOGLogfiles as generated by the  program when logging is on. The name represents the system date and time on which the program was started.
jjjj-mm-dd-hh-mm-ss.TXTTest results if they are written to disk. The name represents the system date and time on which the file was saved.
jjjj-mm-dd-hh-mm-ss.BMPGraphical result of a Hearing Threshold test. The name represents the system date and time on which the file was saved.
TestYourEars.VBPThe Visual Basic Project File, describing the components in the project. Click on this file to start working on the code.
Note that you may need to add some controls to the Development Environment wich are not standard there. These are:
Microsoft Comm Control 6.0,  Microsoft Common Dialog Control 6.0 (SP6) and Microsoft Multimedia Control 6.0.
Click Project and than Components. Check these items in the list and click Apply.
TestYourEars.VBWA Visual Basic Project File, keeping track where the component windows were on your screen.
#DelLogs.batDeletes all logfiles from the current directory.

Some coding conventions I tried to use.