Document toolboxDocument toolbox

(8.D.2.5) Processing audio through Audio Weaver Design using MATLAB

 

About This Guide

This application note describes ways to process input audio through Audio Weaver Design (AWD) using MATLAB scripts.

How to load a system

There are two ways to load an Audio Weaver Design (AWD): -

  1. Load from file: Use the following command to load an AWD from a file on the computer.

GSYS = load_awd(fullfile(dirStr, ‘Example.awd'));
  1. Grab from the AudioWeaver Designer : This is a quicker method of opening the AWD for this command to work, AudioWeaver Designer should be open.

GSYS = get_gsys;

Configure the for Non-Real Time Processing

The AudioWeaver Server searches for a specific command to configure a Real Time vs a non-Real Time System.

For a Non-Real Time, the following command is set to 0 which by default on 1 for assuming a Real Time System by default.

SYS.targetSpecificInfo.RT = 0;

Setting Internal Build Settings

  • Internal Settings to match the Designer.

    • Specify the Datatype to match the designer.

    • Validate Top Level Input Pin

    • Validate Top Level Out Pin

    • Validate Top Level Block Sizes

 

The following command can be used to set the designer settings.

 

Building the System on Designer

The following command is used to build the system with the above-mentioned settings.

 

 

Example – AutoAmp

The Application Note has attached .m file along with AutoAmp_Example.awd as examples for the audio processing. In this example a signal test chirp is generated between 100Hz - 20kHz.

 

 

Output Processing

The processing can be configured by changing the number of audio blocks to 100 or varying it according to the block size in the AWD. The output plot for 100 blocks is as shown.

Figure 1 : Plot of input vs output for 100 blocks

 

 

 

Figure 2: Output vs Input Plot for 750 Blocks

 

Â