diff options
Diffstat (limited to 'docs/feature_sequencer.md')
| -rw-r--r-- | docs/feature_sequencer.md | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/docs/feature_sequencer.md b/docs/feature_sequencer.md new file mode 100644 index 000000000..8c8587a9b --- /dev/null +++ b/docs/feature_sequencer.md | |||
| @@ -0,0 +1,88 @@ | |||
| 1 | # Sequencer | ||
| 2 | |||
| 3 | Since QMK has experimental support for MIDI, you can now turn your keyboard into a [step sequencer](https://en.wikipedia.org/wiki/Music_sequencer#Step_sequencers)! | ||
| 4 | |||
| 5 | !> **IMPORTANT:** This feature is highly experimental, it has only been tested on a Planck EZ so far. Also, the scope will be limited to support the drum machine use-case to start with. | ||
| 6 | |||
| 7 | ## Enable the step sequencer | ||
| 8 | |||
| 9 | Add the following line to your `rules.mk`: | ||
| 10 | |||
| 11 | ```make | ||
| 12 | SEQUENCER_ENABLE = yes | ||
| 13 | ``` | ||
| 14 | |||
| 15 | By default the sequencer has 16 steps, but you can override this setting in your `config.h`: | ||
| 16 | |||
| 17 | ```c | ||
| 18 | #define SEQUENCER_STEPS 32 | ||
| 19 | ``` | ||
| 20 | |||
| 21 | ## Tracks | ||
| 22 | |||
| 23 | You can program up to 8 independent tracks with the step sequencer. Select the tracks you want to edit, enable or disable some steps, and start the sequence! | ||
| 24 | |||
| 25 | ## Resolutions | ||
| 26 | |||
| 27 | While the tempo defines the absolute speed at which the sequencer goes through the steps, the resolution defines the granularity of these steps (from coarser to finer). | ||
| 28 | |||
| 29 | |Resolution |Description | | ||
| 30 | |---------- |----------- | | ||
| 31 | |`SQ_RES_2` |Every other beat | | ||
| 32 | |`SQ_RES_2T` |Every 1.5 beats | | ||
| 33 | |`SQ_RES_4` |Every beat | | ||
| 34 | |`SQ_RES_4T` |Three times per 2 beats| | ||
| 35 | |`SQ_RES_8` |Twice per beat | | ||
| 36 | |`SQ_RES_8T` |Three times per beat | | ||
| 37 | |`SQ_RES_16` |Four times per beat | | ||
| 38 | |`SQ_RES_16T` |Six times per beat | | ||
| 39 | |`SQ_RES_32` |Eight times per beat | | ||
| 40 | |||
| 41 | ## Keycodes | ||
| 42 | |||
| 43 | |Keycode |Description | | ||
| 44 | |------- |----------- | | ||
| 45 | |`SQ_ON` |Start the step sequencer | | ||
| 46 | |`SQ_OFF` |Stop the step sequencer | | ||
| 47 | |`SQ_TOG` |Toggle the step sequencer playback | | ||
| 48 | |`SQ_SALL`|Enable all the steps | | ||
| 49 | |`SQ_SCLR`|Disable all the steps | | ||
| 50 | |`SQ_S(n)`|Toggle the step `n` | | ||
| 51 | |`SQ_TMPD`|Decrease the tempo | | ||
| 52 | |`SQ_TMPU`|Increase the tempo | | ||
| 53 | |`SQ_R(n)`|Set the resolution to n | | ||
| 54 | |`SQ_RESD`|Change to the slower resolution | | ||
| 55 | |`SQ_RESU`|Change to the faster resolution | | ||
| 56 | |`SQ_T(n)`|Set `n` as the only active track or deactivate all | | ||
| 57 | |||
| 58 | ## Functions | ||
| 59 | |||
| 60 | |Function |Description | | ||
| 61 | |-------- |----------- | | ||
| 62 | |`bool is_sequencer_on(void);` |Return whether the sequencer is playing | | ||
| 63 | |`void sequencer_toggle(void);` |Toggle the step sequencer playback | | ||
| 64 | |`void sequencer_on(void);` |Start the step sequencer | | ||
| 65 | |`void sequencer_off(void);` |Stop the step sequencer | | ||
| 66 | |`bool is_sequencer_step_on(uint8_t step);` |Return whether the step is currently enabled | | ||
| 67 | |`void sequencer_set_step(uint8_t step, bool value);` |Enable or disable the step | | ||
| 68 | |`void sequencer_set_step_on();` |Enable the step | | ||
| 69 | |`void sequencer_set_step_off();` |Disable the step | | ||
| 70 | |`void sequencer_toggle_step(uint8_t step);` |Toggle the step | | ||
| 71 | |`void sequencer_set_all_steps(bool value);` |Enable or disable all the steps | | ||
| 72 | |`void sequencer_set_all_steps_on();` |Enable all the steps | | ||
| 73 | |`void sequencer_set_all_steps_off();` |Disable all the steps | | ||
| 74 | |`uint8_t sequencer_get_tempo(void);` |Return the current tempo | | ||
| 75 | |`void sequencer_set_tempo(uint8_t tempo);` |Set the tempo to `tempo` (between 1 and 255) | | ||
| 76 | |`void sequencer_increase_tempo(void);` |Increase the tempo | | ||
| 77 | |`void sequencer_decrease_tempo(void);` |Decrease the tempo | | ||
| 78 | |`sequencer_resolution_t sequencer_get_resolution(void);` |Return the current resolution | | ||
| 79 | |`void sequencer_set_resolution(sequencer_resolution_t resolution);` |Set the resolution to `resolution` | | ||
| 80 | |`void sequencer_increase_resolution(void);` |Change to the faster resolution | | ||
| 81 | |`void sequencer_decrease_resolution(void);` |Change to the slower resolution | | ||
| 82 | |`bool is_sequencer_track_active(uint8_t track);` |Return whether the track is active | | ||
| 83 | |`void sequencer_set_track_activation(uint8_t track, bool value);` |Activate or deactivate the `track` | | ||
| 84 | |`void sequencer_toggle_track_activation(uint8_t track);` |Toggle the `track` | | ||
| 85 | |`void sequencer_activate_track(uint8_t track);` |Activate the `track` | | ||
| 86 | |`void sequencer_deactivate_track(uint8_t track);` |Deactivate the `track` | | ||
| 87 | |`void sequencer_toggle_single_active_track(uint8_t track);` |Set `track` as the only active track or deactivate all | | ||
| 88 | |||
