Showing posts with label music. Show all posts
Showing posts with label music. Show all posts

Saturday, May 28, 2016

Modeling rhythms using numbers - part 2

This is a continuation of my previous post on modeling rhythms using numbers.

Euclidean rhythms

The Euclidean Rhythm in music was discovered by Godfried Toussaint in 2004 and is described in a 2005 paper "The Euclidean Algorithm Generates Traditional Musical Rhythms". The greatest common divisor of two numbers is used rhythmically giving the number of beats and silences, generating the majority of important World Music rhythms.

Do it yourself

You can play with a slightly generalized version of euclidean rhythms in your browser  using a p5js based sketch I made to test my understanding of the algorithms involved. If it doesn't work in your preferred browser, retry with google chrome.  

The code

The code may still evolve in the future. There are some possibilities not explored yet (e.g. using ternary number systems instead of binary to drive 3 sounds per circle). You can download the full code for the p5js sketch on github

screenshot of the p5js sketch running. click the image to enlarge

The theory

So what does it do and how does it work? Each wheel contains a number of smaller circles. Each small circle represents a beat. With the length slider you decide how many beats are present on a wheel.  

Some beats are colored dark gray (these can be seen as strong beats), whereas other beats are colored white (weak beats). To strong and weak beats one can assign a different instrument. The target pattern length decides how many weak beats exist between the strong beats. Of course it's not always possible to honor this request: in a cycle with a length of 5 beats and a target pattern length of 3 beats (left wheel in the screenshot) we will have a phrase of 3 beats that conforms to the target pattern length, and a phrase consisting of the 2 remaining beats that make a "best effort" to comply to the target pattern length. 

Technically this is accomplished by running Euclid's algorithm. This algorithm is normally used to calculate the greatest common divisor between two numbers, but here we are mostly interesting in the intermediate results of the algorithm. In Euclid's algorithm, to calculate the greatest common divisor between an integer m and a smaller integer n, the smaller number n is repeatedly subtracted from the greater until the greater is zero or becomes smaller than the smaller, in which case it is called the remainder. This remainder is then repeatedly subtracted from the smaller number to obtain a new remainder. This process is continued until the remainder is zero. When that happens, the corresponding smaller number is the greatest common divisor between the original two numbers n and m.

Let's try it out on the situation of the left wheel in the screenshot. The greater number m is 5 (length) and the smaller number n is 3 (target pattern length). Now the recipe says to repeatedly subtract 3 from 5 until you get something smaller than 3. We can do this exactly once:

5 - (1).3 = 2

We can rewrite this as:

5 = (1).3 + 2

This we can interpret as: the cycle of 5 beats is to be decomposed as 1 phrase with 3 beats, followed by a phrase with 2 beats (the remainder). Each phrase consists of a single strong beat followed by all weak beats. In a symbolic representation easier read by musicians one might write: x..x. (In the notation of the previous part of this article one could also write 10010).

Euclid's algorithm doesn't stop here. Now we have to repeatedly subtract the remainder 2 from the smaller number 3:

3 = (1).2 + 1

This in turn can be read as: the phrase of 3 beats can be further decomposed as 1 phrase of 2 beats followed by a phrase consisting of 1 beat. In a symbolic representation: x.x Euclid continues:

2 = (2).1 + 0

The phrase of two beats can be represented symbolically as: xx. We've reached remainder 0 and Euclid stops: apparently the greatest common divisor between 5 and 3 is 1.

Now it's time to realize what we really did: 
  • We decomposed a phrase of 5 beats in a phrase of 3 beats and a phrase of 2 beats making a rhythm x..x. 
  • Then we further decomposed the phrase of 3 beats into a phrase of 2 beats followed by a phrase of 1 beat. 
  • We can substitute this refined 3 beat phrase in our original rhythm of 5 = 3+2 beats to get a rhythm consisting of 5 = (2 + 1) + 2 beats: x.xx. 
  • I hope it's clear by now that by choosing how long to continue using Euclid's algorithm, we can decide how fine-grained we want our rhythms to become. 
  • This is where the max pattern length slider comes into play. 
The length slider and the target pattern slider will determine a rough division between strong and weak beats by running Euclid's algorithm just once, whereas the max pattern length slider helps you decide how long to carry on Euclid's algorithm to further refine the generated rhythm.


Sunday, September 6, 2015

Fear of change and its influence on the practice of music composition

Introduction

In this blog entry I will formulate some thoughts about how fear of change can explain a number of principles in music composition. It's very well possible that all this has been written before, and much better explained than I will ever be able to do, but I'm in philosophical mood today, and perhaps you'll start to think differently about some things after reading this text. If you experience a feeling of skepticism while reading this article, and feel like it's written by an internet crackpot theorist, rest assured that this is in complete correspondence with what the article predicts will happen :)

Fear of change as an organizing principle in the universe

Fear of change, while sounding specific to human psychology, really permeates the universe. In Newtonian physics, any action will cause a counter-action that resists the original action. If you push your table top down, the table top pushes back and cancels out your intention to change it (until you hit it so hard that it breaks or deforms). Dynamic processes strive for equilibrium, that is, a state in which all changes canceled each other out perfectly and nothing happens anymore. Exactly why all things strive for minimal energy to the best of my knowledge is not known to anyone but it's an empirical observation that has held together science for a few centuries already and has been observed over and again in experiments and observations.

In psychology, “fear of change” is a well-known topic. When Copernicus found that the earth rotates around the sun, it caused massive resistance from the world population. When confronted with the implications of quantum theory (that he helped to establish), Einstein resisted the change in world view it would bring about and declared that "God doesn't throw dice". Announcements for big changes in an organization, e.g., are typically met with skepticism, and quickly resistance and conservatism will pop up to cancel out the announced change. Just google for “change management” to find a myriad of books explaining how to reorganize a corporation. As I will argue in this blog entry, this same mechanism of fear of change (or better "resistance to change") also permeates music theory. 

At the same time the universe doesn't appear to like complete rest. Quantum physics (a revolutionary theory that of course was met with a lot of skepticism at first!) predicts that there's no such thing as complete “rest”. The Heisenberg uncertainty relation necessitates that even at a temperature of 0 Kelvin (the lowest possible temperature in the universe) there must still be a small rest energy. In nature and technology we also observe constant evolution. Change is inevitable it seems. Similarly, in music, listening to a piece that consists of a single note without volume or rhythmic variation that lasts forever is not a pleasant experience. Ask anyone who's suffering from tinnitus what it's like...

Finally, I want to stress that this fear of change is not a bad thing per se. After all, it has helped us survive since the stone age. It was probably safer to eat the berries that your parents ate than to try new berries every day. And it continues until today, since not all big changes or revolutionary “new insights” really have the merit they claim they have (and that may well apply to this blog entry too!)

Fear of change in music

In this section I will list some places where I see fear of change in action in music composition. If you know about more examples, by all means, comment!


3.1 Music style

In modern classical music, certain experiments have been branded "interesting", whereas other experiments have proved to be wildly successful with wide audiences. 

The “12 tone” music style, that resolutely throws away the organizing principle of “sounding good” and replaces it with a different organizing principle of “using all available notes and treating them without differences”, as introduced by Schoenberg, results in music that has many leaps and bounds and, let's face it, has failed to attract a significant audience. On the other hand, “minimal music” with composers like Philip Glass, Steve Reich, Brian Eno, Michael Nyman, Terry Riley and a myriad of others, makes slowly evolving music and continues to be wildly successful with wide audiences. Compared to the 12-tone music, minimal music minimizes change. It also offers just enough changes to keep it from being boring. As such it avoids complete rest.


3.2 Writing melody

When writing melody, e.g. in the context of counterpoint, or in the context of a song, it is advised to avoid big leaps. The reason given by ancient theorists is that smaller leaps are easier to sing. What makes a bigger leap harder to sing accurately than a smaller leap? Is the larger change of pitch a cause for distress in our brains? At the same time, I also took an introduction to counterpoint class, in which I was warned to avoid “turbulence”, i.e. writing a flurry of notes that doesn't seem to go anywhere. Minimize the change, while avoiding complete lack of direction (lack of direction would be a form of equilibrium or rest).


3.3 Voice leading

When moving from chord to chord, voice leading is the principle that makes you do these movements while minimizing the changes in notes. Voice leading is an important topic in many courses on harmony and jazz theory. It is perhaps the most common principle that governs modern music styles (apart from those styles that avoid it on purpose, like the 12-tone music mentioned earlier). Voice leading is a direct application of minimizing change between chords. The fact that you move between chords and don't just stay on the same chord all the time, is a direct application of avoiding complete rest. 

Minimizing changes between chords historically probably also has a second reason: when playing chords on a keyboard it is easiest to play chords that are close together, i.e. where you minimize the changes in required hand and finger movements. Minimizing unneeded movements is absolutely required when learning to play an instrument at the level of a virtuoso. This synergy between physical minimization of change and pyschological minimization of change probably has led voice leading towards the huge role it plays in music composition.


3.4 Fugue construction

While constructing a fugue according to the classical rules, the composer first states the theme, then restates the theme a fifth away from the original theme (but without introducing new accidentals, a so-called modal transposition), then returns to the original theme. This is the so-called “exposition” part of the fugue. During the exposition, the listener is taught the theme that will return in all kinds of variations later on. The theme is taught three times (minimize change), but the second time a fifth away compared to the first and third time (no complete rest). Why a fifth away? At first sight, a fifth seems like a large jump. Why didn't the composer just write the theme a second higher?

There's again an application of the principle here and it requires some explanation. If you transpose all notes from the C major key a perfect fifth up, you get the notes from G major. If you compare the notes of C major and G major, you will notice that they share all the same notes, except for the note f (in C major) compared to a note f# (in G major). G major therefore represents a key that is as close as possible to C major (since it differs in only one accidental) while not being completely the same (since it differs in at least one accidental). A theme written in C major that is modally transposed from c to g will therefore sound maximally the same as the original theme (minimize change). Next time you wonder why moving along the circle of fifths is so popular, fear of change may be the answer you look for.

3.5 Modulation

Modulation is the art of moving from musical key to musical key. When you move from one key to another, you want to gently guide the listener towards this change. When you read about modulation, you will often be advised to modulate to “near” keys, that is, musical keys that do not differ in number of accidentals too much. This is a direct application of minimization of change. 

One can also modulate to more distant keys. In those cases a sudden change, known as direct modulation, is frown upon by composers and theorists. To modulate between keys, especially to distant keys, several advanced techniques have been invented and they involve clever voice leading, sometimes going as far as substituting chromatic notes for enharmonic equivalents, towards a cadence to confirm the new key. These techniques incrementally introduce small changes to the audience so they are guided from the old key into the new key without sudden changes.


3.6 Writing hit songs

Commercial pop music often reuses the same chord progressions. During the 1980-ies, these chords where typically I, IV, V (think: C F G). Nowadays, the new chord progression used in virtually all hit songs is (I, V, vi, IV) (think: C G Am F). Why is that? Why exactly those progressions? Why did I,V,iv,IV come after I,IV,V?

Look at I, IV, V. Remember from the section about fugue construction that transposing a theme a fifth up will maximally retain the existing melody notes. The same is true when transposing a theme a fifth down (note “c” transposed a fifth down gives an “f”. This can just as well be thought of as transposing it a fourth up). When transposing something a fifth up, you need an extra sharp (or one less flat) to completely preserve the same melody. Similarly, when transposing a theme a fifth down, or equivalently a fourth up, you need an extra flat (or one less sharp) to completely preserve the melody. This means that by playing with the chords I, IV, V you have minimized the changes in the set of notes that need to be recognized by an audience, and maximally preserved the possible melodies that can be written on top of these chords.

Complete rest is still not desirable, and so after 20 years of I, IV, V the time was ready for a new chord progression that finds a way to minimize change while avoiding complete rest. And this new chord progression appears to be I, V, vi, IV. It's an evolution from I,IV,V in that it introduces an extra chord. Because the audience is already very used to I, IV, V, this extra chord can inject a bit of much needed change into the music again. The new chord of course is not chosen arbitrarily. It's chosen in such a way that it minimizes change with respect to the old chord progression. 

As before, when going from I to V, you need only one extra accidental. When going from V to vi, you need one less accidental (since vi is the minor equivalent of major I). Then when going from vi to IV, you need one less accidental again, and finally when going back from the final IV to I to sing the next verse, you need a single extra accidental again, making the circle round. Changes have been minimized between every two consecutive chords, and total rest is avoided by moving between different chords.


I'm afraid we're still stuck with I, V, vi, IV for a while, but if you want to define the future, grab your chance, and design a new chord progression that minimizes change while avoiding complete rest :) Unfortunately, you may have trouble selling it to the music publishing companies, since they will probably resist these sudden changes you try to introduce ;) “Never change a winning team/theme!”


Wednesday, January 14, 2015

Stefaan Himpe - Fairy tale for piano solo

Fairy tale for piano solo

It's been a while but I finally found some time to write, practice and record a new piece. All things music have been on a break for a while now, and I'm glad that I can take a break from taking a break.

You can download the piece from my soundcloud account: https://soundcloud.com/stefaanhimpe/fairy-tale-for-piano-solo



So... what do we have here really? 

The piece started as a sad ending theme for a video game. It was never used for that purpose and so I decided to rework it into something longer. Maybe it's interesting if I tell you how I think about the music, bar by bar. (Then again, maybe it's not ;) Feel free to skip the explanations. Most of all, I'm also curious how much of this I will still recognize in a year or in 5 years. I may even come back to my description and update it as my insights change.)

Bars 1-4: The piece starts off quite melancholic (which was a requirement for the sad ending of the video game). This part is written in C minor key, a key that is traditionally regarded as the key in which to express a declaration of love with lament of unhappy love, sighing of the lovesick soul. Clearly someone is thinking back about something.

Bars 5-8: The beginning is repeated with a slight variation in the accompaniment to avoid making it sound the same twice. It is as if the accompaniment adds more detail to the memories as they are repeated.

Bars 9-12: Suddenly the melancholic fantasy is interrupted with a little waltz. A short distraction? Or perhaps a related memory, a sudden free association. 

Bars 13-20: The distracting thoughts are pushed away and make place again for the fantasy. As the fantasy repeats itself, the melody notes again add more details to the memories. By coloring the melody using notes outside the scale, the color of the memories changes. Little imperfections that keep the story alive as it were.

Bars 21-27: The fantasy continues. The fantasizing person remembers and overthinks some of the consequences that resulted from whatever happened in bars 13-20.

Bars 27-32: Stress level increases a bit. Temper gets a bit heated. 

Bars 33-34: Some soothing thoughts manage to calm down the person.

Bars 35-38: There's our distraction waltz again. It's barely interesting enough to keep our thoughts away from what happened.

Bars 39-48: The fantasy is resumed, but in bar 45 it suddenly takes a different path. The person has second thoughts about how everything really went back then. For a while, things are remembered as perhaps more festive than before (bars 47-48).

Bars 49-52: These finish the first fantasy and prepare the music to change into a different key of f minor. F minor is the key in which one traditionally expresses deep depression, funeral lament, groans of misery and longing for the grave. No doubt the passage that follows will have a sinister side to it.

Bars 52-85: A buildup of emotions, a waterfall of notes follows. In the left hand we have a sad but very static accompaniment with typical f minor notes. In the right hand, in bars 53-64, we also have very dissonant chords which work to create a somewhat uneasy feeling. In bars 65-76, the dissonant chords are now replaced with a locrian motif that further increases the uneasyness in the music. In bar 74, the deepest note of the piece (a very low "d") is reached. Then bars 77-85 repeat the same techniques but a fifth higher and with many more, and much faster notes, which adds even more drama to the already dramatic state of mind of our fantast. The fifth higher brings us in the key of Bb minor, which traditionally is used to express feelings of mocking God and the world, discontented with itself and everything, preparation of suicide. Quite restless and dramatic indeed :)

Bars 86-91: The deepest darkest memories subside and make place again for the sweeter earlier theme.

Bars 92-113: The earlier theme is repeated, but again the colors have changed to something more bitter-sweet. This time the chords in the right hand sound much more yearning than in the beginning of the piece. As if the darkest memories increased the feeling of having lost something valuable and make it more painful to think back about what was lost.

Bars 114-117: Eventually, the person snaps out of his trip through memory lane and we hear the waltz playing again.

Bar 118: The piece ends with some bitter sweet ending chords. A near happy end, and time to get back to work ;)



Sunday, October 20, 2013

Music to die for...

When starting this blog, I announced I would sometimes share things I've come across that really need to heard to be believed.

Here is one such thing...

Árstíðir

I'd happily have missed my train for this...

Sunday, September 9, 2012

Modulation

Modulation

Modulation is the art of smoothly moving from one musical key to another. Modulation is one of the ways to make your music more interesting. If this sounds intriguing and you know how to read music notes, stay with me.

Three weeks ago, I set out to learn something about modulation. I took notes while doing so, and I'm making those notes available for anyone interested in the subject. The notes so far encompass 257 (!) pages full of modulations between different keys. Each modulation each time is written out in all keys, leading to a catalogue of modulations from any key to any key (well... almost. It's a work in progress). It also contains brief explanations about the underlying principles that make the modulation work. Using those principles, it should be possible to create new modulations yourself.

Most of the material is illustrated in the context of classical music theory (but all the underlying principles illustrated there apply also to jazz/blues/pop/gospel/...), but part III also contains some beginnings of Jazz and Gospel cadenzas.

Downloading?

Sure. The document is available under a CC-BY-NC-SA license. The source code is available on sourceforge. It requires lilypond, lyx and LaTeX to "compile" to .pdf.

You can also download a prebuilt .pdf from the files section.

If you have downloaded and skimmed the book, be sure to comment either here or on the book's forum.

Sunday, August 12, 2012

The Fly

The Fly

The Fly is a poem written by William Blake, a poet not unknown to music lovers. His poem "The Lamb" has inspired many a composer to write music, and the same holds for another of his poems: "The Tyger".

William Blake

My version of The Fly

Of course "The Fly" has been set to music as well. There's something about Blake's poems that invite people to write music...

I've written something for piano solo (one can sing the words to the music, but in order to protect your sanity, I won't sing in the recording ;) ).

Without further ado, head over to my youtube page:

Enjoy!

Thursday, July 12, 2012

Rain Dance

Another day, another piece!

LMMS madness struck again... I tried to make something different from my usual style and the result - love it, or hate it, is here.

I've embedded some soundscapes into the music (reused from http://freesound.org)

  • oceanwavescrushing by Luftrum (CC attribution)
  • kinder auf dem spielplatz by fieldmuzick (sampling+)
  • thunderstorm2 by erdie (CC attribution)

Friday, June 29, 2012

Call for contributions: YouCoLeLe Twilight

YouCoWhat?!

Maybe you remember my enthusiastic blog post with respect to tunestorm. Unfortunately, the submission deadline has long passed and the organizers do not seem to find the time to broadcast the submissions. That's not exactly the way to make and keep people enthusiastic - perhaps quite the contrary.

I still very much like the concept of a tunestorm: let a group of people create music around a common theme, each in their own style. As a variation on the tunestorm theme, I thought of trying something similar, from now on called YouCoLeLe.

"YouCoLeLe" is an acronym and stands for Youtube Composer's Legendary League. The idea is for people to create music around a common theme, put that music on a site like Youtube or SoundCloud, and tag it with "YouCoLeLe <Theme>" where <Theme> should be replaced with the theme the music was created for. This way, people can contribute without really having to obey a strict deadline. Nevertheless, each time a new theme is chosen, a target date is set, after which a compilation of "contributions so far" will be made. One important difference with tunestorm is this: even if this blog dies or I don't find time to update it anymore, anyone can still find back the contributions by searching for videos/sound streams tagged with "YouCoLeLe ".

So what's the first theme?

The first theme is Twilight. It's up to you to interpret the assignment as you like. The target date is set to 1 september 2012.

What are the constraints?

I don't want to restrict your creative freedom too much, meaning that you are free to create something that in your opinion illustrates the theme. You are free to chose your instruments or musical style. You can create songs or pieces or soundscapes... whatever floats your boat. For your own sake, just make sure that you have the right to use whatever materials you happen to reuse. Legal reuse of material available under creative commons license is highly recommended by the way: that way the new contributions also become available under creative commons license, and who knows: perhaps someone else will reuse your material in their creation. If you create original work of your own of course you can choose not to release it under a creative commons license (although I would highly recommended for The Greater Good.)

Are you going to keep babbling or can we hear some music?

As it happens (surprise, surprise), I have made an entry for "YouCoLeLe Twilight" which you can hear here:

If you want to play it yourself, you can download the score by clicking on this link. Or you can browse the score (without the poem, due to copyright restrictions) here:

Finally...

Feel free to drop me a note with a link to your contribution. Don't be scared to contribute - it's for fun only. It's not a competition, and the whole thing is not meant to judge your work, although it can be a way to find an audience and a way to get feedback on your work if you are looking for that. Better indicate it explicitly in that case.

Unless big disasters happen I will create a compilation of contributions on this blog after the target date. As I see it now, the contributions would be listed with my personal comments on them (if the author indicated they wanted comments), ordered according to the date on which I became aware of the contribution. Should I forget to do so, feel free to remind me of my promise!

I hope to see (m)any contributions :)