Initial source commit

This commit is contained in:
Tony Bark 2025-10-03 02:19:59 -04:00
commit f1384c11ee
335 changed files with 52715 additions and 0 deletions

View file

@ -0,0 +1,45 @@
class Envelope {
public:
/**
* Constructs an envelope.
*
* All parameters are in range 0..1, and sum of the three time
* parameters must be <= 1.
*
* @param inMaxNoteLengthInGridSteps the maximum note length to
* cover. Exact envelopes will be generated for notes up
* to this length.
* @param inGridStepDurationInSamples the number of samples
* per grid step.
*/
Envelope( double inAttackTime, double inDecayTime,
double inSustainLevel, double inReleaseTime,
int inMaxNoteLengthInGridSteps,
int inGridStepDurationInSamples );
~Envelope();
/**
* Gets an evenlope for a given note length.
*
* @return an evelope of values in [0,1] that can be indexed by
* sample number. Will be destroyed when this class is destroyed.
*/
double *getEnvelope( int inNoteLengthInGridSteps );
private:
int mNumComputedEnvelopes;
int *mEvelopeLengths;
double **mComputedEnvelopes;
};