more minor cleanup
This commit is contained in:
@ -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];
|
||||
};
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user