This guide assumes that you've read through the MATLAB Scripting API and can develop audio systems using MATLAB scripts. This is particularly important for module developers since many of the key concepts – pins, variables, modules and system objects - will be built upon here. Modules are developed using a combination C or Assembly code and MATLAB scripts, and understanding the MATLAB scripts described in the Matlab API guide is critical. This Developers Guide is suitable for use with the Pro edition of Audio Weaver Designer with a Custom Module Creator license. With Audio Weaver Designer, you will be limited to developing custom audio modules on the PC.
Developing custom audio modules for the native PC target requires the following:
Valid Audio Weaver Designer – Pro Edition License
Valid Audio Weaver Feature: Module Creator License
MATLAB 2017b (64-bit) or later
Visual Studio 2019 or later
The audio module code is compiled and packaged into an audio module Dynamic Link Library (DLL). The DLL is read by the Server when it launches and makes the audio modules in the DLL available to the Server.
To develop custom audio modules for an embedded target you'll need the software items listed above together with development tools for the embedded target. You first create an audio module DLL using Visual Studio; this describes the audio module to the Server and is needed even if the Server is connecting to an embedded target. You then rebuild the target executable and link in your custom modules using your embedded development tools. The embedded development tools to use depend upon the details of your target processor.
Overall Development Environment
The Audio Weaver environment utilizes MATLAB, a PC-based Server, a hardware target, and development tools for the hardware target, as shown in Figure 1. Much of the design is orchestrated by MATLAB including describing modules, generating code, and generating documentation.
Steps 1 through 9 shown above the dark line in the figure below are for creating custom audio module DLLs on the PC. The main output is an audio module DLL shown as item 9. The DLL encapsulates all of the information required by the Server to natively execute an audio module. This includes the module C functions – Constructor, Set, Get, Process, and Bypass – and schema information describing the module instance data structure to the Server. A DLL may contain one or more audio modules.
The custom module DLL is copied into the same directory as the AWE_Server executable. When the Server is launched, it loads all of the audio module DLLs contained in the executable directory and the new modules are then available for use.
Items 10 through 15 shown below the dark line sare associated with creating custom audio modules on an embedded target. You first create the custom audio module DLL on the PC and then compile the generated module source files (item 6) using your embedded development tools. Several libraries and source files are pulled together to create the new executable for the target (item 15).
Also shown in the figure below is a C code initializer file (item 20). This file is used when the target lacks a tuning interface, and initializes the audio processing to a known state.
This document focuses exclusively on items 1 through 9 – those associated with creating custom audio module DLLs on the PC. The AWE-Core™ Integration Guide takes you through the remaining steps needed to update the audio module library on an embedded target and to create C code initializers.