CSL  6.0
Test_Oscillators.cpp File Reference
#include "Test_Support.cpp"
#include "SoundFileL.h"
#include "SimpleSines.h"
#include <SHARC.h>

Go to the source code of this file.

Macros

#define USE_TEST_MAIN
 
#define TABLE_SIZE   128
 Test truncating and interpolating wavetable osc with a small wavetable (these should sound different because of the truncation error in the first tone) More...
 

Functions

void testSweep ()
 Apply a glissando and swell to a sine oscillator with LineSegments. More...
 
void testSimpleSines ()
 Simplest sine wave tests using the tutorial example classes. More...
 
void testBasicWaves ()
 Test/demonstrate the basic waveform oscillators. More...
 
void testScaledSin ()
 Scaled sine wave – 3 methods: with a MulOp and using the Sine's scale input. More...
 
void testWavetableInterpolation ()
 
void testAMFMSin ()
 AM and FM using the dynamic scale and frequency inputs. More...
 
void dumpAMFMSin ()
 use the dumpTest call to dump the whole graph More...
 
void testSumOfSinesCached ()
 Play a sum of sines waveform – cached harmonic overtone series. More...
 
void testSumOfSines1F ()
 Play a sum of sines waveform – 1/f + noise. More...
 
void testSumOfSinesSteps ()
 
void testSumOfSinesNonCached ()
 Now test an uncached inharmonic series constructor format 3 = list of (freq/amp/phase) for (not-necessarily-harmonic) overtones Since it's a non-harmonic overtone series in this example, we can't cache a wavetable. More...
 
void testWaveTableFromFile ()
 Load an oscillator's wave table from a file – a single cycle of the vowel "oo" from the word "moon". More...
 
void test_SHARC ()
 Test loading the SHARC samples. More...
 
void test_SHARC2 ()
 test vector SHARC - load 3 spectra into SOS oscillators and cross-fade More...
 
void runTests ()
 

Macro Definition Documentation

#define USE_TEST_MAIN

Definition at line 12 of file Test_Oscillators.cpp.

#define TABLE_SIZE   128

Test truncating and interpolating wavetable osc with a small wavetable (these should sound different because of the truncation error in the first tone)

Definition at line 128 of file Test_Oscillators.cpp.

Referenced by testWavetableInterpolation().

Function Documentation

void testSweep ( )

Apply a glissando and swell to a sine oscillator with LineSegments.

Definition at line 28 of file Test_Oscillators.cpp.

References csl::logMsg(), Osc, and runTest().

void testSimpleSines ( )

Simplest sine wave tests using the tutorial example classes.

Definition at line 42 of file Test_Oscillators.cpp.

References csl::SineAsPhased::dump(), csl::SineAsScaled::dump(), csl::UnitGenerator::dump(), csl::logMsg(), and runTest().

Referenced by runTests().

void testBasicWaves ( )

Test/demonstrate the basic waveform oscillators.

Definition at line 63 of file Test_Oscillators.cpp.

References csl::logMsg(), Osc, runTest(), and csl::sleepMsec().

void testScaledSin ( )

Scaled sine wave – 3 methods: with a MulOp and using the Sine's scale input.

Definition at line 101 of file Test_Oscillators.cpp.

References csl::BinaryOp::dump(), csl::logMsg(), Osc, runTest(), and csl::sleepMsec().

void testWavetableInterpolation ( )
void testAMFMSin ( )

AM and FM using the dynamic scale and frequency inputs.

Definition at line 156 of file Test_Oscillators.cpp.

References csl::logMsg(), Osc, and runTest().

void dumpAMFMSin ( )

use the dumpTest call to dump the whole graph

Definition at line 180 of file Test_Oscillators.cpp.

References dumpTest(), csl::logMsg(), Osc, and runTest().

void testSumOfSinesCached ( )

Play a sum of sines waveform – cached harmonic overtone series.

Definition at line 196 of file Test_Oscillators.cpp.

References csl::CompOrCacheOscillator::createCache(), csl::SumOfSines::dump(), kFrequency, csl::logMsg(), runTest(), csl::Phased::setFrequency(), csl::Scalable::setScale(), and csl::sleepMsec().

void testSumOfSines1F ( )

Play a sum of sines waveform – 1/f + noise.

Definition at line 216 of file Test_Oscillators.cpp.

References csl::CompOrCacheOscillator::createCache(), csl::logMsg(), runTest(), csl::Phased::setFrequency(), and csl::Scalable::setScale().

void testSumOfSinesNonCached ( )

Now test an uncached inharmonic series constructor format 3 = list of (freq/amp/phase) for (not-necessarily-harmonic) overtones Since it's a non-harmonic overtone series in this example, we can't cache a wavetable.

Definition at line 246 of file Test_Oscillators.cpp.

References kFreqAmpPhase, csl::logMsg(), runTest(), csl::Phased::setFrequency(), and csl::Scalable::setScale().

void testWaveTableFromFile ( )

Load an oscillator's wave table from a file – a single cycle of the vowel "oo" from the word "moon".

Definition at line 259 of file Test_Oscillators.cpp.

References csl::logMsg(), Osc, runTest(), and csl::Buffer::setBuffer().

void test_SHARC2 ( )
void runTests ( )

Definition at line 342 of file Test_Oscillators.cpp.

References testSimpleSines().