Add clock run/reset

This commit is contained in:
2026-02-21 10:19:09 -08:00
parent 763d58f411
commit bd08ac4352
12 changed files with 324 additions and 162 deletions

View File

@ -18,24 +18,26 @@
// Global state for settings and app behavior.
struct AppState {
int tempo = Clock::DEFAULT_TEMPO;
Channel channel[Gravity::OUTPUT_COUNT];
byte selected_param = 0;
byte selected_sub_param = 0; // Temporary value for editing params.
byte selected_channel = 0; // 0=tempo, 1-6=output channel
byte selected_swing = 0;
byte selected_save_slot = 0; // The currently active save slot.
Clock::Source selected_source = Clock::SOURCE_INTERNAL;
Clock::Pulse selected_pulse = Clock::PULSE_PPQN_24;
bool editing_param = false;
bool encoder_reversed = false;
bool refresh_screen = true;
int tempo = Clock::DEFAULT_TEMPO;
Channel channel[Gravity::OUTPUT_COUNT];
byte selected_param = 0;
byte selected_sub_param = 0; // Temporary value for editing params.
byte selected_channel = 0; // 0=tempo, 1-6=output channel
byte selected_swing = 0;
byte selected_save_slot = 0; // The currently active save slot.
Clock::Source selected_source = Clock::SOURCE_INTERNAL;
Clock::Pulse selected_pulse = Clock::PULSE_PPQN_24;
byte cv_run = 0;
byte cv_reset = 0;
bool editing_param = false;
bool encoder_reversed = false;
bool refresh_screen = true;
};
extern AppState app;
static Channel& GetSelectedChannel() {
return app.channel[app.selected_channel - 1];
static Channel &GetSelectedChannel() {
return app.channel[app.selected_channel - 1];
}
#endif // APP_STATE_H
#endif // APP_STATE_H