...
<DIR>\Examples.h — Header file containing extern definitions for each module class object. It also has macros defining the entire list of modules and all dependencies.
<DIR>\Examples.sch — Overall schema file for the library.
<DIR>\ExamplesSchema.cpp — Compiled schema file.
📁 <DIR>\Doc — Location of generated documentation
📁 <DIR>\Include — Location of generated module include files
📁 <DIR>\matlab — Location of the module m-files. This also contains the master library make script.
📁 <DIR>\matlab\code — Suggested location for the inner code pieces.
📁 <DIR>\matlab\process — Suggested location of the MATLAB versions of the processing functions.
📁 <DIR>\matlab\test — Suggested location of MATLAB test scripts which validate the operation of the modules.
📁 <DIR>\Source – Location of the generated module source files.
📁 <DIR>\xml – Module XML file for AWE Designer, explained in get_variable.m and set_variable.m .
SchemaBuilder.exe
You'll notice this executable within the Audio Weaver Bin directory. This executable compiles the schema information. That is, it takes a .sch file and compiles into a .cpp file. The .cpp file is then included in the project for building the module DLL. SchemaBuilder.exe is automatically called by awe_generate_library.m
and there is no need to call it separately.
...
The ordering enforces that all scalar variables, which are initialized by the base module constructor function, are located at the start of the instance structure. Refer to Module Function Details for additional information.
...
Allows you to specify a bypass function by name. This is typically used in conjunction with one of the predefined bypass functions listed in Bypass Function. For example,
awe_addcodemarker(M, 'bypassFunctionName', 'IOAcrossModule_Bypass');
...
Specifies the inner portion of a custom constructor function. The function must follow the calling convention outlined in Constructor Function.
Simple audio modules without indirect arrays: No need to define the constructor function. The
BaseClassModule_Constructor()
usually does everything needed.Audio modules with direct arrays: Set the
.arrayHeap
and.arraySizeConstructor
fields of the array variables in MATLAB. Audio Weaver will then auto generate a suitable constructor function.Complex modules requiring further initialization: Write a custom
$constructorFunction$
or use the$postConstructorFunction$
shown below.Modules created out of subsystems: Audio Weaver automatically generates code for these systems. If you need further initialization, use the
$postConstructorFunction$
shown below.
...
Specifies the inner portion of a module's Get function. Follows the calling convention outlined in Get Function .
$setFunction$
Specifies the inner portion of a module's Set function. Follows the calling convention outlined in Set Function.
$hFileDefine$
Located near the top of the template file awe_module_template.h. Allows you to add additional preprocessor directives (or anything else) at the start of the header file. Example,
...
Specifies the inner code for the module's processing function. This must always be defined for modules. For subsystems, the auto-generated should be used. Refer to Processing Function for a discussion of how to define this function.
...
Audio Weaver uses the default template files specified at the start of Code Markers and Template Substitution. You can override the templates used by a particular module by setting these code markers. There are separate markers for the header file, $hFileTemplate$
, and the source file, $srcFileTemplate$
. It is handy to override these values if you want to change copyright information in the generated files.
...
ARRAYVAR
and TYPE
are already known to MATLAB. SIZE
and HEAP
must be separately specified as C code to embed into the generated code. The string SIZE
is specified in MATLAB by setting .arraySizeConstructor
field of the array variable. Similarly, HEAP
is specified by setting the .arrayHeap
field of the array variable. For an example, see Peak Hold Module.
Specifying Module Constructor Arguments in Subsystems
Anchor | ||||
---|---|---|---|---|
|
...
To get around this problem, Audio Weaver allows you to specify a piece of C code which overrides the default numeric initializer for an internal module variable. The C code is written to the .constructorCode
field of the variable. For an example, refer to the Look Ahead Limiter Module.
Avoiding Wire Allocation Problems with Subsystems
This issue also applies to the case of compiling subsystems to form new module classes. If your subsystem has .flattenOnBuild=1
(which means that it is not compiled), then you can ignore this section. This problem arises because Audio Weaver modules can operate on an arbitrary number of channels. In certain circumstances, the routing algorithm incorrectly allocates wire buffers during code generation such that audio processing crashes at run-time. In these cases, you need to be careful how you specify default channel counts and block sizes within modules. Look Ahead Limiter Module demonstrates the problem and presents a solution.
...