Вы находитесь на странице: 1из 11

28/11/2017 Algorithmic Composer: OpenMusic and Chaos - OMChaos library

More Next Blog» sophocha@gmail.com Dashboard Sign Out

ALGORITHMIC COMPOSER

Getting Started with Algorithmic Composition

SUNDAY, 25 APRIL 2010 BLOG ARCHIVE

OpenMusic and Chaos - OMChaos library ► 2016 (5)

Our last few Algorithmic Composition posts have featured OpenMusic ► 2011 (7)
tutorials. We're continuing our look at OpenMusic today by looking at ▼ 2010 (25)
chaos, using the OMChaos library. ► May (7)
▼ April (9)
Random Walks in Max and
PureData
OpenMusic and Chaos -
OMChaos library
OpenMusic Markov Chains and
omlea
OpenMusic and CSound -
om2csound library

The OpenMusic OMalea library


- Random Walk
Probabilities in OpenMusic
using OMalea

Chaos theory is a field of mathematics where dynamic systems are very Piano Phase - Max
sensitive to initial conditions. The famous 'butterfly effect' states that OpenMusic 6.2
small differences can lead to large variations later: the small flap of a Keykit | Algorithmic
butterfly's wings may cause effects that later alter the path of a tornado. Composition Software

http://www.algorithmiccomposer.com/2010/04/algorithmic-composition-openmusic-and_25.html 1/11
28/11/2017 Algorithmic Composer: OpenMusic and Chaos - OMChaos library

Many of our previous algorithmic composition tutorials have used ► March (9)
random elements (e.g. probabilities and Markov chains). Although
► 2009 (1)
Chaos might appear random, it's important to note that it is
deterministic: if you run the algorithm again with exactly the same
input it will produce the same output.
FOLLOWERS

Today we'll start to look at using some Chaos algorithms to generate Followers (45) Next
algorithmic music.

OpenMusic and Chaos - The OMChaos library


1. Make sure that OMChaos has been enabled in the preferences of
OpenMusic.

Follow

POPULAR POSTS

Algorithmic Composition:
Markov Chains in
PureData

Algorithmic Composition:
Markov Chains in Max
MSP
2. Create a new patch in your workspace. OMChaos has 4 categories of
functions: orbitals, IFS, fractus and UTILS.
gorithmic Composition with timbres:
Klangfarbenmelodie

http://www.algorithmiccomposer.com/2010/04/algorithmic-composition-openmusic-and_25.html 2/11
28/11/2017 Algorithmic Composer: OpenMusic and Chaos - OMChaos library

Tone Rows - PureData and


3. The OMChaos orbitals menu features the core of the library. Each of Max
these orbitals functions is a different chaos algorithm. Each of them
shares the important chaos algorithm characteristic: small changes in
initial conditions can lead to large changes later.
Chaos in Max and PureData

Algorithmic Composition |
OpenMusic Rhythm Trees
Tutorial Part 1

LABELS

algorithmic composition (31)


beginners (6)
chaos (2)
csound (1)
interpolation (1)
4. We'll start by using the KAOSN function. intro (3)
markov chains (6)
max (13)
maxmsp (13)
omalea (4)
omchaos (1)

http://www.algorithmiccomposer.com/2010/04/algorithmic-composition-openmusic-and_25.html 3/11
28/11/2017 Algorithmic Composer: OpenMusic and Chaos - OMChaos library

open music (12)


openmusic (12)
pd (17)
probabilities (5)
puredata (16)
rhythm (2)
5. This OpenMusic function is a form of a very common chaos rhythm trees (3)
algorithm fn+1=cfn(1-fn). That's to say: to get the next value of f, software (3)
multiply the current values of c, f and (1 - f). This formula involves only sonification (1)
1 subtraction and two multiplies but it leads to chaotic behaviour. In timbre (1)
this graph you can see with values of c below 3 the behaviour is very
tone rows (3)
predicatable. However if c > 3.75 then very small changes in f lead to
tutorial (19)
very large changes later on:

TWITTER UPDATES 2.2.1:


FEEDWITTER

SUBSCRIBE NOW:

Subscribe in a reader
6. Here we've used 24 values for .95 for f 3.75 for c and set the length to
be 24. Evaluating the KAOSN function will produce a series of 24
values based on these input parameters. Each time its evaluated it will
produce the same numbers. If we change the input values to f 3.75 and
c .94999, the numbers generated will start the same but slowly deviate
as the sequence grows in length: the butterfly effect, small changes in
initial conditions lead to large changes later on.

http://www.algorithmiccomposer.com/2010/04/algorithmic-composition-openmusic-and_25.html 4/11
28/11/2017 Algorithmic Composer: OpenMusic and Chaos - OMChaos library

7. We'll use this chaos function to generate pitches between MIDI note
48 and 72. The output of the kaosn function is a series of floating point
numbers between 0 and 1. To get the number in the range we want add:

an om* function and 24, giving our series a range of 0 to 24


an om+ function and 48 giving our series a range of 48 to 72
an om* function and 100, to change MIDI notes into the
MIDIcents pitch representation OpenMusic uses
The om-round function rounds these numbers into integers

http://www.algorithmiccomposer.com/2010/04/algorithmic-composition-openmusic-and_25.html 5/11
28/11/2017 Algorithmic Composer: OpenMusic and Chaos - OMChaos library

8. In this patch we'll have two voices with slightly different initial
conditions for our chaos function. They will start playing identical
notes and then slowly start to deviate. We'll append a reversed copy of
the list, so we'll have a musical palindrome. To do this we can add cons
and reverse functions. Reverse will reverse our original pitch list and
cons will add this reverse pitch list to the end of our original pitch list.
If you evaluate the cons function you'll see it's created list of lists (two
sets of parentheses), we use the flat function here to flatten the list into
a single set of parentheses:

http://www.algorithmiccomposer.com/2010/04/algorithmic-composition-openmusic-and_25.html 6/11
28/11/2017 Algorithmic Composer: OpenMusic and Chaos - OMChaos library

9. Connect the output of voice, to the chords input of a voice.

10. We now need to duplicate what we have so far so we can create


another set of pitches with slightly a different initial for our KAOSN
function. Select all [CMD A on Mac, CTRL A on PC] and duplicate
[CMD D on Mac, CTRL D on PC]. Change the second input to one your
KAOSN functions to .94999, so that the two sections have slightly
different initial conditions.

11. We also need to tell OpenMusic what rhythm to use for our melody.
The voice function uses Rhythm Trees as its rhythmic representation.
Rhythm trees are beyond the scope of this algorithmic composition
post, but we will create some algorithmic music with rhythm trees in a
future algorithmic composition tutorial. For now add in a repeat-n
function and a mktree function. In this example we'll create 48 32nd
notes:

http://www.algorithmiccomposer.com/2010/04/algorithmic-composition-openmusic-and_25.html 7/11
28/11/2017 Algorithmic Composer: OpenMusic and Chaos - OMChaos library

10. Your patch should now look something like this (click on the image
for a larger version):

11. To evaluate each voice press v, to play the voice press p to send it to
a MIDI port. If you haven't done this already you can set up your MIDI
outputs in OpenMusic preferences.

12. To hear both voices at the same time we need to create a list of both
voices add in a poly function.

http://www.algorithmiccomposer.com/2010/04/algorithmic-composition-openmusic-and_25.html 8/11
28/11/2017 Algorithmic Composer: OpenMusic and Chaos - OMChaos library

13. We can now hear both voices starting with the same pitches, slowly
diverging and the converging back to the same pitches.

14. We'll be looking at rhythm trees in more detail in a future post, but
for now to make the rhythms more interesting we'll use the nth-
random function to choose randomly from a list of possible rhythms:
(1/32 1/8 -1/16 -1/4 1/16) negative numbers represent rests. Repeat-n
will generate a hundred of the randomly chosen rhythms:

15. Your final patch should look like something like this (I've changed
the length of the sequence for both KAOSN functions to 50, giving us a

http://www.algorithmiccomposer.com/2010/04/algorithmic-composition-openmusic-and_25.html 9/11
28/11/2017 Algorithmic Composer: OpenMusic and Chaos - OMChaos library

melody 100 notes long when the reversed melody is added to the end).
Click on the image for a larger version.

OpenMusic OMChaos Library Tutorial Summary


We've created an OpenMusic patch using the OMChaos library to
generate chaotic pitches. Two voices have been used, with slightly
different initial conditions the melodies diverge. Appending a reverse
version of the melody on the end gives us a musical palindrome.

We then introduced the concept of rhythm trees in OpenMusic and


randomly selected some rhythms from a given list.

Subscribe to the RSS feed and tune back regularly for more algorithmic
composition tutorials, posts and reviews using Common Music,
OpenMusic, PureData, MaxMSP and other algorithmic composition
software.

http://www.algorithmiccomposer.com/2010/04/algorithmic-composition-openmusic-and_25.html 10/11
28/11/2017 Algorithmic Composer: OpenMusic and Chaos - OMChaos library

POSTED BY ACUMA AT 20:10


LABELS: ALGORITHMIC COMPOSITIO N, CHAOS, OMCHAOS, OPEN MUSIC,
OPENMUSIC, TUTORIAL

NO COMMENTS:

POST A COMMENT

Enter your comment...

Comment as: Unknown (Goo Sign out

Publish Preview Notify me

Newer Post Home Older Post

SEARCH THIS BLOG

Search

http://www.algorithmiccomposer.com/2010/04/algorithmic-composition-openmusic-and_25.html 11/11

Вам также может понравиться