changed plugin effect to inline

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@90 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Andreas Brandmaier
2006-02-23 17:34:27 +00:00
parent 1ef530bde2
commit 841118a7f4

View File

@@ -424,7 +424,7 @@ void organicInstrument::deleteNotePluginData( notePlayHandle * _n )
delete static_cast<oscPtr *>( _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)<t)
return x;
else
{
if(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);