'Folk' Tune 'Arrangements'

Standing on the shoulders of giants such as Bartok or Berio, I recently finished writing an ensemble piece titled Bastard Tunes. The piece was composed with the help of a machine learning system trained on transcriptions of Celtic music. The system produces short melodies that share many characteristics with the style it learned. But, with the possible exception of the fourth Bastard Tune, my piece applies more freedom in the way the system's output is used as compositional material. The piece will be premiered in a concert with other examples of music composed by and with computers.

At this moment, working with the system is through a python script:
> python sample_rnn.py metadata/config5-wrepeats-20160112-222521.pkl --temperature 1.8 --seed "M:4/4 K:Cmin E"
Which, translated into English means (more or less): take a trained model and use it to generate a tune in 4/4 in the key of C minor with the first note E. The result could start with:

I can then either decide that I like it and keep it or change some of the numbers in the command and regenerate a different outcome. For example I can change the opening note(s)
 > python sample_rnn.py metadata/config5-wrepeats-20160112-222521.pkl --temperature 1.8 --seed "M:4/4 K:Cmin D E /2 C"
Or I can decide to try again with different temperature. Lower temperature would mean a more cautious sampling from the system (the next note in each step is more likely to be the most probable one). Higher temperature will result in more adventurous results.
Both the way I extracted the material from the system through such an interactive process and how this material was transformed in the composition process is different in each of the four movements of Bastard Tunes. For example, this is part of a melody I got through the system:
Which was the basis for this page from the second movement:

Throughout that movement the melody generated with the system is at the centre surrounded by heterophonic textures that at times accompany and at times contrast with it. I also used the melody itself with considerable freedom - removing bars or phrases that didn't work, changing rhythms to make it less rigid, octave transpositions, etc. 
I took a slightly different route in the first movement. I wanted four melodic strands that start together and gradually diverged. It took several experiments with the system till I got what I wanted. I started by setting the temperature parameter very low which meant the next note in the melody would often be the most likely note. I got 4 very similar melodies:
Using the last measure of each tune as the seed and slowly raising the temperature parameter in each iteration, I got melodies that gradually diverged from each other
 And also got further and further away from the training style:
There was still a fair bit of further editing on my part (removing very large portion at the end - I generated too much material; changing octaves to fit the instruments and bring out interesting bits; deleting some notes so the players can breath; etc.) to make it really work.
My colleague and collaborator Bob posted the score of a piece he wrote with the same system on his blog.

No comments:

Post a Comment