Csound Csound-dev Csound-tekno Search About

Re: Algorithmic composition - the simplest model

Date2006-02-10 15:47
FromMichael Gogins
SubjectRe: Algorithmic composition - the simplest model
There are two simple systems that produce music that I find interesting.

The first is the differential canon or "phase music" originating in early New York minimalism. In this case two or more copies of the same eighth or sixteenth note motive start on the same beat. Each successive copy of the motive is an eighth or sixteenth or quarter note longer than the previous copy, and may also be transposed by a sixth, fifth, or octave, so as they repeat they go out of phase so that deterministic, yet to the unaided ear unpredictable, combinations occur in canon. This is a fairly common technique and, of course, need not be implemented by an algorithm. However, using a program, one can generate such pieces with complete precision and more elaboration, and also interactively experiment with minor changes in motive, timing, tempo, and instrumentation to fine-tune a piece.

The second is chaotic dynamical systems (see Julien Sprott's web site). By tuning the parameters of, say, a four-dimensional polynomial dynamical system one can find cycles of chaotic or almost chaotic orbits that produce musically interesting results. It is possible with systems of higher dimension to find systems that phase back and forth between rather different musical textures, providing a degree of high-level structure. I find it necessary to generate hundreds or thousands of different pieces to find a parameter set that will produce this behavior but I have made some good stuff this way. The StrangeAttractor class in CsoundVST implements this system, and there's an example (don't know if it still actually runs) in the Csound5 examples directory.

In both cases, the phenomenon of computational irreducibility is exhibited. Irreducible systems are those whose evolution cannot be intuitively predicted even if one has a complete understanding of the initial state and behavioral rules of the system. You have to actually run the system to see how it will evolve. This gets at the heart of why algorithmic composition is musically interesting. Irreducible systems are not random, but they are too complex to grasp at first sight. The two systems above not only are irreducible, but they are simple enough to produce many variations by quickly changing a few parameters. Simple yet complex -- that means, simple in construction yet complex in behavior. 

Regards,
Mike

-----Original Message-----
>From: Michael Mossey 
>Sent: Feb 9, 2006 10:50 PM
>To: csound@lists.bath.ac.uk
>Subject: [Csnd] Algorithmic composition - the simplest model
>
>I'm interested in the question: if you were to reduce music to the
>simplest form which still interested you, what would it be?
>
>One can ask this about any kind of composition, but since I'm interested
>in researching algorithmic composition, it seems like a good way to
>approach it.. that is, to research music in its simplest form.
>
>What would that form be for you? Would, for example, a melody with no
>accompaniment be a basic model for music? Would that contain enough of the
>essential "features" of music that it would be a worthy testbed for ideas?
>
>I have "Composing Music With Computers" by Miranda, which discusses some
>simple compositional systems.. ie., compositional programs which produce
>music in a simple form. (They have to be simple because the book is a
>survey of techniques.. I think it's great actually, but you do have to
>find more sources if you want to understand anything in depth.)
>
>I've noticed that most of the example composition programs or systems he
>describes don't appeal to me as *music*.
>
>My favorite music resonates with living movement.. dance, for example, or
>any kind of animal movement, or breathing. The thing about animals is that
>they don't move in the same way over and over.. there is some variety.
>Likewise, I like a sense of a "living pulse" to music. It can be a regular
>pulse, but just not like a drum machine (bumper sticker: "drum machines
>have no soul"). Or better, it would be an irregular pulse, perhaps one
>that speeds up and slows down in a cycle about the same length as a
>breath. (Our heartbeats do that.) And it would vary in dynamics.
>
>In essence, good music for me acts as an expression of a living being in
>the moment of creating that music.
>
>If you look at the simple examples in Miranda's book, a lot of them are
>about composing a single line melody. And rhythm? Some of the methods he
>presents use all quarters (i.e., all the same length notes). Other
>examples have some notes of different durations, but everything is played
>in drum-machine-like precision through midi.
>
>For my tastes, the simplest model of interesting music is beating on a
>drum, with a somewhat free and irregular pulse, and lots of dynamic
>variation. Just a single drum. But the dynamic variation and living pulse
>would be key.
>
>What's key for you?
>
>Mike
>
>
>
>--
>Send bugs reports to this list.
>To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk


Date2006-02-10 22:10
FromAnthony Kozar
SubjectRe: Algorithmic composition - the simplest model
I'm glad that Michael (Gogins) mentioned the phase music of the early
minimalists.  This is the kind of simple algorithmic system that I was
thinking of when Michael (Mossey) asked his question.

In particular, I really enjoy a somewhat simpler process that was used by
Brian Eno in some of his ambient pieces (see for example, "2/2" from
_Music_for_Airports_).  He was (almost certainly) directly inspired by
pieces by Steve Reich such as "It's Gonna Rain" and "Piano Phase".  The
basic process of "2/2" is that he recorded one note each on the beginning of
a set of analog tape fragments.  Each fragment was cut to a different length
and looped.  All were played back simultaneously so that the relationships
of the notes constantly shifted in their relative "phases."

Of course this technique is even easier to implement with a digital music
system.  A number of my own compositions have used this process ("Dorian
Gray", "Old Man and Stones", "one", "three", and some recent unreleased
music).

This is probably the simplest algorithmic system that I really enjoy.

Michael Gogins wrote on 2/10/06 10:47 AM:

> The first is the differential canon or "phase music" originating in early New
> York minimalism. In this case two or more copies of the same eighth or
> sixteenth note motive start on the same beat. Each successive copy of the
> motive is an eighth or sixteenth or quarter note longer than the previous
> copy, and may also be transposed by a sixth, fifth, or octave, so as they
> repeat they go out of phase so that deterministic, yet to the unaided ear
> unpredictable, combinations occur in canon.
> [...]

I am not really familiar with this exact implementation of the phase music
idea.  In particular, the part about "each successive copy of the
motive is an eighth or sixteenth or quarter note longer".  Does this mean
that each voice has a different length motive?  Or does it mean that the
length of the motive changes within a single voice each time that it is
repeated?  Where can I read more about pieces that use this process?
(Thanks).

> [...]
> This gets at the heart of why algorithmic composition is musically
> interesting. Irreducible systems are not random, but they are too complex to
> grasp at first sight.  [...]  Simple yet complex -- that means, simple in
> construction yet complex in behavior.

This very nicely explains exactly what I enjoy about algorithmic music
systems.  I am seldom satisfied with processes that rely too much on
randomness.  I like those processes (such as the Eno one) that are extremely
simple to comprehend and yet produce results whose details cannot be
anticipated in advance -- thus making them interesting to listen to.

BTW, Michael (Gogins), I really enjoy some of your music such as
"Lindenmayer Music 21" and "csound[2005-03-06][03.38.19].py".  I would be
very interested in hearing a great deal more music like this if it is
available.

Great discussion!  Thanks!

Anthony Kozar
anthonykozar AT sbcglobal DOT net

Date2006-02-12 22:15
FromOeyvind Brandtsegg
SubjectRe: Algorithmic composition - the simplest model
I do not think there is a "simplest" model for algorithmic composition that will actually produce satisfying music. Composing music is a complex operation, where a great many factors are considered, some more clearly and intellectually than others.

But, in response to the "beating of a drum" idea Michael (Mossey) mentioned, I would like to point to a simple method for generating complex rhythms.
If you use a sine waveform, letting a trigger go off every time the wave goes from positive to negative (on zero crossing), you would get a metronomic rhythm trigger.
One nice thing about this is that it (at least conceptually) takes into account the "motion required to hit the drum", e.g. the wave has to go back to positive to be able to do another zero crossing. This resembles a simple model of a hand hitting a drum.
I you use FM on this sine wave, you will get more and more complex rhythms the more modulation index you use. If using phase modulation instead of FM, you can keep the basic tempo steady while modulating.
Futher on, you might use the same concept to make rhythms out of sound segments (played very slowly). This will make very chaotic rhythms from noisy sounds, and regular beats out of harmonic sounds. For bass drum beats that have a noisy attack and a clear pitch following the attack, you get a chaotic to steady evolution in the output.
Still, this is a simple idea, and without connecting it to some system with a musical knowledge of "what is this piece going to sound like, and what are the other simultaneous voices doing", I think the output will be interesting but rudimentary.

I am working on a system now, where I will try to build in som sort of musical knowledge. I do not propose that my new system will be the answers to anyone's prayers but my own. I might have mentioned this setup before on this list.
My basic thought is to use a "pool-rule" setup, where one algorithm generates a set of beleivable candidates (a pool) for the next value, then these candidates are filtered and weighted by applying rules. The rules might simply be "prefer ascending pitches", or in more complex cases they might say"try to keep all simultaneous voices withing the notes of a certain chord, while maintaining smooth voice leading, prefer fast rhythms, and prefer rhythm attacks that are not time-simultaneous with the other simultaneoulsy sounding voices" or something like that. The previous sentence will of course be split into separate rules, and the rules can be weighted agains each other. Sometimes rules will conflict, but that does not matter (in real life they do so too...), the weighting of the rules and the pool of beleviable candidates will take care that there is always at least one ok candidate for t
 he next value.
The pool of beleviable candidates might be generated by means for a markov process, with a dynamic order, so that one can use e.g. 3rd order for a fairly "tight" markov pool, but still fall back to 2nd, 1st or even zeroeth order if the system finds that the criteria is too tightly set to find viable candidates for the next value.

Oeyvind

Date2006-02-12 22:30
From"Michael Mossey"
SubjectRe: Algorithmic composition - the simplest model

> I do not think there is a "simplest" model for algorithmic composition
> that will actually produce satisfying music. Composing music is a complex
> operation, where a great many factors are considered, some more clearly
> and intellectually than others.

Hi Oeyvind,

Thanks for the response. Let me point out that I wasn't really talking
about the simplest algorithm, but rather the simplest model for music
itself.

I.e., most music has counterpoint, melody, rhythm, dynamics, harmony,
articulartion, etc. What can we discard and still have music?

Personally, I need rhythm that is "alive" (not purely metronomic) and
dynamics. But that's it! Just beating on a drum.

I enjoy pieces that are single melodies. But they need articulation,
lively rhythm, and dynamics for me to actually enjoy them. So IOW a melody
has eveything beating on a drum has, with the addition of pitch. So it is
more complicated.

>
> But, in response to the "beating of a drum" idea Michael (Mossey)
> mentioned, I would like to point to a simple method for generating complex
> rhythms.
> If you use a sine waveform, letting a trigger go off every time the wave
> goes from positive to negative (on zero crossing), you would get a
> metronomic rhythm trigger.
> One nice thing about this is that it (at least conceptually) takes into
> account the "motion required to hit the drum", e.g. the wave has to go
> back to positive to be able to do another zero crossing. This resembles a
> simple model of a hand hitting a drum.
> I you use FM on this sine wave, you will get more and more complex rhythms
> the more modulation index you use. If using phase modulation instead of
> FM, you can keep the basic tempo steady while modulating.
> Futher on, you might use the same concept to make rhythms out of sound
> segments (played very slowly). This will make very chaotic rhythms from
> noisy sounds, and regular beats out of harmonic sounds. For bass drum
> beats that have a noisy attack and a clear pitch following the attack, you
> get a chaotic to steady evolution in the output.
> Still, this is a simple idea, and without connecting it to some system
> with a musical knowledge of "what is this piece going to sound like, and
> what are the other simultaneous voices doing", I think the output will be
> interesting but rudimentary.

Interesting idea.

>
> I am working on a system now, where I will try to build in som sort of
> musical knowledge. I do not propose that my new system will be the answers
> to anyone's prayers but my own. I might have mentioned this setup before
> on this list.
> My basic thought is to use a "pool-rule" setup, where one algorithm
> generates a set of beleivable candidates (a pool) for the next value, then
> these candidates are filtered and weighted by applying rules. The rules
> might simply be "prefer ascending pitches", or in more complex cases they
> might say"try to keep all simultaneous voices withing the notes of a
> certain chord, while maintaining smooth voice leading, prefer fast
> rhythms, and prefer rhythm attacks that are not time-simultaneous with the
> other simultaneoulsy sounding voices" or something like that. The previous
> sentence will of course be split into separate rules, and the rules can be
> weighted agains each other. Sometimes rules will conflict, but that does
> not matter (in real life they do so too...), the weighting of the rules
> and the pool of beleviable candidates will take care that there is always
> at least one ok candidate for the next value.
> The pool of beleviable candidates might be generated by means for a markov
> process, with a dynamic order, so that one can use e.g. 3rd order for a
> fairly "tight" markov pool, but still fall back to 2nd, 1st or even
> zeroeth order if the system finds that the criteria is too tightly set to
> find viable candidates for the next value.
>
> Oeyvind
>

Sounds like a fascinating idea. I've noticed that some algorithms for
creating music are imitative of what a human composer would do (would you
say this describes yours?) and some are purely mathematical (I think M.
Gogins is more interested in this type).

Best,
Mike

Date2006-02-13 14:02
FromOeyvind Brandtsegg
SubjectRe: Algorithmic composition - the simplest model
This is an interesting discussion.

I think that a model for music itself, and an algorithm for telling a computer how to make music is somehow two sides of the same coin.

As for "making it come alive", I think there's a lot to be gained from looking at music performance research. We humans do make it come alive when we play it, and examinimg what it is we do might give us more of a direction towards telling computers how to do it. Of course, a human performance on an acoustic instrument is complex beyond modeling in most cases. Still, some algorithmic process or "rule set" for phrasing and performance might give computer music modeling a touch of "being alive".

I do look for algorithms that imitate some of the behaviour a human composer or performer might do. But not limited to what a human might (be able to) do. For me, the "human approach" lends som kind of familiar logic to the music, so that when something does not sound right, I sit down and think about how I would have played this if I was to play it. 
I use purely mathematical algorithms for inspiration when I look for something different/new, but I seldom use them for large parts of a piece. But, sometimes one might stumble across an algorithm and think" hey, this works exactly the way I think about rhythm", and then it's easier to put it into a musical context.


Oeyvind

Date2006-02-13 14:45
From"Dale Stewart"
SubjectRe: Algorithmic composition - the simplest model
I see a lot of similar things being said in this thread, so I am going to
throw something completely different into the mix to see what happens.  

Basically, I see music as a form of communication.  Communication is simply
transfer of information from a source to a destination across a channel.
However, there are many forms of communication, so it is important to
determine what makes music distinct from other forms.  It may be useful to
start with the fundamental principles of information theory and build on
that, both for the algorithmic composition model, and for a solid definition
of music that encompasses all the "prior art".  Here is a link that may be
of use:

http://cm.bell-labs.com/cm/ms/what/shannonday/paper.html

Personally, I see one distinction in music as a form of communication - it
tends to speak to the emotions of the listener more heavily than the
intellect, although not exclusively so.  It certainly takes a great deal of
intellect to compose, play, and analyze.  It also seems to be a more direct
communication form than speech, for example, as people will listen and
respond to music in ways that pure speech does not inspire.  

Anyway, looking at the information theory model for music, I think the more
information-rich a piece of music is, the more "alive" it will typically
seem, although I imagine that if too much information is involved, it will
not be perceived as musical either, depending on the sophistication of the
listener.

This is just a starting point, but I thought I should throw this in to see
if anyone is interested in taking the discussion in this direction.

Thanks,
Dale

-----Original Message-----
From: Oeyvind Brandtsegg [mailto:obrandts@online.no] 
Sent: Monday, February 13, 2006 8:03 AM
To: csound@lists.bath.ac.uk
Subject: Re: [Csnd] Algorithmic composition - the simplest model

This is an interesting discussion.

I think that a model for music itself, and an algorithm for telling a
computer how to make music is somehow two sides of the same coin.

As for "making it come alive", I think there's a lot to be gained from
looking at music performance research. We humans do make it come alive when
we play it, and examinimg what it is we do might give us more of a direction
towards telling computers how to do it. Of course, a human performance on an
acoustic instrument is complex beyond modeling in most cases. Still, some
algorithmic process or "rule set" for phrasing and performance might give
computer music modeling a touch of "being alive".

I do look for algorithms that imitate some of the behaviour a human composer
or performer might do. But not limited to what a human might (be able to)
do. For me, the "human approach" lends som kind of familiar logic to the
music, so that when something does not sound right, I sit down and think
about how I would have played this if I was to play it. 
I use purely mathematical algorithms for inspiration when I look for
something different/new, but I seldom use them for large parts of a piece.
But, sometimes one might stumble across an algorithm and think" hey, this
works exactly the way I think about rhythm", and then it's easier to put it
into a musical context.


Oeyvind

Date2006-02-13 16:03
From
SubjectRe: Algorithmic composition - the simplest model
I too am enjoying everyone's thoughts on this. 

For me algorithmic composition begins with having a clear understanding of
what makes music "music" for me. That in itself is the main tool we have as
composers and it is a lifetime in development. Knowledge of our own voice
and how to work with it is key.

When composing I begin with constraints using whatever criteria I have
chosen to work with for a given composition. As the computer begins giving
me feedback I listen for a gem, a pearl in the onion so to speak, for the
little spark of life within the sound files I am rendering. When I find such
a section I analyze the code and find what is causing the desirable output
and then begin refining my constrains to bring it out and develop it. That
is how I make (or better allow) the music "come alive". 

I find this process to be very similar to sculpting where you have a big
block of marble and look for the being that is living inside. Then you
simply carve away what is keeping it from being seen.

BTW, I have posted an mp3 of a new algorithmic composition on my web site on
the mp3 page. It is the one at the top of the page titled "Release!".
Comments are always welcomed.

Michael
www.perceptionfactory.com



> -----Original Message-----
> From: Oeyvind Brandtsegg [mailto:obrandts@online.no]
> Sent: Monday, February 13, 2006 9:03 AM
> To: csound@lists.bath.ac.uk
> Subject: Re: [Csnd] Algorithmic composition - the simplest model
> 
> This is an interesting discussion.
> 
> I think that a model for music itself, and an algorithm for telling a
> computer how to make music is somehow two sides of the same coin.
> 
> As for "making it come alive", I think there's a lot to be gained from
> looking at music performance research. We humans do make it come alive
> when we play it, and examinimg what it is we do might give us more of a
> direction towards telling computers how to do it. Of course, a human
> performance on an acoustic instrument is complex beyond modeling in most
> cases. Still, some algorithmic process or "rule set" for phrasing and
> performance might give computer music modeling a touch of "being alive".
> 
> I do look for algorithms that imitate some of the behaviour a human
> composer or performer might do. But not limited to what a human might (be
> able to) do. For me, the "human approach" lends som kind of familiar logic
> to the music, so that when something does not sound right, I sit down and
> think about how I would have played this if I was to play it.
> I use purely mathematical algorithms for inspiration when I look for
> something different/new, but I seldom use them for large parts of a piece.
> But, sometimes one might stumble across an algorithm and think" hey, this
> works exactly the way I think about rhythm", and then it's easier to put
> it into a musical context.
> 
> 
> Oeyvind
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.859 / Virus Database: 585 - Release Date: 2/14/2005
> 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.859 / Virus Database: 585 - Release Date: 2/14/2005