RSS

The system we have here is really simple: My hobbies feed the blog. If I code, I write about code. If I play a game, I review the game. If I read a slightly annoying news story about a games publisher, I write a meandering 2,000 word screed denouncing the entire enterprise and everyone who took part in it.

The problem is that I’m composing music. I’d write about music, but I don’t know anything about music. Sure, I made some music, but that’s mostly because I am a hard-working and resourceful idiot, not because I have any musical talent.

Speaking of which, here’s another track I made:

Since I can’t share my knowledge with you, I’ll have to share my ignorance. Let me tell you about all the things I don’t know about music. Or to be more precise, all the things I think I know but are most likely profoundly, dangerously wrong.

So let’s say you want to make some music. To keep things simple, let’s say you’re doing it on a keyboard where 1 input = 1 note, and not one of those devious string or wind instruments where you can make a large number of notes from a small number of inputs. You want to make some music-type sounds, but when you ask people to explain how it works they baffle you with a bunch of nonsense about “Seventh augmented fifth” and “an augmented fourth/tritone”. They draw these “circle of fifths” things that have twelve points and are numbered with letters, and you can’t even tell if the gibberish they’re saying actually makes sense or if they’re just making stuff up to avoid answering the question.

Ignore those idiots. They’re trying to confuse you with knowledge and facts. Here is what you need to know…

You’ll hear people talking about what “key” something is played in. And “major” and “minor” keys. Major and minor keys have a different feel. If something is in a major key then it’s usually upbeat, triumphant, majestic, or whatever. Minor scales are moody, mellow, serious, depressing. Take a gander at your keyboard. If you don’t have a keyboard, use this Jpeg:

You don’t need to be a professor of mathematics to figure out there are 12 unique keys. But in a proper musical scale, you never use more than 7 of them. So in the song you’re writing, every single musician will be working with the same seven notes.

This is where the music majors want to jump in and say something like, “Well, ACTUALLY…” If they do, then punch them in the face and run away. They’re trying to confuse you. Just stay focused: Seven notes.

Don’t feel bad about the face-punching. Collectively, music types have it coming. I mean, when they designed music they decided that the keys would be numbered using letters, some of them have names based on their neighborsWhy would we give letters to the black keys? We might run out of letters! Let’s just call these A sharp and B flat because they’re near A and B., some of them have more than one nameYes, A sharp and B flat are actually the same key. I don’t see what’s so confusing about this. If you look at my circle of fifths diagram and note that in pentatonic scale… and the lettering starts with C. You can’t tell me that’s not a deliberate attempt to confuse people.

Anyway. Where was I? Right: Seven keys. So now you need to figure out which seven belong in your song and which ones are left out.

So to make a major scale, pick a key at random and start counting up from where you started, including the black keys. Take this many steps: 2 2 1 2 2 2 1

So if we start with (say) C, then our next note is 2 keys above it. The next one is two keys after that, but the one after that is only one key away. And so on. If you follow this pattern properly, then the last key you land on will be the same one you started with, just one octave higher. If you follow this pattern when starting from C, then you’ll land on every white key and skip over every black one.

This is C major. If you do that pattern when starting with A, then you get:

That’s A major. So now you know how to make a major scale. To make a minor scale, you do the same thing except the pattern is: 2 1 2 2 1 2 2

Now you’ve picked a key and figured out what notes belong in your scale. Just make sure to only hit those particular notes and you’re making music. As long as you’re hitting them one at a time and not just mashing the keys with your face, any arrangement of notes on the same scale should sound passable. It might not sound interesting or good, but it shouldn’t sound wrong or dissonant.

Maybe you’re feeling ambitious and you don’t want to settle for just making music that’s “not painful to hear”. Maybe you aspire to make something stimulating. For that, you’re going to need chords.

A chord is usually 3 notes. Don’t let the music nerds confuse you with exceptions, just remember that a chord is a group of three notes that sound really sweet together. If you’ve ever fiddled around with a keyboard, you’ll notice that this is not true of most groups of three. In fact, when you start mashing keys down at the same time, it usually sounds horrible even if they’re all part of the same scale. But there are a few magical groups of keys that really get along well, and we call those grouping chords.

To find one of these groups, pick a key from your scale. I’m going to use C as an example. If you’re building a major chord, then the next note in the chord is FOUR keys above it. (Remember to count ALL keys: White and black, whether they belong to your scale or not.) The last key will be three steps above that one. So if we’re playing a chord in C major, and if you’re playing a chord that starts with C, then our grouping is:

C E G. This is confusing for newbies because they look at the keyboard and see that the keys are evenly spaced out (with one white key between them) and assume you could just follow this pattern and make another chord with the same spacing, like D F A. THIS IS WRONG. Do not be fooled. You have to force yourself to count the black keys, even though musicians have done everything they could to hide them. Our major chord is C (skip 3 keys) E (skip two keys) G.

You may notice that not all groups work. Try starting a C major chord with D. Skip the next three keys and you land on a black key, which isn’t part of our C major scale. That means you don’t want to start a chord with D. You can still play D alone in your song, and D might show up in a chord that begins with another note (spoiler: Try G) but if you try to make a chord with D it will sound like you went to the face-mash-keyboard school of music.

You can use this to hunt for chords. Just work your way up the C major scale:

If you’re working on a MINOR scale, then it’s the same thing, except you skip two and then skip three. So an A minor chord would be A (skip two keys) C (skip three keys) E.

The cool thing about chords is that those three notes get on really well. You don’t HAVE to hit them all at the same time. Play them next to each other and it sounds just a little sweeter than a sequence played with other notes. Taking our C E G chord above: If some other instrument is playing a nice long C, then you can make great things happen by poking those E and G notes at the same time on another instrument. They sound great even if they’re played in different octaves. Try playing C E and then the G from way up near the top of the keyboard. It still sounds cool. (Eh. Perhaps it’s better to say it’s just more interesting than if you tried the same thing with non-chord notes.)

There. That’s everything I know. It’s not much. At all. But it’s apparently all you need to make something like this:

And yes, the male voice in there is mine. I hit it with a vocoder and auto-tuned it to death, because I have the singing voice of a sow being fed ass-first into a meatgrinder.

Enjoy. Or don’t. Whatever. I’m not your mum.

Footnotes:

[1] Why would we give letters to the black keys? We might run out of letters! Let’s just call these A sharp and B flat because they’re near A and B.

[2] Yes, A sharp and B flat are actually the same key. I don’t see what’s so confusing about this. If you look at my circle of fifths diagram and note that in pentatonic scale…

If you put both of those chords in the same song you would make very bad sounds.

Trivia: All of the music I’ve posted so far is in A minor. It’s just really easy to see what you’re doing when lining notes up on a grid because you can just avoid the black keys. (They are color-coded on the grid.) If I use a key with sharps / flats, then I end up counting keys all the time to make sure I don’t get lost.

If you ever want a more “folksy” flavor to your music, you could try exact the opposite, and write using ONLY black keys. This creates one of the pentatonic scales, and such scales appear in folk musics in most of the world.

It’s a bog standard A minor scale as far as I can tell. :) It’s the specifics of the melody and the harmonic progression that makes it sound special.

More exotic scales with various augmented intervals (or even the feared half diminished – or “octatonic” – scale) are often used in balkan music, klezmer and other related genres, but surprisingly often, it’s much simpler than that. We are just used to hearing notes in a certain order, so when we hear them used another way it sounds “exotic” even though it’s the same toolset.

You’ve taken your first step into a larger world. It starts with seventh chords. You think you’ll just dabble with four-note chords. What’s the harm, you think to yourself. They’re all diatonic. They all fit within the scale. It all works together. Then you’ll start wondering about five note chords. Six. Even seven! Then one day you’ll make your first slip. You meant to stay within your scale, within your chord progression, you swear, but there it is, plain as day–an accidental! But… it sounds okay, you think to yourself. You could erase it. Rewrite it. But you like the way it sounds. But you don’t know where to take it. You can’t go back to normal. You can’t pretend nothing has changed. You’re in the proverbial uncharted waters. You have another iconoclastic thought–what if you keep writing, but with a different set of notes, a different key? Something that has that accidental in it. What’s the harm in trying? So you do. You try a modulation. And it’s good. You can’t go back. You’ve seen the shadows on the cave walls for what they are. You can’t pretend you haven’t. Soon you’ll start… experimenting. Homophony gives way to polyphony. Rhythms become syncopated and then polymetric. You discover isorhythms and palindromes. Hemiolas! Triadic harmony begins to bore you and you learn of tone clusters, quartal harmony. Tone rows and quintal harmony. Atonality! Serialism! Minimalism! Spectralism! And then, just like that, everything falls away and you see terms and labels as just that. You realize that music is in everything, everywhere, man-made and natural. You see that music itself is just a label itself, nothing more than a term for organized sound. With this realization laid upon you and with the heaviness it lays upon your heart, you fall to your knees and weep.

That’s actually an A minor 7th chord. Or a C major 6th, depending on how you want to look at it…

By the way, if you’re writing a song in A minor and you play C, E, and G, that can be interpreted as a rootless voicing of an A minor 7th chord. (“rootless voicing” just means that you leave out the root of the chord–in this case, A).

Actually, if you put both those chords in the same song, you would get the well-known 1957 Paul Anka hit “Diana”. Quite uncontroversial.

While a major key is certainly defined by its major chords, it is not limited to them. Face punching-bait ahead:

Any major or minor key in traditional western music has three central chords. In C these would be C, F and G. These are often referred to with the generic names “tonic”, “subdominant” and “dominant”. In the key of D for example, D is the tonic, G is the subdominant and A is the dominant. In a major key, these are all major chords, and no other major chords are in fact naturally found in the key.

There are various reasons why these three chords are important, but let’s just take that at face value for today.

In a major key like C major, you get your three central major chords, but also the minor chords Dm, Em and Am (and the diminished chord Bm(-5), but forget about that). These three are each associated with one of the central chords, and are known as “parallell chords”. (I can see your fists rising in anger now…) Each parallel chord resides two steps below it’s “parent”, and so shares a bunch of notes with it. Am is the parallell to C, Dm is the parallell to F, and Em is the parallell to G.

In a minor key, a similar arrangement is found, but it’s more complicated since you still have a major chord as dominant in a minor key (through temporary tampering with the scale), so let’s leave that for another time.

Do you know about chord progression? That’s a very simple term to describe a very simple thing: the chords in a song change. Say you’ve got 4 beats to a measure, you start out in C, going along nicely… Then, after two beats in C, you SWITCH to a G, just for kicks, and play notes in G for two beats. Then maybe go back to C for another two beats, then go do something crazy like A for the other two beats!

That’s really all I know about it. There are some very loose rules for making chord progressions sound good, but I don’t remember them. I do know that songs are basically never written in the same chord throughout, though.

That’s pretty much all that the minor scales are, in a nutshell. Take the arrangement of notes you have from your major scale, offset your starting note by a certain amount (I think 3 down from it?) and BOOM, you have a minor scale.

If you think that’s messed up, you can use the same notes and start on any of them and get a scale- we just decided, in the 18th century, that we were going to start using only those two and calling them “Major” and “Minor”. We call the other ones “Modes” and they’re all named after bits of ancient Greece. We used to use all of them (except Locrian which sounds awful), and the most popular used to be Dorian- starting on D if you use all white keys.
Jazz likes to use Dorian and Mixolydian (starts on G).

Yes, it’s definitely essential that we explain the difference between the Pythagorean comma and the Syntonic comma, and how they relate to the difference between A sharp and B flat. I mean, if you can’t explain the mathematical differences between Pythagorean tuning, just tuning, well temperament, and equal temperament, how are you supposed to enjoy the music?

Oh, now, now. I (nor anyone in this thread) never said that anything was “essential” or that music couldn’t be “enjoyed” without certain knowledge. Making music is fun! Theories of making music are fun! Realizing that things you’ve been led to believe are true are not, and that there are whole kinds of music that can be made outside your traditionally-accepted system: that is very, very fun!

My pedantry was meant in the spirit of joyful and irreverent discovery. No need to be stiff.

My apologies, my sarcasm was intended to be humorous, not stiff. Once again I have failed to convey my tone through mere words. (this must be why I’m not a writer.)
I thoroughly approve of joyful irreverence; I greatly enjoy indulging in pedantry, but I feel the need to poke fun at myself when doing so. No offense was intended to others.

Ack! I’m definitely an idiot, Vel. If I’d noticed you were the person who started the sub-thread I replied to in the first place, I would never have inferred your tone in the way I did. Sorry, sorry, nothing to see here…

When I started reading this,at first I thought you were talking about computer keyboards.Then when I came to your last song,the image gave me an interesting* idea:If you were to assign a note to every ascii symbol,what would a piece of your written code sound like?Or how would one of your texts sound like?

Wobbler was a bit repetitive at first, but evened out to be a lot of fun.

I took music classes for 7 years(at one time I could play trombone and piano, and I’m still a decent singer) and never learned what you managed to teach in half an hour. Not sure what that says. Especially since the scales and chords are supposed to be beginner stuff and I never did quite get them.

Shamus, if I had a lot of money and wanted to learn something complicated, I think I would pay you to learn it first and then teach it to me. Not that I’ve ever tried to learn musical scales before, but I have a feeling I would have gotten all punchy as well before getting very far. This was both interesting and informative. Thank you.

I am so excited about this project! Not that I dislike reading about programming or anything, but this reading comes with its own soundtrack. Shamuscontent in non-words form directly to my earparts!

Also, as one of those damned musicians, I can attest that this post was super hilarious. Also, you have assembled a very functional set of ‘programming rules’ by which to usefully interpret some foundational music theory, so that is pretty awesome!

Reading about someone's understanding of a topic he or she has very little knowledge in has always been interesting to me, but in this case, it has me reflecting on how little I know about music myself. My understanding of music has come from my time in a high school band class, private piano lessons, and a personal desire to learn more about it. Even with all of that, my understanding is not much higher than Shamus'. I would agree with him that music has a lot of stupid stuff and that it is only taught to people because of “tradition.” It almost seems like knowing the word for something is more important than knowing what it is or how it's used.

The way Shamus describes creating music is very much like the way I do, but to expand on what he said, my advice would be to always start and end on a chord note (So for a C major chord start on C, E; G preferably C and end on C, E; G). You can venture to other notes not within the chord (or even scale if you're feeling dangerous) but keep it quick. Start a “phrase” on the “important” beats of a measure (for example if you are using 4 beats per measure then the important beats are 1 and 3). Moving up or down the scale note by note usually turns out nice if you follow the above rules. Try not to repeat the same thing more than 2 times. It will sound better even if you change the smallest thing like a drumbeat or even dropping a voice. Probably the most important rule, does it sound good? If it does, good. If not, why. Figure out what is conflicting and try to fix it (does the drumbeat match up to the melody, does the melody work with the chord you're playing, or does the song transition to abruptly). Don't be afraid to undo some measures if it's not working out.

Reading about music theory makes it seem like some super advanced subject that requires years of formal education to even attempt to create something decent, but just remember that music was created because a person thought some sounds sounded good together. If you create something that sounds good, even if the creation method is a bit brute force, it is still music; the theory is just there to help and answer why it sounds good.

Like the way Shamus ends his article, if you want to see what this level of knowledge can do you can take a listen to these things I'm not total embarrassed to have composed.

“Reading about music theory makes it seem like some super advanced subject that requires years of formal education to even attempt to create something decent, but just remember that music was created because a person thought some sounds sounded good together. If you create something that sounds good, even if the creation method is a bit brute force, it is still music; the theory is just there to help and answer why it sounds good.”

Indeed! Just like grammar was for language, music theory was invented to explain music, not dictate it.

Let’s also recognize that the two are not unrelated. Yes, grammar describes language, but a person who has studied grammar will be informed by that study when he speaks or writes.

The same holds true for music theory. You don’t *need* it to appreciate or even create music, but at the same time the odds are against you composing, say, the Brandenburg Concertos (and I use Bach as my example here purposefully) without it.

It is interesting reading Shamus’ thoughts and experiences self-developing his own version of music theory. Hope he continues, and that he makes some additional discoveries (the different *types* of minor scales, the times when dissonance is actually wanted, etc) along the way.

The origins of the diatonic scale are actually quite interesting and mathematical, and have to do with ratios, and the fact that equal ratios of frequencies produce constant intervals. The smaller ratios (1:1, 2:1, 3:2, 4:3) were used to derive the diatonic scale.

There’s a whole body of theory around tuning and the production of scales, the upshot of which is that, these days, pretty much any keyboard you buy will be tuned using ‘equal temperment’, in which each key is at a ratio of the twelfth root of two to its neighbor. Which has the consequence that all major scales are translationally equivalent to each other; they all sound the same. (So you might as well make all your music in C major or A minor.)

I will not punch you in the face, but I will point out that when I put “equal temperment” into Wikipedia, the second sentence of that article starts with “As pitch is perceived roughly as the logarithm of frequency,” and goes downhill from there.

Rules and exceptions like this are the reason I ended my music career. I played saxophone starting in fourth grade and went all the way through the end of high school, learning to play marimba and vibraphone along the way. But, if I wanted to continue into college, I would inevitably have to learn all this music theory, and they didn’t let you join any of the bands unless you were in the music program. Honestly, some of this stuff is more confusing than English language rules.

I didn’t want to learn a completely new language, I just wanted to play.

Sharp means it goes up half a tone, flat means it goes down half a tone. Not that hard, Shamus! :P

Now if you’ll look over here at my circle of fifths…

(oh, and by the way, B is C flat, C is B sharp, E is F flat, and F is E sharp, more or less. And there’s quarter, half, three-quarter, double, and triple sharps and flats too, you just can’t really play them on a piano. The more you know…!)

If you want to make chords which are guaranteed to be in the key that your music is in (assuming you’re making the scale the way Shamus says), you can pick any note from the scale as your starting point. Then, only looking at notes from your scale, take that note, skip a note, take a note, skip a note, take a note. You should now have 3 notes from your scale, with a single note from your scale in between each. Depending on what note you start with, this can give you more interesting chords than the ones Shamus gave you, while still probably fitting well with your song. If you’re feeling adventurous, you can skip another note and take another note to get a 4 note chord, or if you’re feeling jazzy you can build chords up to 5 or 6 notes high and then randomly remove 1 or 2 of the notes.

You can think of chords as slotting into a flowchart, in which the basic structure in C major is: C chords go to anything, F chords go to G chords, G chords go to C chords. Start on C and end on C.

To expand that, you can substitute D for F and B for G, G can go to A can go to anything, and I believe A can go to D/F. E theoretically goes to A, but in C major, this doesn’t happen in practice. (There is a more complete chart you can find on GIS, but it makes my brain melt to look at it.)

Also, when you ascend in a minor scale, you’re supposed to sharp some of the notes, for reasons. Actually, the specific rule is, either you leave the notes alone, you sharp just the last one, or you sharp the last two, but only when ascending. Choose a system based on what sounds good at the time.

I’m willing to bet that at some point someone coded a program that you can feed various parameters into and it pops out some procedurally generated music based on your guidelines. If not, Someone Really Should. It’d be delightful to play around with, if nothing else.

The system we have here is really simple: My hobbies feed the blog. If I code, I write about code. If I play a game, I review the game. If I read a slightly annoying news story about a games publisher, I write a meandering 2,000 word screed denouncing the entire enterprise and everyone who took part in it.

The problem is that I'm composing music. I'd write about music, but I don't know anything about music. Sure, I made some music, but that's mostly because I am a hard-working and resourceful idiot, not because I have any musical talent.

I totally get that. For some reason, music is something I feel completely unqualified to talk about a lot of the time(although kudos to you for managing to get a post this long out of it anyway).

As passionate as I am about the music I enjoy, I admit I can’t even begin to explain what makes a song work for me, and what doesn’t. No musical training, no understanding of music theory or chords. I find I can at least wing it on a few subjects, but with music I am completely at the mercy of an emotional response… which I guess makes sense, now that I think about it.

I mean, I could tell you that I think Nobuo Uematsu is our greatest living composer, but damned if I could tell you why. Aside from just linking to music of his that I think is incredible, I don’t know how I would compare that to a supposedly “lesser” musician. Or figure out why one works and the other doesn’t for me.

I could gush about how much I love the soundtracks from the Mega Man games, or the work of Hans Zimmer, and have no real target to aim for in doing so. But to me, those are some of the closer examples I can find to musical perfection.

The best I can do is just say that I feel like, for the most part, these people never include a wrong or unnecessary note. It almost always feels -RIGHT-, whatever that means for music. And whenever I try my hand at making music, that’s pretty much the only thing I consider:

“Is there any part of this that should not be there, and is there anything that SHOULD?”

Sorry if someone asked this earlier, I haven’t read all the comments on these posts. But: Are those stock photos or did you take them yourself? All of them look like things you could’ve taken yourself – a screenshot of your own code tilted slightly in photoshop, a picture of your wife/daughter sillhouetted by her computer screen, Pittsburg by night. Or maybe that’s someone else’s code, someone else’s daughter, and someone else’s city.

Ah HAH! I have listened to Codebase of Babel nine times now trying like HELL to make out what you’re vox track is listing… and I think it’s the names of different programming languages!
Hello
Basic
Fortran
Cobol
Pascal
C
C#
etc,etc.
Am I right?!?
What a COOL idea, Shamus! I was a music major for two years, then studied at a German music academy for another 6 months before dropping out and joining the Navy as a Data Processor. As a music nerd gone geek, I can tell you I love your “Geeks approach to music”! In fact, it has a bit in common with two of the biggest stumbling blocks that going from an American music education to a Germanic one is 1.) the ‘H’ note and the odd Diatonic Divergence (Caution-SERIOUS music nerd stuff in that link!)
Boy, I wish I had someone use your approach to teaching while in school. then again- if I did, I might not have given it all up and discovered my knack and eventual career in IT.

Also, that turned out so well it made me wish I’d put more effort into it. It repeats the same four lines in the song. Would have been better if each time it was a different list of languages. (Although finding recognizable two-syllable languages that rhyme is a little challenging.)

I got as far as the jpeg before it all got too much, and now I’m just left with the vague sense that I should be punching someone.

It’s weird: I don’t really understand any of the programming posts either, but I feel like I could do with a following wind on a sunny day. Music … yeah no; fat chance. And that’s just the basics: if anyone starts on the science of sound propagation then I’m just going to run away squealing.*

I don’t know why the letters became so popular, but all the musicians I know play by numbers, not letter notes.
In this way, the scale is numbered 1 to 7. Then the chords are numbered the same way, based on the note they start on. So, in your example, you found that the 1, 4, and 5 chords all work well. And, in fact, the vast VAST majority of music (both modern and ancient) can be played using just these three chords to support the melody.

The next step after chords is chord progressions, where you play a series of chords. (1,4,5,1) is a common one. (1,4,1,5,1) is common as well.

Want to play the twelve bar blues? Add a 1 on to the beginning and play every chord for two measures. Then fiddle around on the notes in the blues scale. That’s literally the whole thing.

Of course, you can play 2, 3, 6, and 7 as well. Just make them “minor” by lowering the middle note. (You’ll find that this keeps the middle note in the scale.) A really REALLY common lick (a sub-progression) to end a musical arc with is (2,5,1). Tack this on to the above ad you get (1,4,1,2,5,1) which will get you through about 90% of the bluegrass out there.

All of these are built on chaining chords with common notes. Once you get comfortable doing this, you can throw “key” out the window entirely, and simply play music-generator by chaining chords together all day.

It sounds good because of the small integer ratios between the notes… and once you get this down, you can dispense with discrete notes entirely, and generate sequences and sets of waveforms. This is hard to do with traditional instruments, but easy to do with voice… and computers.

(Background: I was a band kid in junior high and high school – mostly tenor sax, dabbling in clarinet, trombone, and bassoon).

The “here’s some notes, make sure you only play these” strategy is how I was taught blues solo improvisation. Teacher pointed out five notes, said “just play those in what ever order you like”. (The next day’s lesson was the other two sets of five notes required to do a full 12-bar blues). Got me through three years of jazz band. :)

Most music theory is explaining *why* something sounds good, not *what* sounds good IMO. So I’d say you’re still on the right track.

The reason musical terminology is crazy and confusing is because it’s centuries old. You’ve complained about some eccentricities of some archaic methods of formatting code, now imagine that compounded tenfold. You even use a piano to explain how the rules work, but the original device the rules were designed around was a bit of a different thing (something about the number of octaves, I’m not sure exactly). Instruments evolve over time.

Most of the terminology was probably developed even before modern sheet music, seeing as how the notation we use now is around 500 years old, while musical tradition is as old as history itself.

Wouldn’t have even been a piano. I find most of Western music theory can be summed up as WWBD: What Would Bach Do (~95% of the time)? And Bach probably never saw a piano. Pipe organ, harpsichord, and clavichord would have been his tools of the trade.

Shamus, this was really interesting. Music has been a subject that has been absolutely unapproachable for me since Forever, but seeing you explain it makes a lot more sense to me. Possibly because you’ve already put the effort into understanding it and can now reorganise that into a sensible format that sensible programmer-types could understand.

It’s got me thinking about it now. Of course, now that I see what’s going on, that piano layout is making me mad, it’ll have to go… and I may have to end up just rewriting the whole rules of music as I go along… but yes, very interesting.

Someone mentioned this in the last post, I’m just going to put some links with music behind it: How long, Shamus, until we see you writing about how you’re programming music? Maybe even in real-time? Have a look/listen:

This is why I love Shamus so much. Everything he writes about, he loves to say “Hey guys, this thing, look at what we can do with it” Its the implicit “we” that always gets me. He’s not writing to say “Look at what I can do.” And no matter how simple or complicated he still makes it seem like you or I could run out and make music or code an AI, or code an AI to make music. And just possibly make something cool in the process.

This was great! Like you, I also have an interest in music but no solid knowledge on it. I did learn a few things that might interest you though. I noticed that books and materials oriented to composition tend to use a more general notation (for the lack of a better term) independent of the scale. Instead of talking about specific notes everything becomes about intervals, and chords get roman numerals for names. So most of the information can be converted to whatever scale you’re using. Take this chord progression for example I I IV V, it means the first chord of the scale (C major in a C major scale) twice, then the fourth chord (F) then fifth (G). The beauty comes from the fact that the progression works on other scales, with different effects.

Anyway, there’s a lot of stuff going on but you may find some interesting things if you look beyond basic material.

A long time ago I worked on an engine to write and play procedural music. I got the engine written in C# (using Microsoft’s XNA framework to shove bytes of information at relevant locations), but I got really sick of it before actually getting into the bar divisions and note placement, but let me say, this post really sums up something I find very interesting: music and math are synonymous, but music theory doesn’t seem to know what math is. To quote another, “music is the sound math makes”, but that’s not reflected in the archaic and entirely obfuscated tools used for teaching music.
For instance, take any bit of music written in common time (4/4). The 4/4 notation alone bothers me, and exists because musicians like to arbitrarily decide that different notes can take the beat (cut time is the devil and exists without a purpose). This aside, any bar written in common time can be infinitely divided by 2- which is why whole notes become two half notes, then four quarter notes, then 8 eighths, sixteen sixteenths, thirty-two thirty-secondths, and so on. So, right off the bat, there’s a logarithmic function (base 2). Turns out that notes themselves are also on a logarithmic scale: C0 = 16.32 Hz, C1 = 2*C0; C2 = 2*C1, and so on. Math, bizzatches!
Oh, and the definitions Shamus gives for major and minor scales? They are modular to one another. Just shift the 2’s and 1’s over like they’re on a clock. That’s pretty much true for any chord or what have you across the board- everything is more-or-less modular. Music really is just a subset of math that people have discovered sans math. While archimedes was off playing with his prime numbers, normal folks were apparently making observations about music and not linking them together into a coherent, simplified system. I’m willing to bet you could reduce a lot of rules in music- note placements, chord progressions, and so on- into very simple arithmetic. Just get some definitions for what notes sound good together (and WHY), then start rocking your number theory skills and starting sucking out the ambiguity on that realm, yo.

Just a question: my friends and I are starting a podcast, and we were wondering if we could use one of your songs for our intro. Are they creative commons or are you retaining all rights? In either case, would you be open to someone using one of your songs with your permission?

I am impressed: It seems that you’ve taken a unique approach and ended up rather skilled from it. In fact, this should be helpful to other non-musical types, hopefully including us! Some have always wanted to create songs but felt too non-musical to have any hope of pulling it off.
–Alice&Co.

Music theory (especially the classic theory) is sort of like C++. You’ve got a logical and solid base that makes perfect sense (C language) and you’ve got all those scary and uncomprehendable bells and whistles like objects and templates (“oh there you are bringing classes into it again!”), which serve mostly the purpose of conflicting with each other, leaking memory and crashing your program for no apparent reason.

In music theory, there is one basic idea: music is, basically, a sequence of audible strains and releases (resolutions). Music is sequence of dissonances followed by consonances and then back again, sort of like, you know… We all are over 18 here, right? Also it gotta have a start (foreplay), a climax and a finish. And it’s gotta be emotional. Actually, it’s like storytelling, but without using the human spoken language. Seems pretty simple, right?

It’s only that European music language has evolved for over 300 years (we’re not taking ancient Greek music, mind you, lets start from Hendel and Bach) and this evolution suffered from the same problems C++ evolution suffered from: piling all the precious new things AND trying to keep the backward compatibility. You can imagine what this had lead to. Lots of composers, especially in the early 20th century, tried to do something with it and invent their own theory, or at least modify the existing. I don’t need to say that it didn’t help to clarify things, because anyone knows the pain of dealing with competing standarts.

To sum it up: you might as well invent your own music theory and get away with that. If your music gives emotions to people, noone is going to say a word against.

PS. I really don’t know that much about programming so my analogies may suck, be warned. Although I’m writing music for over 15 years now for a living.
PPS. Sorry for my bad English.

Ack, as a full time programmer with a degree in music composition, this post hurts me because it’s so full of ignorance. Imagine if you read a blog post from a musician talking about programming and saying things “If a computer science major starts talking about things like pointers and inheritance, ignore those idiots. They’re trying to confuse you with knowledge and facts. Here’s all you need to know, a function is a block of code that you can call from anywhere in your program. If you need to access a variable between two functions, you can declare it at the top of your file.”

If someone tries to explain something musical to you because you asked and you don’t understand it, the proper response is to ask for clarification and/or look it up. This makes your music better, just like knowing about pointers and inheritance. Sure you can guess and poke around if you want to make it look/sound good, but it’s only as good as you think it is. For a child, two or three years is an extremely long time and after that time they feel a strong sense of accomplishment because it’s the most progress they’ve ever seen in themselves. For someone older than say 20 years, two or three years is hardly any amount of time of which to be proud. This is why it’s important for children to heed the advice of their elders, because it will make them that much better. Don’t punch them in the face and try to figure it out yourself. Research what’s already been discovered and documented and ask questions.

“If a computer science major starts talking about things like pointers and inheritance, ignore those idiots. They're trying to confuse you with knowledge and facts. Here's all you need to know, a function is a block of code that you can call from anywhere in your program. If you need to access a variable between two functions, you can declare it at the top of your file.”

I did, and I’m not saying he’s wrong, I’m just saying he’s stumbling through a lot of territory that’s already been covered for hundreds of years, and he could be that much better of a musician/composer if he tried to understand the theory a little more instead of shoving it aside when it sounds confusing. It’s like slowly reinventing the template standard library from scratch instead of just using it, like running across someone reimplementing simple data structures like vectors, maps, and linked lists.