Skip to main content
Skip table of contents

WhiteNoise

Overview

Uniformly distributed white noise generator

Discussion

Generates uniformly distributed random values at the sample rate in the specified range. Internally, the module uses a random number generator and then scales the values into the proper range.

Type Definition

CODE
typedef struct _ModuleWhiteNoise
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    FLOAT32 range;                                // Generated noise will be in the interval [-range +range].
    awe_modRandInstance *rand; // Random number generator using a LCG algorithm
    awe_modTypeConversionInstance *int2flt; // Converts between numeric data types
    awe_modScalerV2Instance *scale; // General purpose scaler with a single gain
} ModuleWhiteNoiseClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

range

float

parameter

0

1

-10:10

range

Pins

Output Pins

Name: out

Description: audio output

Data type: float

Scratch Pins

Channel count: 1

Block size: 32

Sample rate: 48000

MATLAB Usage

File Name: white_noise_module.m

CODE
 M=white_noise_module(NAME, SR, NUMCHANNELS, BLOCKSIZE)
 Creates a white noise generator for use in the Audio Weaver environment.
 The module has a single multichannel output pin.
 Arguments:
    NAME - name of the module.
    SR - sample rate of the output.
    NUMCHANNELS - number of interleaved channels in each output pin.
    BLOCKSIZE - number of samples per output channel.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.