ScummVM API documentation
MT32Emu::LA32WaveGenerator Class Reference

#include <LA32WaveGenerator.h>

Public Member Functions

void initSynth (const bool sawtoothWaveform, const Bit8u pulseWidth, const Bit8u resonance)
 
void initPCM (const Bit16s *const pcmWaveAddress, const Bit32u pcmWaveLength, const bool pcmWaveLooped, const bool pcmWaveInterpolated)
 
void generateNextSample (const Bit32u amp, const Bit16u pitch, const Bit32u cutoff)
 
LogSample getOutputLogSample (const bool first) const
 
void deactivate ()
 
bool isActive () const
 
bool isPCMWave () const
 
Bit32u getPCMInterpolationFactor () const
 

Detailed Description

LA32WaveGenerator is aimed to represent the exact model of LA32 wave generator. The output square wave is created by adding high / low linear segments in-between the rising and falling cosine segments. Basically, it's very similar to the phase distortion synthesis. Behaviour of a true resonance filter is emulated by adding decaying sine wave. The beginning and the ending of the resonant sine is multiplied by a cosine window. To synthesise sawtooth waves, the resulting square wave is multiplied by synchronous cosine wave.


The documentation for this class was generated from the following file: