This commit is contained in:
Daniel Borges
2012-11-16 09:18:57 +01:00
commit ea6f1ef80a
79 changed files with 3595 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
#ifndef _ENVELOPE_H_
#define _ENVELOPE_H_
#include "InstrumentParameters.h"
typedef enum
{
ATTACK,
DECAY,
SUSTAIN,
RELEASE
}
EnvelopeState;
typedef struct
{
int iTime;
int iLastEnvelope;
int iVelocity;
EnvelopeState iState;
}
Envelope;
void Envelope_Init(Envelope * pEnvelope);
unsigned int Envelope_Compute(Envelope * pEnvelope, InstrumentParameters * pParameters);
void Envelope_NoteOn(Envelope * pEnvelope, int velocity);
void Envelope_NoteOff(Envelope * pEnvelope);
#endif // _ENVELOPE_H_