22 #define DEFAULT_WAVETABLE_SIZE CSL_mMaxBufferFrames // use large wave tables by default
33 Oscillator(
float frequency = 220.0,
float ampl = 1.0,
float offset = 0.0,
float phase = 0.0);
69 #ifndef SWIG_ONLY // SWIG can't handle the initializers
70 WavetableOscillator(
float frequency = 1,
float ampl = 1.0,
float offset = 0.0,
float phase = 0.0);
74 WavetableOscillator(
float frequency = 1,
float ampl = 1.0f,
float offset = 0.0f,
float phase = 0.0f);
110 Sine(
float frequency = 220,
float ampl = 1.0,
float offset = 0.0,
float phase = 0.0);
118 FSine(
float frequency = 220,
float ampl = 1.0,
float offset = 0.0,
float phase = 0.0);
128 Sawtooth(
float frequency = 220,
float ampl = 1.0,
float offset = 0.0,
float phase = 0.0);
138 Square(
float frequency = 220,
float ampl = 1.0,
float offset = 0.0,
float phase = 0.0);
150 Impulse(
float frequency,
float ampl);
151 Impulse(
float frequency,
float ampl,
float offset);
152 Impulse(
float frequency,
float ampl,
float offset,
float phase);
183 #define kFreqAmpPhase 3
212 SumOfSines(
float frequency,
unsigned numHarms,
float noise);
214 SumOfSines(PartialDescriptionMode format,
unsigned partialCount, ...);
221 void addPartial(
float nu,
float amp,
float phase);
sample * SampleBuffer
1-channel buffer data type, vector of (sample)
void nextWaveInto(SampleBuffer dest, unsigned count, bool oneHz)
#define kFrequency
Enum for SumOfSines description formats.
void nextBuffer(Buffer &outputBuffer, unsigned outBufNum)
really compute the next buffer given an offset base channel; this is called by nextBuffer, possibly multiple times
void nextBuffer(Buffer &outputBuffer, unsigned outBufNum)
really compute the next buffer given an offset base channel; this is called by nextBuffer, possibly multiple times
FSine(float frequency=220, float ampl=1.0, float offset=0.0, float phase=0.0)
AdditiveInstrument.h – Sum-of-sines synthesis instrument class.
void setInterpolate(InterpolationPolicy whether)
virtual void nextBuffer(Buffer &outputBuffer, unsigned outBufNum)
really compute the next buffer given an offset base channel; this is called by nextBuffer, possibly multiple times
WavetableOscillator – Oscillator with a stored wave table that does table look-up. The default wave table is an 8192-sample sine. (perhaps accept a vector of freqs and a multichannel buffer?)
WavetableOscillator(Buffer &wave)
Destructor.
Sawtooth oscillator class (non-band-limited)
Phased – a mix-in for objects with phase accumulators (local float) and frequency controls (an input...
void nextBuffer(Buffer &outputBuffer, unsigned outBufNum)
really compute the next buffer given an offset base channel; this is called by nextBuffer, possibly multiple times
virtual void nextBuffer(Buffer &outputBuffer, unsigned outBufNum)
really compute the next buffer given an offset base channel; this is called by nextBuffer, possibly multiple times
std::vector< Partial * > mPartials
void dump()
print the receiver for debugging
Impulse – oscillator class (this create a single impulse delayed by 'delay' samples) ...
void addPartials(unsigned num_p, Partial **pt)
Square(float frequency=220, float ampl=1.0, float offset=0.0, float phase=0.0)
void nextBuffer(Buffer &outputBuffer, unsigned outBufNum)
really compute the next buffer given an offset base channel; this is called by nextBuffer, possibly multiple times
Square oscillator class (non-band-limited)
Scalable – mix-in class with scale and offset control inputs (may be constants or generators)...
Cacheable – a mix-in for caching streams.
void fillSine()
fill the shared wavetable with 1 cycle of a sine wave
~WavetableOscillator()
Destructor.
Struct for partial overtones.
int PartialDescriptionMode
virtual ~Oscillator()
Destructor.
void addPartial(Partial *pt)
given a SHARC spectrum
void setWaveform(Buffer &wave, bool freeBufs=true)
plug in waveforms set the interpolation flag
Buffer mWavetable
the stored wave form
FSine – (uses a ringing filter for the sine calc)
CompOrCacheOscillator(bool whether=false, float frequency=220, float phase=0.0)
virtual void nextWaveInto(SampleBuffer dest, unsigned count, bool oneHz)=0
Sine – oscillator class (this computes the sine fcn on the fly)
Buffer – the multi-channel sample buffer class (passed around between generators and IO guys)...
Oscillator – Abstract oscillator class; inherits from UnitGenerator, Phased, and Scalable and provid...
Oscillator(float frequency=220.0, float ampl=1.0, float offset=0.0, float phase=0.0)
Constructor: parameters are optional.
CompOrCacheOscillator – Abstract oscillator class for those who can compute of cache their wavetable...
void nextBuffer(Buffer &outputBuffer, unsigned outBufNum)
really compute the next buffer given an offset base channel; this is called by nextBuffer, possibly multiple times
InterpolationPolicy mInterpolate
whether/how I should interpolate between samples
Sine(float frequency=220, float ampl=1.0, float offset=0.0, float phase=0.0)
void dump()
print the receiver for debugging
Base class of CSL exceptions (written upper-case). Has a string message.
Sawtooth(float frequency=220, float ampl=1.0, float offset=0.0, float phase=0.0)