     {
       stage_count = 8;
     }
+    seq_values.stage_count = stage_count;
     load_params(26, diradd_mode, 1);
+    seq_values.diradd_mode = (bool)diradd_mode;
     load_params(27, slew_rate, 1);
+    seq_values.slew_rate = (float)slew_rate / 255.0;
     load_params(28, gate_time, 1);
+    seq_values.gate_time = (float)gate_time / 255.0;
     load_params(29, clock_bpm, 1);
     if(clock_bpm > 30)
     {
       clock_bpm = 30;
     }
+    seq_values.clock_period = bpm_to_ms(clock_bpm);
+    seq_values.clock_ext = !(bool)clock_bpm;
 
     // draw global elements
     display->draw_char(38, 2, '0' + stage_count, DUINO_SSD1306::White);

      {
        stage_pitch[i] = 119;
      }
    }    
    load_params(8, stage_steps, 8);
    for(uint8_t i = 0; i < 8; ++i)
    {

static const unsigned char semitone_lt[12] = {'C', 'C', 'D', 'E', 'E', 'F', 'F', 'G', 'G', 'A', 'B', 'B'};
static const Intonation semitone_in[12] = {IN, IS, IN, IF, IN, IN, IS, IN, IS, IN, IF, IN};

struct DU_SEQ_Values {
  float stage_cv[8];
  uint8_t stage_steps[8];
  GateMode stage_gate[8];
  bool stage_slew[8];
  uint8_t stage_count;
  bool diradd_mode;
  float slew_rate;
  float gate_time;
  float clock_period;
  bool clock_ext;
};

DU_SEQ_Values seq_values;

void clock_isr();
void reset_isr();
void timer_isr();
