@@ -266,6 +266,7 @@ void button_key_on_single(uint8_t key) {
266
266
}
267
267
268
268
bool cued_sound_selector = false;
269
+ int8_t cued_sound_last_selected = 1 ;
269
270
void button_key_on_double (uint8_t key1 , uint8_t key2 ) {
270
271
printf ("on double %d+%d\n" , key1 , key2 );
271
272
if (key_on_buttons [KEY_A ] && key_on_buttons [KEY_B ]) {
@@ -296,6 +297,7 @@ void button_key_on_double(uint8_t key1, uint8_t key2) {
296
297
cuedsounds_volume = 150 ;
297
298
}
298
299
do_layer_kicks = cuedsounds_do_play ;
300
+ cued_sound_last_selected = cuedsounds_do_play ;
299
301
printf ("cuedsounds_do_play: %d\n" , cuedsounds_do_play );
300
302
} else {
301
303
// select volume
@@ -657,13 +659,20 @@ void button_handler(ButtonMatrix *bm) {
657
659
}
658
660
} else if (key_pressed [0 ] == 16 && key_pressed [1 ] == 13 &&
659
661
key_pressed [2 ] == 10 && key_pressed [3 ] == 19 ) {
662
+ #ifdef INCLUDE_CUEDSOUNDS
660
663
// switch between layering kicks
661
- do_layer_kicks = !do_layer_kicks ;
662
- if (do_layer_kicks ) {
664
+ if (do_layer_kicks == -1 ) {
665
+ do_layer_kicks = cued_sound_last_selected ;
666
+ if (cuedsounds_volume == 0 ) {
667
+ cuedsounds_volume = 150 ;
668
+ }
663
669
DebounceDigits_setText (debouncer_digits , "LAYER" , 200 );
664
670
} else {
671
+ do_layer_kicks = -1 ;
665
672
DebounceDigits_setText (debouncer_digits , "NORM" , 200 );
666
673
}
674
+
675
+ #endif
667
676
} else if (key_pressed [0 ] == 9 && key_pressed [1 ] == 10 &&
668
677
key_pressed [2 ] == 14 && key_pressed [3 ] == 13 ) {
669
678
// toggle random sequence mode
0 commit comments