Преглед изворни кода

some hints on what to implement next

Thomas Buck пре 6 месеци
родитељ
комит
7000ed422d
3 измењених фајлова са 36 додато и 11 уклоњено
  1. 10
    1
      docs/src/loopstation.md
  2. 18
    6
      src/sequence.c
  3. 8
    4
      src/ui.c

+ 10
- 1
docs/src/loopstation.md Прегледај датотеку

@@ -7,6 +7,15 @@ Hold it down for a while and release it to set the length of the loop.
7 7
 
8 8
 Notes played while the record button is held will be looped.
9 9
 
10
-The top-right button below the encoder clears the recorded loop.
10
+The top-right button below the encoder clears the recorded loop in different ways:
11
+
12
+ * Pressing it on its own will clear all channels of the current loop, keeping the set length.
13
+ * Presssing it while holding down one of the channel mute buttons will clear only this channel in the current loop.
14
+ * Pressing it while holding down the left REC button will clear the current loop, including the length.
15
+ * Pressing it while holding down the right REC button will clear all loops in all banks.
11 16
 
12 17
 You can modify the loop length using the encoder menu.
18
+
19
+The encoder menu also provides a way to switch between different loop banks.
20
+With the `Sel-Bnk` menu you can switch to another loop bank.
21
+With the `Cpy-Bnk` menu you can copy the current loop to another bank and switch to it.

+ 18
- 6
src/sequence.c Прегледај датотеку

@@ -119,30 +119,42 @@ static bool sequence_get(uint32_t beat, enum channels ch) {
119 119
 
120 120
 void sequence_handle_button_loopstation(enum buttons btn, bool rec) {
121 121
     switch (btn) {
122
-        case BTN_A:
123
-        case BTN_E: {
122
+        case BTN_A: {
124 123
             pulse_trigger_out(0, mem_data()->ch_timings[0]);
125 124
             pulse_trigger_led(0, mem_data()->ch_timings[0]);
126 125
             pulse_trigger_led(4, mem_data()->ch_timings[0]);
127 126
             break;
128 127
         }
129 128
 
130
-        case BTN_B:
131
-        case BTN_F: {
129
+        case BTN_B: {
132 130
             pulse_trigger_out(1, mem_data()->ch_timings[1]);
133 131
             pulse_trigger_led(1, mem_data()->ch_timings[1]);
134 132
             pulse_trigger_led(5, mem_data()->ch_timings[1]);
135 133
             break;
136 134
         }
137 135
 
138
-        case BTN_C:
139
-        case BTN_G: {
136
+        case BTN_C: {
140 137
             pulse_trigger_out(2, mem_data()->ch_timings[2]);
141 138
             pulse_trigger_led(2, mem_data()->ch_timings[2]);
142 139
             pulse_trigger_led(6, mem_data()->ch_timings[2]);
143 140
             break;
144 141
         }
145 142
 
143
+        case BTN_E: {
144
+            // TODO mute/unmute according to rec param
145
+            return; // not recording sequence!
146
+        }
147
+
148
+        case BTN_F: {
149
+            // TODO mute/unmute according to rec param
150
+            return; // not recording sequence!
151
+        }
152
+
153
+        case BTN_G: {
154
+            // TODO mute/unmute according to rec param
155
+            return; // not recording sequence!
156
+        }
157
+
146 158
         default: {
147 159
             break;
148 160
         }

+ 8
- 4
src/ui.c Прегледај датотеку

@@ -188,16 +188,20 @@ static void ui_buttons_loopstation(enum buttons btn, bool val) {
188 188
     switch (btn) {
189 189
         case BTN_A:
190 190
         case BTN_B:
191
-        case BTN_C:
192
-        case BTN_E:
193
-        case BTN_F:
194
-        case BTN_G: {
191
+        case BTN_C: {
195 192
             if (val) {
196 193
                 sequence_handle_button_loopstation(btn, rec_held_down);
197 194
             }
198 195
             break;
199 196
         }
200 197
 
198
+        case BTN_E:
199
+        case BTN_F:
200
+        case BTN_G: {
201
+            sequence_handle_button_loopstation(btn, val);
202
+            break;
203
+        }
204
+
201 205
         case BTN_REC: {
202 206
             // reset sequence
203 207
             sequence_init();

Loading…
Откажи
Сачувај