-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathlut48x256.h
36 lines (30 loc) · 1.72 KB
/
lut48x256.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
#define WAVEFORM_MAX_STEP 48UL
#define WAVEFORM_TYPES 8
uint8_t Ramp[]={0,5,10,16,21,27,32,37,43,48,54,59,65,70,75,81,86,92,97,103,108,113,119,124,130,135,141,146,151,157,162,168,173,179,184,189,195,200,206,211,217,222,227,233,238,244,249,255};
uint8_t InvRamp[]={255,249,244,238,233,227,222,217,211,206,200,195,189,184,179,173,168,162,157,151,146,141,135,130,124,119,113,108,103,97,92,86,81,75,70,65,59,54,48,43,37,32,27,21,16,10,5,0};
uint8_t Triangle[]={0,10,21,32,43,54,65,75,86,97,108,119,130,141,151,162,173,184,195,206,217,227,238,249,249,238,227,217,206,195,184,173,162,151,141,130,119,108,97,86,75,65,54,43,32,21,10,0};
uint8_t Rect[]={255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
uint8_t InvRect[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255};
uint8_t Sine[]={0,1,5,10,18,27,39,52,66,82,98,115,132,149,165,181,196,210,222,233,241,248,252,255,255,252,248,241,233,222,210,196,181,165,149,132,115,98,82,66,52,39,27,18,10,5,1,0};
uint8_t InvSine[]={255,254,250,245,237,228,216,203,189,173,157,140,123,106,90,74,59,45,33,22,14,7,3,0,0,3,7,14,22,33,45,59,74,90,106,123,140,157,173,189,203,216,228,237,245,250,254,255};
uint8_t Rnd(){ return (uint8_t)random(255); }
uint8_t* waveform[WAVEFORM_TYPES]={
Ramp,
InvRamp,
Triangle,
Rect,
InvRect,
Sine,
InvSine,
InvSine //dummy, for rnd
};
const char waveformName[WAVEFORM_TYPES][5]={
{ 'R','a','m','p',0 },
{ 'i','R','a','m',0 },
{ 'T','r','i','a',0 },
{ 'R','e','c','t',0 },
{ 'i','R','e','c',0 },
{ 'S','i','n','e',0 },
{ 'i','S','i','n',0 },
{ 'R','n','d',' ',0 },
};