CSL  6.0
Test_Panners.cpp File Reference
#include "Test_Support.cpp"
#include "Convolver.h"
#include "Convolver2.h"
#include <unistd.h>
#include "InOut.h"
#include "SpatialAudio.h"
#include "Binaural.h"

Go to the source code of this file.

Macros

#define USE_TEST_MAIN
 
#define USE_CONVOLVER
 
#define IR_FILE   "/Content/Code/CSL/CSL_Data/7.0s_Cathedral C.aiff"
 NEW (1905) Convolver. More...
 
#define USE_SND_FILES
 

Functions

void testPan ()
 Pan a sine to stereo. More...
 
void testN2MPan ()
 Pan a sine to "N" channels. More...
 
void testSineMixer ()
 Test mixer – really slow additive synthesis. More...
 
void testPanMix ()
 Pan and mix 2 sines. More...
 
void testBigPanMix ()
 Pan and mix many sines. More...
 
void testOscBank ()
 Make a bank or 50 sines with random walk panners and glissandi. More...
 
void testCMapIO ()
 swap sound channels with a ChannelMappedBuffer InOut Constructor: InOut(input, inChan, outChan, [ch-1 ... ch-outChan]); More...
 
void test_Binaural_horiz ()
 Spatializer with HRTF. More...
 
void test_Binaural_vertAxial ()
 Repeat a short test file moving in circles around the vertical plane at AZ = CSL_PIHALF (axial plane in line with your ears, easy to localize) More...
 
void test_Binaural_vertMedian ()
 Repeat a short test file moving in circles around the vertical plane at AZ = 0 (median plane between your ears, hard to localize) More...
 
void test_Ambi_horiz ()
 Spatializer with Ambisonics. More...
 
void test_SimpleP ()
 Spatializer with simple panners & filters and/or reverb. More...
 
void test_VBAP_horiz ()
 Spatializer with VBAP. More...
 
void test_convolution ()
 
float * load_filter_data (char *fname, unsigned &siz)
 
void test_convolution_file (float *data, unsigned len)
 
void test_convolution_files ()
 
void runTests ()
 

Variables

float test_IR [400]
 

Macro Definition Documentation

#define USE_TEST_MAIN

Definition at line 12 of file Test_Panners.cpp.

#define USE_CONVOLVER

Definition at line 16 of file Test_Panners.cpp.

#define IR_FILE   "/Content/Code/CSL/CSL_Data/7.0s_Cathedral C.aiff"

NEW (1905) Convolver.

Definition at line 417 of file Test_Panners.cpp.

Referenced by test_convolution().

#define USE_SND_FILES

Definition at line 467 of file Test_Panners.cpp.

Function Documentation

void testPan ( )

Pan a sine to stereo.

Definition at line 29 of file Test_Panners.cpp.

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

void testN2MPan ( )

Pan a sine to "N" channels.

Definition at line 41 of file Test_Panners.cpp.

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

void testSineMixer ( )

Test mixer – really slow additive synthesis.

Definition at line 55 of file Test_Panners.cpp.

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

void testPanMix ( )

Pan and mix 2 sines.

Definition at line 74 of file Test_Panners.cpp.

References csl::Mixer::addInput(), CSL_PI, csl::logMsg(), Osc, and runTest().

void testBigPanMix ( )

Pan and mix many sines.

Definition at line 98 of file Test_Panners.cpp.

References csl::Mixer::addInput(), CSL_PI, csl::Mixer::deleteInputs(), csl::fRandM(), csl::logMsg(), Osc, and runTest().

void testOscBank ( )

Make a bank or 50 sines with random walk panners and glissandi.

Definition at line 122 of file Test_Panners.cpp.

References csl::Mixer::addInput(), csl::Mixer::deleteInputs(), csl::logMsg(), Osc, and runTest().

void testCMapIO ( )

swap sound channels with a ChannelMappedBuffer InOut Constructor: InOut(input, inChan, outChan, [ch-1 ... ch-outChan]);

Copy in-out plug

Definition at line 147 of file Test_Panners.cpp.

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

void test_Binaural_horiz ( )

Spatializer with HRTF.

Repeat a short test file moving in circles around the horizontal plane

Definition at line 246 of file Test_Panners.cpp.

References csl::Spatializer::addSource(), csl::IO::clearRoot(), CSL_NAME_LEN, csl::SpatialSource::dump(), csl::kBinaural, csl::logMsg(), csl::SpatialSource::setPosition(), csl::IO::setRoot(), csl::sleepSec(), and theIO.

Referenced by runTests().

void test_Binaural_vertAxial ( )

Repeat a short test file moving in circles around the vertical plane at AZ = CSL_PIHALF (axial plane in line with your ears, easy to localize)

Definition at line 280 of file Test_Panners.cpp.

References csl::Spatializer::addSource(), csl::IO::clearRoot(), CSL_PIHALF, csl::SpatialSource::dump(), csl::kBinaural, csl::logMsg(), csl::SpatialSource::setPosition(), csl::IO::setRoot(), csl::sleepSec(), and theIO.

void test_Binaural_vertMedian ( )

Repeat a short test file moving in circles around the vertical plane at AZ = 0 (median plane between your ears, hard to localize)

Definition at line 306 of file Test_Panners.cpp.

References csl::Spatializer::addSource(), csl::IO::clearRoot(), csl::SpatialSource::dump(), csl::kBinaural, csl::logMsg(), csl::SpatialSource::setPosition(), csl::IO::setRoot(), csl::sleepSec(), and theIO.

void test_SimpleP ( )
void test_convolution ( )
void test_convolution_file ( float *  data,
unsigned  len 
)
void test_convolution_files ( )

Definition at line 573 of file Test_Panners.cpp.

References len, load_filter_data(), and test_convolution_file().

void runTests ( )

Definition at line 603 of file Test_Panners.cpp.

References test_Binaural_horiz().

Variable Documentation

float test_IR[400]

Definition at line 421 of file Test_Panners.cpp.