|
|
@ -39,14 +39,16 @@ static uint8_t music_sequence_position = 0;
|
|
|
|
static uint16_t music_sequence_timer = 0;
|
|
|
|
static uint16_t music_sequence_timer = 0;
|
|
|
|
static uint16_t music_sequence_interval = 100;
|
|
|
|
static uint16_t music_sequence_interval = 100;
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef MUSIC_ON_SONG
|
|
|
|
#ifdef AUDIO_ENABLE
|
|
|
|
|
|
|
|
#ifndef MUSIC_ON_SONG
|
|
|
|
#define MUSIC_ON_SONG SONG(MUSIC_ON_SOUND)
|
|
|
|
#define MUSIC_ON_SONG SONG(MUSIC_ON_SOUND)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#ifndef MUSIC_OFF_SONG
|
|
|
|
#ifndef MUSIC_OFF_SONG
|
|
|
|
#define MUSIC_OFF_SONG SONG(MUSIC_OFF_SOUND)
|
|
|
|
#define MUSIC_OFF_SONG SONG(MUSIC_OFF_SOUND)
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
float music_on_song[][2] = MUSIC_ON_SONG;
|
|
|
|
|
|
|
|
float music_off_song[][2] = MUSIC_OFF_SONG;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
float music_on_song[][2] = MUSIC_ON_SONG;
|
|
|
|
|
|
|
|
float music_off_song[][2] = MUSIC_OFF_SONG;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void music_noteon(uint8_t note) {
|
|
|
|
static void music_noteon(uint8_t note) {
|
|
|
|
#ifdef AUDIO_ENABLE
|
|
|
|
#ifdef AUDIO_ENABLE
|
|
|
@ -181,14 +183,18 @@ void music_toggle(void) {
|
|
|
|
|
|
|
|
|
|
|
|
void music_on(void) {
|
|
|
|
void music_on(void) {
|
|
|
|
music_activated = 1;
|
|
|
|
music_activated = 1;
|
|
|
|
|
|
|
|
#ifdef AUDIO_ENABLE
|
|
|
|
PLAY_SONG(music_on_song);
|
|
|
|
PLAY_SONG(music_on_song);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
music_on_user();
|
|
|
|
music_on_user();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void music_off(void) {
|
|
|
|
void music_off(void) {
|
|
|
|
music_all_notes_off();
|
|
|
|
music_all_notes_off();
|
|
|
|
music_activated = 0;
|
|
|
|
music_activated = 0;
|
|
|
|
|
|
|
|
#ifdef AUDIO_ENABLE
|
|
|
|
PLAY_SONG(music_off_song);
|
|
|
|
PLAY_SONG(music_off_song);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void matrix_scan_music(void) {
|
|
|
|
void matrix_scan_music(void) {
|
|
|
|