forked from mirrors/qmk_userspace
adds music mode, music mode songs, music mask
This commit is contained in:
parent
9abbbe7089
commit
415d38ba9e
10 changed files with 168 additions and 81 deletions
|
@ -1,6 +1,11 @@
|
|||
#include "audio.h"
|
||||
#include "process_audio.h"
|
||||
|
||||
#ifndef VOICE_CHANGE_SONG
|
||||
#define VOICE_CHANGE_SONG SONG(VOICE_CHANGE_SOUND)
|
||||
#endif
|
||||
float voice_change_song[][2] = VOICE_CHANGE_SONG;
|
||||
|
||||
static float compute_freq_for_midi_note(uint8_t note)
|
||||
{
|
||||
// https://en.wikipedia.org/wiki/MIDI_tuning_standard
|
||||
|
@ -20,12 +25,9 @@ bool process_audio(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
|
||||
if (keycode == AU_TOG && record->event.pressed) {
|
||||
if (is_audio_on())
|
||||
{
|
||||
if (is_audio_on()) {
|
||||
audio_off();
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
audio_on();
|
||||
}
|
||||
return false;
|
||||
|
@ -33,13 +35,13 @@ bool process_audio(uint16_t keycode, keyrecord_t *record) {
|
|||
|
||||
if (keycode == MUV_IN && record->event.pressed) {
|
||||
voice_iterate();
|
||||
music_scale_user();
|
||||
PLAY_SONG(voice_change_song);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (keycode == MUV_DE && record->event.pressed) {
|
||||
voice_deiterate();
|
||||
music_scale_user();
|
||||
PLAY_SONG(voice_change_song);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue