Measurement
Discussion
THIS MODULE IS DEPRECATED AND NOT RECOMMENDED FOR NEW DESIGNS. PLEASE USE THE MeasurementV2 MODULE INSTEAD.
This module will periodically output the stimulus signal. On the measurement side, the received signal of length L will be measured and averaged. The number of times that the stimulus signal is output and the received signal measured is numReps. The average of the recorded signal is in the response buffer. The trigger is a parameter which the PC sets to trigger the measurement. This will initially be 0 (waiting), then set to 1 by PC (start measurement). Once the measurement is completed, it will be set to 0.
Follow these steps to plot the measurement. (Note: This requires AudioWeaver Pro Edition)
1) Run the layout in Designer.
2) While running, check the trigger box on the measurement inspector.
3) Get the running layouts structure in Matlab:
>> GSYS = get_gsys();
4) Next read out the stimulus and response in Matlab command window:
>> x = GSYS.SYS.Measurement1.response;
>> z = GSYS.SYS.Measurement1.stimulus;
5) Next compute the transfer function and plot it. For example, if you have the signal processing toolbox you can do:
>>[tf, f] = tfestimate(z,x,[],[],[],48000);
>> plot(f,abs(tf));shg
Module Pack
Advanced
ClassID
classID = 1296
Type Definition
typedef struct _ModuleMeasurement
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
INT32 L; // Length of the stimulus signal.
INT32 numReps; // Number of times to repeat the stimulus and average the result
INT32 trigger; // state variable/parameter which the PC sets to trigger the measurement.
INT32 readIndex; // Index used for circular reading
INT32 stateIndex; // Index used for state
INT32 cnt; // Index used to measure the response
FLOAT32* stimulus; // Column vector of length L holding the stimulus signal
FLOAT32* response; // Holds the time average measured signal
} ModuleMeasurementClass;
Variables
Properties
| Name | Type | Usage | isHidden | Default Value | Range | Units |
|---|---|---|---|---|---|---|
| L | int | const | 0 | 2048 | Unrestricted | |
| numReps | int | parameter | 0 | 16 | 1:1024 | |
| trigger | int | parameter | 0 | 0 | 0:1 | |
| readIndex | int | state | 1 | 0 | Unrestricted | |
| stateIndex | int | state | 1 | 0 | Unrestricted | |
| cnt | int | state | 1 | 0 | Unrestricted | |
| stimulus | float* | parameter | 0 | [2048 x 1] | Unrestricted | |
| response | float* | derived | 0 | [1 x 2048] | Unrestricted |
Pins
Input Pins
| Name | in |
| Description | audio input |
| Data type | float |
| Channel range | Unrestricted |
| Block size range | Unrestricted |
| Sample rate range | Unrestricted |
| Complex support | Real |
Output Pins
| Name | out |
| Description | audio output |
| Data Type | float |
Matlab Usage
File Name: measurement_module.m
M=measurement_module(NAME, L)
Audio Weaver module which performs transfer function measurements
using a stimulus and response. The module outputs the stimulus signal
and averages the response over multiple repetitions. Arguments:
NAME - name of the module
L - length of the measurement signal, in samples
Copyright (c) 2026 DSP Concepts, Inc.