Joined: Nov 29, 2008 Posts: 149 Location: Cheshire, UK
Audio files: 7
Posted: Thu Dec 11, 2008 9:50 am Post subject:
Algorithmic composition - what does everyone think?
The (mighty) Inspiration thread has been filling up recently with one of my favourite subjects - algorithmic composition. So it seems like a good time to see what everyone makes of this subject - what is it for?
Apologies to any of you whose answer doesn't fit my categories - I'd be really interested to read people's views in more detail anyway!
I'm voting for no. 3 - I enjoy the exercise for its own sake even though I keep having to mess with the algorithm subjectively, and add non-algorithmic content, to get decent music out of it!
UPDATE: What I meant by "mess with the algorithm" was that if it doesn't sound great, the ideal fix would be to keep changing the rules until the algorithm itself gives me something really good, rather than modifying the output by ear. I don't always live up to the ideal though - In my recent slow algorithmic music I've had to fade some of the notes out completely to get through some hairy chord progressions.
My favourite techniques:
For slow/ambient music: using mathematical curves to control note or MIDI controller data. More details here.
For the faster stuff: Sequence morphing: using some system to produce gradual changes in a repeating sequence of notes, given predefined 'start' and 'end' sequences. I've done this by bubblesorting the sequencer steps into a different order, and also by changes of start and end points when playing little bits of a longer sequence, as Tangerine Dream used to do, but not improvised in realtime.
Gordon Last edited by Octahedra on Sun Dec 14, 2008 2:10 am; edited 2 times in total
Ok .. I thought that seeing the values being swapped in a demo might give an idea of how to use it ... anyway I imagined a sequence of random notes slowly being sorted into a sequence of ascending notes. But I've got no idea as to how to do such a thing on a G2 ...
Joined: Nov 29, 2008 Posts: 149 Location: Cheshire, UK
Audio files: 7
Posted: Thu Dec 11, 2008 7:55 pm Post subject:
kara wrote:
I do know what a bublesort is, but how does that apply to music or patches ?
Good question. As in I had to write the algorithm in software and actually try it, just to find out whether it was any good! I've uploaded an MP3 of the bubblesort morph section in my track Dark Matter, the newest to use this idea. It's the fast synth sequence that's being morphed - the easiest bit to hear is early on when the start sequence gets progressively broken up into almost random junk. It quickly comes back together at the very end.
I first compose the 'start' and 'end' sequences for the morph. For any sorting algorithm to work, both sequences have to contain the same note events but in a different order. This puts serious limits on the amount of variety you can get, which is one reason why I've only used bubblesorting a couple of times so far.
Then my cranky home-made software (not updated since 2002 and only outputs tracker .mod files! Argh.) compares the two sequences and works out the index number of where each step in the start sequence will have to move to in order to form the end sequence. So now you have a list of numbers you can just bubblesort into ascending order. In the sorting stage, every time a pair of these numbers gets swapped, the note data in the corresponding steps swaps with it, and this new morph sequence gets added to the end of the previous output.
For some reason doing the sort from right to left seemed to produce slightly better music! The sequences in Dark Matter are 32 steps long, which would have made the morph go on way too long because of the amount of sorting needed. So I threw away morph sequences from the output at regular intervals to get only as many as needed.
Gordon
dark_matter_demo.mp3
Description:
Octahedra - Dark Matter (extract featuring bubblesort as sequence morphing technique)
Joined: Aug 28, 2006 Posts: 858 Location: Guangzhou, China
Audio files: 4
Posted: Fri Dec 12, 2008 11:59 am Post subject:
A bit off topic, but the remarks on bubblesorting brought to mind a small program I was obsessed with on the Apple II when I was a kid. It did a two-dimensional bubble sort of colored blocks, ending up with these curved and tapered bands of color.
So I hacked it up in SuperCollider... basically just like I remember it
routine = Routine({
var numSwaps = 1, temp,
// a bit tricky: I want to randomize whether it swaps
// horizontally first, or vertically
// so I put h-swap and v-swap functions in an array
// then, on each iteration, choose randomly which one to do first
swaps = [{ |i, j, k|
// horizontal swap
if((matrix[i][j] > matrix[i][k])) {
matrix[i].swap(j, k);
views[i][j].refresh;
views[i][k].refresh;
numSwaps = numSwaps + 1;
};
}, { |i, j, k|
// vertical swap
if(matrix[j][i] > matrix[k][i]) {
temp = matrix[j][i];
matrix[j][i] = matrix[k][i];
matrix[k][i] = temp;
views[j][i].refresh;
views[k][i].refresh;
numSwaps = numSwaps + 1;
};
}],
// another trick: going forward always causes a bias toward the bottom right
// so, we will scan forward first, then backward
fwdBackwd = Pseq(#[do, reverseDo], inf).asStream,
scanDirection;
while { numSwaps.debug("number of swaps last pass") > 0 } {
numSwaps = 0;
scanDirection = fwdBackwd.next;
blocks.perform(scanDirection, { |i|
(blocks-1).perform(scanDirection, { |j|
swaps[#[[0, 1], [1, 0]].choose].do({ |func|
func.value(i, j, j + 1);
});
0.01.wait;
});
});
};
"done".postln;
w.front; // no matter what I'm doing, I want this to pop up
}).play(AppClock);
Joined: Nov 29, 2008 Posts: 149 Location: Cheshire, UK
Audio files: 7
Posted: Fri Dec 12, 2008 1:34 pm Post subject:
dewdrop_world wrote:
A bit off topic, but the remarks on bubblesorting brought to mind a small program I was obsessed with on the Apple II when I was a kid. It did a two-dimensional bubble sort of colored blocks, ending up with these curved and tapered bands of color.
You can use images as a source for algorithmic composition (or thinking about it the other way round, how about designing a graphic score as a work of art to look at) so how could it possibly be off topic? I really like your image by the way.
Way back in 2001 while I was first finding a way to use bubblesorting in music I also tried it for visuals (below). Somehow I've never got round to trying it again since then. When I occasionally have a go at art, some freak circuit in my brain always seems to make it come out in either a perfect square, ultra-widescreen or ultra-tall format. Somehow the conventional paper sizes just turn me off! In this case of course the sorting operation affected the shape of it.
yes hell, it doesnt transport any emotions. at least for me. a nice intellectual endeavour, but no music. *ducks*
you are right but it can be nice as background music or as a starting point for some composition.
Jan's noodles (on the G2), for example, are usually very entertaining besides being the result of amazingly smart programming.
_________________ homepage - blog - forum - youtube
Quote:
Don't die with your music still in you - Wayne Dyer
Joined: Jul 07, 2007 Posts: 2081 Location: Berks County, PA
Audio files: 90
Posted: Sat Dec 13, 2008 7:41 am Post subject:
Re: Algorithmic composition - what does everyone think?
Octahedra wrote:
I'm voting for no. 3 - I enjoy the exercise for its own sake even though I keep having to mess with the algorithm subjectively, and add non-algorithmic content, to get decent music out of it!
That would be composition then, wouldn't it?
I find encoding some of "what I would do" (were I a computer) is much more satisfying than strictly sticking with some mathematical abstraction.
The other year I worked for a while trying to use the genetic algorithm to explore accompaniment space in algorithmic improvisation, and what I found is that the space is too big, and mostly dead boring. Seeding it with "intentional algorithms" (or in AI parlance, "knowledge based methods") instead of the more general "weak methods" of AI (general search or problem solving methods) gives much more satisfying results.
So, writing intentional algorithms is basically back into the business of a human-written composition, albeit a piece of code, but there's no reason that this sort of human composition cannot be a generative, improvisational one. It sounds like what I would do, were I a computer, or, it bears some relationship to music I hear in my head. Not abstract at all. Very concrete.
I voted for 3, could have gone for 1. _________________ When the stream is deep
my wild little dog frolics,
when shallow, she drinks.
Sometimes I think my noodles to be life forms ... anyway, two examples.
I recorded these from the G2 with no treatment other than normalization and fade in/out ... usually I run such a thing for hours or days even instead of just a couple of minutes, and it will keep changing although the general character is laid down in the patch of course.
Joined: Jan 18, 2005 Posts: 4145 Location: Sweden
Audio files: 373
G2 patch files: 100
Posted: Sat Dec 13, 2008 7:16 pm Post subject:
Re: Algorithmic composition - what does everyone think?
Acoustic Interloper wrote:
That would be composition then, wouldn't it?
I wonder if we could find some legendary compositions (Bach and others) that were algorithmic in nature, though they would not call it as such since they didn't know about alogrithms. Music, in some ways, is heavily mathematical, even when you feel it in your soul.
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 270
Posted: Sat Dec 13, 2008 10:36 pm Post subject:
Here is some computer generated music that I created recently using my KNoW program. KNoW is short for "Kijjaz No Wave", named after our friend kijjaz because he made so many instrument programming contributions to the program and "No Wave" because Kassen said the music is reminiscent of the No Wave phenomenon that originated in New York and lasted from 1978 to 1992.
The program starts out making music and then you can change the music by pressing keyboard selections to randomly generate new music components. It's all based on my Boolean Sequencing technique. More music can be found on my Virb page which is here:
Joined: Nov 29, 2008 Posts: 149 Location: Cheshire, UK
Audio files: 7
Posted: Sun Dec 14, 2008 2:52 am Post subject:
Blue Hell wrote:
Sometimes I think my noodles to be life forms ... anyway, two examples.
Now I can see why you need so many LFOs and clocks in your Nord modular patch!
I like the atmosphere of your music - this is sort of an extreme version of the sound effects I use in the background while my chords are in control! Reminds me of one of my favourite ambient albums - Andrew Oudot's The Log which, if I remember, was created entirely with the Virus TI.
I like to think of myself as a non-realtime algorithm person, but I also use a few unsynced LFOs doing their own thing and making timbral variations all the time. Even though I sequence all my synth parts I still get a slightly different result on each recording take.
If you're into playing with these edgy sounds in realtime can I recommend Crusher-X... It's a granular synthesis program that completely, um, weirdifies any audio sample. A bit of a steep learning curve when you first get it, because it can so quickly destroy all recogniseable properties of the original sound! I've used it in the background for most of the tracks I've made in the last 3 years.
Joined: Nov 01, 2007 Posts: 4 Location: Austin, TX
Posted: Wed Dec 17, 2008 1:06 pm Post subject:
This is a topic that has always fascinated me...
I truly believe that music is a language that encodes form.
These forms and the evolution of the relationships between them
move us to feel things. There is a part of that mysterious process
that only the human mind can truly understand. I don't think alg
generated music and reproduce that.
So my approach to alg comp is not to replace that but to try to enhance
that process. By creating composition tools that free me of the tedious
tasks of composing so I can then think of things on a more abstract
level. So I would have to say my vote is for 1.
I have always been drawn to trying to harness computational
geometry and mapping it in different ways. You have some very
interesting ideas Gordon. I am definitely going to explore the
harmonograph. Genetic algorithms are also a great source
of varying ideas. Algorithms for parsing and generating grammars
are also interesting areas for exploration.
Joined: Feb 14, 2009 Posts: 9 Location: London, UK
Posted: Mon Feb 16, 2009 7:58 am Post subject:
Evolutionary music, at least for soul-less electronic styles, works for me, given PLENTY of time... When working on my projects (most are available at http://ccmixter.org/people/revken/automatic) I often find myself humming the tunes during the day. My favourite work ("Metro Ride", http://ccmixter.org/files/revken/8489) benefits from some human spoken word on top, just to add that dimension, and of course, the piece as a whole is constructed manually from evolved loops.
I just put the latest version online (see sig), so you can give it a go yourself (although note that the online projects are all community collaborations). _________________ Evolectronica - survival of the funkiest
For me, listening to algorithmic composition is usually an intellectual pleasure and/or challenge. Only very rarely (if ever...) does it evoke an emotional response or provide direct inspiration. Octahedras piece "Equatorial Transform" is close to invoking an emotional response with me - a rare case then (the voicings are part of it I think). In any case, algorithms in motion are always fun to hear
Joined: Nov 29, 2008 Posts: 149 Location: Cheshire, UK
Audio files: 7
Posted: Tue Feb 17, 2009 5:04 am Post subject:
DrJustice wrote:
Octahedras piece "Equatorial Transform" is close to invoking an emotional response with me - a rare case then (the voicings are part of it I think).
Thanks - glad you found it interesting I think your last sentence gets to the heart of it...
With both the Transform pieces, the algorithm just gave me all the notes. Then I slowly worked my way through the whole thing, looking for the most interesting patterns and little fragments of melody, and bringing them to the surface by choosing which synth sound, or electric violin, would play each note. A lot of the synth parts have LFOs changing the sound slowly, but these are all doing their own thing regardless - not synchronised or midi-controlled in any way.
It's always felt like an uphill struggle - wanting to make the music more algorithmic but having to stop at a certain point and just do what sounds good...
For me, listening to algorithmic composition is usually an intellectual pleasure and/or challenge. Only very rarely (if ever...) does it evoke an emotional response or provide direct inspiration.
you can not expect algorithmic music to evoke an emotional response. it's a matter of fact. _________________ homepage - blog - forum - youtube
Quote:
Don't die with your music still in you - Wayne Dyer
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum