-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathADDAC_Adsr.h
executable file
·51 lines (37 loc) · 1.2 KB
/
ADDAC_Adsr.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
/*
* ADDAC_Adsr
* Version 0.1 November, 2011
* Copyright 2011 AndrŽ Gonalves
*/
#ifndef ADDAC_Adsr_h
#define ADDAC_Adsr_h
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
#define addacMaxResolution 65535
//#define DEBUG
//#define DEBUG_adsr
/*! \ADDAC_ADSR class */
class ADDAC_Adsr{
public:
ADDAC_Adsr();
void update(bool _trigger, bool _inverted, float _Atime, float _D, float _Dtime,float _Stime, float _Rtime);
void update(bool _trigger, bool _inverted, float _A, float _Atime, float _D, float _Dtime, float _Stime, float _Rtime);
void updateLogExpMode(bool _trigger, bool _inverted, float _A, float _Atime, float _Ashape, float _D, float _Dtime, float _Dshape,float _S, float _Stime, float _Sshape, float _Rtime, float _Rshape);
///
void update(float _A, float _Atime, float _D, float _Dtime, float _S,float _Stime, float _Rtime);
void trigger(float _A);
void trigger();
void release();
unsigned long ADSRtriggerTime;
bool ADSRtrigger;
float CVstream;
unsigned int toAddDif;
float TipPoint;
float Attack;
float floatPercentage, weakLink;
bool SUSTAIN;
};
#endif