mirror of
https://github.com/thestk/stk
synced 2026-01-13 21:11:53 +00:00
Version 4.0
This commit is contained in:
committed by
Stephen Sinclair
parent
3f126af4e5
commit
81475b04c5
@@ -1,22 +1,25 @@
|
||||
/*******************************************/
|
||||
/* Master Class for Sampling Synthesizer */
|
||||
/* by Perry R. Cook, 1995-96 */
|
||||
/* This instrument contains up to 5 */
|
||||
/* attack waves, 5 looped waves, and */
|
||||
/* an ADSR envelope. */
|
||||
/*******************************************/
|
||||
/***************************************************/
|
||||
/*! \class Sampler
|
||||
\brief STK sampling synthesis abstract base class.
|
||||
|
||||
This instrument contains up to 5 attack waves,
|
||||
5 looped waves, and an ADSR envelope.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2002.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
#include "Sampler.h"
|
||||
|
||||
Sampler :: Sampler()
|
||||
{
|
||||
// We don't make the waves here yet, because
|
||||
// we don't know what they will be.
|
||||
adsr = new ADSR;
|
||||
/* We don't make the waves here yet, because */
|
||||
/* we don't know what they will be. */
|
||||
baseFreq = (MY_FLOAT) 440.0;
|
||||
baseFrequency = 440.0;
|
||||
filter = new OnePole;
|
||||
attackGain = (MY_FLOAT) 0.25;
|
||||
loopGain = (MY_FLOAT) 0.25;
|
||||
attackGain = 0.25;
|
||||
loopGain = 0.25;
|
||||
whichOne = 0;
|
||||
}
|
||||
|
||||
@@ -40,13 +43,10 @@ void Sampler :: keyOff()
|
||||
void Sampler :: noteOff(MY_FLOAT amplitude)
|
||||
{
|
||||
this->keyOff();
|
||||
#if defined(_debug_)
|
||||
printf("Sampler : NoteOff: Amp=%lf\n",amplitude);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Sampler :: setFreq(MY_FLOAT frequency)
|
||||
{
|
||||
#if defined(_STK_DEBUG_)
|
||||
cerr << "Sampler: NoteOff amplitude = " << amplitude << endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
MY_FLOAT Sampler :: tick()
|
||||
@@ -57,7 +57,3 @@ MY_FLOAT Sampler :: tick()
|
||||
lastOutput *= adsr->tick();
|
||||
return lastOutput;
|
||||
}
|
||||
|
||||
void Sampler :: controlChange(int number, MY_FLOAT value)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user