Oscillators

class tiliqua.dsp.SawNCO(*args, src_loc_at=0, **kwargs)

Sawtooth Numerically Controlled Oscillator.

Often this can be simply routed into a LUT waveshaper for any other waveform type.

Members:
  • i (In(stream.Signature(data.StructLayout)) – Input stream, with fields freq_inc (linear frequency) and phase (phase offset). One output sample is produced for each input sample.

  • o (Out(stream.Signature(ASQ))) – Output stream, values sweep from ASQ.min() to ASQ.max().

class tiliqua.dsp.WhiteNoise(*args, src_loc_at=0, **kwargs)

Simple white noise generator.

See: https://www.musicdsp.org/en/latest/Synthesis/216-fast-whitenoise-generator.html

Members:

o (Out(stream.Signature(ASQ))) – Output stream of white noise.

class tiliqua.dsp.DWO(*args, src_loc_at=0, **kwargs)

Digital Waveguide Oscillator.

Emits a fixed frequency and amplitude sine wave, without needing a sine LUT. Instead, only uses 2 registers, 1 multiply, 3 adds.

This is not easy to modulate, but it is an interesting way to achieve a high-fidelity sine wave with minimal resources.

For details, see Fig. 3 from:

https://ccrma.stanford.edu/~jos/wgo/Second_Order_Waveguide_Filter.html

Members:

o (Out(stream.Signature(ASQ))) – Output stream of sinusoid samples.