Defuser - a musical game for norns/MIDI keyboard


a musical game for norns/MIDI keyboard

defuser is a musical code-breaking game for norns that tests the user’s listening skills. With three minutes on the clock, you must find the six notes that make up a “code” sequence, determine the correct order of notes, then correctly enter the code in order to win the game.

This game was programmed as my first full script for norns as a way to learn Lua and the Norns API, as well as being an experiment in using music and MIDI input in a game context. Inspired by code-breaking games and bomb-defusal scenes in film (hence the name!). This was also the product of my independent study for the Fall 2020 semester.


  • norns
  • MIDI keyboard (with range of at least C3-C6)


(Watch the video above for a video demonstration!)

You have 3 minutes to figure out a “code”, a random sequence of six notes (within the range C3-C6).

  1. You don’t know initially which notes will be used in the sequence and have to find them yourself. Test every note with to see if it is part of the code, but use a delicate hand - playing a note that isn’t in the code with too high velocity will penalize the time remaining. These “wrong” notes sound dull. Correct notes that are in the sequence are safe and ring clear.

  2. Once discovered, correct notes will play in a loop in the background. When all 6 notes are found, one note rings longer than the others. This is the first note of the sequence which you will enter as the code. Use that first note as an anchor to figure out the order for the rest.

  3. Press K3 to begin an attempt to input the code. Play the six notes in what you believe is the correct order, then press K3 again to enter it. If the code is wrong, or if too many notes are inputted, time is greatly penalized.

  4. If the code is correct: you win! The time you had remaining is displayed. If the timer ever reaches zero, you lose.

  5. Either way, press K3 to try again! Practice to get faster and faster.


defuser.lua (9.2 KB)

Would love any feedback! I had a lot of fun making this and find it really engaging to play. Hope you enjoy!


I love this idea! Just needs score leader boards at the end lol


Thanks! I was thinking that too - maybe the next version I could include at least a high score or something!

1 Like

It’s cool to see some games on Norns. Good job!


I’m excited to play around with this as an ear training exercise. Since it’s a game it’ll potentially encourage repeatability vs regular practice.


20 characters of fresh idea :lemon: Thank you for sharing

1 Like

Well jigsaw puzzles and rubix cubes don’t look like fun from a spectators perspective. Maybe it’s like that.

You’re probably right. I should give it a shot! Sorry for my negative comment. I’ll show myself out.

Nothing wrong with discussion IMO puzzles aren’t a spectators sport lol. However I do like watching that mr. puzzles YouTube channel because his puzzles cost hundreds of dollars and most of them have really interesting design.


Thanks for the comments everyone!
I do think the comparison to other physical puzzles works well. Kind of about flexing the brain more than gameplay itself I guess! Like @anxietymachine said, I definitely think it has some utility as an ear training exercise, so i guess the appeal for me with the timer is seeing how fast i can solve it. I’ve found myself getting better at it over time, which is pretty fulfilling too. I am also considering adding some parameters to change difficulty to make it more accessible!

1 Like

I’m curious if this is in some educational institution, e.g. a design, musicology or pedagogy programme. Or self-education?

Either way, excellent job and if you are writing it up as a paper, posting that too here would be really interesting :page_facing_up:←:eyes:


Yes, I am Master’s student in the Music and Technology program at CMU! And sure, I’d be glad to include the paper later, when it’s done! Typing it as we speak :sunglasses:

1 Like

is the code up anywhere? github or the like?

CMU = Carnegie Mellon University, I presume?

Happy typing!

Yup that’s my school, and thanks!

@Justmat the .lua file is attached at the bottom of the original post. i probably will make a github page for it soon though!

1 Like

This is amazing!!! I love how usable it is. And it’s an interesting exploration of the game/puzzle genre, almost like an escape room.

1 Like

Thanks so much! Yeah, that was my goal with it, to bring the physicality of an instrument to game design. Even just something like using velocity adds a dimension to control most games don’t ask for. I’m glad you appreciate that!