แสดงบทความที่มีป้ายกำกับ random music แสดงบทความทั้งหมด
แสดงบทความที่มีป้ายกำกับ random music แสดงบทความทั้งหมด

วันพฤหัสบดีที่ 9 กรกฎาคม พ.ศ. 2552

Rhythmic Permutations

I also just had some insight into rhythm permutations. Random permutations are not musically meaningful the same way random note permutations end up sounding meaningless, hence the need for some structure such as inversions and retrogrades provide.

I remembered that, in Africa, master drummers cycle through rhythms. So, if you’ve got the one played all over Africa 2+2+1+2+2+2+1, when you want to play something different but related to this, you can play through one of it’s rhythmic modes. For example starting on the second rhythm event and using that as the beginning aka 2+1+2+2+2+1+2. This is musically meaningful/useful permutations of the rhythm.

Notice also that the first one I gave mirrors the intervals in a major scale M2 M2 m2 M2 M2 M2 m2. Because of this we can say it is the Ionian rhythmic mode. Another interesting thing about this is that the other two most prominant rhythmic modes in Africa are part of the cycle of this one. It shouldn’t perhaps be surprising then that they are in fact the Lydian and Mixolydian modes. I, IV and V. Creepy, I know.

Another more abstract but still musically meaningful permutation is to sort notes in ascending and/or descending order of length or perhaps rhythmic cells sorted in ascending order of probability, just like in my chart on my http://www.myspace.com/gongchime page in the Music Comps folder under pics.

I was looking at the chart in the other post about Probability and was thinking about how that data is similar to a zip file and that every melody used to create it is still stored in the data and we just need to unpack it. That lead me to think about a phenomenon called Automorphs. Maybe you’ve heard of them.

You can take any kind of series melodic or rhythmic and then just continue to expand or contract it so, for example, if you move up an interval of a m2 then the next time you can move up the interval of a M2 and after that a m3 etc...

Rhythmically, it might go a sixteenth followed by an eighth followed by a sixteenth morphed using rhythmic augmentation into an eighth followed by a quarter followed by an eighth and morphed again the same way into a quarter note followed by a half note followed by a quarter. Then played back to back. You can also alternate such as moving UP a m2 DOWN a M2 UP a m3 etc...

I wanted to mention that not every culture thinks about things the same way we do and what they’re thinking about can be very surprising to us. Specifically I’m thinking about the first comment in the article made about Mozart that said he used just a short list of melodic patterns that he composed from. I suspect this may have come from his father Leopold encountered somehow by way of Middle Eastern musicians.

Before explaining, it should probably be pointed out that when Europe was wallowing in the dark ages, all of the mathemtical and scientific advancements were coming out of the Middle East of those regions at that time.

When improvising, many musicians coming from Middle Eastern countries don’t just go up and down the scale or hop around the way we might. They have been taught by a teacher to join fairly short melodic patterns together. There are three kinds for ease of memorization; upper tetra-chord, lower-tetrachord and one’s that bridge the tetrachods.

You can start on any pattern that you learned at any position, it doesn’t have to be the first pitch and you can end on any position, then if you want to continue a melodic line you have to either superimpose the last note you played onto another of the basic patterns at the place where it has that pitch or to an adjacent pitch aka conjunct or disjunct respectively. This seems to be similar to what Mozart had done.

Their teacher’s teacher’s teacher going back thousands of years had already worked out the most common solutions and taught improv using this method. And this has become the basis for much of the Middle Eastern tradition. Using my handy dandy chart recently acquired, I’ve made a list of the common solutions through the pitch series that are the most effective in the Western tradition.

Musical Patterns

If you were wondering just what exactly are the properties which fractals and algorithms have that allow them to generate music similar to what humans make, then this is your place. Frequently it’s an aperiodicity but which isn’t completely random or even pseudo-random. There’s structure but it’s often open ended.

Remember when there was a thread with a bunch of number sequences in it and the comment was made by me that a person minimally needs 1 hour of music to play in order to be considered a professional performer? Of course several ways of accomplishing that are to listen to CD’s, attend concerts, buy songbooks, find teachers etc... and we should persue all of them.

Yet just about all of the COMPOSERS in the classical vein, although they always say a trained composer makes better music than any system, have studied the use of fractals, algorithms etc... If you start talking about it, it’s not like they say what’s that? They’ve usually already explored it. So, it’s not just for programming computers to make music.

One of my favorite comments by one such a person was that he liked variety, so it was more interesting to him when, if a system was being used, is if it was broken. Breaking it somewhere around the golden mean seems intuitive (which is yet another system).

Expert Systems and Effective Melodic Solutions

Dear friend, please meet our new teachers; on the right are several Expert System software programmers and on the left are their computer programs running on their computers. Shake hands and say hello. Is it possible to do the same thing with actual humans? Make the process more effective, faster and cheaper? Of course, the answer is definitely yes or I wouldn’t have created this course. I’ll admit it’s a bit strange having a computer study from an expert and then having the computer’s programmer be our teacher but, hey, if it works why not?

I’d like to answer the most important questions; what problems do you commonly face as a songwriter/composer and what are the key characteristics of effective solutions. One of the most important if not THE most important question that needs to be answered is how to come up with melodic material.

The qualities that the most effective solutions have to the problems you face as a composer are the same qualities that effective solutions have to any problem you might encounter. The solutions need to have a balance between being effective, abundant, fast, easy and cheap.
I've experimented with a lot of different things and had success coming up with melodies using different approaches such as; turning phone numbers, street addresses and names into melodies and rhythms, as well as rolling dice for one or both aspects, narrowing down the kinds of things the dice can choose such as rhythms, melodic sequences or interval motion thought to be probable, building motifs from auto-morphs or digital patterns such as 1234, 2345, 3456 or basing them on complex mathematical patterns and fractals etc...

Some of these solutions are fast and easy but not effective. Others are somewhat effective but not fast or easy. As you may have guessed by now, my favorite all time “technique” for coming up with new material is through the transformation of existing music which fulfills all of the criteria. It’s effective, abundant, fast, easy and cheap.

It's obvious to me that we can't be spending an inordinate amount of time agonizing over how to turn one melodic cell we've created into a phrase and then have no idea how we're going to create the following phrase. Then there is the question of where is the melodic material for the next section coming from?

Either we have to be able to come up with the answers to those questions fast or we have to stop thinking note to note and start thinking in broad strokes; at least as broad as a whole phrase and maybe even as broad as the entire album.

A master animator just puts in the important scenes and lets the grunts paint in all the rest. If you’re not already a professional composer then without the right teacher plus the time and money to invest, the conscious transformation of existing music is truly the next best thing. We have to be more like the master animator. We must have the big picture and be able to work from the top down. If you can't do this, yes, you can still write songs but its slow going and often doesn’t sound as good.
Luckily there is a huge pool of songs you already like which you can use as source material that you can transform into new music. And you can do it in big chunks such as entire phrases, sections and even whole songs.

It’s not possible for them to be boring. You already like them. And the level of ease with which transforming a melody can be done is the same level of ease you have drawing the silhouette of a carrot (>) backwards (<) or of drawing the silhouette of a mountain (^) upside-down (v).
If you can’t read or write music, it’s O.K. You’re covered. First, there are a lot of midi songs available on the internet. Find ones that you like and click on the guitar solo or the vocal part to see what it looks like on a grid. The ability to read traditional music notation is not required. There is no need to learn guitar tablature either, although if you already know how to read that, then you can use your favorite songs presented that way as the pool of music you’re going to morph into your next album. Second, you can just notate a song you already know onto paper with lines for a graph. And if you have sound editing software such as Wavelab, you can record your favorite music and play it back slower so you can transcribe it onto the graph paper. Wavelab can even play the music backwards for you and can start the music on any note you want.

One pro said to me that what I‘m recommending is not what professional composers do. There are no professional composers of popular styles of music that he knows who are using the backwards and upside-down version of phrases as new phrases. Well, to start, lots of classical composers are using these techniques and not just in twelve-tone or serialist music. In standard practice these transformations are applied all the time but at the smaller level of the motif. The serialists and the twelve-tonalists are applying it at the level of entire compositions. Jazz improvisation instruction books often tell you to practice all of the ideas both upside-down, backwards, and rhythmically displaced. For melodic material, rhythmic displacement in particular is a common stylistic element of jazz. And even the pros creating popular music are occasionally applying these transformations unconsciously. The professional who said no one is using these techniques has in fact used these techniques himself more than just a few times, albeit on a smaller scale than what I’m recommending here. He just didn’t know CONSCIOUSLY that his subconscious had already been using them. These are tried and true methods known to serious composers and we’ve ALL heard them before. If you don’t tell the people who listen to your music that you made it using these methods, they’ll never know the difference. Your music will cause their jaws to drop regardless. They’ll want to know how you got so good so fast and that’s all that matters. Then, your only problem will be how to record thousands of ideas fast enough. The fact of the matter is that there are many paths that all lead to the same location. My composition professor at Keimyung university in South Korea told me of a student who entered a music writing competition with a piece of music he created by taking one of Beethoven’s works, writing the whole thing backwards, and then performing it with an orchestra. He took second place. This stuff works. Period. I already did it, classical musicians did it, bebop musicians did it and pop musicians are doing it. If we can do it, you can do it too. Before you can start applying the transformations, you need to be able to either get your hands on a song book, midi versions of your favorite songs, or be able to transcribe.

Individually, each transformation is simplistic and I had originally rejected them for popular music, thinking they only had value to classical dodecaphonist and serial composers etc... I had tried them and wasn’t impressed. But then I discovered that simultaneously applying the backwards version of the melody (which is known as the retrograde) with moving all the notes of this new backwards version up or down by a certain interval (which is known as transposition) and moving all the notes backwards or forwards a certain number of beats (which is called rhythmic displacement) solves a lot of problems at once. It solves the problems of
1) creating variety in a subsequent section by changing the rhythmic location of the first rhythmic event,
2) varying the starting pitch,
3) creating the benefit of having a different melodic contour,
4) creating a different melodic rhythm,
5) making one section reach a higher note than the other,
6) having a different ending note, and
7) having a different rhythmic ending position.
That’s powerful. Talk about economy of means. Just this grouping of only three transformations (backwards, transposed and displaced), consistently works. They’re what allowed me to take a short melody and extend it into a complete composition. Even if you don't like my CD's chords or lack thereof, or my instrumentation or my textures, MELODICALLY, this method is quite a success.

You do need to sing or play through the melodies you arrive at to make sure they are what you want to hear. Sometimes it happens that they’re not. But frequently all they need is a single note tweaked or to be transposed or displaced to a different position. Very occasionally it happens that you just can’t find what you’re looking for. There are still other transformations you can try.

Expert Systems, Fractals, and Algorithms,

Some programmers initiate music composition systems with fractals or algorithms which the computer then performs transformations on, such as playing the input backwards, upside down, upside-down and backwards, faster, slower etc… And then the program performs transformations on the transformations.

If you were wondering just what exactly are the properties which fractals and genetic algorithms have that allow them to generate music similar to what humans make, it's an aperiodicity but which isn't completely random. There's structure, but it's often open ended and infinitely long. This is somewhat similar to human music but not spot on. Sometimes in order to identify the structure within an algorithm, you’d have to look at thousands of individual members within it before you could find the pattern. Those specific algorithms are not normally used for music composition. So, just because it’s an algorithm doesn’t mean it’s good. Even a good algorithm only creates pseudo-human-like music. It might repeat patterns in an ever changing way, which could be mildly interesting at times, but they never fool experts into thinking the music was created by another human let alone by another expert. It usually sounds quite amateurish.

Below is only one quarter of an example of a gene sequence. Computer programmers can assign different musical parameters to the recurrences of the amino acids adenine, guanine, cytosine and thymine to create different effects.

… 1 ggcagtggtg ctgggagtgt cgtggacgcc gtgccgttac tcgtagtcag gcggcggcgc
61 aggcggcggc ggcggcatag cgcacagcgc gccttagcag cagcagcagc agcagcggca
121 tcggaggtac ccccgccgtc gcagcccccg cgctggtgca gccaccctcg ctccctctgc
181 tcttcctccc ttcgctcgca ccatggctga tcagctgacc gaagaacaga ttgctgaatt
241 caaggaagcc ttctccctat ttgataaaga tggcgatggc accatcacaa caaaggaact
301 tggaactgtc atgaggtcac tgggtcagaa cccaacagaa gctgaattgc aggatatgat
361 caatgaagtg gatgctgatg gtaatggcac cattgacttc cccgaatttt tgactatgat

Just about all of the contemporary composers in the classical vein that you might run into at a university, although they always say a trained composer makes better music than any system, have studied the use of the Fibonacci series, fractals and algorithms etc... If you start talking about those, it's not like the classical composers will say, “What are those?” They've usually already explored genetic algorithms and such. So, it seems fractals and the like are not just for computers.

Expert Systems

There are now computer musical composition systems that are able to convince experts and average listeners that the computers are expert humans playing music. The listeners can't see that the music is being played by a computer. The people programming the systems are able to teach something as dumb as a computer to create music good enough to fool experts and the average listener. They can teach us a thing or two.

What are the programmers teaching the computers to do? The programmers teach the computers what expert humans do. Research indicates that people who have composing careers tend to start with the big picture and work down toward the details. Amateurs do the opposite but pros are able to think up and compose several parts at once while considering the relationship between them and even to compose from the top down and from the bottom up simultaneously. Amateurs write one bar at a time and have no idea how that part affects the others. Pros have a rhythmic approach to melody writing and amateurs don’t. Frequently amateurs only focus on pitches. The pitches are of secondary importance to rhythmic considerations. Actually, the form, overall length, section lengths, and phrase lengths are just larger rhythms. They are periodicities that occur infrequently compared with individual notes and rhythms but are just as important as the smaller details and help give the smaller details somewhere to reside. Although an expert may know how to do many seemingly complex things, one of the things that separate him or her from the amateur is how to simplify and categorize their vast knowledge into a structure that is small and manageable.

In the beginning of the history of expert systems, programmers thought if they just asked experts and also observed them, that it would be easy to find out what the experts were doing.
It turned out to be much more difficult. Experts sometimes can’t communicate what they’re doing or the variables are so numerous that a busy person can’t take the time to cover EVERYTHING they know how to do. The other issue is that the programmers didn’t know the right questions to ask.
This isn’t any different than a teacher with a student. Only in that case, the student is a computer. Some people say that composition can’t be taught, yet even with all of the difficulties, people still try to teach it and to learn it from a mentor of some sort.

The field of expert systems has grown a lot since the beginning. Experts have dug deeper into their psyches and more intimately revealed their thought processes and the programmers have started asking better questions. It’s still not perfect but it doesn’t need to be perfect for our purposes.
I’ve got a Boss BR1180 Digital Recording Unit. Acquaintances said it’s not good enough nowadays. I said that I have a Mac G4 computer and ProTools recording software also but didn’t always need to use them in many cases because the Boss BR1180 is better than anything the Beatles ever had. Clearly, it’s good enough.

An experienced recording engineer will know what to do with a cheap SM57 microphone and make it sound the best it can. Often, an amateur won’t be able to make a $400 mic sound as good as the pro with a cheaper mic.

If you convert a music file to mp3, it leaves out a lot of data but most non-musicians can’t tell the difference. The reason is because it presents the most important aspects with more detail, the less important aspects with less detail and leaves out the rest. Again, the amount of data not being used might be fairly large but the difference is virtually imperceptible. This course on melody and solo composition is similar to those examples.

If you’re in a band and you want to play your own original material, how do you create the music? You don’t just pull it out of thin air. Your thoughts as a musician have been existing in a historical context since the day you were born. What did your favorite musicians do to start creating their own original music? Usually, people start out copying their favorite groups and artists. But if you just copy them, it’s not original. To make it original you have to change something. Maybe you keep the rhythm for the rhythm guitar part but you change the chords or you keep the chords and change the rhythm.

This is similar to what the programmers of expert systems are teaching their computers. But it has to be done in a way that doesn’t turn the good input into crappy output. That’s part of the difficulty. Lots of people have tried just changing things a bit and have been unsuccessful in consistently putting all of the elements together in an aesthetically pleasing direction. Only a lucky few make that work. There are a lot of things you can screw up in the process of creating a song. And you only need to screw up one of them to put a blight on all the rest.

It might take a normal person studying alone ten years to get a handle on composing. But a programmer can download all of an expert’s or several expert’s knowledge over the course of only a few days. Then the computer can integrate that into its function very quickly. But only if the programmer knows what the computer will be able to do effectively. Computers aren’t people. Early on in the history of computer music composition, too much of the output was inferior to a normal person’s expectations and the programmer had to wade through tons of crappy music to find something passable at the end of it all. Why was that the case?

Randomness
In the Classical era Mozart played a game that chose pitches at random. If a computer does this for an entire phrase, it produces very angular melodies with awkward leaps and changes of direction.
Since then things have slowly become more sophisticated.
Here is a chart with truly random data which is generated from the decay of a radioactive isotope which you can use to prove to yourself just how bad music created this way really sounds. You can read it forwards, backwards, diagonally and even change direction. It won’t matter because it’s random.

36AC20D21D08302E7C005F96EDD46E625084F3C9D6C0D04F294DA755D3F8111B
886C03EC54728F39F093F19DC46235CB451F7A2DBABB2D93F899EBC0CEBD4404
7692D7AC44C5AFD1E4500AE7D2628D37E804155F190CAD994C7B949D3A2790BB
FCFB6C1E300C715AF01D90F968691857FB814CFCAB46F7A505D34B7268E4CF0D
65014D38083996BACB8E2BC26C78F989787D99B11D4184B80246394867470394
2AFFD91610D9C97FC3809D8B9E81A105DD8C972321BB839E5B8FAC3F07A2407B
CFB00042DB9A69C10011767E8C00430A4D5064C2BF00B37156D30312B56B480F

It’s possible to find truly inspirational music in random methods but first you’d have to wade through literally thousands if not millions of cases to find even one brilliant case. As expert system programmers say nowadays, it’s better to be consistently effective than to only occasionally create a more stellar example.

Weightedness

Weighted Pitches

Below is a chart used by some computer systems which shows the likelihood that a musical pitch will occur in "normal" melodies they sampled. Each is weighted with a number. In the key of C Major the notes are weighted like this;
C=5, D=3.5, E=2, F=4, G=4.5, A=3.5, B=4.

note,probability,probabilities

As you can see, the note C will occur more often than note E. If you roll weighted dice to create a melody or draw from a group of tiles, the pitch frequency method has the problem of not placing important pitches on important beats. It creates large leaps frequently. Even worse, it does not create enough motion by step or third.

Weighted Interval
Another method used is to weight the likelihood that one INTERVAL will follow another interval instead of one note following another note.
Below is a chart with the frequency of intervals that occur within "normal" western melodies. They are weighted like this;

Unison=5 (when the next note is the same as the previous note), Minor Second=5.5, Major Second=15, Minor Third=2.5, Major Third=2, Perfect Fourth=3, Tritone=0, Perfect Fifth=1.5, Minor Sixth=.125, Major Sixth=.25, Minor Seventh=.25, Major Seventh=.25, Octave=1

intervals,probability,probabilities

As you can see, it’s most common for one note to move a Major Second to another note.
This method produces smoother lines than the random pitch method but without enough surprises in the right place. One big problem with this interval method is that it gets trapped in a back and forth motion, for example going between G and A or F when it’s calling for all those Major seconds. It also does not place important pitches on important beats.

For this interval method, when the computer is calculating where to go, if it has drawn an interval of a major second it’s supposed to use, then if we’re assuming the male vocal range and it’s starting at the bottom of that range on C, obviously the melody cannot descend since that would take it outside the range. Therefore the next note must ascend to D. Also, if you’re trying to stay in a C Major scale then the Bb below C which is a major second below, if it were in the range, still would not be an option since it’s not part of the C Major Scale.

But if you’re on G, then you can either go to the A above or the F below. However, it’s best if the computer does not try to pick which line it’s going to follow yet and just keeps track of where each line goes. There may be some situation where one of the lines terminates because there is an interval combination that won’t work for that line such as if it’s on D and the interval it should travel from there is a Major third. There is no scale step in C Major that is a major third from D, so then it would have to abandon that line.

One way of evaluating the fitness of anything put out by the interval method is by simply counting notes. So, if there aren’t enough ones, fives and threes, aka C’s G’s and E’s not being anywhere near the ballpark of the called-for parameters for the percentage of occurrences of each, then what the interval method has produced is probably bad.

We could also use the interval method to evaluate the fitness of anything produced by the pitch frequency method. If the percentage of minor and major seconds to other intervals is not within a certain parameter...something like 80% of the ideal, then we can probably say with some confidence that a melody created with the pitch method is not a good melody without even listening to it. In other words, if the melody has too many intervals of a fifth, sixth and seventh but only a couple of intervals of a second and third then it’ probably not good.

Placing Pitches on Beat

Another technique that is applied increases the likelihood that the most frequent pitches; 1, 5, 3, 4, 7, 2, and 6, in that order, will occur on the down-beat by a factor of three, on beat three by a factor of two and on beats two and four by a factor of one. The off beats are not affected. It means that if a note falling on the down beat currently is the pitch number two, then you have to move it back three places in this string of numbers: 1,(5,3),(4,7),2. Start on pitch number two and count backward three places. That will change it to pitch number three, a more important pitch. Some pitches were placed in parenthesis because they have the same weight and so can be interchangeable. This pitch ranking was taken from a different sample of melodies than the previous example of pitch probabilities.

Combined Pitch and Interval Method

There are also systems that combine the random pitch method and the random interval method. It takes the input of several thousand tunes and gives them all the same starting pitch.

On one chart there were 3,282 instances of C going to C again and only 1 instance of C going to C#, and 2,661 instances of C going to D. All of the data makes sense if we think about it in terms of voice leading. Because C is the most important note of the scale, it wants to stay where it is. Therefore C will often repeat. C# is not in either the C major or the C minor scales so it occurs only once out of thousands of melodies. C goes to D less frequently than C repeating itself but more frequently than going to C#. That’s because D is part of the right scales and since D is a close neighbor to C.

Then the computer’s internal dice are weighted appropriately so that the computer chooses to go to the most common next note more frequently than uncommon next notes without eliminating them from the realm of possibility.

This method can be improved even further if the previous two or more notes are taken into consideration when trying to decide what the next note should be. The words usually invoked to give a name to this are Second Order Markov chain but the results are a vague approximation of a style and are not a fully adequate solution.