Skip to content

SawtoothFract32

Overview

Sawtooth wave generator (no anti-aliasing)

Discussion

Module Pack

Standard

ClassID

classID = 183

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.020833 Unrestricted

Pins

Output Pins

Name out
Description audio output
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. 

Copyright (c) 2026 DSP Concepts, Inc.