From 5801a1f8af5f13779581dbf16052d7286af1f579 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Fri, 9 Jun 2017 16:42:30 -0400 Subject: update music docs --- docs/Modding-your-keyboard.md | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'docs') diff --git a/docs/Modding-your-keyboard.md b/docs/Modding-your-keyboard.md index 5d4b5d40f..2429570f5 100644 --- a/docs/Modding-your-keyboard.md +++ b/docs/Modding-your-keyboard.md @@ -48,16 +48,25 @@ This is inside one of the macros. So when that macro executes, your keyboard pla "Rest style" in the method signature above (the last parameter) specifies if there's a rest (a moment of silence) between the notes. +## Music mode -## Recording And Playing back Music -* ```Music On``` - Turn music mode on. The default mapping is ```Lower+Upper+C``` -* ```LCTL``` - start a recording -* play some tones -* ```LALT``` - stop recording, stop playing -* ```LGUI``` - play recording -* ```LALT``` - stop playing -* ```Music Off``` - Turn music mode off. The default mapping is ```Lower+Upper+V``` +The music mode maps your columns to a chromatic scale, and your rows to octaves. This works best with ortholinear keyboards, but can be made to work with others. All keycodes less than `0xFF` get blocked, so you won't type while playing notes - if you have special keys/mods, those will still work. A work-around for this is to jump to a different layer with KC_NOs before (or after) enabling music mode. +Recording is experimental due to some memory issues - if you experience some weird behavior, unplugging/replugging your keyboard will fix things. + +Keycodes available: + +* `MU_ON` - Turn music mode on +* `MU_OFF` - Turn music mode off +* `MU_TOG` - Toggle music mode + +In music mode, the following keycodes work differently, and don't pass through: + +* `LCTL` - start a recording +* `LALT` - stop recording/stop playing +* `LGUI` - play recording +* `KC_UP` - speed-up playback +* `KC_DOWN` - slow-down playback ## MIDI functionalty -- cgit v1.2.3-70-g09d2 From 1da0a19177effe3a946a5188c692fa8749a3a4f1 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sat, 10 Jun 2017 12:18:49 -0400 Subject: make searchable --- docs/Home.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/Home.md b/docs/Home.md index bc1d25bf2..600438718 100644 --- a/docs/Home.md +++ b/docs/Home.md @@ -136,15 +136,15 @@ Enable the backlight from the Makefile. All of these functions are available in the `*_kb()` or `*_user()` variety. `kb` ones should only be used in the `/.c` file, and `user` ones should only be used in the `keymap.c`. The keyboard ones call the user ones - it's necessary to keep these calls to allow the keymap functions to work correctly. -## `void matrix_init_*(void)` +## `void matrix_init_user(void)`/`void matrix_init_kb(void)` This function gets called when the matrix is initiated, and can contain start-up code for your keyboard/keymap. -## `void matrix_scan_*(void)` +## `void matrix_scan_user(void)`/`void matrix_scan_kb(void)` This function gets called at every matrix scan, which is basically as often as the MCU can handle. Be careful what you put here, as it will get run a lot. -## `bool process_record_*(uint16_t keycode, keyrecord_t *record)` +## `bool process_record_user(uint16_t keycode, keyrecord_t *record)`/`bool process_record_kb(uint16_t keycode, keyrecord_t *record)` This function gets called on every keypress/release, and is where you can define custom functionality. The return value is whether or not QMK should continue processing the keycode - returning `false` stops the execution. @@ -167,7 +167,7 @@ keyrecord_t record { The conditional `if (record->event.pressed)` can tell if the key is being pressed or released, and you can execute code based on that. -## `void led_set_*(uint8_t usb_led)` +## `void led_set_user(uint8_t usb_led)`/`void led_set_kb(uint8_t usb_led)` This gets called whenever there is a state change on your host LEDs \(eg caps lock, scroll lock, etc\). The LEDs are defined as: -- cgit v1.2.3-70-g09d2