periodicsynth 0.1.3

Simple pereodic function snythesizer for Sine, Square, Triangle, Sawtooth waves with arbitary frequency.
Documentation

PeriodicSynth

Build Status

Periodic waveform synthesizer (like a signal-generator) implemented in Rust. This can generate most common types of signals (e.g sine, square).


/**
 * A basic usage of the library, a triangle wave
 * with a frequency of 440hZ and samplerate of
 * 44.1khZ and bit-depth of 64bits.
 */
use periodicsynth;

fn main() {
    let mut samples = vec![0f64; 44100];
    periodicsynth::synth(&samples, periodicsynth::PereodicFunction::Traingle, 440.0);
}

Motivation

The WebAudio API's OscillatorNode generates pereodic waveforms on demand with several types of pereodic function types with arbitary frequency and samplerate.