-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathelmyraGlobalDefines.hpp
82 lines (76 loc) · 2.43 KB
/
elmyraGlobalDefines.hpp
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#ifndef ELMYRAGLOBALDEFINES_HPP
#define ELMYRAGLOBALDEFINES_HPP
#define SERIAL_DEBUG
//#define SERIAL_DEBUG_TOUCH
#define BIAS 512
#define AMP_MAX 511
#define POT_MAX 4095
#define LED_PIN_MAX 254
#define SMOOTHING_FACTOR_TUNE 60
#define SMOOTHING_FACTOR_NORMAL 5
#define SMOOTHING_FACTOR_TOUCH 5
#define POT_DEAD_ZONE_TUNE 1
#define POT_DEAD_ZONE_NORMAL 30
#define POT_TUNE_BASE 20000
#define POT_TUNE_SCALE 100
#define ENV_MAX 900
#define ENV_MIN 50
#define ENV_ATTACK 2
#define ENV_RELEASE 2
#define ENV_SPEED_FACTOR 32
#define SPECIAL_MODE_ENABLE_TIME 1
#define AUDIO_BUF_SIZE 1000
#define AUDIO_BUF_PREFILL 100
#define DELAY_BUF_SIZE 12000
#define DELAY_POT_SCALE_MIX 4095
#define DELAY_POT_SCALE_TIME 500
#define DELAY_POT_SCALE_FEEDBACK 1023
#define DELAY_TIME_SLEW 500
#define DELAY_TIME_FINETUNE_POINT 1000
#define DELAY_TIME_FINETUNE_FACTOR 2
#define OSC_WAVE_SLEW_LOW 1
#define OSC_WAVE_SLEW_HIGH 5
#define OSC_SLEW_SCALE 4
#define OSC_MOD_AMOUNT_MAX 24
#define CLOCK_RATE 48000000
#define SAMPLE_RATE 24000
#define RELAX_TIME 5
#define IO_UPDATE_FREQ 25
#define NUM_VOICES 3
#define SEQUENCER_MAX_STEPS 16
#define SEQUENCER_MIN_STEP_LEN 1
#define SEQUENCER_MAX_STEP_LEN 72
#define SPECIAL_MODE_SCALE_NUM 0
#define SPECIAL_MODE_SEQUENCER_RUN_NUM 1
#define SPECIAL_MODE_SEQUENCER_RECORD_NUM 2
#define PIN_IN_GSR_1 A3
#define PIN_IN_GSR_2 A2
#define PIN_IN_GSR_3 A1
#define PIN_IN_TUNE_1 A5
#define PIN_IN_TUNE_2 20
#define PIN_IN_TUNE_3 21
#define PIN_IN_MOD A4
#define PIN_IN_DELAY_FEEDBACK 22
#define PIN_IN_DELAY_TIME 23
#define PIN_IN_DELAY_MIX 25
#define PIN_IN_WAVE_1 7
#define PIN_IN_WAVE_2 12
#define PIN_IN_WAVE_3 2
#define PIN_IN_ENV_1 SCK
#define PIN_IN_ENV_2 MOSI
#define PIN_IN_ENV_3 MISO
#define PIN_OUT_AUDIO A0
#define PIN_OUT_ENV_1 13
#define PIN_OUT_ENV_2 11
#define PIN_OUT_ENV_3 10
#define SCALE_MAX 76
static const int scale[] = \
{ 20600, 21830, 23120, 24500, 25960, 27500, 29140, 30870, 32700, 34650, 36710, 38890, \
41200, 43650, 46250, 49000, 51910, 55000, 58270, 61740, 65410, 69300, 73420, 77780, \
82410, 87310, 92500, 98000, 103800, 110000, 116500, 123500, 130800, 138600, 146800, \
155600, 164800, 174600, 185000, 196000, 207700, 220000, 233100, 246900, 261600, \
277200, 293700, 311100, 329600, 349200, 370000, 392000, 415300, 440000, 466200, \
493900, 523300, 554400, 587300, 622300, 659300, 698500, 740000, 784000, 830600, \
880000, 932300, 987800, 1047000, 1109000, 1175000, 1245000, 1319000, 1397000, \
1480000, 1568000, 1661000 };
#endif