1
/**********************************************/
2
/* Jet Table Object by Perry R. Cook, 1995-96 */
3
/* Consult Fletcher and Rossing, Karjalainen, */
4
/* Cook, more, for information. */
5
/* This, as with many other of my "tables", */
6
/* is not a table, but is computed by poly- */
7
/* nomial calculation. */
8
/**********************************************/
14
lastOutput = (MY_FLOAT) 0.0;
21
MY_FLOAT JetTabl :: lookup(MY_FLOAT sample)
23
return this->tick(sample);
26
MY_FLOAT JetTabl :: tick(MY_FLOAT sample)
27
// Perform "Table Lookup"
28
// By Polynomial Calculation
30
// (x^3 - x) approximates sigmoid of jet
31
lastOutput = sample * (sample*sample - (MY_FLOAT) 1.0);
33
lastOutput = (MY_FLOAT) 1.0; // Saturation at +/- 1.0
34
if (lastOutput < -1.0)
35
lastOutput = (MY_FLOAT) -1.0;
39
MY_FLOAT JetTabl :: lastOut()