CSL 5.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

Macros | Functions
Test_Sources.cpp File Reference
`#include "Test_Support.cpp"`
`#include "KarplusString.h"`
`#include <BasicFMInstrument.h>`
`#include <AdditiveInstrument.h>`
`#include <SndFileInstrument.h>`
`#include <Granulator.h>`

Go to the source code of this file.

## Macros
#define | USE_TEST_MAIN

## Functions
void | testNoises ()
| Noise tests, WhiteNoise & PinkNoise - using Scalable to protect our ears.
void | testString ()
| Plucked string simulation.
void | testStringChorus ()
| Test a chorus of strings – this demo plays an endless loop of string arpeggii. For each arpeggio, it picks a starting pitch and pitch step, a starting position and position increment, and a duration; the inner loop then creates notes and sleeps.
void | testMonoFilePlayer ()
| Test the sound file player - mono, stereo input files.
void | testStereoFilePlayer ()
void | testSoundFileTranspose ()
| Test the sound file player with rate shift.
void | testWaveShaper ()
| Test the WaveShaper.
void | testFMInstrument ()
| Test basic FM instrument.
void | testSOSInstrument ()
| Test SOS instrument - play 3 different timbres.
void | testFancyFMInstrument ()
void | testSndFileInstrument ()
| Test SoundFile instrument.
void | addSndtoBank (char *nam, UGenVector &snds, UGenVector &pans, Mixer &mix)
void | testSndFileBank ()
void | testGrainCloud ()
void | test_ifft ()
void | test_vector_ifft ()
| do vector cross-fade the long way
void | runTests ()

## Macro Definition Documentation

#define USE_TEST_MAIN

Definition at line 11 of file Test_Sources.cpp.

## Function Documentation

void testNoises | ( |  | ) |

Noise tests, WhiteNoise & PinkNoise - using Scalable to protect our ears.

Definition at line 21 of file Test_Sources.cpp.

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

void testString | ( |  | ) |

Plucked string simulation.

Definition at line 41 of file Test_Sources.cpp.

References csl::fRandM(), csl::logMsg(), runTest(), csl::Scalable::setScale(), and csl::KarplusString::trigger().

void testStringChorus | ( |  | ) |

Test a chorus of strings – this demo plays an endless loop of string arpeggii. For each arpeggio, it picks a starting pitch and pitch step, a starting position and position increment, and a duration; the inner loop then creates notes and sleeps.

Definition at line 54 of file Test_Sources.cpp.

References csl::Mixer::addInput(), csl::coin(), done, csl::fRandM(), csl::fRandZ(), csl::iRandM(), csl::keyToFreq(), csl::logMsg(), csl::Scalable::setScale(), csl::sleepSec(), and theIO.

void testMonoFilePlayer | ( |  | ) |

Test the sound file player - mono, stereo input files.

Definition at line 120 of file Test_Sources.cpp.

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

void testStereoFilePlayer | ( |  | ) |

Definition at line 139 of file Test_Sources.cpp.

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

void testSoundFileTranspose | ( |  | ) |

Test the sound file player with rate shift.

Definition at line 172 of file Test_Sources.cpp.

References csl::logMsg(), csl::sleepSec(), and theIO.

void testWaveShaper | ( |  | ) |

Test the WaveShaper.

Definition at line 193 of file Test_Sources.cpp.

References csl::logMsg(), runTest(), csl::Scalable::setScale(), and csl::Envelope::trigger().

void testFMInstrument | ( |  | ) |

Test basic FM instrument.

Definition at line 223 of file Test_Sources.cpp.

References csl::logMsg(), csl::Instrument::play(), runTest(), set_duration_f, and csl::FMInstrument::setParameter().

void testSOSInstrument | ( |  | ) |

Test SOS instrument - play 3 different timbres.

Definition at line 239 of file Test_Sources.cpp.

References csl::logMsg(), csl::AdditiveInstrument::playMIDI(), and runTest().

void testFancyFMInstrument | ( |  | ) |

Definition at line 262 of file Test_Sources.cpp.

References csl::logMsg(), csl::Instrument::play(), runTest(), set_c_freq_f, set_duration_f, and csl::FancyFMInstrument::setParameter().

void testSndFileInstrument | ( |  | ) |

Test SoundFile instrument.

Definition at line 281 of file Test_Sources.cpp.

References csl::logMsg(), csl::SndFileInstrument::play(), and runTest().

void addSndtoBank | ( | char * | nam,
|  | UGenVector & | snds,
|  | UGenVector & | pans,
|  | Mixer & | mix
| ) |  |

Definition at line 291 of file Test_Sources.cpp.

References csl::Mixer::addInput().

Referenced by testSndFileBank().

void testSndFileBank | ( |  | ) |

Definition at line 302 of file Test_Sources.cpp.

References addSndtoBank(), done, csl::fRand1(), csl::fRandM(), csl::iRandM(), csl::iRandV(), csl::logMsg(), csl::Stereoverb::setRoomSize(), csl::sleepSec(), and theIO.

void testGrainCloud | ( |  | ) |

Definition at line 354 of file Test_Sources.cpp.

References csl::GrainCloud::isPlaying, csl::logMsg(), csl::GrainCloud::mDensityBase, csl::GrainCloud::mDensityRange, csl::GrainCloud::mDurationBase, csl::GrainCloud::mDurationRange, csl::GrainCloud::mEnvelopeBase, csl::GrainCloud::mEnvelopeRange, csl::GrainCloud::mOffsetBase, csl::GrainCloud::mOffsetRange, csl::GrainCloud::mRateBase, csl::GrainCloud::mRateRange, csl::GrainCloud::mSamples, csl::GrainCloud::mVolumeBase, csl::GrainCloud::mVolumeRange, csl::GrainCloud::mWidthBase, csl::GrainCloud::mWidthRange, csl::GrainCloud::numSamples, runTest(), csl::sleepSec(), and csl::GrainCloud::startThreads().

void test_ifft | ( |  | ) |

Definition at line 387 of file Test_Sources.cpp.

References csl::logMsg(), runTest(), and csl::IFFT::setBinMagPhase().

Referenced by runTests().

void test_vector_ifft | ( |  | ) |

do vector cross-fade the long way

Definition at line 401 of file Test_Sources.cpp.

References csl::logMsg(), runTest(), and csl::IFFT::setBinMagPhase().

void runTests | ( |  | ) |

Definition at line 426 of file Test_Sources.cpp.

References test_ifft().