Finley Code #1: Music is Code

As a long-time studied musician who continues to play in local bands, I couldn't help but start the Finley Code (think of it similar to the 'Bro Code' on How I Met Your Mother) a code of my beliefs, thoughts, and discussions of music, code, the creative process and the striking parallels of creating and writing/playing music to writing code. I may also include other personal beliefs or moral ramblings from time to time.

As a preface, I am still ‘new’ to the coding world as I am making a career transition. In the music world I would still be learning the acronyms for the musical staff like 'C Elvis Go Bopping Down the Freeway' for the lines on the treble clef, or learning how to play whole notes (typically a 4 count in 4/4 time unless you are Dave Brubeck). So with that in mind my coding acumen is still very limited but the similarities I have seen and read so far are striking.

Let's Discuss CREATION...

The creation process; arguably the most beautiful and often challenging part of the process. Songwriting can be approached from many angles similar to writing code for say a website. However both songwriting and coding a website have certain conditions that exist at the outset. In music you have the style of music you want to compose in (ie: Jazz or Pop), what time and key signature, how fast or slow will your song be, and the harmonic and melodic structure to be used. Oh and there are quite a few theoretic rules as to what is acceptable harmonic and melodic movement (See Basics of Chords). If building a website your layout must include at a minimum a <html> tag, a <head> tag, and a <body> tag. Just like code, in music there exists a set of universal basic rules of musical clefs, scales, sharps/flats, intervals, and chord progressions that are important to understand if you want to be a successful or at least a well versed musician.

I would liken the musical palette of genre/style, tempo, key, time signature and chord structure to that of the different programming languages that exist, like HTML (used for website building), Python, C++ or JavaScript. All chosen to handle certain moods and create specific and desired outcomes.

Music is Code. The musical notes, a song on paper is code (a language complicated unless studied) arranged in a way that when interpreted by a musician the music comes to life. This is identical to a computer program that is coded and arranged in a certain way by a programmer in a language that is also complicated unless studied.

Coding languages and the musical language are a tool that musicians and programers use as their vehicle to codify their ideas, lay out a set of instructions or guidelines and through performance of their 'code' can be transformed into a living, breathing reality.

Let's look at a real live example of what I mean. Processing is a coding language used within the context of the visual arts. In the code below (figure 1) the void setup() tells the computer what the ground rules are (specifically how big the canvas will be just like the time and key signature in figure 2 below). The code following the setup is where the magic happens, the void draw() instructs the computer what to create (figure 2). Similarly, the musical phrasing and notes on the Take Five leadsheet in figure 3 instructs the saxophonist and band what to create.

void setup(){
void draw() {
  if(mousePressed) {
   fill(0, 250, 125);
} else {
   fill(250, 50, 50);
ellipse(mouseX, mouseY, 80, 80);

figure 1

The result is:

figure 2

While this is just a recorded video of what can happen, the actual file allows you to drag your mouse around the screen and it is one of two colors depending on whether you click and drag or simply move your mouse. But I haven't figured out how to post the interactive piece day.

Take Five Image figure 3

The result is:

There is a stunning correlation in these two examples (and really any music and code) between what you choose your inputs to be and how that affects the outputs.

I play piano (if you couldn't guess by my love for Brubeck), and much like a computer, I think of it as a piece of hardware and music as the software. The act of striking the keys, 'playing the piano' is in effect the same as writing code. Hitting 'run' on the computer, or watching your live preview provides the same elation of listening to the song you composed playing the piano. Music is code. Code is music.

I have heard that beautiful code is an awe to see just like beautiful music is a joy to hear.

In closing and speaking of music and art I would like to pay tribute to my brother and his wife, Nash and Kim Finley. They have a wonderful artistic blog that documents their worldly travels. If you need any logo design, branding or marketing materials, Nash is product designer and would be happy to assist you.

Till next time...

Shout Outs

Subscribe to The Finley Code

* indicates required