This version (20 Jun 2012 22:13) was approved by William Jahn.The Previously approved version (20 Jun 2012 20:58) is available.Diff

Offline Microphone Matching

Click here to return to the ADI Algorithms page

The Offline Microphone Match algorithm analyzes the signal level coming from a stereo input pair. Depending on the target gain level designated, appropriate L/R gains are calculated offline (not running on the DSP) to match the levels between the left and right signals to the target gain. The calculated L/R gains are then applied to the left and right signals, and sent to the output.

Input Pins

NameFormat [int/dec] - [control/audio]Function Description
Pin 0: Left Audiodecimal - audioLeft channel input signal
Pin 1: Right Audiodecimal - audioRight channel input signal

Output Pins

NameFormat [int/dec] - [control/audio]Function Description
Pin 0: Left Audiodecimal - audioGain adjusted left audio output
Pin 0: Right Audiodecimal - audioGain adjusted right audio output

GUI Controls

GUI Control NameDefault ValueRangeFunction Description
Hold (ms)10-500Controls the Hold time used for the peak envelope level detection
Decay (dB/s)1000-1000Controls the Decay time used for the peak envelope level detection
Target Gain (dB)0-48This is the user-defined target gain value for the output. The algorithm will apply gains to both left and right channels to achieve this target output gain on both channel outputs.
Calibraten/an/aThe calibrate button triggers the microphone matching. Before pressing this button the outputs are not calibrated.
L Gainn/an/aThe calculated Left gain to be applied is displayed here
R Gainn/an/aThe calculated Right gain to be applied is displayed here

DSP Parameter Information

GUI Control NameCompiler NameFunction Description
Hold (ms)MicOfflineCalAlg1holdHold time used for peak level detection
Decay (dB/s)MicOfflineCalAlg1decayDecay time used for peak level detection

Algorithm Description

The Offline Microphone Match algorithm is meant to be a system tuning algorithm in order to match a stereo input pair to a designated target output gain. The name “Offline” is used since the calculation for gain application is not running on the DSP. The actual level detection is running on the DSP and is based on a Peak Envelope level detection. Hold and Decay times can be adjusted to fine tune the level calculation.

Upon initial run-time compilation, two signals that are mismatched will run through the algorithm as-is. Once the Calibrate button is pressed, the offline calculation will find the gains necessary to apply to L and R channels to reach a matched output equal to the target gain designated on the control. At this time, these calculated gains, will be displayed on the control, and also applied to both the L and R signals running on the DSP. The graph below shows two sine tones at different levels, and the matched output, once the Calibrate button is pressed. The target output gain was set to -4dB.


The schematic image seen below was used to generate the graph seen above. This image shows the result of the Offline Microphone Match algorithm AFTER the calibrate button has been pressed. Thus the gains necessary to achieve a -4dB target output are displayed in the L gain and R gain text boxes on the control for the given input signals.

Algorithm Details

Toolbox PathADI Algorithms - Record Algorithms - Mic Matching - Offline Microhpone Match
Cores SupportedADAU144x
“Grow Algorithm” Supportedno
“Add Algorithm” Supportedno
Subroutine/Loop Basedno
Program RAM40
Data RAM12
Parameter RAM6
resources/tools-software/sigmastudio/toolbox/adialgorithms/offlinemicrophonematch.txt · Last modified: 20 Jun 2012 22:13 by William Jahn