// ....................................................................... Audio
voidmatrix_init_user(void){#ifdef STENO_ENABLE
steno_set_mode(STENO_MODE_BOLT);// or STENO_MODE_GEMINI
#endif#ifdef AUDIO_ENABLE
startup_user();#endif}#ifdef AUDIO_ENABLE
#ifdef BACKLIGHT_ENABLE
voidled_set_user(uint8_tusb_led){staticuint8_t old_usb_led =0;_delay_ms(10);// gets rid of tick
if(!is_playing_notes()){if((usb_led &(1<<USB_LED_CAPS_LOCK))&&!(old_usb_led &(1<<USB_LED_CAPS_LOCK))){// if capslock LED is turning on
PLAY_SONG(song_caps_on);}elseif(!(usb_led &(1<<USB_LED_CAPS_LOCK))&&(old_usb_led &(1<<USB_LED_CAPS_LOCK))){// if capslock LED is turning off
PLAY_SONG(song_caps_off);}}
old_usb_led = usb_led;}#endifvoidstartup_user(void){_delay_ms(20);// gets rid of tick
PLAY_SONG(song_startup);}voidshutdown_user(void){PLAY_SONG(song_goodbye);_delay_ms(150);stop_all_notes();}voidmusic_on_user(void){music_scale_user();}voidmusic_scale_user(void){PLAY_SONG(music_scale);}#endif