Keyboard Piano

@rebindv0.1.4

Your keyboard becomes a piano with chords, sustain and octave shift. A lessons page in your browser teaches five songs.

Files

songs.luau

-- The songs the piano can play by itself and the lessons page teaches. All are
-- in the public domain. Each hand is a flat list of pairs: MIDI note (0 is a
-- rest), then its length in steps. `step` is one step in milliseconds. Every
-- right hand stays inside C4 to G5, so it can be played without an octave
-- shift. Ordered easiest first.

-- stylua: ignore
return {
  {
    id = "twinkle",
    title = "Twinkle, Twinkle, Little Star",
    by = "Traditional",
    level = "First song",
    step = 450,
    right = {
      60,1, 60,1, 67,1, 67,1, 69,1, 69,1, 67,2,
      65,1, 65,1, 64,1, 64,1, 62,1, 62,1, 60,2,
      67,1, 67,1, 65,1, 65,1, 64,1, 64,1, 62,2,
      67,1, 67,1, 65,1, 65,1, 64,1, 64,1, 62,2,
      60,1, 60,1, 67,1, 67,1, 69,1, 69,1, 67,2,
      65,1, 65,1, 64,1, 64,1, 62,1, 62,1, 60,2,
    },
    left = {
      48,2, 48,2, 53,2, 48,2,
      53,2, 48,2, 55,2, 48,2,
      48,2, 53,2, 48,2, 55,2,
      48,2, 53,2, 48,2, 55,2,
      48,2, 48,2, 53,2, 48,2,
      53,2, 48,2, 55,2, 48,2,
    },
  },
  {
    id = "ode",
    title = "Ode to Joy",
    by = "Ludwig van Beethoven",
    level = "Easy",
    step = 210,
    right = {
      64,2, 64,2, 65,2, 67,2,
      67,2, 65,2, 64,2, 62,2,
      60,2, 60,2, 62,2, 64,2,
      64,3, 62,1, 62,4,
      64,2, 64,2, 65,2, 67,2,
      67,2, 65,2, 64,2, 62,2,
      60,2, 60,2, 62,2, 64,2,
      62,3, 60,1, 60,4,
    },
    left = {
      48,8, 55,8, 48,8, 55,8,
      48,8, 55,8, 48,8, 55,4, 48,4,
    },
  },
  {
    id = "jingle",
    title = "Jingle Bells",
    by = "James Lord Pierpont",
    level = "Easy",
    step = 190,
    right = {
      64,2, 64,2, 64,4,
      64,2, 64,2, 64,4,
      64,2, 67,2, 60,2, 62,2,
      64,8,
      65,2, 65,2, 65,2, 65,2,
      65,2, 64,2, 64,2, 64,2,
      64,2, 62,2, 62,2, 64,2,
      62,4, 67,4,
      64,2, 64,2, 64,4,
      64,2, 64,2, 64,4,
      64,2, 67,2, 60,2, 62,2,
      64,8,
      65,2, 65,2, 65,2, 65,2,
      65,2, 64,2, 64,2, 64,2,
      67,2, 67,2, 65,2, 62,2,
      60,8,
    },
    left = {
      48,8, 48,8, 48,8, 48,8,
      53,8, 48,8, 50,8, 55,8,
      48,8, 48,8, 48,8, 48,8,
      53,8, 48,8, 55,8, 48,8,
    },
  },
  {
    id = "minuet",
    title = "Minuet in G",
    by = "Christian Petzold",
    level = "Medium",
    step = 230,
    right = {
      74,2, 67,1, 69,1, 71,1, 72,1,
      74,2, 67,2, 67,2,
      76,2, 72,1, 74,1, 76,1, 78,1,
      79,2, 67,2, 67,2,
      72,2, 74,1, 72,1, 71,1, 69,1,
      71,2, 72,1, 71,1, 69,1, 67,1,
      66,2, 67,1, 69,1, 71,1, 67,1,
      69,6,
    },
    left = {
      55,4, 57,2,
      59,6,
      60,6,
      59,6,
      57,6,
      55,6,
      62,2, 59,2, 55,2,
      62,2, 50,1, 60,1, 59,1, 57,1,
    },
  },
  {
    id = "elise",
    title = "Für Elise",
    by = "Ludwig van Beethoven",
    level = "Medium",
    step = 220,
    right = {
      76,1, 75,1,
      76,1, 75,1, 76,1, 71,1, 74,1, 72,1,
      69,2, 0,1, 60,1, 64,1, 69,1,
      71,2, 0,1, 64,1, 68,1, 71,1,
      72,2, 0,1, 64,1, 76,1, 75,1,
      76,1, 75,1, 76,1, 71,1, 74,1, 72,1,
      69,2, 0,1, 60,1, 64,1, 69,1,
      71,2, 0,1, 64,1, 72,1, 71,1,
      69,4,
    },
    left = {
      0,2,
      0,6,
      45,1, 52,1, 57,1, 0,3,
      40,1, 52,1, 56,1, 0,3,
      45,1, 52,1, 57,1, 0,3,
      0,6,
      45,1, 52,1, 57,1, 0,3,
      40,1, 52,1, 56,1, 0,3,
      45,1, 52,1, 57,2,
    },
  },
}

56 files without text previews