25 shades of random

Show off original scores and recordings made with Linux!

Moderators: MattKingUSA, khz

Post Reply
shimpe
Established Member
Posts: 39
Joined: Mon Jan 09, 2012 8:11 pm
Contact:

25 shades of random

Post by shimpe »

Hi everyone,

I'm happy to announce the birth of my first algorithmic composition: 25 shades of random.

In this composition I make some basic exploration about how constraints can "tame" (limit) randomness to make a trade-off between
"artificial creativity" and "aptness to human consumption".

http://a-touch-of-music.blogspot.be/201 ... andom.html

For this piece, I've created a simple scheduler and some midi event generator strategies in python, and I used rtmidi to send the generated midi events to Yoshimi and LinuxSampler over jack-midi. The result was recorded in Ardour3 (unfortunately only audio - recording midi appeared to result in ardour entering some infinite loop). I've combined the recording with a screencast made using ffmpeg while playing the file in sonic visualizer. The results were combined into a movie using kdenlive on debian sid.

Comments and critiques are welcome. Enjoy!
varpa
Established Member
Posts: 509
Joined: Fri Feb 25, 2011 6:40 pm
Been thanked: 13 times

Re: 25 shades of random

Post by varpa »

I found you composition to be interesting and wonder how you write such a thing. You say it is randomness with constraints - but was it really totally algorithmic? Do you listen to what you have produced and decide to add another part? Some sections seem partly sequenced - at least I heard "Simple Gifts" at one point.
shimpe
Established Member
Posts: 39
Joined: Mon Jan 09, 2012 8:11 pm
Contact:

Re: 25 shades of random

Post by shimpe »

I found you composition to be interesting and wonder how you write such a thing. You say it is randomness with constraints - but was it really totally algorithmic? Do you listen to what you have produced and decide to add another part? Some sections seem partly sequenced - at least I heard "Simple Gifts" at one point.
Hello varpa,

Thanks for expressing your interest. You are right in that parts of it are sequenced.
But I consider imposing a sequence as imposing yet another type of constraint.

I have created a few strategies, like "select random notes from a set of allowed notes" or "take a theme and interpolate all notes using notes from some scale" or "take a theme and transform all notes into note clusters with that note as center". And then I initialize the strategies with allowed notes, allowed durations, allowed octaviations, start and stop times, ... different strategies take different inputs (constraint definitions) and multiple strategies can run simultaneously. Then I let everything calculate and generate at random, each strategy operating within its constraints.

And yes, I have listened to the output and tuned my constraints to better approximate my desired "sound".
In that sense, the computer has created everything autonomously, operating within constraints that were imposed manually.
Automatic selection from a set of possible constraints is certainly something I could look into for a future experiment.
ssj71
Established Member
Posts: 1294
Joined: Tue Sep 25, 2012 6:36 pm
Has thanked: 1 time

Re: 25 shades of random

Post by ssj71 »

This is cool! Thanks for sharing. Is that python scheduler script something anyone could use? Sounds like fun. Maybe you could publish the source.
_ssj71

music: https://soundcloud.com/ssj71
My plugins are Infamous! http://ssj71.github.io/infamousPlugins
I just want to get back to making music!
shimpe
Established Member
Posts: 39
Joined: Mon Jan 09, 2012 8:11 pm
Contact:

Re: 25 shades of random

Post by shimpe »

Hey ssj71,

Good news! And bad news! The good news is: I had already created a github repository.
The bad news is: I haven't imported the code yet. Here's why:

I'm struggling to find a way to distribute the state of linuxsampler - the session files seem to accept only absolute paths, which make the files hard to transfer between systems. I know that a tool like Lisalo might solve the problem, but it requires python3, whereas my script is python2, which makes the #programming languages required in deploying my little script a bit too large.

So basically I feel like I have to do one of the following before I'm ready to make it available:

1. I read somewhere that latest linuxsampler has support for relative links but I still have to find out more about how that works
2. alternatively: port my script to python 3 first and use it with lisalo (may not be too much work, but i still have to look into it)
3. alternatively: port lisalo to python 2 (haven't looked at it, but at this moment I'm not very interested in creating and maintaining a fork)
shimpe
Established Member
Posts: 39
Joined: Mon Jan 09, 2012 8:11 pm
Contact:

Re: 25 shades of random (github address)

Post by shimpe »

So... I've uploaded the code I have so far.
Usual disclaimer: it was not meant to be published, meaning that some of the score generators
have some code duplication and the code is not robust against all possible errors...

Anyway, have fun. If you get into trouble, feel free to let me know and I'll see if I can help you
somehow.

https://github.com/shimpe/twenty-five-s ... random.git
Post Reply