...
As shown below, there are 3 main components of an Audio Weaver system that require communication in order to tune an audio system. The Designer GUI will generate text based tuning commands (AWS) based on the layout and any user tuning commands. These commands are sent to AWE Server, which in turn compiles the AWS commands into binary commands (AWB) that can be are sent to the target running the AWE Core. The target processes the AWB commands and then generates a reply message that is sent back to the AWE Server.
...
The text-based commands may also be generated by external tools and scripts rather than by AWE Designer. An example script, written in python, that Python 3.11, is shown below. This script connects to the AWE Server at TCP port 15007 (to bypass port 15001, which AWE Designer GUI uses) and reads and writes a the ScalerDBControl module’s variable in an active layout in real-time is shown below. The remainder of this document describes the full set of tuning commands and arguments.
The AWD which works with this script is attached below. Load this into Audio Weaver, then build and run the layout.
View file | ||
---|---|---|
|
Code Block | ||
---|---|---|
| ||
import socket import time TCP_IP = 'localhost' TCP_PORT = 1500115007 BUFFER_SIZE = 1024 # Open a TCP socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((TCP_IP, TCP_PORT)) # Read the value of the scaler s.send(b'get_value,ScalerDB1Scaler1.gainDBcurrentGain\n') data = s.recv(BUFFER_SIZE) print (data) # Attenuate channel 1 s.send(b'set_value,ScalerDB1Scaler1.gainDB\n,-40currentGain,0.5\n') data = s.recv(BUFFER_SIZE) print (data) |
INI file settings
Colors may be customized in the INI file as follows:
...
Reads the specified number of float elements in an array of data and returns the result as binary data rather than as text. This command is only supported through the MATLAB AWEClient.dll and is not for general use. The format of the binary reply packet is described in Internal Binary Packets.
fast_read_int (Matlab)
Syntax:
...
InstanceName must be the name of some object. The first memberName must name a member of the class of which instanceName is an instance. Subsequent terms depend on the type of the member as follows:
Member Type | Followed by |
int | nothing, reply is success,address,int,intvalue |
float | nothing, reply is success,address,float,floatvalue |
[N]int | [0 : N-1], reply is success,address,int,intvalue |
[N]float | [0 : N-1], reply is success,address,float,floatvalue |
*className | .member belonging to className (follows pointer) |
**className | [subscript].member belonging to className (follows subscripted pointer) |
className | .member belonging to className (accesses member) |
Note that the final three type name members: if the types of those members are not one of the first 4 scalar forms, then more members must be named to complete the expression. This continues iteratively until the expression reaches one of the first 4 scalar forms.
...
Commands can produce error messages from the following table:
Text | Description |
failed, heap type index range | A heap index was not in the range of heaps |
failed, awe_fwMalloc no more storage | The given heap does not have enough storage to satisfy the requested size |
failed, awe_fwMallocScratch no more storage | The scratch heap does not have enough storage to satisfy the requested size |
failed, constructor argument count | A create_xx call has an incorrect number of arguments |
failed, class index out of range | The given class index is not in the range of classes |
failed, class not found | The named class was not found in the symbol table |
failed, module already owned | An attempt was made to give a module to a layout when it is already in another layout |
failed, address outside heap | An attempt was made to assign to a location not in any heap |
failed, not a wire | A wire argument to create_module is not actually a wire |
failed, number of inputs and outputs must match | Some modules require that the number of inputs and outputs are the same |
failed, input pin types must be the same | Some modules require that the types of input and output pins be the same |
failed, module needs at least one input | Many modules require at least one input |
failed, module needs at least one output | Many modules require at least one output |
failed, inputs must match corresponding outputs | Some module require that each ith input have the same type as each ith output |
failed, not a module | An attempt was made to give an object not a module instance to add_module |
failed, I/O count error | The input/output count is not acceptable |
failed, parameter error | A parameter given to create_module is wrong for the specified module class |
failed, no more objects | There are no more objects for get_next_object to display |
failed, not object pointer | An expression expected to be of pointer type is not |
failed, not input pin | The pin must be an input pin. |
failed, I/O pin in use | An attempt was made to bind an I/O pin that was already bound with bind_wire |
failed, pin types not compatible | An attempt was made using bind_wire to bind a wire incompatible with the I/O pin |
failed, pin sizes not compatible | An attempt was made using bind_wire to bind a wire not an integer multiple of the I/O pin size |
failed, not output pin | The pin must be an output pin. |
failed, no more I/O pins | There are no more pin objects for get_next_io to display |
failed, no layouts to pump | 'pump' was called when no layouts exist |
failed, module must have only one output | Many modules require only one output |
failed, output wire must have only one sample | Some modules require that an output have only a single sample |
failed, incompatible block sizes | All contained modules must have the same block size |
failed, wire index out of range | A container wire vector indexed a wire out of range |
failed, unknown error %d | An unknown error occurred |
failed, argument count | A command had an invalid number of arguments |
failed, not implemented on target | The target does not implement the command |
failed, instance name '%s' not identifier | The argument must be an identifier |
failed, instance name '%s' is already used | The instance name has already been defined |
failed, class name '%s' is not defined | An attempt was made to use an undefined class name |
failed, class name '%s' has different classID than created instance | An object was created, but then found to have a different class than it should have |
failed, instance name '%s' is not a pin type | The argument must be a pin type |
failed, name '%s' undefined | A name was seen that has not been defined |
failed, expression error | The expression given to get_value or set_value had an error |
failed, wire name '%s' undefined | A supposed wire name given to create_module is not defined |
failed, wire name '%s' is not a Wire | A supposed wire name given to create_module is not of type Wire |
failed, module name '%s' undefined | A supposed module name given to add_module is undefined |
failed, '%s' is not a module | A supposed module name given to add_module is not a module |
failed, unknown argument | A command that takes a symbolic argument had an unknown string argument |
failed, open sound card for input returned an error | 'audio_pump' could not open the sound card for input |
failed, player create returned 0x%08x | 'audio_pump' could not open the sound card for output |
failed, renderer create returned 0x%08x | 'audio_pump' could not create output object |
failed, empty filename | A required filename was empty |
failed, unknown command '%s' | The command keyword is unknown |
failed, empty command | The command was empty |
failed, can't find instance class | An attempt to lookup the class of an instance failed |
failed, can't find instance | An attempt to lookup an instance failed |
failed, '%s' requires subscript | An expression requires a subscript |
failed, '%s' syntax error: missing ']' | Malformed subscript |
failed, '%s' subscript %d out of range | A subscript is outside the array bounds (static arrays only, very rare) |
failed, '%s' requires dot expression | An expression stopped early |
failed, no such member of '%s' as '%s' | The member name given is not a member |
failed, %s(%d): empty class name | Empty class name in schema file |
failed, %s(%d): syntax error in alias of class '%s' | Error while aliasing one class to another in schema file |
failed, %s(%d): unknown base class'%s' in alias of class '%s' | Reference to unknown base class while aliasing one class to another in schema file |
failed, %s(%d): comma expected in class '%s' | Missing comma in schema file |
failed, %s(%d): syntax error in derivation of class '%s' | Syntax error parsing derived class in schema file |
failed, %s(%d): unknown base class '%s' in alias of class '%s' | Attempt to derive a class from an unknown base in schema file |
failed, %s(%d): unexpected '{' in body of class %s | There can only be one level of bracing in schema files |
failed, %s(%d): empty member name in class %s | Member name is empty in schema file |
failed, %s(%d): non-numeric dimension in class %s | Array dimension has non-numeric subscript in schema file |
failed, %s(%d): expected ']' to close dimension in class %s | Missing close bracket in array dimension in schema file |
failed, %s(%d): empty type name in class %s | A type name is empty in schema file |
failed, %s(%d): unknown type name '%s' in class %s | A type name is undefined in schema file. |
failed, %s(%d): unexpected end of file in class %s | Unexpected end of file in schema file |
failed, no such core | A core ID was specified that the target does not have. |
failed, too many bound wires | An attempt was made to bind more than 17 times to an input pin |
Schema Files
Schema files provide a means for describing the layout of DSP storage that is compact and has a simple grammar, and does not need the complexity of the C/C++ type system.
...
The supported types are as follows:
Type | Description |
int | 32 bit integer |
float | 32 bit IEEE float |
[N]int | array of integer with N elements |
[N]float | array of floats with N elements |
*int | pointer to array of integer with unknown number of elements |
*float | pointer to array of float with an unknown number of elements |
*className | pointer to a class instance |
**className | pointer to an array of pointers to class instance with unknown number of elements |
className | a nested structure |
To support mapping to DSP code, class names may have an associated class ID like this:
...