..

Exploring Randomness 1: Tendency masks

For my first university module this year, I got to choose from a selection of classes, each with their own related projects. I chose the Coding and AI for Music class, which involves two main tasks: a 3-minute algorithmic etude, and a 5 minute group project. I was looking forward to getting started, however life sometimes tries to get in the way. Testing positive for Covid was certainly not on the list of things I could have expected to happen. Still, you must play the hand you’re dealt.

While I was unable to make it to the lectures in-person, I used the time I had at home to look into some of the module’s content and do some further reading. Currently we are looking at algorithmic techniques to generate music, specifically exploring randomness.

Tendency masks

One of the topics covered this week was tendency masks, which I found particularly intriguing. A tendency mask, notably used by Gottfried Michael Koenig in Project 2, is the concept of modifying a random number generator’s boundaries over time. This gives you more control over its signal. Here’s a simple example of a tendency mask that was made in Max by my professor:

max for live screenshot

As you adjust the x value at the top between 0-1000, it traverses the graphs (which essentially act as lookup tables) and outputs a random number between both y positions at the same x position. Take a listen to it in action when hooked up to the harmonicity of an FM synthesiser, and observe how it changes over time. I have also included a spectrogram of the output, with the boundaries overlaid.

spectrogram of harmonicity

To demonstrate my understanding, and so you can try out a tendency mask for yourself, I spent some time whipping up a playground in Scratch. You can draw your own boundaries (use the slider to switch lines) and press ‘Start’ to see how the random number generator behaves within them. Try drawing lines that intercept and see how it affects the output.

Etude ideas

Personally I don’t really like the sound of the FM synth in that example above, but I might try attach it to a different parameter on another synth. I could take advantage of Ableton Live’s API and make a M4L device that attaches to any parameter of another plugin, like how the built-in LFO device works.

I’m also considering using them to generate MIDI notes. The boundaries could represent the pitch range, velocity range or even both. I could then snap the output values to a scale or to notes used for drum patterns.

Tendency masks are simply tools that generate random values in a controlled way, and the possibilities are endless. I hope you found this as interesting as I did. Look out for part 2 where I will be exploring seeded randomness.