1
/*******************************************/
2
/* Swept Filter SubClass of Sampling */
3
/* Synthesizer, by Perry R. Cook, 1995-96*/
4
/* This instrument inherits up to 5 */
5
/* attack waves, 5 looped waves, an ADSR */
6
/* envelope, and adds a 4 pole swept */
8
/*******************************************/
12
SamplFlt :: SamplFlt() : Sampler()
14
MY_FLOAT tempCoeffs[2] = {(MY_FLOAT) 0.0,(MY_FLOAT) -1.0};
15
twozeroes[0] = new TwoZero;
16
twozeroes[0]->setZeroCoeffs(tempCoeffs);
17
twozeroes[0]->setGain((MY_FLOAT) 1.0);
18
twozeroes[1] = new TwoZero;
19
twozeroes[1]->setZeroCoeffs(tempCoeffs);
20
twozeroes[1]->setGain((MY_FLOAT) 1.0);
21
filters[0] = new FormSwep;
22
filters[0]->setTargets((MY_FLOAT) 0.0,(MY_FLOAT) 0.7,(MY_FLOAT) 0.5);
23
filters[1] = new FormSwep;
24
filters[1]->setTargets((MY_FLOAT) 0.0,(MY_FLOAT) 0.7,(MY_FLOAT) 0.5);
27
SamplFlt :: ~SamplFlt()
35
MY_FLOAT SamplFlt :: tick()
38
output = Sampler :: tick();
39
output = twozeroes[0]->tick(output);
40
output = filters[0]->tick(output);
41
output = twozeroes[1]->tick(output);
42
output = filters[1]->tick(output);
46
void SamplFlt :: controlChange(int number, MY_FLOAT value)