#include <Oscillator.h>

Public Member Functions | |
| WavetableOscillator (Buffer &wave) | |
| WavetableOscillator (float frequency=1, float ampl=1.0, float offset=0.0, float phase=0.0) | |
| void | setWaveform (Buffer &wave) |
| plug in waveforms | |
| void | setInterpolate (InterpolationPolicy whether) |
| set the interpolation flag | |
| virtual void | nextBuffer (Buffer &outputBuffer, unsigned outBufNum) throw (CException) |
| void | fillSine () |
| fill the wavetable with 1 cycle of a sine wave | |
Public Attributes | |
| InterpolationPolicy | mInterpolate |
| whether/how I should interpolate between samples | |
| Buffer | mWavetable |
| the stored wave form | |
| WavetableOscillator::WavetableOscillator | ( | Buffer & | wave | ) |
References csl::kTruncate, mInterpolate, csl::Buffer::mNumFrames, mWavetable, csl::Buffer::setSize(), and setWaveform().
| WavetableOscillator::WavetableOscillator | ( | float | frequency = 1, |
|
| float | ampl = 1.0, |
|||
| float | offset = 0.0, |
|||
| float | phase = 0.0 | |||
| ) |
References DEFAULT_WAVETABLE_SIZE, csl::kTruncate, mInterpolate, mWavetable, and csl::Buffer::setSize().
| void WavetableOscillator::setWaveform | ( | Buffer & | wave | ) |
plug in waveforms
References csl::Buffer::freeBuffers(), csl::Buffer::mAreBuffersAllocated, csl::Buffer::mAreBuffersZero, csl::Buffer::mBuffers, csl::Buffer::mDidIAllocateBuffers, csl::Buffer::mIsPopulated, csl::Buffer::mMonoBufferByteSize, csl::Buffer::mNumChannels, csl::Buffer::mNumFrames, and mWavetable.
Referenced by csl::Abst_SoundFile::Abst_SoundFile(), and WavetableOscillator().
| void csl::WavetableOscillator::setInterpolate | ( | InterpolationPolicy | whether | ) | [inline] |
| void WavetableOscillator::nextBuffer | ( | Buffer & | outputBuffer, | |
| unsigned | outBufNum | |||
| ) | throw (CException) [virtual] |
really compute the next buffer given an offset base channel; this is called by nextBuffer, possibly multiple times
Reimplemented from csl::UnitGenerator.
Reimplemented in csl::CompOrCacheOscillator.
References DECLARE_PHASED_CONTROLS, DECLARE_SCALABLE_CONTROLS, csl::kLinear, csl::kTruncate, LOAD_PHASED_CONTROLS, LOAD_SCALABLE_CONTROLS, csl::logMsg(), mFrameRate, UPDATE_PHASED_CONTROLS, and UPDATE_SCALABLE_CONTROLS.
Referenced by csl::CompOrCacheOscillator::nextBuffer(), csl::LSoundFile::nextBuffer(), and csl::Abst_SoundFile::nextBuffer().
| void WavetableOscillator::fillSine | ( | ) |
fill the wavetable with 1 cycle of a sine wave
References csl::Buffer::allocateBuffers(), CSL_TWOPI, DEFAULT_WTABLE_SIZE, csl::Buffer::mAreBuffersAllocated, csl::Buffer::mBuffers, csl::Buffer::mDidIAllocateBuffers, csl::Buffer::monoBuffer(), mWavetable, and csl::Buffer::setSize().
whether/how I should interpolate between samples
Referenced by setInterpolate(), and WavetableOscillator().
the stored wave form
Referenced by csl::Abst_SoundFile::Abst_SoundFile(), csl::Abst_SoundFile::checkBuffer(), csl::CompOrCacheOscillator::createCache(), fillSine(), csl::Abst_SoundFile::freeBuffer(), csl::Abst_SoundFile::isCached(), csl::Abst_SoundFile::mergeToMono(), csl::LSoundFile::openForRead(), csl::LSoundFile::readBufferFromFile(), csl::JSoundFile::readBufferFromFile(), csl::CASoundFile::readBufferFromFile(), setWaveform(), and WavetableOscillator().
1.5.8