process_music.h 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. #ifndef PROCESS_MUSIC_H
  2. #define PROCESS_MUSIC_H
  3. #include "quantum.h"
  4. #if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
  5. bool process_music(uint16_t keycode, keyrecord_t *record);
  6. bool is_music_on(void);
  7. void music_toggle(void);
  8. void music_on(void);
  9. void music_off(void);
  10. void music_on_user(void);
  11. void music_scale_user(void);
  12. void music_all_notes_off(void);
  13. void matrix_scan_music(void);
  14. #ifndef SCALE
  15. #define SCALE (int8_t []){ 0 + (12*0), 2 + (12*0), 4 + (12*0), 5 + (12*0), 7 + (12*0), 9 + (12*0), 11 + (12*0), \
  16. 0 + (12*1), 2 + (12*1), 4 + (12*1), 5 + (12*1), 7 + (12*1), 9 + (12*1), 11 + (12*1), \
  17. 0 + (12*2), 2 + (12*2), 4 + (12*2), 5 + (12*2), 7 + (12*2), 9 + (12*2), 11 + (12*2), \
  18. 0 + (12*3), 2 + (12*3), 4 + (12*3), 5 + (12*3), 7 + (12*3), 9 + (12*3), 11 + (12*3), \
  19. 0 + (12*4), 2 + (12*4), 4 + (12*4), 5 + (12*4), 7 + (12*4), 9 + (12*4), 11 + (12*4), }
  20. #endif
  21. #endif // defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
  22. #endif