summaryrefslogtreecommitdiff
path: root/quantum/process_keycode/process_music.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/process_keycode/process_music.c')
-rw-r--r--quantum/process_keycode/process_music.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c
index 6822c5e289..eeec0c28a4 100644
--- a/quantum/process_keycode/process_music.c
+++ b/quantum/process_keycode/process_music.c
@@ -146,7 +146,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) {
if (music_activated || midi_activated) {
if (record->event.pressed) {
- if (keycode == KC_LEFT_CTRL) { // Start recording
+ if (keycode == KC_LEFT_CTRL) { // Start recording
music_all_notes_off();
music_sequence_recording = true;
music_sequence_recorded = false;
@@ -155,9 +155,9 @@ bool process_music(uint16_t keycode, keyrecord_t *record) {
return false;
}
- if (keycode == KC_LEFT_ALT) { // Stop recording/playing
+ if (keycode == KC_LEFT_ALT) { // Stop recording/playing
music_all_notes_off();
- if (music_sequence_recording) { // was recording
+ if (music_sequence_recording) { // was recording
music_sequence_recorded = true;
}
music_sequence_recording = false;
@@ -165,7 +165,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) {
return false;
}
- if (keycode == KC_LEFT_GUI && music_sequence_recorded) { // Start playing
+ if (keycode == KC_LEFT_GUI && music_sequence_recorded) { // Start playing
music_all_notes_off();
music_sequence_recording = false;
music_sequence_playing = true;
@@ -230,11 +230,17 @@ bool music_mask(uint16_t keycode) {
# endif
}
-__attribute__((weak)) bool music_mask_kb(uint16_t keycode) { return music_mask_user(keycode); }
+__attribute__((weak)) bool music_mask_kb(uint16_t keycode) {
+ return music_mask_user(keycode);
+}
-__attribute__((weak)) bool music_mask_user(uint16_t keycode) { return keycode < 0xFF; }
+__attribute__((weak)) bool music_mask_user(uint16_t keycode) {
+ return keycode < 0xFF;
+}
-bool is_music_on(void) { return (music_activated != 0); }
+bool is_music_on(void) {
+ return (music_activated != 0);
+}
void music_toggle(void) {
if (!music_activated) {
@@ -260,7 +266,9 @@ void music_off(void) {
# endif
}
-bool is_midi_on(void) { return (midi_activated != 0); }
+bool is_midi_on(void) {
+ return (midi_activated != 0);
+}
void midi_toggle(void) {
if (!midi_activated) {
@@ -315,4 +323,4 @@ __attribute__((weak)) void midi_on_user() {}
__attribute__((weak)) void music_scale_user() {}
-#endif // defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
+#endif // defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))