aboutsummaryrefslogtreecommitdiffstats
path: root/src/patterns.c
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2023-04-24 17:31:17 +0200
committerBad Diode <bd@badd10de.dev>2023-04-24 17:31:17 +0200
commit4771c84572008a223b1f35f6b2cb1d8b92bb2083 (patch)
treeb7f8318c2003a43dfa75c6e5727c15e895b908fd /src/patterns.c
parent694bcf4790f7c03751972832bf6f2cbe6a215d04 (diff)
downloadstepper-4771c84572008a223b1f35f6b2cb1d8b92bb2083.tar.gz
stepper-4771c84572008a223b1f35f6b2cb1d8b92bb2083.zip
Fix SRAM bug due to exceeding 32KB capacity
This means that currently the global channel parameters are not saved, but this is kind of unimportant, since they are just used to change all the triggers. In the future we may choose to discard a pattern, a bank or compress the data before storing it on the SRAM, depending on how much more data we need to save.
Diffstat (limited to 'src/patterns.c')
-rw-r--r--src/patterns.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/patterns.c b/src/patterns.c
index dbd9c9f..6ce0878 100644
--- a/src/patterns.c
+++ b/src/patterns.c
@@ -34,19 +34,19 @@ typedef struct ChannelNoiseParams {
34typedef struct ChannelSquare { 34typedef struct ChannelSquare {
35 bool active; 35 bool active;
36 TriggerNote notes[16]; 36 TriggerNote notes[16];
37 ChannelSquareParams params[17]; 37 ChannelSquareParams params[16];
38} ChannelSquare; 38} ChannelSquare;
39 39
40typedef struct ChannelWave { 40typedef struct ChannelWave {
41 bool active; 41 bool active;
42 TriggerNote notes[16]; 42 TriggerNote notes[16];
43 ChannelWaveParams params[17]; 43 ChannelWaveParams params[16];
44} ChannelWave; 44} ChannelWave;
45 45
46typedef struct ChannelNoise { 46typedef struct ChannelNoise {
47 bool active; 47 bool active;
48 TriggerNote notes[16]; 48 TriggerNote notes[16];
49 ChannelNoiseParams params[17]; 49 ChannelNoiseParams params[16];
50} ChannelNoise; 50} ChannelNoise;
51 51
52typedef struct Pattern { 52typedef struct Pattern {
@@ -58,6 +58,11 @@ typedef struct Pattern {
58 u8 bank; 58 u8 bank;
59} Pattern; 59} Pattern;
60 60
61static ChannelSquareParams ch1_params = {0};
62static ChannelSquareParams ch2_params = {0};
63static ChannelWaveParams ch3_params = {0};
64static ChannelNoiseParams ch4_params = {0};
65
61// 66//
62// Defaults. 67// Defaults.
63// 68//