25#include <cxxtest/TestSuite.h>
55 synth->buffersize = 256;
58 for(
int i = 0;
i <
synth->buffersize; ++
i)
61 for(
int i = 0;
i <
synth->buffersize; ++
i)
67 for(
int i = 0;
i <
synth->buffersize; ++
i)
80 XMLwrapper *wrap =
new XMLwrapper();
81 cout << string(
SOURCE_DIR) + string(
"/guitar-adnote.xmz")
84 +
string(
"/guitar-adnote.xmz"));
85 TS_ASSERT(wrap->enterbranch(
"MASTER"));
86 TS_ASSERT(wrap->enterbranch(
"PART", 2));
87 TS_ASSERT(wrap->enterbranch(
"INSTRUMENT"));
88 TS_ASSERT(wrap->enterbranch(
"INSTRUMENT_KIT"));
89 TS_ASSERT(wrap->enterbranch(
"INSTRUMENT_KIT_ITEM", 0));
90 TS_ASSERT(wrap->enterbranch(
"PAD_SYNTH_PARAMETERS"));
106 float freq = 440.0f * powf(2.0f, (
testnote - 69.0f) / 12.0f);
143 ofstream
file(
"padnoteout", ios::out);
148 for(
int i = 0;
i <
synth->buffersize; ++
i)
152 sampleCount +=
synth->buffersize;
154 TS_ASSERT_DELTA(
outL[255], 0.0660f, 0.0001f);
161 sampleCount +=
synth->buffersize;
162 TS_ASSERT_DELTA(
outL[255], -0.0729f, 0.0001f);
165 sampleCount +=
synth->buffersize;
166 TS_ASSERT_DELTA(
outL[255], 0.060818f, 0.0001f);
169 sampleCount +=
synth->buffersize;
170 TS_ASSERT_DELTA(
outL[255], 0.036895f, 0.0005f);
173 sampleCount +=
synth->buffersize;
174 TS_ASSERT_DELTA(
outL[255], -0.006623f, 0.0001f);
176 while(!
note->finished()) {
180 for(
int i = 0;
i <
synth->buffersize; ++
i)
184 sampleCount +=
synth->buffersize;
190 TS_ASSERT_EQUALS(sampleCount, 2304);
193#define OUTPUT_PROFILE
196 const int samps = 15000;
199 for(
int i = 0;
i < samps; ++
i)
203 printf(
"PadNoteTest: %f seconds for %d Samples to be generated.\n",
204 (
static_cast<float>(t_off - t_on)) / CLOCKS_PER_SEC, samps);
SYNTH_T * synth
Definition LocalZynAddSubFx.cpp:47
SYNTH_T * synth
Definition PadNoteTest.h:36
void FFT_cleanup()
Definition FFTwrapper.cpp:82
float * denormalkillbuf
Definition Util.cpp:46
Definition Controller.h:9
Definition FFTwrapper.h:32
Definition PADnoteParameters.h:41
void applyparameters(bool lockmutex)
Definition PADnoteParameters.cpp:828
void getfromXML(XMLwrapper *xml)
Definition PADnoteParameters.cpp:1102
Definition PadNoteTest.h:41
void willNoteBeRunButIsHereForLinkingReasonsHowsThisForCamelCaseEh()
Definition PadNoteTest.h:120
FFTwrapper * fft
Definition PadNoteTest.h:45
float * outR
Definition PadNoteTest.h:50
void tearDown()
Definition PadNoteTest.h:125
unsigned char testnote
Definition PadNoteTest.h:47
void setUp()
Definition PadNoteTest.h:52
Master * master
Definition PadNoteTest.h:44
PADnote * note
Definition PadNoteTest.h:43
Controller * controller
Definition PadNoteTest.h:46
void testSpeed()
Definition PadNoteTest.h:195
float * outL
Definition PadNoteTest.h:50
void testDefaults()
Definition PadNoteTest.h:136
register unsigned i
Definition inflate.c:1575
JHUFF_TBL long freq[]
Definition jchuff.h:50
Definition juce_Uuid.h:141
struct zdirent * file
Definition win32.c:1500
#define SOURCE_DIR
Definition zynaddsubfx-src.cpp:21