Version 3.0

This commit is contained in:
Gary Scavone
2013-09-25 11:21:51 +02:00
committed by Stephen Sinclair
parent 7c0ee03d60
commit 868787a5f9
348 changed files with 12471 additions and 9135 deletions

44
effects/Echo.cpp Normal file
View File

@@ -0,0 +1,44 @@
/******************************************/
/* Echo Effect */
/* by Perry Cook, 1996 */
/******************************************/
#include "Echo.h"
Echo :: Echo(MY_FLOAT longestDelay)
{
length = (long) longestDelay + 2;
delayLine = new DLineN(length);
effectMix = 0.5;
this->clear();
this->setDelay(longestDelay);
}
Echo :: ~Echo()
{
delete delayLine;
}
void Echo :: clear()
{
delayLine->clear();
lastOut = 0.0;
}
void Echo :: setDelay(MY_FLOAT delay)
{
delayLine->setDelay(delay);
}
void Echo :: setEffectMix(MY_FLOAT mix)
{
effectMix = mix;
}
MY_FLOAT Echo :: tick(MY_FLOAT input)
{
lastOut = effectMix * delayLine->tick(input);
lastOut += input * (1.0 - effectMix);
return lastOut;
}