Option II: Electronic Keyboard


This option asks you to program a virtual keyboard! The code to the right gives you a start, but you must add additional functionality, perhaps by adding scripts for other keys on the computer keyboard, so that your electric keyboard can change:

  • Volume,
  • Instrument,
  • Tempo, and/or
  • Drum loop/patterns.

You might want to print or draw a piano keyboard or a computer keyboard to keep track of how you have mapped keys to notes. We have provided a few images below that you can use (or print) to work with.


In this assignment, you will create virtual keyboard using Scratch. Your original program should:

  1. simulate a virtual electronic keyboard that plays notes with computer keyboard presses,
  2. use loops to add functionality (e.g., for drum patterns, tempo changes),
  3. use variables appropriately and as necessary,
  4. be usable, efficient, and effective, and
  5. include documentation (describe what it does) in the Instructions pane. Be sure to describe how your program is original.

When you are satisfied with your work, submit a link to your program or the program itself. Your work will be reviewed by a peer, and in turn, you will review one of your peers’ projects. You should base your evaluation on the assignment rubric.