28 StkFloat
tick( StkFloat input );
59 lastFrame_[0] = input * (input * input - 1.0);
62 if ( lastFrame_[0] > 1.0 ) lastFrame_[0] = 1.0;
63 if ( lastFrame_[0] < -1.0 ) lastFrame_[0] = -1.0;
69 #if defined(_STK_DEBUG_)
70 if ( channel >= frames.
channels() ) {
71 oStream_ <<
"JetTable::tick(): channel and StkFrames arguments are incompatible!";
76 StkFloat *samples = &frames[channel];
77 unsigned int hop = frames.
channels();
78 for (
unsigned int i=0; i<frames.
frames(); i++, samples += hop ) {
79 *samples = *samples * (*samples * *samples - 1.0);
80 if ( *samples > 1.0) *samples = 1.0;
81 if ( *samples < -1.0) *samples = -1.0;
84 lastFrame_[0] = *(samples-hop);
90 #if defined(_STK_DEBUG_)
92 oStream_ <<
"JetTable::tick(): channel and StkFrames arguments are incompatible!";
97 StkFloat *iSamples = &iFrames[iChannel];
98 StkFloat *oSamples = &oFrames[oChannel];
100 for (
unsigned int i=0; i<iFrames.
frames(); i++, iSamples += iHop, oSamples += oHop ) {
101 *oSamples = *oSamples * (*oSamples * *oSamples - 1.0);
102 if ( *oSamples > 1.0) *oSamples = 1.0;
103 if ( *oSamples < -1.0) *oSamples = -1.0;
106 lastFrame_[0] = *(oSamples-oHop);