Liberty Instruments, Inc.

LAUD/IMP "Compact" or "Full" data formats

The following technical information is supplied in response to requests from a number of programming-oriented users who wish to read or write IMP's or LAUD's native file formats. You don't need to understand or use this document for LAUD work!

This information is supplied "as is", and no guarantees are made about its utility. Any prospective user is warned that LAUD or IMP are not likely to react nicely to data which is improperly changed and then read back in! Both LAUD and IMP assume that the data they read in is correctly formatted; that it contains only acceptable and non-impossible values, and that it is in the form which LAUD or IMP normally write out.

LAUD's file formats, for saving and retrieving data back into LAUD, use floating point values expressed using the Borland Pascal real type floating point format (the saved file is a "file of real", with all other types included within the data (Integers, Words, Booleans, and Text strings) converted or cast into real types. Obviously, this is most easily handled if you are working in Turbo Pascal or Borland Pascal. But otherwise, the following information may allow you to work from other languages:

Each real value is stored in 6 bytes (48 bits), giving a numerical equivalent value between 2.9E-39 to 1.7E+38. As detailed by Borland, the real number value corresponding to these 48 bits can be detailed as shown below:

Call the first (most significant) bit: "s" (the sign bit).
Call the next 39 bits: "f" (the positive floating fractional value, formed in binary; f<1)
Call the last 8 bits: "e" (the exponent, a one byte positive whole number)

Then the value, v, for the real number is

if 0<e<=255, then v = (-1)^s * 2^(e-129) * (1+f)
if e=0, then v = 0

Whole number values are stored using the floating point equivalent -- you should round them after reading.

TIME DOMAIN: .IM2 Files

The first value is the SIZE of the data (256, 512, 1024, etc). Powers of 2 only, and limited to 4096 for IMP and 16384 for LAUD.
The second value is the sample number of the last actually measured value (it might be different from the SIZE, if the time domain data was derived via an IFFT). Other values are "padded" values (usually duplicates of the last measured value)
The third value is the sample number of the first marker (Mkr1).
The next value is the sample number of the second marker (Mkr2).
Next is the data sample rate in samples per second. Some values may not be compatible with some programs or versions!
The next value is to be truncated to its integer part: the result is 0 if the data is "cal’d" (i.e., if it is derived from IFFTing a cal’d frequency response curve). Otherwise it will be 1.
The next SIZE points are the data sample values. BE SURE THAT THE COUNT OF THESE IS CORRECT
The remaining values contain the title, data of acquisition, and some display parameters which are used internally in LAUD, and will not be described here.
They can be neglected in reading into other programs, and are best left unchanged if the file will be read back into LAUD or IMP.

Frequency Response: .FR2

The values are stored in the following order:
1) the dB/division scale factor
2) position of frequency response marker 1 (an index number, i.e., "5" would be the fifth frequency in the covered values)
3) position of frequency response marker 2 (index number)
4) The dB gain factor (vertical offset for display)
5) a factor used to denote smoothing to be used in display
6) For FFT format data, the effective last valid time data point.. For LAUD SINE format data, the lowest valid frequency (only used in gated sine collections).
7) time delay in milliseconds, for display (as set by F9)
8) an integer (0 thru 6) indicating type of windowing used
9) a time offset value used if data is to be converted back to time domain (to set markers)
10) lower frequency limit of plot grid
11) upper frequency limit of plot grid
12) For FFT format data, sample size of the originating FFT (a power of 2: 256, 512, 1024.... -- there will be about half this number of frequencies covered in the frequency response data!). For SINE format data, the number of frequency points.
13) if >1, the sample rate of the originating time domain data; <1 indicates
data is "SINE" (not FFT) format with arbitrary frequency data points
14) 1 if data is cal’d, otherwise 0.
15) the data point values. The quantities of these must be exactly correct!
For FFT format:
Each data point consists of two real values which make up a complex number: a "real" part followed by an "imaginary" part. The number of such pairs is ((sample size)/2) + 1. {The sample size which was given as value #12}. If you need the dB value and angle, you need to find 20*log10[magnitude] and arctangent[imaginary/real] of the given values. The magnitude = sqrt(real^2+imaginary^2). There may be a scale factor used by LAUD or IMP before display, also.
For SINE format: the SIZE+1 {see #12} data points each involve three real values: first the frequency, then the magnitude value (linear value, not dB), then the angle in degrees.
16) The values after this make up the title for the data and some indicators of the data’s source (such as microphone, probe, date acquired, etc.), etc., or parameters for internal program use, which will not be discussed here and which should best be left unchanged.

Complex Impedance: .ZF2

The values are stored in the following order:
1) the Ohms/division scale factor
2) position of impedance marker 1 (an index number, i.e., "5" would be the fifth frequency in the covered values)
3) position of impedance marker 2 (index number)
4) The value for driver effective diameter (in inches), when used in a Thiele Small parameter extraction.
5) Added mass, in grams, for T/S Vas parameter extraction.
6) (T/S extraction) A value <1 indicates the box method is used for Vas; else the added-mass method.
7) (T/S) for forced (separately measured) value for DC resistance of voice coil.
8) (T/S) Box volume in ft^3, for box method Vas determination
9) lower frequency limit of plot grid
10) upper frequency limit of plot grid
11) For FFT format data, sample size of the originating FFT (a power of 2: 256, 512, 1024.... -- there will be about half this number of frequencies covered in the frequency response data!). For SINE format data, the number of frequency points.
12) if >1, the sample rate of the originating time domain data; <1 indicates
data is "SINE" (not FFT) format with arbitrary frequency data points
13) Value of the test resistor value used to make the measurement. All impedance magnitude values (listed further on) must be multiplied by this value.
14) the data point values. The quantities of these must be exactly correct!
For FFT format:
Each data point consists of two real values which make up a complex number: a "real" part followed by an "imaginary" part. The number of such pairs is ((sample size)/2) + 1. {The sample size which was given as value #11}. To determine the impedance magnitude value in ohms, calculate as (test_resistor_value) * sqrt(real^2+imaginary^2). For impedance angle, calculate arctangent[imaginary/real].
For SINE format: the SIZE+1 {see #11} data points each involve three real values: first the frequency, then the magnitude value (needs to by multiplied by the test_resistor_value), then the angle in degrees.
15) The values after this make up the title for the data and other housekeeping values which will not be discussed here and which should best be left unchanged.