diff options
author | Jack Humbert <jack.humb@gmail.com> | 2018-05-08 17:18:15 -0400 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2018-05-08 17:18:15 -0400 |
commit | 63d5c947d3bce7ad9db014b7930e4809aa16fa4c (patch) | |
tree | 29f2f97b93cf652dcc40742b8b84ae9f78fad900 /docs | |
parent | 14b7602a65dedaf51db1c9288144765d43a83a15 (diff) | |
download | qmk_firmware-63d5c947d3bce7ad9db014b7930e4809aa16fa4c.tar.gz qmk_firmware-63d5c947d3bce7ad9db014b7930e4809aa16fa4c.zip |
updated music mask
Diffstat (limited to 'docs')
-rw-r--r-- | docs/feature_audio.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/feature_audio.md b/docs/feature_audio.md index 1b8ca86f4..50e389605 100644 --- a/docs/feature_audio.md +++ b/docs/feature_audio.md | |||
@@ -89,6 +89,20 @@ By default, `MUSIC_MASK` is set to `keycode < 0xFF` which means keycodes less th | |||
89 | 89 | ||
90 | Which will capture all keycodes - be careful, this will get you stuck in music mode until you restart your keyboard! | 90 | Which will capture all keycodes - be careful, this will get you stuck in music mode until you restart your keyboard! |
91 | 91 | ||
92 | For a more advanced way to control which keycodes should still be processed, you can use `music_mask_kb(keycode)` in `<keyboard>.c` and `music_mask_user(keycode)` in your `keymap.c`: | ||
93 | |||
94 | bool music_mask_user(uint16_t keycode) { | ||
95 | switch (keycode) { | ||
96 | case RAISE: | ||
97 | case LOWER: | ||
98 | return false; | ||
99 | default: | ||
100 | return true; | ||
101 | } | ||
102 | } | ||
103 | |||
104 | Things that return false are not part of the mask, and are always processed. | ||
105 | |||
92 | The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`: | 106 | The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`: |
93 | 107 | ||
94 | #define PITCH_STANDARD_A 432.0f | 108 | #define PITCH_STANDARD_A 432.0f |