Versions Compared

Key

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

...

The text-based commands may also be generated by external tools and scripts rather than by AWE Designer. An example scriptExample scripts, written in Python and MATLAB, is are shown below. This script connects These scripts connect to the AWE Server at TCP port 15007 (to bypass port 15001, which AWE Designer GUI uses) and reads and writes the ScalerDBControl module’s currentGain variable in an active layout in real-time. The remainder of this document describes the full set of tuning commands and arguments.

The AWD which works with this script these scripts is attached below. Load this AWD into Audio Weaver, then build and run the layout. The script has been tested with Python versions 2.7 and 3.11.Finally, run the script.

View file
nameTuning-API-Test.awd

Python 2.7 and 3.11

Code Block
languagepy
import socket
import time

TCP_IP = 'localhost'
TCP_PORT = 15007
BUFFER_SIZE = 1024

# Open a TCP socket to AWE Server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TCP_IP, TCP_PORT))

# Read the value of the scaler's gain
s.send(b'get_value,Scaler1.currentGain\n')
data = s.recv(BUFFER_SIZE)
print (data)

# Attenuate channel 1 to 0.5
s.send(b'set_value,Scaler1.currentGain,0.5\n')
data = s.recv(BUFFER_SIZE)
print (data)

The expected output is shown below.

...

MATLAB (tested with r2023b)

Code Block
% Open a TCP socket to AWE Server
client = tcpclient('127.0.0.1', 15007, "Timeout", 1000);
% Read the value of the scaler's gain
writeline(client, 'get_value,Scaler1.currentGain');
readline(client)
% Attenuate channel 1 to 0.5
writeline(client, 'set_value,Scaler1.currentGain,0.5');
readline(client)

The expected output in the MATLAB console is shown below.

...

INI file settings

Colors may be customized in the INI file as follows:

...