diff options
| author | Joel Challis | 2024-05-30 11:00:28 +0200 |
|---|---|---|
| committer | GitHub | 2024-05-30 11:00:28 +0200 |
| commit | b39285807e1d21300e8a5dbbf6f2c43a8aab3494 (patch) | |
| tree | 311895a73c967f5d322885c1a9f1073a7b9f1b91 /docs/feature_audio.md | |
| parent | 6ef97172889ccd5db376b2a9f8825489e24fdac4 (diff) | |
[docs] Fix code blocks overflowing page width (#23829)
Fix code blocks overflowing page width
Diffstat (limited to 'docs/feature_audio.md')
| -rw-r--r-- | docs/feature_audio.md | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/docs/feature_audio.md b/docs/feature_audio.md index c83d6e3d93..ec28860ae9 100644 --- a/docs/feature_audio.md +++ b/docs/feature_audio.md @@ -263,31 +263,39 @@ In music mode, the following keycodes work differently, and don't pass through: The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`: - #define PITCH_STANDARD_A 432.0f +```c +#define PITCH_STANDARD_A 432.0f +``` You can completely disable Music Mode as well. This is useful, if you're pressed for space on your controller. To disable it, add this to your `config.h`: - #define NO_MUSIC_MODE +```c +#define NO_MUSIC_MODE +``` ### Music Mask By default, `MUSIC_MASK` is set to `keycode < 0xFF` which means keycodes less than `0xFF` are turned into notes, and don't output anything. You can change this by defining this in your `config.h` like this: - #define MUSIC_MASK keycode != KC_NO +```c +#define MUSIC_MASK keycode != KC_NO +``` Which will capture all keycodes - be careful, this will get you stuck in music mode until you restart your keyboard! 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`: - bool music_mask_user(uint16_t keycode) { - switch (keycode) { - case RAISE: - case LOWER: - return false; - default: - return true; - } +```c + bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; } + } +``` Things that return false are not part of the mask, and are always processed. @@ -329,8 +337,9 @@ Keycodes available: The feature is disabled by default, to save space. To enable it, add this to your `config.h`: - #define AUDIO_CLICKY - +```c +#define AUDIO_CLICKY +``` You can configure the default, min and max frequencies, the stepping and built in randomness by defining these values: @@ -343,9 +352,6 @@ You can configure the default, min and max frequencies, the stepping and built i | `AUDIO_CLICKY_FREQ_RANDOMNESS` | 0.05f | Sets a factor of randomness for the clicks, Setting this to `0f` will make each click identical, and `1.0f` will make this sound much like the 90's computer screen scrolling/typing effect. | | `AUDIO_CLICKY_DELAY_DURATION` | 1 | An integer note duration where 1 is 1/16th of the tempo, or a sixty-fourth note (see `quantum/audio/musical_notes.h` for implementation details). The main clicky effect will be delayed by this duration. Adjusting this to values around 6-12 will help compensate for loud switches. | - - - ## MIDI Functionality See [MIDI](feature_midi) |