Activate and Inactivate Sinks and Meters while in Tuning Mode
About This Guide
This application note describes quickly activating and inactivating all Meter and Sink modules in your Audio Weaver Design (AWD) while in Tuning Mode using a MATLAB script.
Introduction
Using this script is similar to setting certain modules to Debug mode, in that when you change your Layout Properties to Release prior to exporting an AWB file, any Module with Debug status enabled will not be included, reducing the load on your embedded platform’s system resources.
Generally speaking, setting a module to “Inactive” Runtime Status is not advised as the resulting behavior can be unpredictable. That said, inactivating all Sink and Meter modules in your Layout can be considered safe as those modules do not have any output pins.
Using the script
Start MATLAB and run “awe_designer” at the console to run Audio Weaver Pro.
Download the script “Set_Meters_Sinks.m” and place it in the current MATLAB folder.
Load the “AutoAmp_Example.awd” layout in the Examples folder beneath your Audio Weaver Pro installation folder, for example:
C:\DSP Concepts\AWE Designer 8.D.2.3 Pro\Examples\AutoAmp_Example.awd
Run the following commands at the MATLAB console.
GSYS = get_gsys('AutoAmp_Example.awd');
SYS = GSYS.SYS;
To inactivate all Meter and Sink modules
Run this command:
Set_Meters_Inactive(SYS,0);
You should see this response on the MATLAB console.
InputMeter is inactive.
ComputeSNR.FanNoiseDB is inactive.
ComputeSNR.RoadNoiseDB is inactive.
ComputeSNR.SignalDB is inactive.
ComputeSNR.TotalNoiseDB is inactive.
ComputeSNR.SNRDB is inactive.
SpeedEQ.GainSink is inactive.
SpeedEQ.BassSink is inactive.
Fader.Sink1 is inactive.
Fader.Sink3 is inactive.
Fader.Sink2 is inactive.
Fader.Sink4 is inactive.
OutputMeter is inactive.
The display will not update until you either Build and Run the Layout,
or click on the Propagate Wires button.
To activate all Meter and Sink modules
Run this command:
Set_Meters_Sinks(SYS,1);
You should see this response on the MATLAB console.
InputMeter is active.
ComputeSNR.FanNoiseDB is active.
ComputeSNR.RoadNoiseDB is active.
ComputeSNR.SignalDB is active.
ComputeSNR.TotalNoiseDB is active.
ComputeSNR.SNRDB is active.
SpeedEQ.GainSink is active.
SpeedEQ.BassSink is active.
Fader.Sink1 is active.
Fader.Sink3 is active.
Fader.Sink2 is active.
Fader.Sink4 is active.
OutputMeter is active.
As before, the display will not update until you either Build and Run the Layout or click on the Propagate Wires button. Note that an Active block does not show “ACTIVE” on the layout canvas. It just does not show “INACTIVE”.
Running the Help command
>> help Set_Meters_Sinks
Function to set all Meters and Sinks inactive or active in a Layout
Set_Meters_Sinks(SYS,MODE)
Input Variables:
SYS - SYS which contains the System
MODE - 0 to inactivate, 1 to activate