-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathADDAC_Env.h
executable file
·61 lines (43 loc) · 1.18 KB
/
ADDAC_Env.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* ADDAC_Adsr
* Version 0.1 November, 2011
* Copyright 2011 AndrŽ Gonalves
*/
#ifndef ADDAC_Env_h
#define ADDAC_Env_h
#include <StandardCplusplus.h>
#include <vector>
using namespace std;
// <iostream> declares cout/cerr, but the application must define them
// because it's up to you what to do with them.
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
#define addacMaxResolution 65535
//#define DEBUG
//#define DEBUG_env
/*! \ADDAC_Env class */
class ADDAC_Env{
public:
ADDAC_Env();
void update(bool _trigger, bool _inverted, float _A, float _Atime, float _D, float _Dtime, float _S,float _Stime, float _Rtime);
void MultiEnv(bool _trigger, bool _inverted);
void MultiEnvLoop(bool _trigger, bool _inverted);
void PrintMultiEnv();
void addPoint(float _amp, float _time);
unsigned long ENVtriggerTime;
int actualStep;
bool ENVtrigger;
float CVstream;
unsigned int toAddDif;
long TipPoint;
float Attack;
float floatPercentage, weakLink;
bool SUSTAIN;
bool _loopON;
vector<float> time;
vector<float> amplitude;
};
#endif