12/28/12 - Composing With Cheat Codes

Start Here:

Cheat codes were originally put into games by developers wanting to breeze through content for playtesting and debugging purposes, and left in as easter eggs for players. Over time these cheats became part of the fabric of video games, morphing from hidden secret to expected feature in the gaming experience. In elementary school during the dark ages of the "pre-internet era" I clearly remember ordering cheat code books from the Scholastic book club. These days any whippersnapper can just Google cheats on their smart phones, taking some of the mystery and hidden fun out of the process. There were always rumors swirling around the Mortal Kombat machine at Aladdin's Castle (Capital Mall represent!) about secret moves and versions of the game with hidden switches on the outer box itself. Big Head Mode in NBA Jam and IDKFA in Doom are also some of the more memorable cheat codes of my formative years.

All of these fond memories pale in comparison to one particular button sequence. The Konami Code is one of the most iconic video game cheat codes of our time. Up Up Down Down Left Right Left Right B A. This series of controller commands was initially used to breeze through a ported arcade game and secured a place in the pantheon of cheat code history with its inclusion in Contra for the NES in 1988. Inputting the code during the title screen gave the player 30 lives, which were much-needed given the impending difficulty of the game. I still remember getting into fights with my neighbor Matt over Contra when one of us would steal the machine gun or spread power-up... This cheat was included in several subsequent releases by Konami Studios, which helped cement its nickname. The article linked above has an excellent summary of uses of the code in popular culture, from contemporary video games to easter eggs in websites. You can even reset your Netflix account by inputting the code! One of my favorite contemporary references is a Penny Arcade shirt that shows the code in graphic format (for anyone looking to buy me a gift I'll take a Large).

For those of you still with me at this point, this is one of those "I told that story to tell this story" blog entries. I have been writing electronic music almost exclusively since May and have really enjoyed reconnecting with my roots in the video game sound world. Rediscovering 8-bit music has been extremely refreshing and I have really enjoyed the challenge of composing with trackers that impose very strict limitations on musical possibilities. I happened upon an interesting idea while sketching ideas for basslines and chord progressions last month but could not make it fit with the track in progress. I thought it was an interesting idea and filed it away, finally revisiting it this past Monday. Did you follow directions and press play on the button above and/or is the file still playing? Go ahead, I'll wait.




Okay here's the secret - the bassline for that tune was written using the Konami Code. Confused? Here's what the main idea looks like:

Using the code in composing is actually quite intuitive except for one tiny detail - up and down motions are easily audible, and the end of the code will obviously use the pitches B and A. Let's look at the example without those pesky rhythms:

This actually makes a nifty cantus firmus - hmmm...

This example starts with the pitch E and then the Konami Code is inserted around that note. I compose most of my chiptunes using a nylon string guitar and E is the lowest note in standard tuning. I generally try to transpose the final product so not every piece sounds in the same key, but in this case the original register sounded perfect with the triangle wave bass. Anyhow, start on E and then input the code:

Up, Up

Down, Down

L, R, L, R

B, A

All in all a very simple process except for that pesky L-R-L-R middle section. Besides choosing the actual pitches, this is the part I struggled with the most during my initial concept (and might also be where I routinely messed up the "30 lives code" in Contra). On the surface that four-note grouping looks like either a mixture of Up-Down or a bunch of Right motions. However, I am still thinking of these motions relative to the first pitch E. For the Left-Right portion I decided to orient those motions around the guitar fretboard - this requires further suspension of your skepticism because you need to know that I play as a lefty and the fretboard direction is reversed. (i.e. moving left results in higher pitches rather than lower) Go ahead and laugh, but this guy and this guy are laughing all the way to the bank while you normal guitar/bass players are practicing "Stairway" in your basements!

Here's a visualization of how I came up with the Left-Right motion using notation and tablature - remember that we are oriented around the open low E, and the first pitch is "to the left" of that open string on the fretboard:

Obviously there is a bit of artistic license taken with my musical application of the Konami Code; the pattern is reversed if you are a right-handed guitar player, and is not apparent in the pitches or the rhythms. I have several other ideas about how to show Left-Right motion and I think this is perhaps not the last time I will use the Konami Code in my music. Future music theorists should definitely scan my viola lines in any music written after 2012!

One last thing - the sine wave bass in the introduction of the chiptune uses the same idea, although it is slightly altered from the presentation outlined in this post. The first B-flat is natural, and the final B-A motion does not happen until the true bassline kicks in. Ah, I also forgot to mention that the title of this track is, fittingly, Konami Code. Have a safe and happy New Year - see you in 2013!

Update - 3/22/13

Recently I finished a piece for Pierrot Ensemble and Game Boy called MINIBOSS where I used the Konami Code to compose the opening melody. The piece started with the opening arpeggios in the Game Boy, so I worked around that two-chord vamp to come up with this melody in the clarinet:

One of the things I struggled with when writing the piece (besides learning how to program LSDJ) was balancing my tonal chiptune sound with my usual "less-tonal" art music style. I think this opening manages to blend those two fairly well - the chords don't exactly sound like video game music, but they also aren't completely dissonant. Putting this strange melody over the top was my way of integrating the overal video game theme by using the Konami Code with contemporary composition techniques. The opening also seems to establish that anything is possible before going to a slightly more traditional chip sound with steady kick drums and square waves.

Here is the opening tone row for MINIBOSS analyzed using the Konami Code:

Again we start on E and then move Up/Down. The Left/Right portion is a bit strange; it has been a while and I believe the F# is "left" of the previous D#, and C# is to the right. The second pair has G "left" and E "right" of the same D# - that part is always ambiguous when using the code. The B A portion uses B-flat and A-flat to fit with the Game Boy arpeggios.