How to setup array structure for melody sequences

  • create a single-dimension array containing tones and durations. Format this array text for visual separation of songs.
  • The first element of each "song" in this array will be the "song" number
  • the second element will contain length of "song"
  • make an enum() of song titles.
  • when you call the "playSong(songName)" function, you search for the enum() song number, and extract the song length.
  • play the song

You could also make a sequencer. Here is a link to a simple LED sequencer. If you make this into a music sequencer of twelve rows, each row could be a half-step note. Each song would look like sheet music.