aboutsummaryrefslogtreecommitdiffstats
path: root/src/globals.c
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2024-01-15 16:14:14 +0100
committerBad Diode <bd@badd10de.dev>2024-01-15 16:14:14 +0100
commit22ddbd9d1688aed3220122ac7a513742140ed3b6 (patch)
tree9cc99919e74b09c8f1d42863d08c6fa7a63968c9 /src/globals.c
parentf6efcdd98b32f1cd0d5a4a52abb333437c04b44f (diff)
downloadstepper-22ddbd9d1688aed3220122ac7a513742140ed3b6.tar.gz
stepper-22ddbd9d1688aed3220122ac7a513742140ed3b6.zip
[WIP] Fix drawing bug on channel params
Diffstat (limited to 'src/globals.c')
-rw-r--r--src/globals.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/globals.c b/src/globals.c
index 05c964a..5063d69 100644
--- a/src/globals.c
+++ b/src/globals.c
@@ -1,3 +1,15 @@
1enum WAVES {
2 WAVE_SIN,
3 WAVE_SAW,
4 WAVE_SQUARE,
5 WAVE_MAX,
6};
7
8#define WAVE_SIZE 4
9#define WAVE_VARS 4
10
11typedef u32 Wave[WAVE_SIZE];
12
1// 13//
2// Globals. 14// Globals.
3// 15//
@@ -209,3 +221,9 @@ bool redraw_scale = true;
209bool update_bpm = false; 221bool update_bpm = false;
210u8 bar_counter = 0; 222u8 bar_counter = 0;
211 223
224static Wave wave_active = {0};
225// static Wave wave_target = {0};
226// TODO: wave env status: OFF, ATTACK, DECAY
227static int wave_env_ticks = 0;
228static int wave_env_attack = 8;
229static int wave_env_decay = 8;