Version 0.99

This commit is contained in:
Gary Scavone
2009-03-24 22:41:14 -04:00
committed by Stephen Sinclair
commit 6485746ee9
218 changed files with 13786 additions and 0 deletions

36
JetTabl.cpp Normal file
View File

@@ -0,0 +1,36 @@
/**********************************************/
/* Jet Table Object by Perry R. Cook, 1995-96 */
/* Consult Fletcher and Rossing, Karjalainen, */
/* Cook, more, for information. */
/* This, as with many other of my "tables", */
/* is not a table, but is computed by poly- */
/* nomial calculation. */
/**********************************************/
#include "JetTabl.h"
JetTabl :: JetTabl()
{
lastOutput = 0.0;
}
JetTabl :: ~JetTabl()
{
}
MY_FLOAT JetTabl :: lookup(double sample) /* Perform "Table Lookup" */
{ /* By Polynomial Calculation */
lastOutput = sample *
(sample*sample - 1.0); /* (x^3 - x) approximates sigmoid of jet */
if (lastOutput > 1.0)
lastOutput = 1.0; /* Saturation at +/- 1.0 */
if (lastOutput < -1.0)
lastOutput = -1.0;
return lastOutput;
}
MY_FLOAT JetTabl :: lastOut()
{
return lastOutput;
}