This page describes Audio Weaver's MATLAB functions related to module generation. Audio Weaver makes heavy use of MATLAB’s object oriented features. An object in MATLAB is a data structure with associated functions or methods. Each type of object is referred to as a class, and Audio Weaver uses separate classes to represent variable, modules, and subsystems. The class functions are stored in directories that start with the “@” symbol. Under <AWE>\matlabMATLAB\ are 3 class directories:
...
name — string indicating the name of the variable. This was set when the variable was added to the module. Not user editable.
hierarchyName — hierarchical location of the variable in the overall system. Initially empty and then set by build.m. Not user editable.
value — current value of the variable. Although it can be read and written by the user, it is easier to access the value simply by referencing
SYS.agc.core.targetLevel
size — 1x2 element vector used to represent the size of matrices, [rows columns]. For scalars, this is always [1 1]. Set when the variable was added to the module or by the prebuild function. Not user editable.
type — string specifying the underlying data type of the variable. Allowable values are 'float', 'fract32', 'int', and 'uint'. Set when the variable was added to the module. Not user editable.
isComplex — Boolean indicating whether the variable contains complex data. Set when the variable was added to the module. Only arrays can be complex, not individual scalar variables. Not user editable.
range — a vector or matrix specifying the allowable range of the variable. This is used to validate variable updates and also to draw knobs and sliders. This vector uses the same format as the pin type described in Section 3.4. User editable.
usage — a string specifying how the variable is used in Audio Weaver. Set when the variable was added to the module. Not user editable. Possible values are:
‘const’ — the variable is initialized when the module is allocated and does not change thereafter.
‘parameter’ — the variable can be changed at run-time and is exposed as a control.
‘derived' — similar to a parameter, but the value of the variable is computed based on other parameters in the module. Derived variables are not exposed as controls.
‘state’ — the variable is set at run-time by the processing function.
description - a string describing the purpose or usage of the variable. User editable.
arrayHeap — used to specify array allocation information to the code generator. User editable.
memorySegment - used to specify array allocation information to the code generator. User editable.
arraySizeConstructor - used to specify array allocation information to the code generator. User editable.
constructorCode - specifies variable initialization when a module exists within a subsystem and is used by the code generator. User editable.
guiInfo — structure used to hold GUI related information. Some fields are user settable. Refer to the chapter in the Audio Weaver Matlab MATLAB API that discusses creating custom inspector interfaces.
format - C formatting string used by when displaying values in the MATLAB output window. Follows the formatting convention of the printf function. User editable.
units - a string containing the underlying units of the variable. For example, ‘dB’ or ‘Hz’. This is used by documentation and on user interface panels. User editable.
isLive — Boolean variable indicating whether the variable is residing on the target (isLive = 1), or if it has not yet been built (isLive=0). This starts out equaling 0 when the module is instantiated and the set to 1 by build.m. Not user editable.
isVolatile — Boolean indicating whether the variable is changed outside of MATLAB and needs to be read from the target each time. Reading of variables from the target only occurs when isLive=1. By default, only 'const' variables have isVolatile set to 0; all others are set to 1. User editable.
isHidden — Boolean indicating whether a variable is hidden. Hidden variables are not shown when a subsystem is displayed in the MATLAB output window. However, hidden variables may still be referenced. User editable.
isPreset — Boolean indicating whether the variable is included in presets. Used by the create_preset.m function. User editable.
isArray — Boolean indicating whether the variable is a scalar or an array. Scalars values occur in the instance data structure. Arrays have pointers in the instance data structure. This field is set when the variable is first instantiated and should not be changed thereafter.
targetInfo — internal data structure used when tuning the variable at run-time. Not user editable.
fieldNames — internal cell array of field names (actually the names of the fields in this data structure). It is used to accelerate references. Not user editable.
isLocked — internal field used to accelerate references. Not user editable.
isPtr — Boolean indicating whether the variable is a pointer of type ptrExpr.
ptrExpr — string specifying the pointer type of the variable.
isRangeEditable — Boolean indicates whether the variable range is editable or not.
isTuningSymbol — Boolean indicates whether the variable is real time tunable or not.
classVersion — internal field indicates the SVN version number.
class — string specifying the underlying object class. This is always 'awe_variable'. Not user editable.
...
M - @awe_module object to which to add the pointer variable.
NAME — name of the pointer variable. Must be a valid C variable name.
CTYPE — type definition which will be used by the variable. For example, ‘void *’ or ‘SparseItem *’. This string is used directly as the pointer type in the instance structure.
USAGE — how the variable is used. As before, this can be ‘parameter’, ‘state’, ‘derived’, or ‘const’.
DESCRIPTION — optional short description string.
ISHIDDEN — optional Boolean which hides the variable from standard Matlab MATLAB usage.
Note: you will not be able to examine the contents of pointer variables from MatlabMATLAB, since Matlab is unaware of the data type of the variable.
...