Versions Compared

Key

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

This section 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 the section Scaler Smoothed Example Source Files. Section 7 The Examples Module Library contains additional module examples which highlight advanced features.

...

Each audio module has an associated module M-file, item 1 shown in Figure 1. For this example, the file is found in

<AWE>\AWEModules\Source\Examples\matlab\scaler_smoothed_example_module.m

and a listing is shown in Section 2.9.1. When you first initialize Audio Weaver using awe_init.m, this file will be placed on your MATLAB path. The module m-file completely describes the audio module to MATLAB. It contains:

  • Input and output pins descriptions

...

  • :
    Data types, number of channels, block sizes, sample rates, etc.

  • Instance structure variables

...

  • :
    Date types, variable names, array sizes, memory allocation rules.

  • Documentation

...

  • :
    Descriptions of variables, pins, and text describing the overall audio model.

  • MATLAB implementation of the module

...

  • :
    Processing function (optional), and if needed, set function, bypass function, and get function. There may also be a prebuild function which is called when a system is built.

  • User interface

...

  • :
    Individual variables are exposed and tied to controls. Controls are positioned and configured.

  • Browser information

...

  • :
    This is the information for AWE Designer window to list under specific folder, search tag, bit map image of the module in Designer window etc.

All of these items above are documented in the Audio Weaver Matlab API. The specific items in the module m-file pertaining to module generation are variables, code markers, and wiring allocation guidelines described in Sections 5.1.11 and 5.2 Generating Module Libraries (sections Specifying Wiring Constraints and Code Markers and Template Substitution).

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

...