Author |
Message |
mskala

Joined: Sep 21, 2017 Posts: 10 Location: Toronto
Audio files: 1
|
Posted: Sun Oct 01, 2017 6:59 am Post subject:
Black Swan Suite Subject description: algorithmically generated music from mathematical tilings |
 |
|
Here's a piece I wrote in 2015, for which I recently updated the explanatory text: audio; Web log entry; detailed commentary in PDF format attached here, as well as being linked from the Web log entry.
Very briefly: if you have something that generates a point moving around on the geometric plane, you can translate each motion into a note by mapping the directions into the circle of the octave. I used a Cauchy-distributed random walk to generate a target point (which I imagine as a black swan named Daffy), and then had several other points (hunters: Elmer, Fanny, Grover, and Hermione) chase it around, following the edges of a mathematical tiling. Penrose tilings and some others generate different sounds and different microtonal scales in the five movements of the piece.
Note generation is done by a few thousand lines of C code; it's randomized, but heavily human-supervised to choose the best-sounding random seeds and chunks of the sequence. Then the final sequence goes into Csound for rendering.
Description: |
Notes on Notes on the Plane |
|
 Download |
Filename: |
notes.pdf |
Filesize: |
1.09 MB |
Downloaded: |
508 Time(s) |
|
|
Back to top
|
|
 |
Blue Hell
Site Admin

Joined: Apr 03, 2004 Posts: 24042 Location: The Netherlands, Enschede
Audio files: 276
G2 patch files: 320
|
Posted: Sun Oct 01, 2017 8:41 am Post subject:
|
 |
|
This is very interesting, and sofar (in the dunes now) has been enjoyable to listen to.
When I understand correctly .. the C code makes a score that you then fine tune before it to be performed by CSound?
Also to the forum.
I'm sure your pdf will give me some ideas to explore too. _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
mskala

Joined: Sep 21, 2017 Posts: 10 Location: Toronto
Audio files: 1
|
Posted: Sun Oct 01, 2017 3:17 pm Post subject:
|
 |
|
The fine tuning is more on the input side - I manually select the random seed, at what time to add and remove hunters, the speed for the hunters to move, and so on. The C code translates that into a score which goes more or less unmodified into Csound (along with a manually-written Csound "orchestra" describing the timbres), and Csound renders it into audio. There was a fair bit of back-and-forth of rendering different option selections, then going back and changing them and trying again. _________________ North Coast Synthesis Ltd.
Twitch stream, Mondays 6pm Eastern |
|
Back to top
|
|
 |
Blue Hell
Site Admin

Joined: Apr 03, 2004 Posts: 24042 Location: The Netherlands, Enschede
Audio files: 276
G2 patch files: 320
|
Posted: Sun Oct 01, 2017 3:36 pm Post subject:
|
 |
|
Ah ok.
I'm now trying to make a real time version of this for my soft synth thingie, current brain breaker for me is how to make recursive tessellations into a maze. I've made a maze engine that hunters can move around in to close in onto the swan, also having stuff for the swan flights already.
I vaguely remember a lecture in which a prof made the tessellation stuff sound easy .. but hey . .that was like 35 years ago  _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
mskala

Joined: Sep 21, 2017 Posts: 10 Location: Toronto
Audio files: 1
|
Posted: Sun Oct 01, 2017 3:48 pm Post subject:
|
 |
|
If you've already got the tesselation, here's how I would turn it into a maze:
* Keep track of which faces are already in the maze (could be a flag per face).
* Start with just one face "in the maze."
* As long as there are still faces not in the maze, choose at random an edge going between a face in the maze and a face not in the maze. Add this edge to the maze.
You end up with a spanning tree covering all the faces. A fancier version would use a data structure to keep track of the edges currently on the frontier; depending on how you implement the "choose next edge" step this can save some time. But it's unlikely that even a slow version would be slow enough to be a problem.
Wikipedia has an article on maze generation algorithms: https://en.wikipedia.org/wiki/Maze_generation_algorithm . The one I described is basically what they call "Randomized Prim's Algorithm."
If your algorithm for the hunters has them often making 180° turns (as might be typical in exploring a maze), then you'll end up with a lot of tritones in the music. That may not be desirable, depending on how you want the music to sound. _________________ North Coast Synthesis Ltd.
Twitch stream, Mondays 6pm Eastern |
|
Back to top
|
|
 |
Blue Hell
Site Admin

Joined: Apr 03, 2004 Posts: 24042 Location: The Netherlands, Enschede
Audio files: 276
G2 patch files: 320
|
Posted: Fri Oct 13, 2017 2:52 pm Post subject:
|
 |
|
Pwew .. that was a bit more work than I had expected .. but I have something working, a bit different from what you did.
Thank you for the idea!
I've added a a forth interpreter implementing turtle graphics which is used to draw a maze. I've made clock inputs to make the hunters move, and X and Y inputs to control the swan position. Also added a rule that no two hunters can be in the same place (hunters don't really move along the edges, they jump from vertex to vertex). Outputs are angle and last path length for each hunter (can have six).
Now to find some interesting drawings to use
Some examples I've used for testing:
A test patch (using quatization here to map angles to notes, but could use other scaling as well of course):
 _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
Back to top
|
|
 |
Blue Hell
Site Admin

Joined: Apr 03, 2004 Posts: 24042 Location: The Netherlands, Enschede
Audio files: 276
G2 patch files: 320
|
|
Back to top
|
|
 |
|