Keymap: Clicky frequency modulation (#4012)

Also worked around my busted dipswitch 2...
This commit is contained in:
Ethan Madden 2018-09-28 12:44:15 -07:00 committed by Drashna Jaelre
parent f1b2d46eaf
commit cb468e0307

View file

@ -188,15 +188,24 @@ uint16_t muse_counter = 0;
uint8_t muse_offset = 70; uint8_t muse_offset = 70;
uint16_t muse_tempo = 20; uint16_t muse_tempo = 20;
extern float clicky_rand;
void encoder_update(bool clockwise) { void encoder_update(bool clockwise) {
if (is_clicky_on()) { if (is_clicky_on()) {
if (clockwise) { if (IS_LAYER_ON(_RAISE)) {
clicky_freq_up(); if (clockwise) {
clicky_rand += 0.5f;
} else {
clicky_rand -= 0.5f;
}
} else { } else {
clicky_freq_down(); if (clockwise) {
clicky_freq_up();
} else {
clicky_freq_down();
}
} }
} else } else if (muse_mode) {
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) { if (IS_LAYER_ON(_RAISE)) {
if (clockwise) { if (clockwise) {
muse_offset++; muse_offset++;
@ -255,7 +264,8 @@ void dip_update(uint8_t index, bool active) {
stop_all_notes(); stop_all_notes();
#endif #endif
} }
case 2: break;
case 3:
if (active) { if (active) {
clicky_on(); clicky_on();
} else { } else {