Autofit and Environmental Algorithms

Rev 2009-03-24

Support Routines

Autofit Defaults

Calculate VC Range

Rev 1 calculation:

^ Soft Gain (Response) ^ VC Range ^ | 50dB - 120dB | 40dB | | 40dB - 49dB | 30dB | | 0dB - 39dB | 10dB |

* if avg Soft Gain (Response) > = 50dB, then VC Range = 40dB * else if avg Soft Gain (Response) > = 40dB, then VC Range = 30dB * else VC Range = 10dB

Rev 2 calculation:

Soft Gain (Response) VC Range
41dB - 120dB 40dB
31dB - 40dB 30dB
21dB - 30dB 20dB
0dB - 20dB 10dB

Rev 3 (2009-07-10) calculation:

^ Soft Target ^ VC Range ^ | 41dB - 120dB | 40dB | | 31dB - 40dB | 30dB | | 21dB - 30dB | 20dB | | 0dB - 20dB | 10dB |

* if Avg Soft Target > 40dB, then VC Range = 40dB * else if Avg Soft Target > 30dB, then VC Range = 30dB * else if Avg Soft Target > 20dB, then VC Range = 20dB * else VC Range = 10dB

NOTE: Using Soft Target (as opposed to Soft Response Gain) allows using a stable reference for calculating the VC Range before running an Autofit. Using the Soft Response Gain requires performing an Autofit first (to obtain the response curves), and then calculating the VC Range based on those curves. The problem that emerges from the latter is when the VC Range modifies the response curves. In Intricon products, the response curve is kept in the middle of the VC Range. So for a 20 dB range, the response curve has +10 dB and - 10 dB. For a 50 dB range, it gets modified to have +25 dB and -25 dB, but the response curve is changed as well, no longer matching the autofitted response curve.

Match 3kHz or Appropriate Peak

Formula for matching 3kHz or appropriate peak. In summary:

Example code:

 EqMax       := NzBase.GetParamMax('BEQ1_gain');
 TargetCurve := sdSoft;
 
 Case TargetCurve of
   sdSoft:     TargetCurveValue := 40;
   sdModerate: TargetCurveValue := 60;
   else        TargetCurveValue := 80;
 end;
 
 // Adjust GC/VC to match Soft target at 3000 Hz.
 // However, if HearingLossThreshold at 500Hz > HearingLossThreshold at 1000Hz, 
//  and HearingLossThreshold at 1000Hz > HearingLossThreshold at 2000Hz, skip
 // {if (Audiogram.Values[fq500]  <= Audiogram.Values[fq1000]) or
 //    (Audiogram.Values[fq1000] <= Audiogram.Values[fq2000]) then}
 
 // Get frequency of peak gain
 HighestFreq := fq3000;
 if Audiogram.Values[HighestFreq] < Audiogram.Values[fq2000] then HighestFreq := fq2000;
 if Audiogram.Values[HighestFreq] < Audiogram.Values[fq1000] then HighestFreq := fq1000;
 if Audiogram.Values[HighestFreq] < Audiogram.Values[fq500]  then HighestFreq := fq500;
 
 // Get avg HearingLossThreshold 
 AvgThres := (Audiogram.Values[fq500]  + Audiogram.Values[fq1000] +
              Audiogram.Values[fq2000] + Audiogram.Values[fq3000]) div 4;
 
 // compare avg HearingLossThreshold to audiogram values at 3kHz and Peak frequency
 if (Audiogram.Values[fq3000]-AvgThres) >= (Audiogram.Values[HighestFreq]-AvgThres) then begin
     // if freq3000 contains peak, we simply adjust GC/VC to match Soft Target at 3000 Hz.
     AdjustParam(TargetCurve, 'matrix_gain', 0, 47, 1, 47 {2.997kHz}, TargetCurveValue);
 end else begin
     // if frequencies other than freq3000 contains peak gain,   
     // we adjust GC/VC to match Soft Target at that other frequency.
     Case HighestFreq of
        fq500 : AdjustParam(TargetCurve, 'matrix_gain', 0, 47, 1, 16 {500Hz},  TargetCurveValue);
        fq1000: AdjustParam(TargetCurve, 'matrix_gain', 0, 47, 1, 28 {1000Hz}, TargetCurveValue);
        fq2000: AdjustParam(TargetCurve, 'matrix_gain', 0, 47, 1, 40 {2000Hz}, TargetCurveValue);
     end;
     // Match equalizers frequencies to Soft Target from 5.2 - 7.2 kHz.
     SetParamValue('BEQ10_gain', FindBestMatch(TargetCurve, 'BEQ10_gain', 0, EqMax, 57 {5339Hz}, TargetCurveValue), False);  // 5.2 kHz
     SetParamValue('BEQ11_gain', FindBestMatch(TargetCurve, 'BEQ11_gain', 0, EqMax, 60 {6350Hz}, TargetCurveValue), False);  // 6.5 kHz
     SetParamValue('BEQ12_gain', FindBestMatch(TargetCurve, 'BEQ12_gain', 0, EqMax, 62 {7127Hz}, TargetCurveValue), False);  // 7.2 kHz
 end;
Main Algorithms

Autofit routine dependencies:

Autofit dependency overview:

Normal (WDRC)

AutoAdapt (if available)

Enable autofit on Half Shell and Full Shell products only, and having Adaptive Directional microphones: — Jenny Sudduth 2008/09/08 12:50

AGC-O

* Custom Settings: * Sparo, SparoAD (all Open Fit perhaps?): MPO = -8dBJenny Sudduth 2008/09/08 16:11 - Make all styles the same

Linear

Restaurant/Party

Telephone

Music

Television

Theatre/Place of Worship

Intense Noise

Notation
Abbreviation Term
AGC-o Automatic Gain Control (output)
Avg Average
BTE Behind-the-Ear instrument
Ch Channel
CR Compression Ratio
dB Decibels
Freq Frequency
HL Hearing Level (or Loss) as depicted in an Audiogram (aka HTL)
HTL Hearing Threshold Level as depicted in an Audiogram (aka HL)
Hz Hertz
kHz KiloHertz
MPO Maximum Power Output
OTE Other-the-Ear instrument
RIC Receiver-in-Canal instrument
SRT Speech Reception Threshold
TK Threshold Kneepoint
VC Volume Control
Archives