Add per-channel Swing configuration (#7)

Select swing amount from a percentage range of the beat starting a 50% (unchanged) to a max swing amount of 95% (about 1/32nd note before end of period). Swing percentage shows an indicator marker when the percentage lines up with a quantized note on the grid.

This is probably going to be the last feature because it is pushing up against the limits of available dynamic memory.

Out of scope changes:
- selecting parameters / values no longer wraps
- reduce dynamic memory used in processClockTick
- various readability formatting

Reviewed-on: https://git.pinkduck.xyz/adam/libGravity/pulls/7
Co-authored-by: Adam Wonak <adam.wonak@gmail.com>
Co-committed-by: Adam Wonak <adam.wonak@gmail.com>
This commit is contained in:
2025-06-22 18:38:51 +00:00
committed by adam
parent c8e42c7448
commit 973c13b8ef
6 changed files with 95 additions and 32 deletions

View File

@ -14,6 +14,7 @@ struct AppState {
int selected_param = 0;
int selected_sub_param = 0;
byte selected_channel = 0; // 0=tempo, 1-6=output channel
byte selected_shuffle = 0;
Clock::Source selected_source = Clock::SOURCE_INTERNAL;
Channel channel[Gravity::OUTPUT_COUNT];
};
@ -37,6 +38,7 @@ enum ParamsChannelPage {
PARAM_CH_PROB,
PARAM_CH_DUTY,
PARAM_CH_OFFSET,
PARAM_CH_SWING,
PARAM_CH_CV_SRC,
PARAM_CH_CV_DEST,
PARAM_CH_LAST,