Document toolboxDocument toolbox

SawtoothFract32

Overview

Sawtooth wave generator (no anti-aliasing)

Type Definition

typedef struct _ModuleSawtoothFract32 { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure FLOAT32 freq; // Frequency of the sawtooth generator. fract32 phase; // The stored phase of the sawtooth module. fract32 phaseIncrement; // The amount that the oscillator phase is incremented for each output sample. } ModuleSawtoothFract32Class;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

freq

float

parameter

0

1000

0.01:24000

Hz

phase

fract32

state

1

0

Unrestricted

 

phaseIncrement

fract32

parameter

1

0.02083

Unrestricted

 

Pins

Output Pins

Name: out

Description: output data

Data type: fract32

MATLAB Usage

File Name: sawtooth_fract32_module.m

M=sawtooth_fract32_module(NAME, SR, BLOCKSIZE) Creates a sawtooth generator for use in the Audio Weaver. This module has a single 1 channel output pin with controllable frequency. The output of the module changes instantly when the frequency is updated. Arguments: NAME - name of the module. SR - sample rate BLOCKSIZE - number of samples per output channel.

Â