Skip to content

Instantly share code, notes, and snippets.

@CodyJung
Created April 6, 2012 00:59
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CodyJung/2315618 to your computer and use it in GitHub Desktop.
Save CodyJung/2315618 to your computer and use it in GitHub Desktop.
Super Mario Brothers sheet music using MIDI values
// Notes come in byte-pairs.
// Even numbers (0th, 2nd, 4th...) are note numbers (based on MIDI notes)
// Odd numbers (1st, 3rd, 5th...) are duration. 12 is a quarter note
// The music is divided into sections because the Roomba can't store the whole song.
// Part 1 is played once.
// Part 2 is played twice.
// Parts 3 and 4 are played together, twice.
// Part 5 is played once.
// Part 2 is played twice again.
// Part 6 is played twice.
// Part 5 is played again.
// Part 6 is played again once.
// Part 7 is played once.
// Based on http://www.mariopiano.com/mario-sheet-music-overworld-main-theme.html
List<Byte> part1 = new List<Byte> { 76, 12, 76, 12, 20, 12, 76, 12, 20, 12, 72, 12, 76, 12, 20, 12, 79, 12, 20, 36, 67, 12, 20, 36 };
List<Byte> part2 = new List<Byte> { 72, 12, 20, 24, 67, 12, 20, 24, 64, 12, 20, 24, 69, 12, 20, 12, 71, 12, 20, 12, 70, 12, 69, 12, 20, 12, 67, 16, 76, 16, 79, 16, 81, 12, 20, 12, 77, 12, 79, 12, 20, 12, 76, 12, 20, 12, 72, 12, 74, 12, 71, 12, 20, 24 };
List<Byte> part3 = new List<Byte> { 48, 12, 20, 12, 79, 12, 78, 12, 77, 12, 75, 12, 60, 12, 76, 12, 53, 12, 68, 12, 69, 12, 72, 12, 60, 12, 69, 12, 72, 12, 74, 12, 48, 12, 20, 12, 79, 12, 78, 12, 77, 12, 75, 12, 55, 12, 76, 12, 20, 12, 84, 12, 20, 12, 84, 12, 84, 12 };
List<Byte> part4 = new List<Byte> { 55, 12, 20, 12, 48, 12, 20, 12, 79, 12, 78, 12, 77, 12, 75, 12, 60, 12, 76, 12, 53, 12, 68, 12, 69, 12, 72, 12, 60, 12, 69, 12, 72, 12, 74, 12, 48, 12, 20, 12, 75, 24, 20, 12, 74, 24, 20, 12, 72, 24, 20, 12, 55, 12, 55, 12, 20, 12, 48, 12 };
List<Byte> part5 = new List<Byte> { 72, 12, 72, 12, 20, 12, 72, 12, 20, 12, 72, 12, 74, 12, 20, 12, 76, 12, 72, 12, 20, 12, 69, 12, 67, 12, 20, 12, 43, 12, 20, 12, 72, 12, 72, 12, 20, 12, 72, 12, 20, 12, 72, 12, 74, 12, 76, 12, 55, 12, 20, 24, 48, 12, 20, 24, 43, 12, 20, 12, 72, 12, 72, 12, 20, 12, 72, 12, 20, 12, 72, 12, 74, 12, 20, 12, 76, 12, 72, 12, 20, 12, 69, 12, 67, 12, 20, 12, 43, 12, 20, 12, 76, 12, 76, 12, 20, 12, 76, 12, 20, 12, 72, 12, 76, 12, 20, 12, 79, 12, 20, 36, 67, 12, 20, 36 };
List<Byte> part6 = new List<Byte> { 76, 12, 72, 12, 20, 12, 67, 12, 55, 12, 20, 12, 68, 12, 20, 12, 69, 12, 77, 12, 53, 12, 77, 12, 69, 12, 60, 12, 53, 12, 20, 12, 71, 16, 81, 16, 81, 16, 81, 16, 79, 16, 77, 16, 76, 12, 72, 12, 55, 12, 69, 12, 67, 12, 60, 12, 55, 12, 20, 12, 76, 12, 72, 12, 20, 12, 67, 12, 55, 12, 20, 12, 68, 12, 20, 12, 69, 12, 77, 12, 53, 12, 77, 12, 69, 12, 60, 12, 53, 12, 20, 12, 71, 12, 77, 12, 20, 12, 77, 12, 77, 16, 76, 16, 74, 16, 72, 12, 64, 12, 55, 12, 64, 12, 60, 12, 20, 36 };
List<Byte> part7 = new List<Byte> { 72, 12, 20, 24, 67, 12, 20, 24, 64, 24, 69, 16, 71, 16, 69, 16, 68, 24, 70, 24, 68, 24, 67, 12, 65, 12, 67, 48 };
@hayhaydz
Copy link

Hey, this is probably a long shot as this is very frickin old, I was wondering whether you had any advice or information about how you got those midi values out of a midi file, and how I should go about doing it. I used your midi values in a lua note api in Minecraft https://www.youtube.com/watch?v=77kusndEYvI, it's not great but would love to know how I could do this with some other songs.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment