From 841118a7f40844f7c6bb5dbd4e96ae99e91212dd Mon Sep 17 00:00:00 2001 From: Andreas Brandmaier Date: Thu, 23 Feb 2006 17:34:27 +0000 Subject: [PATCH] changed plugin effect to inline git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@90 0778d3d1-df1d-0410-868b-ea421aaaa00d --- plugins/organic/organic.cpp | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/plugins/organic/organic.cpp b/plugins/organic/organic.cpp index 336d9f79b..3c01b96ec 100644 --- a/plugins/organic/organic.cpp +++ b/plugins/organic/organic.cpp @@ -424,7 +424,7 @@ void organicInstrument::deleteNotePluginData( notePlayHandle * _n ) delete static_cast( _n->m_pluginData ); } -float organicInstrument::foldback(float in, float threshold) +/*float inline organicInstrument::foldback(float in, float threshold) { if (in>threshold || in<-threshold) { @@ -432,32 +432,9 @@ float organicInstrument::foldback(float in, float threshold) } return in; } +*/ -float organicInstrument::distort(float in, float dist) -{ - in *= dist; - if (in >= 1.0f) { - return 1.0f; - } else { - return in; - } - -} - -float organicInstrument::saturate(float x, float t) -{ - if(fabs(x) 0.f) - return t + (1.f-t)*tanh((x-t)/(1-t)); - else - return -(t + (1.f-t)*tanh((-x-t)/(1-t))); - } -} - -float organicInstrument::waveshape(float in, float amount) +float inline organicInstrument::waveshape(float in, float amount) { float k = 2.0f*amount/(1.0f-amount);