diff --git a/examples/Gravity/app_state.h b/examples/Gravity/app_state.h index 06cec2a..bb9f662 100644 --- a/examples/Gravity/app_state.h +++ b/examples/Gravity/app_state.h @@ -14,7 +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; // index into shuffle template + byte selected_shuffle = 0; Clock::Source selected_source = Clock::SOURCE_INTERNAL; Channel channel[Gravity::OUTPUT_COUNT]; }; diff --git a/examples/Gravity/channel.h b/examples/Gravity/channel.h index 12a858e..3567643 100644 --- a/examples/Gravity/channel.h +++ b/examples/Gravity/channel.h @@ -93,7 +93,7 @@ class Channel { swing_pulses = (long)((mod_pulses * (100L - shifted_swing)) / 100L); } - const uint16_t current_tick_offset = tick + offset_pulses + swing_pulses; + const uint32_t current_tick_offset = tick + offset_pulses + swing_pulses; // Step check if (!output.On()) { @@ -106,7 +106,7 @@ class Channel { } // Duty cycle low check - const uint16_t duty_cycle_end_tick = tick + duty_pulses + offset_pulses + swing_pulses; + const uint32_t duty_cycle_end_tick = tick + duty_pulses + offset_pulses + swing_pulses; if (duty_cycle_end_tick % mod_pulses == 0) { output.Low(); } diff --git a/examples/Gravity/display.h b/examples/Gravity/display.h index 26388f5..4396d05 100644 --- a/examples/Gravity/display.h +++ b/examples/Gravity/display.h @@ -147,6 +147,7 @@ void drawMenuItems(const char* menu_items[], int menu_size) { } } +// Display an indicator when swing percentage matches a musical note. void swingDivisionMark() { auto& ch = GetSelectedChannel(); switch (ch.getSwing()) {