     return ((float)note - 36.0) / 12.0;
   }
 
-  float bpm_to_ms(uint8_t bpm)
-  {
-    return 600000.0 / (float)bpm;
+  uint16_t bpm_to_ms(uint8_t bpm)
+  {
+    return 600000 / bpm;
   }
 
   void display_slew_rate(int16_t x, int16_t y, uint8_t rate, DUINO_SSD1306::SSD1306Color color)


void clock_isr()
{
}

void reset_isr()
{
}

void timer_isr()

#include <du-ino_interface.h>
#include <TimerOne.h>
#include <avr/pgmspace.h>
#include <util/atomic.h>

#define DIGITAL_THRESH 1.25 // V

enum GateMode {
  GATE_NONE = 0,
