Warning: this is a rather philosophical post with limited practical value. 😉
In the world of music psychology and such you often see music compared and contrasted to language. This makes sense as both music and language use sound. Some would argue that they both use sound to communicate.
In language, we know if a statement follows the rules of the language by whether or not it makes sense. If I say, “My dog ate his dinner,” that makes sense; we can derive meaning from the statement. If I say, “Dinner his ate dog my,” the meaning is non-existent. We would say that sentence is “wrong.” (Note that this kind of wrongness is separate from the actual truth of the statement. The “my dog ate his dinner” sentence could be wrong if my dog had not actually had his dinner, but the sentence would still make sense.)
So what about music? It is sound; is it sound that communicates meaning? Well, it clearly doesn’t communicate meaning the way a sentence does. I can’t say “My dog ate his dinner” simply by using musical notes and rhythms. Music can’t pass on semantic meaning.
Having said that, we often hear music and say, “this piece is sad” or “this song is angry.” Music does seems to communicate emotional meaning.
Now, with language, there are better and worse ways to communicate a meaning. “My dog ate his dinner,” is pretty clear. “My dog his dinner ate,” is less clear but would probably get the point across. But “Dinner his ate dog my,” is very difficult to parse.
Are there better, worse and wrong ways to communicate emotional meaning? Well, if you want to convey anger and you play a quiet major chord once every 10 seconds, not a lot of people are going to derive the idea of anger from it. If you want to create a calm piece and you use chromatic 32nd notes jumping around with no apparent pattern you’re probably going to create anxiety for a lot of listers.
So the emotional meaning of music may not be dependent on a formal grammar but there are some general rules to follow.
So where is this emotional meaning kept in a musical statement?
I would say…
Chords are generally termed happy, sad, mysterious, dark, etc. Chord’s interactions with each other also have a certain emotional character. A C maj chord might be happy. A C maj chord going to and from a C# maj chord has a different, darker flavor. (Try it.)
Obviously fast, busy rhythms have a frenetic flavor while slow rhythms are more languid and lazy.
This gets tricky. Obviously melodies can imply harmony (using arpeggios for example) and thus convey emotions that the harmony would. A melody’s direction can also convey emotion. A melody climbing upward has a striving, reaching, ascending quality. (Flying to heaven?) A descending melody has a depressing, falling quality. (Going to hell?)
I’m vastly simplifying here, and focusing on “obvious” emotions like happiness as opposed to “confused melancholy” or what not. I’m also ignoring the fact that the intended emotional character of music varies by culture (e.g. what a Chinese peasant hears as happy music may not be what a web developer is San Francisco hears as happy.) Nonetheless, I recall seeing Daniel Levitin, cognitive psychologist and author of the book “This is Your Brain on Music,” make the point that there are some universal constants. In no culture do people emote calm by jumping up and screaming.
A point made in the book “Music, The Brain and Ecstasy” is this: music creates emotional meaning by actually affecting your nervous system. If music sounds “anxious” it’s because it is actually increasing your heart rate, raising your blood pressure, filling your body with adrenaline etc. If music sounds calm it is because it is doing the reverse. (Obviously this is on a subtle level. There’s “listening to a jarring movie soundtrack” anxious and then there’s “actually being chased by a bear” anxious.)