Sunday, November 27, 2011

Gonna need a bigger ipod...

When I was a kid taking piano lessons and starting to write small pieces I remember talking to an adult who was a bit less excited about music.  "Eventually we'll run out of new songs altogether.  There are only so many notes, and only so long of a piece that people can tolerate. Musicians copy each other a lot already."  I was initially shocked by this, but as much as I disliked it, it seemed to make sense.  I began to wonder how much music was really left to be found.  Was this really true, or just an assertion based on general musical disinterest?

Knowing a little more math than I did then, I can think about the question a bit differently now.  Here's my shot at figuring out how many songs there are to be found:

First of all, I'll be using simple counting techniques that that most people learn in middle or high school.  Nothing fancy.  For example: if a person rolls two six-sided dice (with different numbers/characters on each face of each die) the number of possible combinations is equal to:
  6 x 6 = 36
Add another die with unique characters and you just multiply by 6 again.  Simple.

Well, we can put some limits on what constitutes a musical piece.  To keep things manageable, we'll limit the length of a piece to 3 minutes.  Also, we'll cut out sounds above 20kHz, since that's beyond the range of human hearing.  For resolution we'll use 16 bits, since that's good enough for CDs.  We'll only handle mono stuff; the second channel added by stereo may inflate the numbers artificially.

So we'll find the total number of unique mono CD quality recordings that fit within 3 minutes.  Each bit can be one of 2 possibilities (a 1 or a zero), so our base will be 2.

2^(16 bits per sample x 44,100 samples per second x 3 minutes x 60 seconds per minute)

2^127008000 = 2^(1.27 x 10^8) = 10^(38234000)

Okay, so take a 2 and double it more than 100 million times.  That's a lot of twos.  Or 10 raised to the 38 millionth power, if you prefer.  But what does it mean?  It means that there are that many different 3 minute songs that you could record at CD quality.  It would take about 25 billion years to play them all back one after the other (unless I've made a mistake in my arithmetic, which is very possible).  Right now, though, the difference between one unique song and the next could be the addition or omission of the slightest pop or crackle, or delaying everything by a fraction of a second, or any of a number of other trivial changes.  

So, let's try a more constrained estimate based on musical principles.  We'll look for the number of unique melodies that exist.  We'll limit the possibilities to 8 measures of 4/4 with the equal tempered chromatic notes over 2 octave (25 notes).  The fastest note that we'll allow is a sixteenth note.  Let's see what we get:

25^(16 notes per measure x 8 measures)
25^128
10^(128 x log10(25))
10^179

Okay, so now we have a lot of tens, but not NEARLY as many as the 3-minute songs that we counted earlier.  Again, this time we weren't counting full songs, but melodies, which some might consider the basis of a song.  So, how much is 10^179?  Well, wikipedia is telling me that there are 10^80 atoms in the known universe.  That means that if each atom in the universe were actually a portal to another universe of equal size, each of the atoms in each of the universes would have their own 8-bar melody, and there would still be a lot left over.

So, if there are any readers that I haven't yet scared away with math, here is today's piece of music recorded over the Thanksgiving holiday:

Penta gone by are.kay.more

Sunday, November 6, 2011

Family-friendly

So, having a family complicates the "how to fill an ipod with music" problem. I like to have it play at random in the car or while we clean the house, but I'd rather not have my 6-year-old singing along with "She's got leeeeeegggggss!", or worse yet: "Get one the scene! Like a sex machine!" To remedy this problem, I had a couple of options: 1) remove all rock, blues, and R&B music from my ipod OR 2) Gently edit the music to make it more family friendly.

I didn't like option 1 because I LOVE old R&B and blues. I'm drawn to it, probably because I'm completely incapable of producing it, coming from a comfortable middle-class upbringing. So I decided to explore the other option...

Upon trying option number 2, I figured out that my hand is incapable of the subtle editing that would be required. Simply gating out the work "sex" from the chorus of James Brown's "Get up" proved pretty jarring. So, some of you may recall last year when I decided to go ahead and destroy the song entirely.

This week I decided to give a Marvin Gaye tune the business. I didn't find a good place for a guitar solo or a polka band, like I gave to Mr. Brown, but I did manage to drop nearly all of the cheesy house remix tricks that I know.

Technical Healing by are.kay.more