add soft-clipping of mixed sounds using tanh

expose ADSR to TinyAudio API
enable envelope when playing wav files
This commit is contained in:
Erwin Coumans
2017-04-28 12:39:51 -07:00
parent 821ad96549
commit c95a1c9c33
8 changed files with 51 additions and 19 deletions

View File

@@ -21,6 +21,15 @@ public:
bool isIdle() const;
void keyOn();
void keyOff();
void setValues(double attack,double decay,double sustain,double release)
{
m_attackRate = attack;
m_decayRate = decay;
m_sustainLevel = sustain;
m_releaseRate = release;
}
};
#endif //B3_ADSR_H