   }
 };
 
-
 void clear_notes_and_timers()
 {
   for (byte i = 0; i < TIMER_COUNT; i++)

// For the pulsed (tick) mode
const int32_t MAX_WAIT_US = 1000;
const float DUTY_CYCLE = 0.25;
const float PULSE_MULT = (1.0/DUTY_CYCLE) - 1.0;

volatile MUSIC_STATE music_state = SM_NEXT;
volatile int pulse_length_us = 100;
volatile unsigned long next_pulse_start_micros = 0;

void start_music_sm(){
  music_state = SM_NEXT;
  timer_0.begin(music_loop, 10);
  // timer_0.priority(0);
}

void stop_music_sm() {
  music_state = SM_NEXT;
  timer_0.end();
}

  active_notes[i].phase_us = micros() % active_notes[i].period_us;
}

void clear_note(int i)
{
  active_notes[i].velocity = 0;
  active_notes[i].pitch = 255;
  active_notes[i].channel = 0;
