Nesso Mazes : IMU Test

Click here for...

The new song, transcribed, as an array...
static constexpr const int16_t stillalive[] = {

// set tempo = 300

// https://forum.arduino.cc/t/nesso-mazes-imu-test/1416402/17
// Still Alive by Jonathan Coultrain
// https://en.wikipedia.org/wiki/Jonathan_Coulton
// https://en.wikipedia.org/wiki/Still_Alive

  // bar 1
  NOTE_G4 , 8, NOTE_FS4, 8, NOTE_E4 , 8, NOTE_E4 , 8, 
  NOTE_FS4, 2, REST    , 2, 
  REST    ,-4, NOTE_A3 , 8, NOTE_G4 , 8, NOTE_FS4, 8, NOTE_E4 , 8, NOTE_E4 , 4, 
  NOTE_FS4, -4, NOTE_D4 , 4, NOTE_E4 , 8, NOTE_A3 , 8, 

  // bar 5
  REST    , 8, NOTE_A3 , 8, 
  NOTE_E4 , 4, NOTE_FS4, 8, NOTE_G4 ,-4, NOTE_E4 , 8, NOTE_CS4,  4, 
  NOTE_D4 ,-4, NOTE_E4 , 4, NOTE_A3 , 8, NOTE_A3 , 4, 
  NOTE_FS4, 8, 

  // bar 9
  REST    , 2, NOTE_G4 , 8, NOTE_FS4, 8, NOTE_E4 , 8, NOTE_E4 , 8, 
  NOTE_FS4, 2, REST    , 2, 
  REST    ,-4, NOTE_A3 , 8, NOTE_G4 , 8, NOTE_FS4, 8, NOTE_E4 , 8, NOTE_E4 ,-4, 
  NOTE_FS4, 8, NOTE_D4 ,-4, NOTE_E4 , 8, NOTE_A3 ,-4, 

  // bar 13
  REST    , 1, 
  NOTE_E4 , 4, NOTE_FS4, 8, NOTE_G4 ,-4, NOTE_E4 , 8, NOTE_CS4, -4, 
  NOTE_D4 , 8, NOTE_E4 , 4, NOTE_A3 , 8, NOTE_D4 , 8, NOTE_E4 , 8, 
  NOTE_F4 , 8, NOTE_E4 , 8, NOTE_D4 , 8, NOTE_C4 , 8, REST    , 4, NOTE_A3 , 8, NOTE_AS3, 8, 

  // bar 17
  NOTE_C4 , 4, NOTE_F4 , 4, NOTE_E4 , 8, NOTE_D4 , 8, NOTE_D4 , 8, NOTE_C4 , 8, 
  NOTE_D4 , 8, NOTE_C4 , 8, NOTE_C4 , 4, NOTE_C4 , 4, NOTE_A3 , 8, NOTE_AS3, 8,   
  NOTE_C4 , 4, NOTE_F4 , 4, NOTE_G4 , 8, NOTE_F4 , 8, NOTE_E4 , 8, NOTE_D4 , 8, 
  NOTE_D4 , 8, NOTE_E4 , 8, NOTE_F4 , 4, NOTE_F4 , 4, NOTE_G4 , 8, NOTE_A4 , 8, 

  // bar 21
  NOTE_AS4, 8, NOTE_AS4, 8, NOTE_A4 , 4, NOTE_G4 , 4, NOTE_F4 , 8, NOTE_G4 , 8, 
  NOTE_A4 , 8, NOTE_A4 , 8, NOTE_G4 , 4, NOTE_F4 , 4, NOTE_D4 , 8, NOTE_C4 , 8, 
  NOTE_D4 , 8, NOTE_F4 , 8, NOTE_F4 , 8, NOTE_E4 , 4, NOTE_E4 , 8, NOTE_FS4, 8, NOTE_FS4, 8, 
  REST    , 2, REST    , 2, 

  // bar 25
  REST    , 2, REST    , 2, 
  REST    , 2, REST    , 2, 
  REST    ,-4, NOTE_A3 , 8, NOTE_G4 , 8, NOTE_FS4, 8, NOTE_E4 , 8, NOTE_E4 , 8, 
  NOTE_FS4, 8, REST    , 2, 

  // bar 29
  REST    , 2, NOTE_G4 , 8, NOTE_FS4, 8, NOTE_E4 , 8, NOTE_E4 ,-4, 
  NOTE_FS4, 8, NOTE_D4 , 4, NOTE_E4 , 4, NOTE_A3 ,-4, 
  REST    , 8, 
  NOTE_E4 , 4, NOTE_FS4, 8, NOTE_G4 ,-4, NOTE_E4 , 4, 

  // bar 33
  NOTE_CS4,  4, NOTE_D4 , 8, NOTE_E4 ,-4, NOTE_A3 , 8, NOTE_A3 , 4, 
  NOTE_FS4, 8, REST    , 4, 
  REST    ,-4, NOTE_A3 , 8, NOTE_B4 , 8, NOTE_A4 , 8, NOTE_G4 , 8, NOTE_G4 , 8, 
  NOTE_A4 , 4, REST    ,-2,

  // bar 37
  REST    ,-4, NOTE_A3 , 8, NOTE_B4 , 8, NOTE_A4 , 8, NOTE_G4 , 8, NOTE_G4 ,-4, 
  NOTE_A4 , 8, NOTE_FS4, -4, NOTE_G4 , 8, NOTE_D4 ,-4, 
  REST    ,-2,
  NOTE_E4 , 4, NOTE_FS4, 8, NOTE_G4 ,-4, NOTE_E4 , 4, 

  // bar 41
  NOTE_CS4,  4, NOTE_D4 , 8, NOTE_E4 , 4, NOTE_A3 , 8, NOTE_D4 , 8, NOTE_E4 , 8, 
  NOTE_F4 , 8, NOTE_E4 , 8, NOTE_D4 , 8, NOTE_C4 ,-4, NOTE_A3 , 8, NOTE_AS3, 8, 
  NOTE_C4 , 4, NOTE_F4 , 4, NOTE_E4 , 8, NOTE_D4 , 8, NOTE_D4 , 8, NOTE_C4 , 8, 
  NOTE_D4 , 8, NOTE_C4 , 8, NOTE_C4 , 4, NOTE_C4 , 4, NOTE_A3 , 8, NOTE_AS3, 8, 

  // bar 45
  NOTE_C4 , 4, NOTE_F4 , 4, NOTE_G4 , 8, NOTE_F4 , 8, NOTE_E4 , 8, NOTE_D4 , 8, 
  NOTE_D4 , 8, NOTE_E4 , 8, NOTE_F4 , 4, NOTE_F4 , 4, NOTE_G4 , 8, NOTE_A4 , 8, 
  NOTE_AS4, 8, NOTE_AS4, 8, NOTE_A4 , 4, NOTE_G4 , 4, NOTE_F4 , 8, NOTE_G4 , 8, 
  NOTE_A4 , 8, NOTE_A4 , 8, NOTE_G4 , 8, NOTE_F4 , 8, NOTE_F4 , 4, NOTE_D4 , 8, NOTE_C4 , 8, 

  // bar 49
  NOTE_D4 , 8, NOTE_F4 , 8, NOTE_F4 , 8, NOTE_E4 , 4, NOTE_E4 , 8, NOTE_FS4, 8, NOTE_FS4, 8, 
  REST    , 2, 
  REST    , 2, REST    , 2, 
  REST    , 2, REST    , 2, 

  // bar 53
  REST    , 2, NOTE_G4 , 8, NOTE_FS4, 8, NOTE_E4 , 8, NOTE_E4 , 4, 
  NOTE_FS4, -4, REST    , 2, 
  REST    ,-4, NOTE_A3 , 8, NOTE_G4 , 8, NOTE_FS4, 8, NOTE_E4 , 8, NOTE_E4 ,-4, 
  NOTE_FS4, 8, NOTE_D4 ,-4, NOTE_E4 , 8, NOTE_A3 , 8, 

  // bar 57
  REST    , 2, 
  NOTE_E4 , 4, NOTE_FS4, 8, NOTE_G4 ,-4, NOTE_E4 , 4, 
  NOTE_CS4,  4, NOTE_D4 , 8, NOTE_E4 , 4, REST    , 8, NOTE_A3 , 8, NOTE_A3 , 4, 
  NOTE_FS4, 8, REST    , 4, 

  // bar 61
  REST    , 4, REST    , 4, NOTE_B4 , 8, NOTE_A4 , 8, NOTE_G4 , 8, NOTE_G4 , 4, 
  NOTE_A4 , 4, REST    , 8, 
  REST    , 2, NOTE_B4 , 8, NOTE_A4 , 8, NOTE_G4 , 8, NOTE_G4 ,-4, 
  NOTE_A4 , 8, NOTE_FS4, -4, NOTE_G4 , 8, NOTE_D4 ,-4, 

  // bar 65
  REST    ,-2, 
  NOTE_E4 , 4, NOTE_FS4, 8, NOTE_G4 ,-4, NOTE_E4 , 4, 
  NOTE_CS4,  4, NOTE_D4 , 8, NOTE_E4 , 4, NOTE_A3 , 8, NOTE_D4 , 8, NOTE_E4 , 8, 
  NOTE_F4 , 8, NOTE_E4 , 8, NOTE_D4 , 8, NOTE_C4 ,-4, NOTE_A3 , 8, NOTE_AS3, 8, 

  // bar 69
  NOTE_C4 , 4, NOTE_F4 , 4, NOTE_E4 , 8, NOTE_D4 , 8, NOTE_D4 , 8, NOTE_C4 , 8, 
  NOTE_D4 , 8, NOTE_C4 , 8, NOTE_C4 , 4, NOTE_C4 , 4, NOTE_A3 , 8, NOTE_AS3, 8, 
  NOTE_C4 , 4, NOTE_F4 , 4, NOTE_G4 , 8, NOTE_F4 , 8, NOTE_E4 , 8, NOTE_D4 , 8, 
  NOTE_D4 , 8, NOTE_E4 , 8, NOTE_F4 , 4, NOTE_F4 , 4, NOTE_G4 , 8, NOTE_A4 , 8, 

  // bar 73
  NOTE_AS4, 8, NOTE_AS4, 8, NOTE_A4 , 8, NOTE_G4 , 8, NOTE_G4 , 4, NOTE_F4 , 8, NOTE_G4 , 8, 
  NOTE_A4 , 8, NOTE_A4 , 8, NOTE_G4 , 8, NOTE_F4 , 8, NOTE_F4 , 4, NOTE_D4 , 8, NOTE_C4 , 8, 
  NOTE_D4 , 8, NOTE_F4 , 8, NOTE_F4 , 8, NOTE_E4 , 4, NOTE_E4 , 8, NOTE_FS4, 8, NOTE_FS4, 8, 
  REST    , 8, REST    , 8, NOTE_A4 , 8, NOTE_A4 , 8, 

  // bar 77
  NOTE_B4 , 8, NOTE_A4 , 8, NOTE_FS4, 8, NOTE_D4 , 4, NOTE_E4 , 8, NOTE_FS4, 8, NOTE_A4 ,-4, 
  REST    , 8, REST    , 4, NOTE_A4 , 8, NOTE_A4 , 8, NOTE_A4 , 8, 
  NOTE_B4 , 8, NOTE_A4 , 8, NOTE_FS4, 8, NOTE_D4 , 4, NOTE_G4 , 8, NOTE_A4 , 8, NOTE_A4 ,-4, 
  REST    , 8,   REST    , 4, NOTE_A4 , 8, NOTE_A4 , 8, NOTE_A4 , 8, 

  // bar 81
  NOTE_B4 , 8, NOTE_A4 , 8, NOTE_FS4, 8, NOTE_D4 , 4, NOTE_G4 , 8, NOTE_A4 , 8, NOTE_A4 ,-4, 
  REST    , 4, REST    , 4, NOTE_A4 , 8, NOTE_A4 , 8, 
  NOTE_B4 , 8, NOTE_A4 , 8, NOTE_FS4, 8, NOTE_D4 , 4, NOTE_G4 , 8, NOTE_A4 , 8, NOTE_A4 ,-4, 
  REST    , 8, REST    , 4, NOTE_A4 , 8, NOTE_A4 , 8, NOTE_A4 , 8, 

  // bar 85
  NOTE_B4 , 8, NOTE_A4 , 8, NOTE_FS4, 8, NOTE_D4 , 4, NOTE_G4 , 8, NOTE_A4 , 8, NOTE_A4 ,-4, 
  REST    , 8, REST    , 4, NOTE_G4 , 8, NOTE_A4 , 8, NOTE_A4 ,-4, 
  REST    ,-4, NOTE_G4 , 8, NOTE_FS4, 8, NOTE_FS4, 8, 
  REST    , 2
};

static constexpr const int16_t furelise[] = {
  // Fur Elise - Ludwig van Beethovem
  // Score available at https://musescore.com/user/28149610/scores/5281944

  //starts from 1 ending on 9
  NOTE_E5, 16, NOTE_DS5, 16, //1
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_A4, -8, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16,
  NOTE_B4, -8, NOTE_E4, 16, NOTE_GS4, 16, NOTE_B4, 16,
  NOTE_C5, 8,  REST, 16, NOTE_E4, 16, NOTE_E5, 16,  NOTE_DS5, 16,
  
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,//6
  NOTE_A4, -8, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16, 
  NOTE_B4, -8, NOTE_E4, 16, NOTE_C5, 16, NOTE_B4, 16, 
  NOTE_A4 , 4, REST, 8, //9 - 1st ending

  //repaets from 1 ending on 10
  NOTE_E5, 16, NOTE_DS5, 16, //1
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_A4, -8, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16,
  NOTE_B4, -8, NOTE_E4, 16, NOTE_GS4, 16, NOTE_B4, 16,
  NOTE_C5, 8,  REST, 16, NOTE_E4, 16, NOTE_E5, 16,  NOTE_DS5, 16,
  
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,//6
  NOTE_A4, -8, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16, 
  NOTE_B4, -8, NOTE_E4, 16, NOTE_C5, 16, NOTE_B4, 16, 
  NOTE_A4, 8, REST, 16, NOTE_B4, 16, NOTE_C5, 16, NOTE_D5, 16, //10 - 2nd ending
  //continues from 11
  NOTE_E5, -8, NOTE_G4, 16, NOTE_F5, 16, NOTE_E5, 16, 
  NOTE_D5, -8, NOTE_F4, 16, NOTE_E5, 16, NOTE_D5, 16, //12
  
  NOTE_C5, -8, NOTE_E4, 16, NOTE_D5, 16, NOTE_C5, 16, //13
  NOTE_B4, 8, REST, 16, NOTE_E4, 16, NOTE_E5, 16, REST, 16,
  REST, 16, NOTE_E5, 16, NOTE_E6, 16, REST, 16, REST, 16, NOTE_DS5, 16,
  NOTE_E5, 16, REST, 16, REST, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_DS5, 16,
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_A4, 8, REST, 16, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16,
  
  NOTE_B4, 8, REST, 16, NOTE_E4, 16, NOTE_GS4, 16, NOTE_B4, 16, //19
  NOTE_C5, 8, REST, 16, NOTE_E4, 16, NOTE_E5, 16,  NOTE_DS5, 16,
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_A4, 8, REST, 16, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16,
  NOTE_B4, 8, REST, 16, NOTE_E4, 16, NOTE_C5, 16, NOTE_B4, 16,
  NOTE_A4, 8, REST, 16, NOTE_B4, 16, NOTE_C5, 16, NOTE_D5, 16, //24 (1st ending)
  
  //repeats from 11
  NOTE_E5, -8, NOTE_G4, 16, NOTE_F5, 16, NOTE_E5, 16, 
  NOTE_D5, -8, NOTE_F4, 16, NOTE_E5, 16, NOTE_D5, 16, //12
  
  NOTE_C5, -8, NOTE_E4, 16, NOTE_D5, 16, NOTE_C5, 16, //13
  NOTE_B4, 8, REST, 16, NOTE_E4, 16, NOTE_E5, 16, REST, 16,
  REST, 16, NOTE_E5, 16, NOTE_E6, 16, REST, 16, REST, 16, NOTE_DS5, 16,
  NOTE_E5, 16, REST, 16, REST, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_DS5, 16,
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_A4, 8, REST, 16, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16,
  
  NOTE_B4, 8, REST, 16, NOTE_E4, 16, NOTE_GS4, 16, NOTE_B4, 16, //19
  NOTE_C5, 8, REST, 16, NOTE_E4, 16, NOTE_E5, 16,  NOTE_DS5, 16,
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_A4, 8, REST, 16, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16,
  NOTE_B4, 8, REST, 16, NOTE_E4, 16, NOTE_C5, 16, NOTE_B4, 16,
  NOTE_A4, 8, REST, 16, NOTE_C5, 16, NOTE_C5, 16, NOTE_C5, 16, //25 - 2nd ending

  //continues from 26
  NOTE_C5 , 4, NOTE_F5, -16, NOTE_E5, 32, //26
  NOTE_E5, 8, NOTE_D5, 8, NOTE_AS5, -16, NOTE_A5, 32,
  NOTE_A5, 16, NOTE_G5, 16, NOTE_F5, 16, NOTE_E5, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_AS4, 8, NOTE_A4, 8, NOTE_A4, 32, NOTE_G4, 32, NOTE_A4, 32, NOTE_B4, 32,
  NOTE_C5 , 4, NOTE_D5, 16, NOTE_DS5, 16,
  NOTE_E5, -8, NOTE_E5, 16, NOTE_F5, 16, NOTE_A4, 16,
  NOTE_C5 , 4,  NOTE_D5, -16, NOTE_B4, 32,
 
  
  NOTE_C5, 32, NOTE_G5, 32, NOTE_G4, 32, NOTE_G5, 32, NOTE_A4, 32, NOTE_G5, 32, NOTE_B4, 32, NOTE_G5, 32, NOTE_C5, 32, NOTE_G5, 32, NOTE_D5, 32, NOTE_G5, 32, //33
  NOTE_E5, 32, NOTE_G5, 32, NOTE_C6, 32, NOTE_B5, 32, NOTE_A5, 32, NOTE_G5, 32, NOTE_F5, 32, NOTE_E5, 32, NOTE_D5, 32, NOTE_G5, 32, NOTE_F5, 32, NOTE_D5, 32,
  NOTE_C5, 32, NOTE_G5, 32, NOTE_G4, 32, NOTE_G5, 32, NOTE_A4, 32, NOTE_G5, 32, NOTE_B4, 32, NOTE_G5, 32, NOTE_C5, 32, NOTE_G5, 32, NOTE_D5, 32, NOTE_G5, 32,

  NOTE_E5, 32, NOTE_G5, 32, NOTE_C6, 32, NOTE_B5, 32, NOTE_A5, 32, NOTE_G5, 32, NOTE_F5, 32, NOTE_E5, 32, NOTE_D5, 32, NOTE_G5, 32, NOTE_F5, 32, NOTE_D5, 32, //36
  NOTE_E5, 32, NOTE_F5, 32, NOTE_E5, 32, NOTE_DS5, 32, NOTE_E5, 32, NOTE_B4, 32, NOTE_E5, 32, NOTE_DS5, 32, NOTE_E5, 32, NOTE_B4, 32, NOTE_E5, 32, NOTE_DS5, 32,
  NOTE_E5, -8, NOTE_B4, 16, NOTE_E5, 16, NOTE_DS5, 16,
  NOTE_E5, -8, NOTE_B4, 16, NOTE_E5, 16, REST, 16,

  REST, 16, NOTE_DS5, 16, NOTE_E5, 16, REST, 16, REST, 16, NOTE_DS5, 16, //40
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_A4, 8, REST, 16, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16,
  NOTE_B4, 8, REST, 16, NOTE_E4, 16, NOTE_GS4, 16, NOTE_B4, 16,
  NOTE_C5, 8, REST, 16, NOTE_E4, 16, NOTE_E5, 16, NOTE_DS5, 16,
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,

  NOTE_A4, 8, REST, 16, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16, //46
  NOTE_B4, 8, REST, 16, NOTE_E4, 16, NOTE_C5, 16, NOTE_B4, 16,
  NOTE_A4, 8, REST, 16, NOTE_B4, 16, NOTE_C5, 16, NOTE_D5, 16,
  NOTE_E5, -8, NOTE_G4, 16, NOTE_F5, 16, NOTE_E5, 16,
  NOTE_D5, -8, NOTE_F4, 16, NOTE_E5, 16, NOTE_D5, 16,
  NOTE_C5, -8, NOTE_E4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_B4, 8, REST, 16, NOTE_E4, 16, NOTE_E5, 16, REST, 16,
  REST, 16, NOTE_E5, 16, NOTE_E6, 16, REST, 16, REST, 16, NOTE_DS5, 16,

  NOTE_E5, 16, REST, 16, REST, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_D5, 16, //54
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_A4, 8, REST, 16, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16,
  NOTE_B4, 8, REST, 16, NOTE_E4, 16, NOTE_GS4, 16, NOTE_B4, 16,
  NOTE_C5, 8, REST, 16, NOTE_E4, 16, NOTE_E5, 16, NOTE_DS5, 16,
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  
  NOTE_A4, 8, REST, 16, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16, //60
  NOTE_B4, 8, REST, 16, NOTE_E4, 16, NOTE_C5, 16, NOTE_B4, 16,
  NOTE_A4, 8, REST, 16, REST, 16, REST, 8, 
  NOTE_CS5 , -4, 
  NOTE_D5 , 4, NOTE_E5, 16, NOTE_F5, 16,
  NOTE_F5 , 4, NOTE_F5, 8, 
  NOTE_E5 , -4,
  NOTE_D5 , 4, NOTE_C5, 16, NOTE_B4, 16,
  NOTE_A4 , 4, NOTE_A4, 8,
  NOTE_A4, 8, NOTE_C5, 8, NOTE_B4, 8,
  NOTE_A4 , -4,
  NOTE_CS5 , -4,

  NOTE_D5 , 4, NOTE_E5, 16, NOTE_F5, 16, //72
  NOTE_F5 , 4, NOTE_F5, 8,
  NOTE_F5 , -4,
  NOTE_DS5 , 4, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_AS4 , 4, NOTE_A4, 8,
  NOTE_GS4 , 4, NOTE_G4, 8,
  NOTE_A4 , -4,
  NOTE_B4 , 4, REST, 8,
  NOTE_A3, -32, NOTE_C4, -32, NOTE_E4, -32, NOTE_A4, -32, NOTE_C5, -32, NOTE_E5, -32, NOTE_D5, -32, NOTE_C5, -32, NOTE_B4, -32,

  NOTE_A4, -32, NOTE_C5, -32, NOTE_E5, -32, NOTE_A5, -32, NOTE_C6, -32, NOTE_E6, -32, NOTE_D6, -32, NOTE_C6, -32, NOTE_B5, -32, //80
  NOTE_A4, -32, NOTE_C5, -32, NOTE_E5, -32, NOTE_A5, -32, NOTE_C6, -32, NOTE_E6, -32, NOTE_D6, -32, NOTE_C6, -32, NOTE_B5, -32,
  NOTE_AS5, -32, NOTE_A5, -32, NOTE_GS5, -32, NOTE_G5, -32, NOTE_FS5, -32, NOTE_F5, -32, NOTE_E5, -32, NOTE_DS5, -32, NOTE_D5, -32,

  NOTE_CS5, -32, NOTE_C5, -32, NOTE_B4, -32, NOTE_AS4, -32, NOTE_A4, -32, NOTE_GS4, -32, NOTE_G4, -32, NOTE_FS4, -32, NOTE_F4, -32, //84
  NOTE_E4, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_A4, -8, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16,
  NOTE_B4, -8, NOTE_E4, 16, NOTE_GS4, 16, NOTE_B4, 16,

  NOTE_C5, 8, REST, 16, NOTE_E4, 16, NOTE_E5, 16, NOTE_DS5, 16, //88
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16, 
  NOTE_A4, -8, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16, 
  NOTE_B4, -8, NOTE_E4, 16, NOTE_C5, 16, NOTE_B4, 16, 
  NOTE_A4, -8, REST, -8,
  REST, -8, NOTE_G4, 16, NOTE_F5, 16, NOTE_E5, 16,
  NOTE_D5 , 4, REST, 8,
  REST, -8, NOTE_E4, 16, NOTE_D5, 16, NOTE_C5, 16,
  
  NOTE_B4, -8, NOTE_E4, 16, NOTE_E5, 8, //96
  NOTE_E5, 8, NOTE_E6, -8, NOTE_DS5, 16,
  NOTE_E5, 16, REST, 16, REST, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_DS5, 16,
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_A4, -8, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16,
  NOTE_B4, -8, NOTE_E4, 16, NOTE_GS4, 16, NOTE_B4, 16,

  NOTE_C5, 8, REST, 16, NOTE_E4, 16, NOTE_E5, 16, NOTE_DS5, 16, //102
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_A4, -8, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16,
  NOTE_B4, -8, NOTE_E4, 16, NOTE_C5, 16, NOTE_B4, 16,
  NOTE_A4 , -4,
};
Your `mazes.ino` code, new song title added, song tempo added
/*
  Created 2025.25.11 ~q

  NessoMazes - navigate mazes using IMU..
  The nesso should be flat upon startup as this will
  be used as zero..

  maze creating algos research..
  https://weblog.jamisbuck.org/2010/12/27/maze-generation-recursive-backtracking
  fund some c code in above..
  https://gist.github.com/jamis/754545
  the above gives some ruby code..

  The Zeros allow for it to start and return to a stopped state.

  Finishing the maze drops you right back into a new one..
  improvements 2025.27.11 ~q
   added splash screen.
   added system state machine.
   removed all delays.
   added async back ground music.
   added info screen, can turn music on/off and change song..
   also has battery voltage and charge, currently not reporting properly
   but should be fixed in the future??
   revision 2025.11.12 ~q
   ported over to the new Arduino_Nesso_N1 lib..
   touch cords were off in lala land, had to compensate..
   the new lib conflics with 1.2.1 of BMI lib, I commented out the error lines..
   added Auto Solver mode, use button 2 to enable/disbale..
   everything seems to work.. :)
  No AI was used or consulted during the creation of this software.. :P
  No warranties, no gaurantees..
  Coded with love..
  be it harm none, do as ye wish..
  have fun, code on.. ~q
  www.github.com/qubits-us/

*/

#include <Arduino_Nesso_N1.h>
#include <Arduino_BMI270_BMM150.h>
#include <stack>
#include "Muzak.h"

NessoBattery battery;
NessoDisplay Display;
NessoTouch Touch;
#define TONE_PIN 11

#define DIR_STOP 0
#define DIR_UP 1
#define DIR_DWN 2
#define DIR_LEFT 3
#define DIR_RIGHT 4
//max maze size
#define MAX_HEIGHT 20
#define MAX_WIDTH 50
//size of the maze..
int8_t MazeWidth = 15;  //24 for Tb5
int8_t MazeHeight = 8;  //12;
//cell size in pixels..
int8_t CellSize = 15;  // 50;
//player size in pixels..
int8_t PlayerSize = 2;  //10;
//data that needs stacked..
struct MazeCell {
  int8_t x;
  int8_t y;
  int8_t Dirs[4];
  int8_t DirStep;
};
//our cell..
MazeCell Cell;
//player position within the maze..
struct PosPlayer {
  int8_t x;
  int8_t y;
};
PosPlayer PlayerPos;
//dir bit fields or'd into maze cells..
enum { N = 1,
       E = 4,
       S = 2,
       W = 8 };
//directions
int8_t directions[4] = { N, E, S, W };
//direction movements..
int8_t DX[9];
int8_t DY[9];
//opposite directions
int8_t OPPS[9];
//maze Grid..
int8_t MAZE[MAX_WIDTH][MAX_HEIGHT];
int8_t SOL[MAX_WIDTH][MAX_HEIGHT];
//our stack of cells..
std::stack<MazeCell> q;
//need a gap to see outer walls..
int gap = CellSize / 2;
int border_x, border_y;

//IMU values
float xValue = 0;
float yValue = 0;
//zero might not be zero
float xZero, yZero;
//tilt threshold
const float thresh = 0.10;

//initial starting pos, top right, exit is bottom left..
int playerX = CellSize / 2 + PlayerSize / 2;
int playerY = CellSize / 2 + PlayerSize / 2;

unsigned long now, lastMove;
bool debug = true;
//maze speed, increase to 1000 when debugging..
unsigned long delayMove = 100;
enum statesSystem { state_Splash = 0,
                    state_Maze = 1,
                    state_Info = 2,
                    state_Wait = 3,
                    state_WaitBtn = 4,
                    state_Launch = 5
} stateSystem = state_Splash;

statesSystem nextState = state_Maze;

struct ScreenButton {
  int x;
  int y;
  int w;
  int h;
};

ScreenButton Buttons[3];

unsigned long waitStart;
unsigned long waitFor;

ExpanderPin btnPins[2] = { KEY1, KEY2 };
unsigned long lastButton[2];
unsigned long btnDebounce = 50;
int lastBtnState[2] = { HIGH, HIGH };
unsigned long lastTouch;
unsigned long touchDebounce = 200;

bool AutoSolve = false;
//music player globals
int Music_Tempo = 240;
int Music_WholeNote = (60000 * 4) / Music_Tempo;
int Music_Note;
int Note_Divider = 0;
int CurrNote = -2;
bool NotePlaying = false;
unsigned long NoteStart, NoteDuration;
bool Music_Enabled = false;
int Music_Song = 0;

const int16_t MusicTempos[] = { 150, // furelise
                                300, // minuet
                                600, // cannon
                                400, // odetojoy
                                400, // brahmlullaby
                                300, // starwars
                                300, // imperialmarch
                                300  // stillalive
                                };
//Creates the maze..
void CreateMaze() {
  //opposites
  OPPS[N] = S;
  OPPS[S] = N;
  OPPS[E] = W;
  OPPS[W] = E;
  //direction steps..
  DX[N] = 0;
  DX[E] = 1;
  DX[S] = 0;
  DX[W] = -1;
  DY[N] = -1;
  DY[E] = 0;
  DY[S] = 1;
  DY[W] = 0;
  //initialize random..
  randomSeed(analogRead(0));
  //out with the old..
  memset(&MAZE[0], 0, sizeof(MAZE));
  memset(&SOL[0], 0, sizeof(SOL));

  //shuffle the directions..
  ShuffleDirections(directions, 4);
  //init our first cell..
  Cell.x = 0;
  Cell.y = 0;
  Cell.DirStep = 0;
  Cell.Dirs[0] = directions[0];
  Cell.Dirs[1] = directions[1];
  Cell.Dirs[2] = directions[2];
  Cell.Dirs[3] = directions[3];
  //push the cell to the stack
  q.push(Cell);
  //carve the maze passages..
  CarveMaze();
  //place our player into a maze cell..
  PlayerPos.x = 0;
  PlayerPos.y = 0;
}

//Shuffles a byte array..
void ShuffleDirections(int8_t *dirs, int size) {
  for (int i = 0; i < size; i++) {
    int r = i + (random() % (size - i));
    int8_t temp = dirs[i];
    dirs[i] = dirs[r];
    dirs[r] = temp;
  }
}

//Carves passages into the maze grid..
//a recursive backtracking algorythm..
//uses iteration in place of recursion..
void CarveMaze() {
  int dx, dy, nx, ny, cx, cy;
  int step, i;
  //loop until stack is empty..
  while (not q.empty()) {
    //get top cell..
    Cell = q.top();
    cx = Cell.x;
    cy = Cell.y;
    step = Cell.DirStep;
    for (i = 0; i < 4; i++)
      directions[i] = Cell.Dirs[i];
    //check all 4 directions..
    for (i = step; i < 4; i++) {
      dx = DX[directions[i]];
      dy = DY[directions[i]];
      nx = cx + dx;
      ny = cy + dy;
      //check valid grid cell..
      if (((nx < MazeWidth) & (nx >= 0)) & ((ny < MazeHeight) & (ny >= 0))) {
        //check if it empty..
        if (MAZE[nx][ny] == 0) {
          //valid cell, let's tunnel into it..
          MAZE[cx][cy] = (int8_t)((int8_t)MAZE[cx][cy] | (int8_t)directions[i]);
          MAZE[nx][ny] = (int8_t)((int8_t)MAZE[nx][ny] | (int8_t)OPPS[directions[i]]);
          //replace old cell..
          q.pop();
          //if we really need to come back here..
          if (i < 3) {
            Cell.DirStep = i;
            q.push(Cell);
          }
          //stack the new cell..
          Cell.x = nx;
          Cell.y = ny;
          Cell.DirStep = 0;
          //shuffle directions..
          ShuffleDirections(directions, 4);
          for (int j = 0; j < 4; j++)
            Cell.Dirs[j] = directions[j];
          q.push(Cell);
          //break out and tunnel into new cell..
          break;
        }  //if empty cell
      }    //valid grid pos
    }      // for all directions..
    //pop the stack if we visited all dirs..
    if (i == 4)
      q.pop();
    //don't be a hog!!
    yield();
  }  //while stack not empty..
}

//prints the maze in ascii to the serial monitor..
//don't look too hard, you may go cross eyed.. :)
void SerialPrintMaze() {
  for (int x = 0; x < (MazeWidth * 2); x++)
    Serial.print("_");
  Serial.println();
  for (int y = 0; y < MazeHeight; y++) {
    Serial.print("|");
    for (int x = 0; x < MazeWidth; x++) {
      Serial.print(((MAZE[x][y] & S) != 0) ? " " : "_");
      if ((MAZE[x][y] & E) != 0) {
        Serial.print((((MAZE[x][y] | MAZE[x + 1][y]) & S) != 0) ? " " : "_");
      } else {
        Serial.print("|");
      }
    }
    Serial.println();
  }
}

//draw the maze to the display..
//draws cell by cell..
void DrawMaze(uint16_t color) {
  int x, y, posx, posy, ex, ey, cell;
  x = 0;
  y = 0;
  cell = 0;
  gap = CellSize / 2;
  border_y = Display.height() - (CellSize * MazeHeight);
  border_x = Display.width() - (CellSize * MazeWidth);
  border_y = border_y / 2;
  border_x = border_x / 2;
  posx = border_x;
  posy = border_y;
  ey = 1;
  ex = CellSize;
  Display.fillScreen(TFT_BLACK);
  for (y = 0; y < MazeHeight; y++) {
    for (x = 0; x < MazeWidth; x++) {
      posx = (x * CellSize) + border_x;
      posy = (y * CellSize) + border_y;
      ey = posy;
      ex = posx + CellSize;
      //top
      if ((MAZE[x][y] & N) == 0)
        Display.drawLine(posx, posy, ex, ey, color);
      ey = posy + CellSize;
      ex = posx;
      //left
      if ((MAZE[x][y] & W) == 0)
        Display.drawLine(posx, posy, ex, ey, color);
      posy = posy + CellSize;
      ex = posx + CellSize;
      ey = posy;
      //bottom
      if ((MAZE[x][y] & S) == 0)
        Display.drawLine(posx, posy, ex, ey, color);
      posx += CellSize;
      ex = posx;
      ey = posy - CellSize;
      //if not the exit..
      if ((x == MazeWidth - 1) && (y == MazeHeight - 1)) {
        if (debug) Serial.println("Door");
      } else {
        //right
        if ((MAZE[x][y] & E) == 0)
          Display.drawLine(posx, posy, ex, ey, color);
      }
    }
  }
}

void LaunchMaze() {
  Display.fillScreen(TFT_BLACK);
  //speed check vars..
  unsigned long start, end;
  while (!q.empty()) q.pop();
  //how much ram free before..
  Serial.printf("Starting heap Available: %d\n", ESP.getFreeHeap());
  start = millis();
  CreateMaze();
  end = millis();
  //how long..
  Serial.printf("Maze Generation Completed Millis: %d\n", (end - start));
  //subtract from above, looks like about 356b, stays the same after
  //multiple maze generations..
  Serial.printf("Ending heap Available: %d\n", ESP.getFreeHeap());
  //print it out to the serial monitor..
  SerialPrintMaze();
  //draw it on the screen..
  DrawMaze(YELLOW);
  if (AutoSolve) {
    directions[0] = N;
    directions[1] = E;
    directions[2] = S;
    directions[3] = W;
    Cell.x = 0;
    Cell.y = 0;
    Cell.DirStep = 0;
    for (int i = 0; i < 4; i++)
      Cell.Dirs[i] = directions[i];
    //push the cell to the stack
    q.push(Cell);
  }
  stateSystem = state_Maze;
}

bool SolveMazeStep() {
  bool result = false;
  int dx, dy, nx, ny, cx, cy;
  int step, i;
  //until stack is empty..
  if (not q.empty()) {
    //get top cell..
    Cell = q.top();
    cx = Cell.x;
    cy = Cell.y;
    PlayerPos.x = cx;
    PlayerPos.y = cy;
    step = Cell.DirStep;
    //check all 4 directions..
    for (i = step; i < 4; i++) {
      //calc new pos
      dx = DX[directions[i]];
      dy = DY[directions[i]];
      nx = cx + dx;
      ny = cy + dy;
      if (((MAZE[cx][cy] & directions[i]) != 0) && (SOL[nx][ny] == 0)) {
        SOL[nx][ny] = 1;  //mark cell visited..
        //move into new cell..
        q.pop();
        //come back here..
        Cell.DirStep = i;
        q.push(Cell);

        PlayerPos.x = nx;
        PlayerPos.y = ny;
        //is it the exit..
        if (nx == MazeWidth && ny == MazeHeight) {
          //all done.. empty the q..
          while (!q.empty()) q.pop();
          result = true;
          break;
        }
        //stack the new cell..
        Cell.x = nx;
        Cell.y = ny;
        Cell.DirStep = 0;
        q.push(Cell);
        //break out and tunnel into new cell..
        //printf("moving into new cell x: %d y: %d\n",nx,ny);
        break;
      }
    }  // for all directions..
    //pop the stack if we visited all dirs..
    if (i == 4)
      q.pop();
    //don't be a hog!!
    //  yield();
  } else  //if stack not empty..
    result = true;

  return result;
}

//step through maze..
void StepSolution() {
  // move the user if allowed
  //erase last pos..
  playerX = PlayerPos.x;
  playerY = PlayerPos.y;
  SolveMazeStep();
  if (playerX != PlayerPos.x || playerY != PlayerPos.y) {
    int ny = PlayerPos.y;
    int nx = PlayerPos.x;
    PlayerPos.x = playerX;
    PlayerPos.y = playerY;
    drawPlayer(BLACK);
    PlayerPos.x = nx;
    PlayerPos.y = ny;
    drawPlayer(WHITE);
  }
}
//step the maze..
void StepMaze() {
  int dir = readIMU();
  drawPlayer(WHITE);

  // Check if the user's next move will intersect with a wall
  bool canMove = dir != DIR_STOP;
  int nextX = PlayerPos.x;
  int nextY = PlayerPos.y;

  //navigate maze..
  switch (dir) {
    case DIR_LEFT:
      nextX -= 1;
      if (nextX < 0) {
        canMove = false;
      } else {
        if ((MAZE[PlayerPos.x][PlayerPos.y] & W) == 0) canMove = false;
      }
      break;
    case DIR_UP:
      nextY -= 1;
      if (nextY < 0) {
        canMove = false;
      } else {
        if ((MAZE[PlayerPos.x][PlayerPos.y] & N) == 0) canMove = false;
      }
      break;
    case DIR_RIGHT:
      nextX += 1;
      if (nextX > MazeWidth - 1) {
        canMove = false;
      } else {
        if ((MAZE[PlayerPos.x][PlayerPos.y] & E) == 0) canMove = false;
      }
      break;
    case DIR_DWN:
      nextY += 1;
      if (nextY > MazeHeight - 1) {
        canMove = false;
      } else {
        if ((MAZE[PlayerPos.x][PlayerPos.y] & S) == 0) canMove = false;
      }
      break;
  }

  // move the user if allowed
  if (canMove) {
    //erase last pos..
    drawPlayer(BLACK);
    PlayerPos.x = nextX;
    PlayerPos.y = nextY;
    drawPlayer(WHITE);
  }
}
//draw player into a new cell of the maze..
//also checks for completion and creates new maze..
void drawPlayer(uint16_t color) {
  int g = (CellSize - (PlayerSize * 2)) / 4;

  //are we done..
  if (PlayerPos.x == MazeWidth - 1 && PlayerPos.y == MazeHeight - 1) {
    LaunchMaze();
  } else {
    //translate grid to screen cords..
    playerX = ((PlayerPos.x * CellSize) + (CellSize / 2) + (PlayerSize / 2) + border_x) - g;
    playerY = ((PlayerPos.y * CellSize) + (CellSize / 2) + (PlayerSize / 2) + border_y) - g;
    //draw the player..
    Display.fillCircle(playerX, playerY, PlayerSize, color);
  }
}
//Read the IMU accelerator and return a direction..
int readIMU() {
  //default to stopped
  int result = DIR_STOP;
  if (IMU.accelerationAvailable()) {
    float zValue;
    IMU.readAcceleration(xValue, yValue, zValue);
    if (debug) {
      // Serial.print("X:");
      //  Serial.print(xValue);
      //  Serial.print(" Y:");
      //  Serial.print(yValue);
    }

    if (xValue < (xZero - thresh)) {
      //left
      result = DIR_LEFT;
      if (debug) Serial.print(" Left");

    } else if (xValue > (xZero + thresh)) {
      //right
      result = DIR_RIGHT;
      if (debug) Serial.print(" Right");
    }

    if (result == DIR_STOP) {
      if (yValue < (yZero - thresh)) {
        //down
        result = DIR_DWN;
        if (debug) Serial.print(" Down");
      } else if (yValue > (yZero + thresh)) {
        //up
        result = DIR_UP;
        if (debug) Serial.print(" Up");
      }
    }
  }

  if (debug) {
    if (result == DIR_STOP) Serial.print(" Stop");
    Serial.println();
  }
  return result;
}
void setup() {
  Serial.begin(115200);
  if (!IMU.begin()) {
    Serial.println("IMU Failed!!");
    while (1)
      ;
  }

  delay(2000);  //nap while imu warms up a bit..

  float zValue;
  IMU.readAcceleration(xZero, yZero, zValue);

  Serial.println("**** Nesso Mazes ~q ****");
  //hope nesso is laying flat.. :)
  Serial.print("X zero:");
  Serial.println(xZero);
  Serial.print("Y zero:");
  Serial.println(yZero);

  Display.begin();
  Display.setRotation(1);
  Display.fillScreen(TFT_BLACK);
  if (!Touch.begin()) {
    Serial.println("Touch failed to begin..");
  }

  delay(1000);
  battery.begin();
  //battery.enableCharge();
  //enters/exits info screen
  pinMode(KEY1, INPUT_PULLUP);
  //toggles auto solve
  pinMode(KEY2, INPUT_PULLUP);
}

void loop() {

  now = millis();

  int16_t touchX, touchY;
  if (Touch.isTouched()) {
    if (Touch.read(touchX, touchY)) {
      if (now - lastTouch >= touchDebounce) {
        //got a touch..
        lastTouch = now;
        if (stateSystem == state_WaitBtn) {
          //info screen is up, process touches..
          CheckScreenTouch(touchX, touchY);
        }  //else if (stateSystem == state_Maze) {
           // stateSystem = state_Info;
        //  }
      }
    }
  }

  for (int i = 0; i < 2; i++) {
    if (now - lastButton[i] >= btnDebounce) {
      byte b = digitalRead(btnPins[i]);
      if (b != lastBtnState[i]) {
        //start debounce
        lastButton[i] = now;
        lastBtnState[i] = b;
        if (b == LOW) {
          //press and release buttton
          if (i == 0) {
            switch (stateSystem) {
              case state_Maze:
                stateSystem = state_Info;
                break;
              case state_WaitBtn:
                DrawMaze(YELLOW);
                stateSystem = state_Maze;
                break;
            }
          } else {
            //key2
            if (!AutoSolve) {
              //turn auto solve on..
              AutoSolve = true;
              while (!q.empty()) q.pop();
              memset(&SOL[0], 0, sizeof(SOL));
              directions[0] = N;
              directions[1] = E;
              directions[2] = S;
              directions[3] = W;
              Cell.x = 0;
              Cell.y = 0;
              Cell.DirStep = 0;
              for (int i = 0; i < 4; i++)
                Cell.Dirs[i] = directions[i];
              //push the cell to the stack
              q.push(Cell);
              drawPlayer(BLACK);
            } else {
              //turn auto solve off..
              AutoSolve = false;
              drawPlayer(BLACK);
              PlayerPos.x = 0;
              PlayerPos.y = 0;
              drawPlayer(WHITE);
            }
          }
        }
      }
    }
  }

  if (Music_Enabled) {  //play a tune..
    Music_Tempo = MusicTempos[Music_Song];
    Music_WholeNote = (60000 * 4) / Music_Tempo;
    switch (Music_Song) {
      case 0:
        PlayMusic(furelise, sizeof(furelise) / sizeof(furelise[0]));
        break;
      case 1:
        PlayMusic(minuet, sizeof(minuet) / sizeof(minuet[0]));
        break;
      case 2:
        PlayMusic(cannon, sizeof(cannon) / sizeof(cannon[0]));
        break;
      case 3:
        PlayMusic(odetojoy, sizeof(odetojoy) / sizeof(odetojoy[0]));
        break;
      case 4:
        PlayMusic(brahmslullaby, sizeof(brahmslullaby) / sizeof(brahmslullaby[0]));
        break;
      case 5:
        PlayMusic(starwars, sizeof(starwars) / sizeof(starwars[0]));
        break;
      case 6:
        PlayMusic(imperialmarch, sizeof(imperialmarch) / sizeof(imperialmarch[0]));
        break;
      case 7:
        PlayMusic(stillalive, sizeof(stillalive) / sizeof(stillalive[0]));
        break;
    }
  }

  switch (stateSystem) {
    case state_Maze:
      if (now - lastMove >= delayMove) {
        lastMove = now;
        if (!AutoSolve) {
          StepMaze();
        } else {
          StepSolution();
        }
      }
      break;
    case state_Splash:
      ScreenSplash();
      break;
    case state_Info:
      ScreenInfo();
      break;
    case state_Wait:
      if (now - waitStart >= waitFor) {
        stateSystem = nextState;
      }
      break;
    case state_Launch:
      LaunchMaze();
      break;
  }
  yield();
}
void ScreenSplash() {
  int tw, th, tx, ty, sh, sw;
  sh = Display.height();
  sw = Display.width();
  Display.fillScreen(TFT_BLACK);
  Display.setTextSize(2);
  th = Display.fontHeight();
  tw = Display.textWidth("Nesso Mazes");
  tx = (Display.width() / 2) - (tw / 2);
  ty = (Display.height() / 2) - (th / 2);
  CreateMaze();
  DrawMaze(YELLOW);
  Display.fillRect(tx - 6, ty - 6, tw + 12, th + 12, BLACK);
  Display.drawRect(tx - 6, ty - 6, tw + 12, th + 12, YELLOW);
  Display.drawString("Nesso Mazes", tx, ty);
  waitStart = now;
  waitFor = 5000;
  stateSystem = state_Wait;
  nextState = state_Launch;
}
void ScreenInfo() {
  int tw, th, tx, ty, gap, border, sh, sw, nw, cw, ch;

  sh = Display.height();
  sw = Display.width();
  //Serial.printf("Screen H: %d W: %d\n", sh, sw);
  border = 10;
  gap = 2;

  Display.fillScreen(TFT_BLACK);
  Display.setTextSize(2);
  Display.setTextColor(WHITE, BLACK);
  //x,y
  tx = 10;
  ty = 10;
  //3 cols 2 rows..
  cw = (sw - ((border * 2) + (gap * 2))) / 3;
  ch = (sh - ((border * 2) + (gap * 2))) / 2;
  // Serial.printf("Cell H: %d W: %d\n", ch, cw);

  tw = Display.textWidth("Music");
  th = Display.fontHeight() + gap;
  Display.drawRect(tx, ty, cw, th, YELLOW);
  Display.drawString("Music", tx + 6, ty + 1);
  ty += th + gap;
  Display.drawRect(tx, ty, cw, ch - (th + gap), YELLOW);
  Buttons[0].x = tx;
  Buttons[0].y = ty;
  Buttons[0].w = cw;
  Buttons[0].h = ch - (th + gap);

  if (Music_Enabled) {
    nw = Display.textWidth("On");
    Display.drawString("On", (tx + 6) + (nw / 2), ty + 12);
  } else {
    nw = Display.textWidth("Off");
    Display.drawString("Off", (tx + 6) + (nw / 2), ty + 12);
  }
  tx += cw + gap;
  ty = 10;
  Display.drawRect(tx, ty, cw, th, YELLOW);
  Display.drawString("Song", tx + 6, ty + 1);
  ty += th + gap;
  Display.drawRect(tx, ty, cw, ch - (th + gap), YELLOW);
  Buttons[1].x = tx;
  Buttons[1].y = ty;
  Buttons[1].w = cw;
  Buttons[1].h = ch - (th + gap);
  nw = Display.textWidth("0");

  Display.drawNumber(Music_Song + 1, tx + (nw / 2) + (tw / 2), ty + 12);
  tx += cw + gap;
  ty = 10;
  Display.drawRect(tx, ty, cw, ch, YELLOW);
  Display.drawString("BattV", tx + 6, ty + 6);
  ty += th + gap;
  Display.drawRect(tx, ty, cw, ch - (th + gap), YELLOW);

  nw = Display.textWidth("9.9");
  Display.drawFloat(battery.getVoltage(), 1, (tx) + (nw / 2), ty + 12);
  // Serial.printf("Voltage: %4.2f",battery.getVoltage());

  tx = 10;
  ty += ch + gap;
  Display.drawRect(tx, ty, sw - (tx * 2), ch - gap, YELLOW);
  Buttons[2].x = tx;
  Buttons[2].y = ty;
  Buttons[2].w = sw - (tx * 2);
  Buttons[2].h = (sh - ty) - 10;
  nw = (sw - (tx * 2)) - 4;
  int cl = battery.getChargeLevel();
  if (cl < 100) {
    float multi = cl / 100.0;
    nw = nw * multi;
  }
  Display.fillRect(tx + 2, ty + 2, nw, ch - (gap * 2), GREEN);
  Display.drawNumber(cl, (sw / 2) - (tw / 2) + 5, ty + 12);
  stateSystem = state_WaitBtn;
}

bool TouchArea(int px, int py, int x, int y, int w, int h) {
  bool result = false;
  int x2 = x + w;
  int y2 = y + h;
  //flip the points around and invert x..
  // Serial.printf("B X: %d  Y: %d\n",px,py);
  int touch_x = py;          //(135 - px);
  int touch_y = (135 - px);  // (240 - py);
                             /// Serial.printf("F X: %d  Y: %d\n",touch_x,touch_y);

  if ((touch_x >= x) && (touch_x <= x2) && (touch_y >= y) && (touch_y <= y2)) result = true;
  if (debug) {
    Serial.printf("X: %d , X1: %d, Y: %d, Y1: %d\n", touch_x, x, touch_y, y);
    Serial.printf("Matched :%d\n", result);
  }
  return result;
}

void CheckScreenTouch(int tx, int ty) {
  int nw;
  //only have 1 screen to watch..
  // Serial.printf("Button 0 x: %d y: %d w: %d h: %d\n",Buttons[0].x, Buttons[0].y, Buttons[0].w, Buttons[0].h);
  //Serial.printf("Button 1 x: %d y: %d w: %d h: %d\n",Buttons[1].x, Buttons[1].y, Buttons[1].w, Buttons[1].h);

  if (TouchArea(tx, ty, Buttons[0].x, Buttons[0].y, Buttons[0].w, Buttons[0].h)) {
    //touch on button 1 - music on/off toggle
    if (debug)
      Serial.println("Button 1 touched..");
    Display.fillRect(Buttons[0].x + 2, Buttons[0].y + 2, Buttons[0].w - 4, Buttons[0].h - 4, BLACK);
    if (Music_Enabled) {
      Music_Enabled = false;
      noTone(TONE_PIN);
      nw = Display.textWidth("Off");
      Display.setTextColor(WHITE, BLACK);
      Display.drawString("Off", Buttons[0].x + 6 + (nw / 2), Buttons[0].y + 12);
    } else {
      Music_Enabled = true;
      nw = Display.textWidth("On");
      Display.setTextColor(WHITE, BLACK);
      Display.drawString(" On", Buttons[0].x + 6 + (nw / 2), Buttons[0].y + 12);
    }

  } else if (TouchArea(tx, ty, Buttons[1].x, Buttons[1].y, Buttons[1].w, Buttons[1].h)) {
    //touch on button 2 - song button select
    if (debug)
      Serial.println("Button 2 touched..");
    bool isEnabled = Music_Enabled;
    Music_Enabled = false;
    Music_Song++;
    if (Music_Song > (sizeof(MusicTempos) / sizeof(MusicTempos[0])) - 1) Music_Song = 0;
    CurrNote = -2;
    Music_Enabled = isEnabled;
    Display.waitDisplay();
    //remove old text..
    Display.fillRect(Buttons[1].x + 2, Buttons[1].y + 2, Buttons[1].w - 4, Buttons[1].h - 4, BLACK);
    nw = Display.textWidth("0");
    Display.setTextColor(WHITE, BLACK);
    Display.drawNumber(Music_Song + 1, Buttons[1].x + (nw / 2) + ((Buttons[1].w - 12) / 2), Buttons[1].y + 12);
    Display.display();
  }  // else if (TouchArea(tx, ty, Buttons[2].x, Buttons[2].y, Buttons[2].w, Buttons[2].h)) {
     //close the info screen..
  //  DrawMaze(YELLOW);
  // stateSystem = state_Maze;
  //}
}

//async tone music player..
void PlayMusic(const int16_t song[], int elements) {
  static bool resting = false;
  if (now - NoteStart >= NoteDuration) {
    if (NotePlaying) {
      if (!resting) {
        noTone(TONE_PIN);
      } else resting = false;
      NotePlaying = false;
      NoteStart = now;
    } else {
      CurrNote += 2;
      if (CurrNote < (elements - 1)) {
        Music_Note = song[CurrNote];
        Note_Divider = song[CurrNote + 1];
        if (Note_Divider > 0) {
          NoteDuration = Music_WholeNote / Note_Divider;
        } else {
          NoteDuration = Music_WholeNote / abs(Note_Divider);
          NoteDuration *= 1.5;
        }
        if (Music_Note != REST) {
          tone(TONE_PIN, Music_Note);
        } else resting = true;
        NoteStart = now;
        NotePlaying = true;
      } else {
        //pause for a sec, then loop..
        noTone(TONE_PIN);
        NoteStart = now;
        NoteDuration = 1000;
        //Music_Song++;
        //if (Music_Song > (sizeof(MusicTempos) / sizeof(MusicTempos[0])) - 1) Music_Song = 0;
        CurrNote = -2;
      }
    }
  }
}
Your `Muzak.h`, new song array added
/*

Muzak.h

Contains musical score arrays..
for back ground music player..

Major Credits for all the musical scores goes too..
https://github.com/robsoncouto/arduino-songs/
Has many more there as well..
Nice work, thanks for sharing!!

2025.28.11 ~q

*/

// pitches.h
#define NOTE_B0  31
#define NOTE_C1  33
#define NOTE_CS1 35
#define NOTE_D1  37
#define NOTE_DS1 39
#define NOTE_E1  41
#define NOTE_F1  44
#define NOTE_FS1 46
#define NOTE_G1  49
#define NOTE_GS1 52
#define NOTE_A1  55
#define NOTE_AS1 58
#define NOTE_B1  62
#define NOTE_C2  65
#define NOTE_CS2 69
#define NOTE_D2  73
#define NOTE_DS2 78
#define NOTE_E2  82
#define NOTE_F2  87
#define NOTE_FS2 93
#define NOTE_G2  98
#define NOTE_GS2 104
#define NOTE_A2  110
#define NOTE_AS2 117
#define NOTE_B2  123
#define NOTE_C3  131
#define NOTE_CS3 139
#define NOTE_D3  147
#define NOTE_DS3 156
#define NOTE_E3  165
#define NOTE_F3  175
#define NOTE_FS3 185
#define NOTE_G3  196
#define NOTE_GS3 208
#define NOTE_A3  220
#define NOTE_AS3 233
#define NOTE_B3  247
#define NOTE_C4  262
#define NOTE_CS4 277
#define NOTE_D4  294
#define NOTE_DS4 311
#define NOTE_E4  330
#define NOTE_F4  349
#define NOTE_FS4 370
#define NOTE_G4  392
#define NOTE_GS4 415
#define NOTE_A4  440
#define NOTE_AS4 466
#define NOTE_B4  494
#define NOTE_C5  523
#define NOTE_CS5 554
#define NOTE_D5  587
#define NOTE_DS5 622
#define NOTE_E5  659
#define NOTE_F5  698
#define NOTE_FS5 740
#define NOTE_G5  784
#define NOTE_GS5 831
#define NOTE_A5  880
#define NOTE_AS5 932
#define NOTE_B5  988
#define NOTE_C6  1047
#define NOTE_CS6 1109
#define NOTE_D6  1175
#define NOTE_DS6 1245
#define NOTE_E6  1319
#define NOTE_F6  1397
#define NOTE_FS6 1480
#define NOTE_G6  1568
#define NOTE_GS6 1661
#define NOTE_A6  1760
#define NOTE_AS6 1865
#define NOTE_B6  1976
#define NOTE_C7  2093
#define NOTE_CS7 2217
#define NOTE_D7  2349
#define NOTE_DS7 2489
#define NOTE_E7  2637
#define NOTE_F7  2794
#define NOTE_FS7 2960
#define NOTE_G7  3136
#define NOTE_GS7 3322
#define NOTE_A7  3520
#define NOTE_AS7 3729
#define NOTE_B7  3951
#define NOTE_C8  4186
#define NOTE_CS8 4435
#define NOTE_D8  4699
#define NOTE_DS8 4978
#define REST     0

static constexpr const int16_t stillalive[] = {

// set tempo = 300

// https://forum.arduino.cc/t/nesso-mazes-imu-test/1416402/17
// Still Alive by Jonathan Coultrain
// https://en.wikipedia.org/wiki/Jonathan_Coulton
// https://en.wikipedia.org/wiki/Still_Alive

  // bar 1
  NOTE_G4 , 8, NOTE_FS4, 8, NOTE_E4 , 8, NOTE_E4 , 8, 
  NOTE_FS4, 2, REST    , 2, 
  REST    ,-4, NOTE_A3 , 8, NOTE_G4 , 8, NOTE_FS4, 8, NOTE_E4 , 8, NOTE_E4 , 4, 
  NOTE_FS4, -4, NOTE_D4 , 4, NOTE_E4 , 8, NOTE_A3 , 8, 

  // bar 5
  REST    , 8, NOTE_A3 , 8, 
  NOTE_E4 , 4, NOTE_FS4, 8, NOTE_G4 ,-4, NOTE_E4 , 8, NOTE_CS4,  4, 
  NOTE_D4 ,-4, NOTE_E4 , 4, NOTE_A3 , 8, NOTE_A3 , 4, 
  NOTE_FS4, 8, 

  // bar 9
  REST    , 2, NOTE_G4 , 8, NOTE_FS4, 8, NOTE_E4 , 8, NOTE_E4 , 8, 
  NOTE_FS4, 2, REST    , 2, 
  REST    ,-4, NOTE_A3 , 8, NOTE_G4 , 8, NOTE_FS4, 8, NOTE_E4 , 8, NOTE_E4 ,-4, 
  NOTE_FS4, 8, NOTE_D4 ,-4, NOTE_E4 , 8, NOTE_A3 ,-4, 

  // bar 13
  REST    , 1, 
  NOTE_E4 , 4, NOTE_FS4, 8, NOTE_G4 ,-4, NOTE_E4 , 8, NOTE_CS4, -4, 
  NOTE_D4 , 8, NOTE_E4 , 4, NOTE_A3 , 8, NOTE_D4 , 8, NOTE_E4 , 8, 
  NOTE_F4 , 8, NOTE_E4 , 8, NOTE_D4 , 8, NOTE_C4 , 8, REST    , 4, NOTE_A3 , 8, NOTE_AS3, 8, 

  // bar 17
  NOTE_C4 , 4, NOTE_F4 , 4, NOTE_E4 , 8, NOTE_D4 , 8, NOTE_D4 , 8, NOTE_C4 , 8, 
  NOTE_D4 , 8, NOTE_C4 , 8, NOTE_C4 , 4, NOTE_C4 , 4, NOTE_A3 , 8, NOTE_AS3, 8,   
  NOTE_C4 , 4, NOTE_F4 , 4, NOTE_G4 , 8, NOTE_F4 , 8, NOTE_E4 , 8, NOTE_D4 , 8, 
  NOTE_D4 , 8, NOTE_E4 , 8, NOTE_F4 , 4, NOTE_F4 , 4, NOTE_G4 , 8, NOTE_A4 , 8, 

  // bar 21
  NOTE_AS4, 8, NOTE_AS4, 8, NOTE_A4 , 4, NOTE_G4 , 4, NOTE_F4 , 8, NOTE_G4 , 8, 
  NOTE_A4 , 8, NOTE_A4 , 8, NOTE_G4 , 4, NOTE_F4 , 4, NOTE_D4 , 8, NOTE_C4 , 8, 
  NOTE_D4 , 8, NOTE_F4 , 8, NOTE_F4 , 8, NOTE_E4 , 4, NOTE_E4 , 8, NOTE_FS4, 8, NOTE_FS4, 8, 
  REST    , 2, REST    , 2, 

  // bar 25
  REST    , 2, REST    , 2, 
  REST    , 2, REST    , 2, 
  REST    ,-4, NOTE_A3 , 8, NOTE_G4 , 8, NOTE_FS4, 8, NOTE_E4 , 8, NOTE_E4 , 8, 
  NOTE_FS4, 8, REST    , 2, 

  // bar 29
  REST    , 2, NOTE_G4 , 8, NOTE_FS4, 8, NOTE_E4 , 8, NOTE_E4 ,-4, 
  NOTE_FS4, 8, NOTE_D4 , 4, NOTE_E4 , 4, NOTE_A3 ,-4, 
  REST    , 8, 
  NOTE_E4 , 4, NOTE_FS4, 8, NOTE_G4 ,-4, NOTE_E4 , 4, 

  // bar 33
  NOTE_CS4,  4, NOTE_D4 , 8, NOTE_E4 ,-4, NOTE_A3 , 8, NOTE_A3 , 4, 
  NOTE_FS4, 8, REST    , 4, 
  REST    ,-4, NOTE_A3 , 8, NOTE_B4 , 8, NOTE_A4 , 8, NOTE_G4 , 8, NOTE_G4 , 8, 
  NOTE_A4 , 4, REST    ,-2,

  // bar 37
  REST    ,-4, NOTE_A3 , 8, NOTE_B4 , 8, NOTE_A4 , 8, NOTE_G4 , 8, NOTE_G4 ,-4, 
  NOTE_A4 , 8, NOTE_FS4, -4, NOTE_G4 , 8, NOTE_D4 ,-4, 
  REST    ,-2,
  NOTE_E4 , 4, NOTE_FS4, 8, NOTE_G4 ,-4, NOTE_E4 , 4, 

  // bar 41
  NOTE_CS4,  4, NOTE_D4 , 8, NOTE_E4 , 4, NOTE_A3 , 8, NOTE_D4 , 8, NOTE_E4 , 8, 
  NOTE_F4 , 8, NOTE_E4 , 8, NOTE_D4 , 8, NOTE_C4 ,-4, NOTE_A3 , 8, NOTE_AS3, 8, 
  NOTE_C4 , 4, NOTE_F4 , 4, NOTE_E4 , 8, NOTE_D4 , 8, NOTE_D4 , 8, NOTE_C4 , 8, 
  NOTE_D4 , 8, NOTE_C4 , 8, NOTE_C4 , 4, NOTE_C4 , 4, NOTE_A3 , 8, NOTE_AS3, 8, 

  // bar 45
  NOTE_C4 , 4, NOTE_F4 , 4, NOTE_G4 , 8, NOTE_F4 , 8, NOTE_E4 , 8, NOTE_D4 , 8, 
  NOTE_D4 , 8, NOTE_E4 , 8, NOTE_F4 , 4, NOTE_F4 , 4, NOTE_G4 , 8, NOTE_A4 , 8, 
  NOTE_AS4, 8, NOTE_AS4, 8, NOTE_A4 , 4, NOTE_G4 , 4, NOTE_F4 , 8, NOTE_G4 , 8, 
  NOTE_A4 , 8, NOTE_A4 , 8, NOTE_G4 , 8, NOTE_F4 , 8, NOTE_F4 , 4, NOTE_D4 , 8, NOTE_C4 , 8, 

  // bar 49
  NOTE_D4 , 8, NOTE_F4 , 8, NOTE_F4 , 8, NOTE_E4 , 4, NOTE_E4 , 8, NOTE_FS4, 8, NOTE_FS4, 8, 
  REST    , 2, 
  REST    , 2, REST    , 2, 
  REST    , 2, REST    , 2, 

  // bar 53
  REST    , 2, NOTE_G4 , 8, NOTE_FS4, 8, NOTE_E4 , 8, NOTE_E4 , 4, 
  NOTE_FS4, -4, REST    , 2, 
  REST    ,-4, NOTE_A3 , 8, NOTE_G4 , 8, NOTE_FS4, 8, NOTE_E4 , 8, NOTE_E4 ,-4, 
  NOTE_FS4, 8, NOTE_D4 ,-4, NOTE_E4 , 8, NOTE_A3 , 8, 

  // bar 57
  REST    , 2, 
  NOTE_E4 , 4, NOTE_FS4, 8, NOTE_G4 ,-4, NOTE_E4 , 4, 
  NOTE_CS4,  4, NOTE_D4 , 8, NOTE_E4 , 4, REST    , 8, NOTE_A3 , 8, NOTE_A3 , 4, 
  NOTE_FS4, 8, REST    , 4, 

  // bar 61
  REST    , 4, REST    , 4, NOTE_B4 , 8, NOTE_A4 , 8, NOTE_G4 , 8, NOTE_G4 , 4, 
  NOTE_A4 , 4, REST    , 8, 
  REST    , 2, NOTE_B4 , 8, NOTE_A4 , 8, NOTE_G4 , 8, NOTE_G4 ,-4, 
  NOTE_A4 , 8, NOTE_FS4, -4, NOTE_G4 , 8, NOTE_D4 ,-4, 

  // bar 65
  REST    ,-2, 
  NOTE_E4 , 4, NOTE_FS4, 8, NOTE_G4 ,-4, NOTE_E4 , 4, 
  NOTE_CS4,  4, NOTE_D4 , 8, NOTE_E4 , 4, NOTE_A3 , 8, NOTE_D4 , 8, NOTE_E4 , 8, 
  NOTE_F4 , 8, NOTE_E4 , 8, NOTE_D4 , 8, NOTE_C4 ,-4, NOTE_A3 , 8, NOTE_AS3, 8, 

  // bar 69
  NOTE_C4 , 4, NOTE_F4 , 4, NOTE_E4 , 8, NOTE_D4 , 8, NOTE_D4 , 8, NOTE_C4 , 8, 
  NOTE_D4 , 8, NOTE_C4 , 8, NOTE_C4 , 4, NOTE_C4 , 4, NOTE_A3 , 8, NOTE_AS3, 8, 
  NOTE_C4 , 4, NOTE_F4 , 4, NOTE_G4 , 8, NOTE_F4 , 8, NOTE_E4 , 8, NOTE_D4 , 8, 
  NOTE_D4 , 8, NOTE_E4 , 8, NOTE_F4 , 4, NOTE_F4 , 4, NOTE_G4 , 8, NOTE_A4 , 8, 

  // bar 73
  NOTE_AS4, 8, NOTE_AS4, 8, NOTE_A4 , 8, NOTE_G4 , 8, NOTE_G4 , 4, NOTE_F4 , 8, NOTE_G4 , 8, 
  NOTE_A4 , 8, NOTE_A4 , 8, NOTE_G4 , 8, NOTE_F4 , 8, NOTE_F4 , 4, NOTE_D4 , 8, NOTE_C4 , 8, 
  NOTE_D4 , 8, NOTE_F4 , 8, NOTE_F4 , 8, NOTE_E4 , 4, NOTE_E4 , 8, NOTE_FS4, 8, NOTE_FS4, 8, 
  REST    , 8, REST    , 8, NOTE_A4 , 8, NOTE_A4 , 8, 

  // bar 77
  NOTE_B4 , 8, NOTE_A4 , 8, NOTE_FS4, 8, NOTE_D4 , 4, NOTE_E4 , 8, NOTE_FS4, 8, NOTE_A4 ,-4, 
  REST    , 8, REST    , 4, NOTE_A4 , 8, NOTE_A4 , 8, NOTE_A4 , 8, 
  NOTE_B4 , 8, NOTE_A4 , 8, NOTE_FS4, 8, NOTE_D4 , 4, NOTE_G4 , 8, NOTE_A4 , 8, NOTE_A4 ,-4, 
  REST    , 8,   REST    , 4, NOTE_A4 , 8, NOTE_A4 , 8, NOTE_A4 , 8, 

  // bar 81
  NOTE_B4 , 8, NOTE_A4 , 8, NOTE_FS4, 8, NOTE_D4 , 4, NOTE_G4 , 8, NOTE_A4 , 8, NOTE_A4 ,-4, 
  REST    , 4, REST    , 4, NOTE_A4 , 8, NOTE_A4 , 8, 
  NOTE_B4 , 8, NOTE_A4 , 8, NOTE_FS4, 8, NOTE_D4 , 4, NOTE_G4 , 8, NOTE_A4 , 8, NOTE_A4 ,-4, 
  REST    , 8, REST    , 4, NOTE_A4 , 8, NOTE_A4 , 8, NOTE_A4 , 8, 

  // bar 85
  NOTE_B4 , 8, NOTE_A4 , 8, NOTE_FS4, 8, NOTE_D4 , 4, NOTE_G4 , 8, NOTE_A4 , 8, NOTE_A4 ,-4, 
  REST    , 8, REST    , 4, NOTE_G4 , 8, NOTE_A4 , 8, NOTE_A4 ,-4, 
  REST    ,-4, NOTE_G4 , 8, NOTE_FS4, 8, NOTE_FS4, 8, 
  REST    , 2
};

static constexpr const int16_t furelise[] = {
  // Fur Elise - Ludwig van Beethovem
  // Score available at https://musescore.com/user/28149610/scores/5281944

  //starts from 1 ending on 9
  NOTE_E5, 16, NOTE_DS5, 16, //1
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_A4, -8, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16,
  NOTE_B4, -8, NOTE_E4, 16, NOTE_GS4, 16, NOTE_B4, 16,
  NOTE_C5, 8,  REST, 16, NOTE_E4, 16, NOTE_E5, 16,  NOTE_DS5, 16,
  
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,//6
  NOTE_A4, -8, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16, 
  NOTE_B4, -8, NOTE_E4, 16, NOTE_C5, 16, NOTE_B4, 16, 
  NOTE_A4 , 4, REST, 8, //9 - 1st ending

  //repaets from 1 ending on 10
  NOTE_E5, 16, NOTE_DS5, 16, //1
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_A4, -8, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16,
  NOTE_B4, -8, NOTE_E4, 16, NOTE_GS4, 16, NOTE_B4, 16,
  NOTE_C5, 8,  REST, 16, NOTE_E4, 16, NOTE_E5, 16,  NOTE_DS5, 16,
  
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,//6
  NOTE_A4, -8, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16, 
  NOTE_B4, -8, NOTE_E4, 16, NOTE_C5, 16, NOTE_B4, 16, 
  NOTE_A4, 8, REST, 16, NOTE_B4, 16, NOTE_C5, 16, NOTE_D5, 16, //10 - 2nd ending
  //continues from 11
  NOTE_E5, -8, NOTE_G4, 16, NOTE_F5, 16, NOTE_E5, 16, 
  NOTE_D5, -8, NOTE_F4, 16, NOTE_E5, 16, NOTE_D5, 16, //12
  
  NOTE_C5, -8, NOTE_E4, 16, NOTE_D5, 16, NOTE_C5, 16, //13
  NOTE_B4, 8, REST, 16, NOTE_E4, 16, NOTE_E5, 16, REST, 16,
  REST, 16, NOTE_E5, 16, NOTE_E6, 16, REST, 16, REST, 16, NOTE_DS5, 16,
  NOTE_E5, 16, REST, 16, REST, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_DS5, 16,
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_A4, 8, REST, 16, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16,
  
  NOTE_B4, 8, REST, 16, NOTE_E4, 16, NOTE_GS4, 16, NOTE_B4, 16, //19
  NOTE_C5, 8, REST, 16, NOTE_E4, 16, NOTE_E5, 16,  NOTE_DS5, 16,
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_A4, 8, REST, 16, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16,
  NOTE_B4, 8, REST, 16, NOTE_E4, 16, NOTE_C5, 16, NOTE_B4, 16,
  NOTE_A4, 8, REST, 16, NOTE_B4, 16, NOTE_C5, 16, NOTE_D5, 16, //24 (1st ending)
  
  //repeats from 11
  NOTE_E5, -8, NOTE_G4, 16, NOTE_F5, 16, NOTE_E5, 16, 
  NOTE_D5, -8, NOTE_F4, 16, NOTE_E5, 16, NOTE_D5, 16, //12
  
  NOTE_C5, -8, NOTE_E4, 16, NOTE_D5, 16, NOTE_C5, 16, //13
  NOTE_B4, 8, REST, 16, NOTE_E4, 16, NOTE_E5, 16, REST, 16,
  REST, 16, NOTE_E5, 16, NOTE_E6, 16, REST, 16, REST, 16, NOTE_DS5, 16,
  NOTE_E5, 16, REST, 16, REST, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_DS5, 16,
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_A4, 8, REST, 16, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16,
  
  NOTE_B4, 8, REST, 16, NOTE_E4, 16, NOTE_GS4, 16, NOTE_B4, 16, //19
  NOTE_C5, 8, REST, 16, NOTE_E4, 16, NOTE_E5, 16,  NOTE_DS5, 16,
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_A4, 8, REST, 16, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16,
  NOTE_B4, 8, REST, 16, NOTE_E4, 16, NOTE_C5, 16, NOTE_B4, 16,
  NOTE_A4, 8, REST, 16, NOTE_C5, 16, NOTE_C5, 16, NOTE_C5, 16, //25 - 2nd ending

  //continues from 26
  NOTE_C5 , 4, NOTE_F5, -16, NOTE_E5, 32, //26
  NOTE_E5, 8, NOTE_D5, 8, NOTE_AS5, -16, NOTE_A5, 32,
  NOTE_A5, 16, NOTE_G5, 16, NOTE_F5, 16, NOTE_E5, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_AS4, 8, NOTE_A4, 8, NOTE_A4, 32, NOTE_G4, 32, NOTE_A4, 32, NOTE_B4, 32,
  NOTE_C5 , 4, NOTE_D5, 16, NOTE_DS5, 16,
  NOTE_E5, -8, NOTE_E5, 16, NOTE_F5, 16, NOTE_A4, 16,
  NOTE_C5 , 4,  NOTE_D5, -16, NOTE_B4, 32,
 
  
  NOTE_C5, 32, NOTE_G5, 32, NOTE_G4, 32, NOTE_G5, 32, NOTE_A4, 32, NOTE_G5, 32, NOTE_B4, 32, NOTE_G5, 32, NOTE_C5, 32, NOTE_G5, 32, NOTE_D5, 32, NOTE_G5, 32, //33
  NOTE_E5, 32, NOTE_G5, 32, NOTE_C6, 32, NOTE_B5, 32, NOTE_A5, 32, NOTE_G5, 32, NOTE_F5, 32, NOTE_E5, 32, NOTE_D5, 32, NOTE_G5, 32, NOTE_F5, 32, NOTE_D5, 32,
  NOTE_C5, 32, NOTE_G5, 32, NOTE_G4, 32, NOTE_G5, 32, NOTE_A4, 32, NOTE_G5, 32, NOTE_B4, 32, NOTE_G5, 32, NOTE_C5, 32, NOTE_G5, 32, NOTE_D5, 32, NOTE_G5, 32,

  NOTE_E5, 32, NOTE_G5, 32, NOTE_C6, 32, NOTE_B5, 32, NOTE_A5, 32, NOTE_G5, 32, NOTE_F5, 32, NOTE_E5, 32, NOTE_D5, 32, NOTE_G5, 32, NOTE_F5, 32, NOTE_D5, 32, //36
  NOTE_E5, 32, NOTE_F5, 32, NOTE_E5, 32, NOTE_DS5, 32, NOTE_E5, 32, NOTE_B4, 32, NOTE_E5, 32, NOTE_DS5, 32, NOTE_E5, 32, NOTE_B4, 32, NOTE_E5, 32, NOTE_DS5, 32,
  NOTE_E5, -8, NOTE_B4, 16, NOTE_E5, 16, NOTE_DS5, 16,
  NOTE_E5, -8, NOTE_B4, 16, NOTE_E5, 16, REST, 16,

  REST, 16, NOTE_DS5, 16, NOTE_E5, 16, REST, 16, REST, 16, NOTE_DS5, 16, //40
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_A4, 8, REST, 16, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16,
  NOTE_B4, 8, REST, 16, NOTE_E4, 16, NOTE_GS4, 16, NOTE_B4, 16,
  NOTE_C5, 8, REST, 16, NOTE_E4, 16, NOTE_E5, 16, NOTE_DS5, 16,
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,

  NOTE_A4, 8, REST, 16, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16, //46
  NOTE_B4, 8, REST, 16, NOTE_E4, 16, NOTE_C5, 16, NOTE_B4, 16,
  NOTE_A4, 8, REST, 16, NOTE_B4, 16, NOTE_C5, 16, NOTE_D5, 16,
  NOTE_E5, -8, NOTE_G4, 16, NOTE_F5, 16, NOTE_E5, 16,
  NOTE_D5, -8, NOTE_F4, 16, NOTE_E5, 16, NOTE_D5, 16,
  NOTE_C5, -8, NOTE_E4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_B4, 8, REST, 16, NOTE_E4, 16, NOTE_E5, 16, REST, 16,
  REST, 16, NOTE_E5, 16, NOTE_E6, 16, REST, 16, REST, 16, NOTE_DS5, 16,

  NOTE_E5, 16, REST, 16, REST, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_D5, 16, //54
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_A4, 8, REST, 16, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16,
  NOTE_B4, 8, REST, 16, NOTE_E4, 16, NOTE_GS4, 16, NOTE_B4, 16,
  NOTE_C5, 8, REST, 16, NOTE_E4, 16, NOTE_E5, 16, NOTE_DS5, 16,
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  
  NOTE_A4, 8, REST, 16, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16, //60
  NOTE_B4, 8, REST, 16, NOTE_E4, 16, NOTE_C5, 16, NOTE_B4, 16,
  NOTE_A4, 8, REST, 16, REST, 16, REST, 8, 
  NOTE_CS5 , -4, 
  NOTE_D5 , 4, NOTE_E5, 16, NOTE_F5, 16,
  NOTE_F5 , 4, NOTE_F5, 8, 
  NOTE_E5 , -4,
  NOTE_D5 , 4, NOTE_C5, 16, NOTE_B4, 16,
  NOTE_A4 , 4, NOTE_A4, 8,
  NOTE_A4, 8, NOTE_C5, 8, NOTE_B4, 8,
  NOTE_A4 , -4,
  NOTE_CS5 , -4,

  NOTE_D5 , 4, NOTE_E5, 16, NOTE_F5, 16, //72
  NOTE_F5 , 4, NOTE_F5, 8,
  NOTE_F5 , -4,
  NOTE_DS5 , 4, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_AS4 , 4, NOTE_A4, 8,
  NOTE_GS4 , 4, NOTE_G4, 8,
  NOTE_A4 , -4,
  NOTE_B4 , 4, REST, 8,
  NOTE_A3, -32, NOTE_C4, -32, NOTE_E4, -32, NOTE_A4, -32, NOTE_C5, -32, NOTE_E5, -32, NOTE_D5, -32, NOTE_C5, -32, NOTE_B4, -32,

  NOTE_A4, -32, NOTE_C5, -32, NOTE_E5, -32, NOTE_A5, -32, NOTE_C6, -32, NOTE_E6, -32, NOTE_D6, -32, NOTE_C6, -32, NOTE_B5, -32, //80
  NOTE_A4, -32, NOTE_C5, -32, NOTE_E5, -32, NOTE_A5, -32, NOTE_C6, -32, NOTE_E6, -32, NOTE_D6, -32, NOTE_C6, -32, NOTE_B5, -32,
  NOTE_AS5, -32, NOTE_A5, -32, NOTE_GS5, -32, NOTE_G5, -32, NOTE_FS5, -32, NOTE_F5, -32, NOTE_E5, -32, NOTE_DS5, -32, NOTE_D5, -32,

  NOTE_CS5, -32, NOTE_C5, -32, NOTE_B4, -32, NOTE_AS4, -32, NOTE_A4, -32, NOTE_GS4, -32, NOTE_G4, -32, NOTE_FS4, -32, NOTE_F4, -32, //84
  NOTE_E4, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_A4, -8, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16,
  NOTE_B4, -8, NOTE_E4, 16, NOTE_GS4, 16, NOTE_B4, 16,

  NOTE_C5, 8, REST, 16, NOTE_E4, 16, NOTE_E5, 16, NOTE_DS5, 16, //88
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16, 
  NOTE_A4, -8, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16, 
  NOTE_B4, -8, NOTE_E4, 16, NOTE_C5, 16, NOTE_B4, 16, 
  NOTE_A4, -8, REST, -8,
  REST, -8, NOTE_G4, 16, NOTE_F5, 16, NOTE_E5, 16,
  NOTE_D5 , 4, REST, 8,
  REST, -8, NOTE_E4, 16, NOTE_D5, 16, NOTE_C5, 16,
  
  NOTE_B4, -8, NOTE_E4, 16, NOTE_E5, 8, //96
  NOTE_E5, 8, NOTE_E6, -8, NOTE_DS5, 16,
  NOTE_E5, 16, REST, 16, REST, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_DS5, 16,
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_A4, -8, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16,
  NOTE_B4, -8, NOTE_E4, 16, NOTE_GS4, 16, NOTE_B4, 16,

  NOTE_C5, 8, REST, 16, NOTE_E4, 16, NOTE_E5, 16, NOTE_DS5, 16, //102
  NOTE_E5, 16, NOTE_DS5, 16, NOTE_E5, 16, NOTE_B4, 16, NOTE_D5, 16, NOTE_C5, 16,
  NOTE_A4, -8, NOTE_C4, 16, NOTE_E4, 16, NOTE_A4, 16,
  NOTE_B4, -8, NOTE_E4, 16, NOTE_C5, 16, NOTE_B4, 16,
  NOTE_A4 , -4,
};

static constexpr  const int16_t starwars[] = {
  
  // Star Wars Main Theme 
  
  NOTE_AS4,8, NOTE_AS4,8, NOTE_AS4,8,//1
  NOTE_F5,2, NOTE_C6,2,
  NOTE_AS5,8, NOTE_A5,8, NOTE_G5,8, NOTE_F6,2, NOTE_C6,4,  
  NOTE_AS5,8, NOTE_A5,8, NOTE_G5,8, NOTE_F6,2, NOTE_C6,4,  
  NOTE_AS5,8, NOTE_A5,8, NOTE_AS5,8, NOTE_G5,2, NOTE_C5,8, NOTE_C5,8, NOTE_C5,8,
  NOTE_F5,2, NOTE_C6,2,
  NOTE_AS5,8, NOTE_A5,8, NOTE_G5,8, NOTE_F6,2, NOTE_C6,4,  
  
  NOTE_AS5,8, NOTE_A5,8, NOTE_G5,8, NOTE_F6,2, NOTE_C6,4, //8  
  NOTE_AS5,8, NOTE_A5,8, NOTE_AS5,8, NOTE_G5,2, NOTE_C5,-8, NOTE_C5,16, 
  NOTE_D5,-4, NOTE_D5,8, NOTE_AS5,8, NOTE_A5,8, NOTE_G5,8, NOTE_F5,8,
  NOTE_F5,8, NOTE_G5,8, NOTE_A5,8, NOTE_G5,4, NOTE_D5,8, NOTE_E5,4,NOTE_C5,-8, NOTE_C5,16,
  NOTE_D5,-4, NOTE_D5,8, NOTE_AS5,8, NOTE_A5,8, NOTE_G5,8, NOTE_F5,8,
  
  NOTE_C6,-8, NOTE_G5,16, NOTE_G5,2, REST,8, NOTE_C5,8,//13
  NOTE_D5,-4, NOTE_D5,8, NOTE_AS5,8, NOTE_A5,8, NOTE_G5,8, NOTE_F5,8,
  NOTE_F5,8, NOTE_G5,8, NOTE_A5,8, NOTE_G5,4, NOTE_D5,8, NOTE_E5,4,NOTE_C6,-8, NOTE_C6,16,
  NOTE_F6,4, NOTE_DS6,8, NOTE_CS6,4, NOTE_C6,8, NOTE_AS5,4, NOTE_GS5,8, NOTE_G5,4, NOTE_F5,8,
  NOTE_C6,1
  
};


static constexpr const int16_t brahmslullaby[] = {

  // Wiegenlied (Brahms' Lullaby)
  // Score available at https://www.flutetunes.com/tunes.php?id=54

  NOTE_G4, 4, NOTE_G4, 4, //1
  NOTE_AS4, -4, NOTE_G4, 8, NOTE_G4, 4,
  NOTE_AS4, 4, REST, 4, NOTE_G4, 8, NOTE_AS4, 8,
  NOTE_DS5, 4, NOTE_D5, -4, NOTE_C5, 8,
  NOTE_C5, 4, NOTE_AS4, 4, NOTE_F4, 8, NOTE_G4, 8,
  NOTE_GS4, 4, NOTE_F4, 4, NOTE_F4, 8, NOTE_G4, 8,
  NOTE_GS4, 4, REST, 4, NOTE_F4, 8, NOTE_GS4, 8,
  NOTE_D5, 8, NOTE_C5, 8, NOTE_AS4, 4, NOTE_D5, 4,

  NOTE_DS5, 4, REST, 4, NOTE_DS4, 8, NOTE_DS4, 8, //8
  NOTE_DS5, 2, NOTE_C5, 8, NOTE_GS4, 8,
  NOTE_AS4, 2, NOTE_G4, 8, NOTE_DS4, 8,
  NOTE_GS4, 4, NOTE_AS4, 4, NOTE_C5, 4,
  NOTE_AS4, 2, NOTE_DS4, 8, NOTE_DS4, 8,
  NOTE_DS5, 2, NOTE_C5, 8, NOTE_GS4, 8,
  NOTE_AS4, 2, NOTE_G4, 8, NOTE_DS4, 8,
  NOTE_AS4, 4, NOTE_G4, 4, NOTE_DS4, 4,
  NOTE_DS4, 2

};


static constexpr const int16_t imperialmarch[] = {
  
  // Dart Vader theme (Imperial March) - Star wars 
  // Score available at https://musescore.com/user/202909/scores/1141521
  // The tenor saxophone part was used
  
  NOTE_A4,-4, NOTE_A4,-4, NOTE_A4,16, NOTE_A4,16, NOTE_A4,16, NOTE_A4,16, NOTE_F4,8, REST,8,
  NOTE_A4,-4, NOTE_A4,-4, NOTE_A4,16, NOTE_A4,16, NOTE_A4,16, NOTE_A4,16, NOTE_F4,8, REST,8,
  NOTE_A4,4, NOTE_A4,4, NOTE_A4,4, NOTE_F4,-8, NOTE_C5,16,

  NOTE_A4,4, NOTE_F4,-8, NOTE_C5,16, NOTE_A4,2,//4
  NOTE_E5,4, NOTE_E5,4, NOTE_E5,4, NOTE_F5,-8, NOTE_C5,16,
  NOTE_A4,4, NOTE_F4,-8, NOTE_C5,16, NOTE_A4,2,
  
  NOTE_A5,4, NOTE_A4,-8, NOTE_A4,16, NOTE_A5,4, NOTE_GS5,-8, NOTE_G5,16, //7 
  NOTE_DS5,16, NOTE_D5,16, NOTE_DS5,8, REST,8, NOTE_A4,8, NOTE_DS5,4, NOTE_D5,-8, NOTE_CS5,16,

  NOTE_C5,16, NOTE_B4,16, NOTE_C5,16, REST,8, NOTE_F4,8, NOTE_GS4,4, NOTE_F4,-8, NOTE_A4,-16,//9
  NOTE_C5,4, NOTE_A4,-8, NOTE_C5,16, NOTE_E5,2,

  NOTE_A5,4, NOTE_A4,-8, NOTE_A4,16, NOTE_A5,4, NOTE_GS5,-8, NOTE_G5,16, //7 
  NOTE_DS5,16, NOTE_D5,16, NOTE_DS5,8, REST,8, NOTE_A4,8, NOTE_DS5,4, NOTE_D5,-8, NOTE_CS5,16,

  NOTE_C5,16, NOTE_B4,16, NOTE_C5,16, REST,8, NOTE_F4,8, NOTE_GS4,4, NOTE_F4,-8, NOTE_A4,-16,//9
  NOTE_A4,4, NOTE_F4,-8, NOTE_C5,16, NOTE_A4,2,
  
};

static constexpr const int16_t minuet[] = {

  // Minuet in G - Petzold
  // Score available at https://musescore.com/user/3402766/scores/1456391
  NOTE_D5,4, NOTE_G4,8, NOTE_A4,8, NOTE_B4,8, NOTE_C5,8, //1
  NOTE_D5,4, NOTE_G4,4, NOTE_G4,4,
  NOTE_E5,4, NOTE_C5,8, NOTE_D5,8, NOTE_E5,8, NOTE_FS5,8,
  NOTE_G5,4, NOTE_G4,4, NOTE_G4,4,
  NOTE_C5,4, NOTE_D5,8, NOTE_C5,8, NOTE_B4,8, NOTE_A4,8,
  
  NOTE_B4,4, NOTE_C5,8, NOTE_B4,8, NOTE_A4,8, NOTE_G4,8,//6
  NOTE_FS4,4, NOTE_G4,8, NOTE_A4,8, NOTE_B4,8, NOTE_G4,8,
  NOTE_A4,-2,
  NOTE_D5,4, NOTE_G4,8, NOTE_A4,8, NOTE_B4,8, NOTE_C5,8, 
  NOTE_D5,4, NOTE_G4,4, NOTE_G4,4,
  NOTE_E5,4, NOTE_C5,8, NOTE_D5,8, NOTE_E5,8, NOTE_FS5,8,
  
  NOTE_G5,4, NOTE_G4,4, NOTE_G4,4,
  NOTE_C5,4, NOTE_D5,8, NOTE_C5,8, NOTE_B4,8, NOTE_A4,8, //12
  NOTE_B4,4, NOTE_C5,8, NOTE_B4,8, NOTE_A4,8, NOTE_G4,8,
  NOTE_A4,4, NOTE_B4,8, NOTE_A4,8, NOTE_G4,8, NOTE_FS4,8,
  NOTE_G4,-2,

  //repeats from 1

  NOTE_D5,4, NOTE_G4,8, NOTE_A4,8, NOTE_B4,8, NOTE_C5,8, //1
  NOTE_D5,4, NOTE_G4,4, NOTE_G4,4,
  NOTE_E5,4, NOTE_C5,8, NOTE_D5,8, NOTE_E5,8, NOTE_FS5,8,
  NOTE_G5,4, NOTE_G4,4, NOTE_G4,4,
  NOTE_C5,4, NOTE_D5,8, NOTE_C5,8, NOTE_B4,8, NOTE_A4,8,
  
  NOTE_B4,4, NOTE_C5,8, NOTE_B4,8, NOTE_A4,8, NOTE_G4,8,//6
  NOTE_FS4,4, NOTE_G4,8, NOTE_A4,8, NOTE_B4,8, NOTE_G4,8,
  NOTE_A4,-2,
  NOTE_D5,4, NOTE_G4,8, NOTE_A4,8, NOTE_B4,8, NOTE_C5,8, 
  NOTE_D5,4, NOTE_G4,4, NOTE_G4,4,
  NOTE_E5,4, NOTE_C5,8, NOTE_D5,8, NOTE_E5,8, NOTE_FS5,8,
  
  NOTE_G5,4, NOTE_G4,4, NOTE_G4,4,
  NOTE_C5,4, NOTE_D5,8, NOTE_C5,8, NOTE_B4,8, NOTE_A4,8, //12
  NOTE_B4,4, NOTE_C5,8, NOTE_B4,8, NOTE_A4,8, NOTE_G4,8,
  NOTE_A4,4, NOTE_B4,8, NOTE_A4,8, NOTE_G4,8, NOTE_FS4,8,
  NOTE_G4,-2,

  //continues from 17

  NOTE_B5,4, NOTE_G5,8, NOTE_A5,8, NOTE_B5,8, NOTE_G5,8,//17
  NOTE_A5,4, NOTE_D5,8, NOTE_E5,8, NOTE_FS5,8, NOTE_D5,8,
  NOTE_G5,4, NOTE_E5,8, NOTE_FS5,8, NOTE_G5,8, NOTE_D5,8,
  NOTE_CS5,4, NOTE_B4,8, NOTE_CS5,8, NOTE_A4,4,
  NOTE_A4,8, NOTE_B4,8, NOTE_CS5,8, NOTE_D5,8, NOTE_E5,8, NOTE_FS5,8,

  NOTE_G5,4, NOTE_FS5,4, NOTE_E5,4, //22
  NOTE_FS5,4, NOTE_A4,4, NOTE_CS5,4,
  NOTE_D5,-2,
  NOTE_D5,4, NOTE_G4,8, NOTE_FS5,8, NOTE_G4,4,
  NOTE_E5,4,  NOTE_G4,8, NOTE_FS4,8, NOTE_G4,4,
  NOTE_D5,4, NOTE_C5,4, NOTE_B4,4,

  NOTE_A4,8, NOTE_G4,8, NOTE_FS4,8, NOTE_G4,8, NOTE_A4,4, //28
  NOTE_D4,8, NOTE_E4,8, NOTE_FS4,8, NOTE_G4,8, NOTE_A4,8, NOTE_B4,8,
  NOTE_C5,4, NOTE_B4,4, NOTE_A4,4,
  NOTE_B4,8, NOTE_D5,8, NOTE_G4,4, NOTE_FS4,4,
  NOTE_G4,-2,
 
};

static constexpr const int16_t cannon[] = {

  // Cannon in D - Pachelbel
  // Score available at https://musescore.com/user/4710311/scores/1975521
  // C F
  NOTE_FS4,2, NOTE_E4,2,
  NOTE_D4,2, NOTE_CS4,2,
  NOTE_B3,2, NOTE_A3,2,
  NOTE_B3,2, NOTE_CS4,2,
  NOTE_FS4,2, NOTE_E4,2,
  NOTE_D4,2, NOTE_CS4,2,
  NOTE_B3,2, NOTE_A3,2,
  NOTE_B3,2, NOTE_CS4,2,
  NOTE_D4,2, NOTE_CS4,2,
  NOTE_B3,2, NOTE_A3,2,
  NOTE_G3,2, NOTE_FS3,2,
  NOTE_G3,2, NOTE_A3,2,

  NOTE_D4,4, NOTE_FS4,8, NOTE_G4,8, NOTE_A4,4, NOTE_FS4,8, NOTE_G4,8, 
  NOTE_A4,4, NOTE_B3,8, NOTE_CS4,8, NOTE_D4,8, NOTE_E4,8, NOTE_FS4,8, NOTE_G4,8, 
  NOTE_FS4,4, NOTE_D4,8, NOTE_E4,8, NOTE_FS4,4, NOTE_FS3,8, NOTE_G3,8,
  NOTE_A3,8, NOTE_G3,8, NOTE_FS3,8, NOTE_G3,8, NOTE_A3,2,
  NOTE_G3,4, NOTE_B3,8, NOTE_A3,8, NOTE_G3,4, NOTE_FS3,8, NOTE_E3,8, 
  NOTE_FS3,4, NOTE_D3,8, NOTE_E3,8, NOTE_FS3,8, NOTE_G3,8, NOTE_A3,8, NOTE_B3,8,

  NOTE_G3,4, NOTE_B3,8, NOTE_A3,8, NOTE_B3,4, NOTE_CS4,8, NOTE_D4,8,
  NOTE_A3,8, NOTE_B3,8, NOTE_CS4,8, NOTE_D4,8, NOTE_E4,8, NOTE_FS4,8, NOTE_G4,8, NOTE_A4,2,
  NOTE_A4,4, NOTE_FS4,8, NOTE_G4,8, NOTE_A4,4,
  NOTE_FS4,8, NOTE_G4,8, NOTE_A4,8, NOTE_A3,8, NOTE_B3,8, NOTE_CS4,8,
  NOTE_D4,8, NOTE_E4,8, NOTE_FS4,8, NOTE_G4,8, NOTE_FS4,4, NOTE_D4,8, NOTE_E4,8,
  NOTE_FS4,8, NOTE_CS4,8, NOTE_A3,8, NOTE_A3,8,

  NOTE_CS4,4, NOTE_B3,4, NOTE_D4,8, NOTE_CS4,8, NOTE_B3,4,
  NOTE_A3,8, NOTE_G3,8, NOTE_A3,4, NOTE_D3,8, NOTE_E3,8, NOTE_FS3,8, NOTE_G3,8,
  NOTE_A3,8, NOTE_B3,4, NOTE_G3,4, NOTE_B3,8, NOTE_A3,8, NOTE_B3,4,
  NOTE_CS4,8, NOTE_D4,8, NOTE_A3,8, NOTE_B3,8, NOTE_CS4,8, NOTE_D4,8, NOTE_E4,8,
  NOTE_FS4,8, NOTE_G4,8, NOTE_A4,2,  
   
  
};

static constexpr const int16_t odetojoy[] = {

/* 
  Ode to Joy - Beethoven's Symphony No. 9 
  More songs available at https://github.com/robsoncouto/arduino-songs                                            
*/

  NOTE_E4,4,  NOTE_E4,4,  NOTE_F4,4,  NOTE_G4,4,//1
  NOTE_G4,4,  NOTE_F4,4,  NOTE_E4,4,  NOTE_D4,4,
  NOTE_C4,4,  NOTE_C4,4,  NOTE_D4,4,  NOTE_E4,4,
  NOTE_E4,-4, NOTE_D4,8,  NOTE_D4,2,

  NOTE_E4,4,  NOTE_E4,4,  NOTE_F4,4,  NOTE_G4,4,//4
  NOTE_G4,4,  NOTE_F4,4,  NOTE_E4,4,  NOTE_D4,4,
  NOTE_C4,4,  NOTE_C4,4,  NOTE_D4,4,  NOTE_E4,4,
  NOTE_D4,-4,  NOTE_C4,8,  NOTE_C4,2,

  NOTE_D4,4,  NOTE_D4,4,  NOTE_E4,4,  NOTE_C4,4,//8
  NOTE_D4,4,  NOTE_E4,8,  NOTE_F4,8,  NOTE_E4,4, NOTE_C4,4,
  NOTE_D4,4,  NOTE_E4,8,  NOTE_F4,8,  NOTE_E4,4, NOTE_D4,4,
  NOTE_C4,4,  NOTE_D4,4,  NOTE_G3,2,

  NOTE_E4,4,  NOTE_E4,4,  NOTE_F4,4,  NOTE_G4,4,//12
  NOTE_G4,4,  NOTE_F4,4,  NOTE_E4,4,  NOTE_D4,4,
  NOTE_C4,4,  NOTE_C4,4,  NOTE_D4,4,  NOTE_E4,4,
  NOTE_D4,-4,  NOTE_C4,8,  NOTE_C4,2
  
};

I made many errors hand-scribing the song from sheet music (I do not read music). Then I made many errors transcribing into "pitches" notation. Then I got rests wrong. I did what I could to clean it up, and think it is recognizable, but I can still hear many errors (in this third try). I still can't "read" music. I'm going to work on my "tone sequencer" that will let me write the score on a clef, and have it spit out "pitches" notation. It will imitate my "DIO sequencer"

1 Like