Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page walks through a complete example of an audio module, starting from the high-level MATLAB model and continuing through the generated code. This example is identical to the scaler_smoothed_module.m contained in the Deprecated module library. We go through this module in a systematic fashion and reference the source files listed in Scaler Smoothed Example Source Files. The Examples Module Library contains additional module examples which highlight advanced features.

This module example is part of a larger audio module DLL containing several example modules. The base directory for the audio module examples is <AWE>\AWEModules\Source\Examples\where <AWE> refers to the root directory of the Audio Weaver Designer installation.

The directory contains several subdirectories and this . This directory structure must be followed when creating other custom audio module libraries. In order to build the examples modules, the above path must be on the Audio Weaver module path variable, which can be retrieved in MATLAB with the ‘add_module_path’ command. The correct path should already be included in a normal installation of Designer, but if it is not, or if another path needs to be added, the module path can be updated using the ‘add_module_path’ command or with the File > Set Module Path menu in Designer.

...

Subsystems are very similar to modules, but also contain a list of internal modules and a list of connections between modules.

Audio Module Instance Structure
Anchor
AudioModuleInstanceStructure
AudioModuleInstanceStructure

Every audio module has an associated instance data structure that holds the variables – state and parameters – needed by the module. In this example, there are 4 variables described in the module m-file:

...