If_Then Permutation Generator v4 2021
This is the If_Then generator. An algorithmic pitch generation tool that allows the user a unique way of generating composition ideas. It uses permutations to generate every possible combination of notes that can come up, as defined by the list of options from user. This allows them to create specific percentages that indicate which note will play next, based on what has come before it. It will generate notes, in an evolving manner as a song progresses.
What & Why:
Permutation theory in aleatoric music has been used for some time. More on that can be found in “Aleatoric Music” - Dr. Justin Henry Rubin, 2005 here and “The Power of Permutation” - Berklee Today Summer, 2009 here. Chance is something I love including in my work. It is one of the key reasons I write generative music and tools. For those uninitiated, you can find a great history on the processes around chance in “Chance, Non-Intention and Process” - Ian Andrews, 2012 here.
I have used permutations as a compositional tool that is reminiscent of Markov chains. A way to determine every possible outcome and control how those outcomes will be played. Probability can be controlled and manipulated for algorithmic music generation. Drawing on a wealth of history before me, I wanted to take a crack at developing my own system. Using what had been played before, to determine what would be played next, was my starting interest point. Developing a chance procedure that could be “all encompassing” and completely within (or outside) my control, was something I knew must be a part of the outcome. When it occurred to me that the number of outcomes for what could be played was finite (even if very large numbers), I knew I had a shot of making something.
The main idea of the tool is:
Generate every possible permutation that could be possible with the number of notes available
Assign (either randomly or manually) the random percentage chance of what note will come next if that permutation comes up
Play the next note based on those random chance percentages and generate the next permutation with the new “last X notes played”
I quickly found that there were some limitations to overcome, such as the very large numbers. Looking at the example below, you can see that if I have 6 different notes, that have the 6 previous notes determine what would come next, that there are 46656 permutations.
This was something that I never really overcame in the way that I generated the permutations, and so there is a limitation in the tool. The more numbers you have, the less numbers back you can have to generate the next lot of percentages. This is based on the way I made it. The main issue I ran into was manually (very quickly) running a calculation to list every number in sequence, with bang objects, uzi object and zl list objects. It uses coll objects in Max to store large datasets. This brute force method was all I got to in building it, and it seemed to get me where I want it to be. It is incredibly inefficient in that regard. The fact that it was built in Max is because that is what I know and love (for good and bad). One day I might get around to rebuilding it in a cleverer fashion to overcome these issues.
Finding Meaning:
The more I worked with it, the more I wanted to “go back” further. This might have helped me find meaning in chance music. Aren’t we all looking for meaning in chance? Maybe I was looking at this as a way of having more control in my own life. But the more I worked with this tool, the more I thought about chance and its role it plays in music for myself. While a lot of people see it as some form of deficiency in my creative ability (or a crutch for music creation), I could not disagree more. Sometimes chance and the creation of a tool to assist that process, is the meaning in why I create. The musical output is just a nice extra. It is the reason I tinker. I think about the meaning of output in music process, often more than music itself. I can’t help but love thinking about process, emotion and creation. Now, before I get too metaphysical, I should get back to the tool.
The more I worked with it, the more I wanted to “go back” further. This might have helped me find meaning in chance music.
Using The Patcher:
You will find a copy of the patcher and its sub-patchers under Resources> COMPOSITION TOOLS. The main patcher is “test_algorithm4_2021_finalpres”. The other patchers have been broken down into many BPatchers. This will hopefully allow the development of some of my ideas later down the track. You will see some dodgy looking numbers that show you the instructions. The hierarchy is Purple - Major steps, Yellow - Secondary steps and Green - Optional steps.
Select how many different notes wanted to have available in the piece
How many notes back to determine the permutations
Select if you want the permutation percentages to be randomly generated or through “feels”
If feels: click notes you want under purple step 2, then elect ranges of percentages you want for each note (yellow 3a)
Record permutations and %s – a pop up will tell you when it is done. You can confirm this by clicking the pink View buttons to see the permutations and percentages
Generate the notes you want or randomly
Generate the initial list of the notes played to create the first permutation or randomly
From here you can change a specific permutation to be specific percentages if you wish
Select if the “simple” sequencer is wanted – in the center of the tool, or the “full sequencer” below
If you select “simple”- then click through each note and write down the results
Click through all the parts of the sequencer, and update what you need to: velocity, rhythms, if notes will play or not (more generative fun), speed
You will see off to the right, where you can select if you want midi out, or my simple synth preferences
I love the deliberate, clunky and segmented procedure that is needed to use my tool. It certainly goes against all my training and research in interface and approachability design. It really is idiosyncratic to my process and how I think. It makes you think about each step in the process. Everything is intentional.
Iterations/Changes:
It has been through some iterations in the 5 years or so I have been using it. The big one was breaking it into sub-patchers and BPatchers. It was originally in one huge patch. Very unruly. I added more “niceties” to allow more immediate output while using it. Included are a few extra items not solely needed for the generator.
The first tool added was a “push through the next note in sequence” button, to allow one the time to sit and record the output manually
There is my Simple Synth patch to quickly get audio output of what you are doing (this uses a triangle and sawtooth wave to make a great 8-bit video game style synthesizer timbre)
There is a recorder that uses a Coll object to record pitch output in a text document
There is a simple step sequencer that allows for random editable percentages of if a note will play and a few other niceties such as velocity control and rhythm selection
A “feels” function (more on that later)
While I think the velocity and the rhythm parameters are implemented in a very limited fashion, it is really fun focussing on the limitations there as a creative approach. The chance of if a note would play in the sequencer, is something I am still proud of, no matter how simple the concept. It adds so much more to the outputs. The pitch generation is the main draw and purpose of this tool. The other musical elements being limited is actually rather refreshing to my ears. I won’t bore you all with my thoughts on how I find musical generation tools with robotic outputs rather cute and nostalgic…..
The Feels section took a lot of thought about implementation. I had hypothesized complicated, layered pyramids of how the percentages would be changed throughout the device. This was to bring some reason, author-taste, and order to the chaos. It then occurred to me that the point of all of this was unnecessary. The ranges of percentages were all that was needed to give some sense of control and “flavour” without taking away from the aleatoric nature of the tool. Isn’t the point of generative tools to lose an aspect of control?
OUTPUT:
See a few other Live Takes that have used this generator in its various forms below:
The work in the video this week feels like one of the first Live Takes I have recently done that thoroughly fulfils the original requirement/purpose of the Live Takes series: to test new processes. This work is a single layer output of the device. It is naked, alone and has had no alteration. The timbre is reminiscent of an 8-bit video game, in the best kind of way. The video accompanying the work is raw. It is a screen capture of the tool in use. You can see the mouse move as I tweak parameters. The title is based on the process tests of my fore-bearers. Device and date of the experiment. Truly, the experimentalists would be proud, (I hope).
So, what is this good for? Firstly, experimental composer style notations of process and thoughts - writing each note in a notebook as a form of cathartic, meditative procedure. It is also great for the generation of new melodies. I find this is the case with a lot of generative tools I have made or use. I make long recordings of the tool going about its procedure, while tweaking parameters as I play along. Then I listen to it back and take the snippets I like and use them in other works. It is good for long generative works, when output through other synthesizers. I love setting it up to moving pads and letting it evolve and change as it goes, then layering some chords after. You could even put multiple of these generative recordings over one another.
I love how this tool means that as a song progresses, so will its output. Every part of the work (or the last small relevant portion of it), creates the next part of the work. It is fascinating to think about. A snapshot of the past controls the future creation. I even have a tool available on my website that uses all previous note output, (rather than a snapshot), to generate the next note. This is the Before_Notes compositional tool.
I have always wanted to wait until it was “finished” to share it. To be “perfect” and maybe even sell it. But if I waited until then, it would probably never be out. What even is perfect? I had the realisation that is actually better to share it with community as is, and let you all learn from it. I write about the issues I had with it here for transparency in my process around building it. Maybe one of you will take up my work and re-make it in a more efficient way. I hope that it inspires someone. (I would love a credit if someone does).
What would future versions of this look like? Firstly, the Feels function. I am sure it can be better implemented. “Controlling” the algorithm and finding the right balance between chance and author is still something I dream about. I would put a much more complex and usable synth in the patch. The implementation of the sequencer could be much better. Obviously, as said before, I want it to be able to have many more notes back to generate the next permutation. I am not sure if I will ever find the “right” amount to go back. Maybe I never will. The interface could do with some work (as said before). It is clunky and not made for proper distribution. It a functional brain dump. The code itself its messy and filled with my notes. I apologise if there are any typos in the patch! I didn’t update anything from when I last used it for transparency and it probably has all sorts of weird notes in it to myself. One day I would ideally have the permutation and percentage generation be implemented across more of the facets of music making. Other musical elements could be velocity, rhythm and timbre control. There could be a changing number of notes and permutations within one work. The amount of notes, and notes back could evolve as the work progresses.
This week, I share the tool with you. I have also posted a Live Takes that uses it, and I write this huge statement about it. You can see how much I have enjoyed this compositional tool. It is the romanticised ideal of making this device that I have loved most. It was something that I did, (and probably will continue to) love editing and building. This feels like the mountain project for myself. My partner is probably sick of hearing about it. Once I got it to this point, I wanted to share it. I hope the notes I write about it, bring you inspiration and insight. It has been cathartic writing about it, so thoroughly. It is something I am so proud of getting this far in, even if there are things that need work. I hope to keep up the work and do more in the generative music space. One day I will find the true meaning of creation, emotion, process and art. When I do, I will keep you updated.