Menu system fixes; made state less global

This commit is contained in:
Brian Hrebec 2023-08-29 13:32:56 -05:00
parent cfc2390b8b
commit 209959e2de
14 changed files with 964 additions and 731 deletions

View file

@ -74,14 +74,13 @@ enum PortamentoMode : uint8_t {
};
struct instrument_state_t {
int mainState; // The state of the main state machine
uint8_t patch; // 1-128
byte activeMIDIchannel = 1; // MIDI channel
byte activeNote = 0; // note playing
byte activePatch = 0;
byte doPatchUpdate = 0;
int8_t transpose = 0;
uint8_t octave = 0;
int8_t octave = 0;
PolySelect polyMode = PolySelect::EHarmonizerOff;
// Raw sensor signals
@ -93,6 +92,7 @@ struct instrument_state_t {
int16_t pbDnSignal = 0;
int16_t extraSignal = 0;
int16_t vibSignal = 0;
int16_t avgCTouchSignal = 0;
// MIDI values
int breathCCVal = 0;
@ -127,8 +127,6 @@ struct instrument_state_t {
int16_t vibThrBiteLo;
};
extern instrument_state_t state;
extern const std::array<const unsigned short*, 13> curves;
extern const unsigned short curveIn[];