NetLogo banner

NetLogo Publications
Contact Us

Modeling Commons

Beginners Interactive NetLogo Dictionary (BIND)
NetLogo Dictionary

User Manuals:
Farsi / Persian


NetLogo User Community Models

(back to the NetLogo User Community Models)

[screen shot]

If clicking does not initiate a download, try right clicking or control clicking and choosing "Save" or "Download".(The run link is disabled because this model uses extensions.)

This model of netlogo, try to explain the complexity in music with the formulation
of two type of modeling, ODE and cellular automata.

The idea behind this, is that, the more complex the function we get
with the parameters in the ODE, or the more complex visualization
we get with the automata, we should listen to a more complex "song".

Simplicity (monotone): that refers to the monotony of the rythm and/or the low variety of notes

Chaos (random): to this we refer to the abrupt change of musical notes that can also have an unharmonious rhythm

We think, that the complexity in music, is usally found, in between simplicity
and chaos.

For the ODE itself, it use a base function as a sine, and three other parameters in it, frequency, repetition, and amplitude.

* Frequency, makes the sine function repeat more

* Amplitude, makes the function increase o decrease respect to the value

* There is another parameter (Maximum),that is used to put a limit to the plot

* Repetition, makes the whole function after the X point. It should be less than
the maximum, in that way, the function should repeat it self after the X point.

* Noise, is a parameter to make the base function, more random. It has a big sensivity,
and usually after 7 it mess up the whole function.

Then, this function is cutted every four numbers, and then a mode is calculated. In
this way, there are less notes, but the sound is more intersting and less monotone.

An automata is a algorithm that is based on simple rules. When
this rules are repited multiple times, it usually create intersting
figures. You can see the rules used with the buton "show rules". There are
multiple rules and combinations of rule.

This model in particular use the last row of the automata, because
it usually is the most complex row of the automata itself
Then, this row is cutted every ten numbers, and then a mode is calculated. In
this way, there are less notes, but the sound is more intersting and less monotone.

First thing to do is initialize the model, you can do it press the button "initialize", then you have to press the button ("Plot Figure") to see the graphic of the model, you can hear the song pressing the button ("Play Song") once the graph is completed.

You can check on or off, for a Dynamic Rythm. if this is on, when the pitch is high, it will play the note faster. When the pitch is low, it will play the note slower. If
it is off, it will play a monotone rythm.


In first place you have to press the button "setup single" or "setup random" in case you want a more random visualization.
When you use the "setup single" it will be an organizated visualization, and it always
be the same.
When you use the "setup random", there is a "density" slider, to get different random patterns based on rules.
You can customize your setting selecting different "Rules Switches" or use the slider to get a rule by the number.
Once you select your setting, if you click on the "go" button you will see in the screen the visualization of the cellular automata, and once its finished, you can click on "Play Song" to listen to the song that is made, by the last row of the visualization.
There is another option that is "auto continue", this will make the visualization again
and again,unless the option is in "off". This should be in off, for the model to be played in a correct way.

Once you click the "Play Song" button for the ODE model, or the automata model, you can see in the netlogo console an array of numbers, this will show the music pattern that will be played

Sometimes, when the automata is played, the graph in the ODE, will be messed up. This
is usually fixed, by making another plot.

Sometimes, if the pitch is really high, it will messup the model itself, is better
to quit netlogo, and open it again.

you can change the amplitude, the frequency, the maximun value that can take the equation and the repetition to see how they affect the graphic, and you can change the value of repetition, that allows you repeat the ecuation at certain point, it is suggested to put a low maximum, to make song shorter.

Another intersting thing, is to see how the randomeness can affect the complexity of a monotone function, and see if it can get complex insted of just chaotic.

* automata rule 131

* automata rule 135

* automata rule 188 setup random density 95%

* automata model rule 105 setup random density 71%

* automata model rule 102 setup random density 15%

* automata model rule 181 setup random density 42%

To extend the model there are two important features that could be implemented:

* Trying to add more instruments, and then mix them together to get a more interesting music, and analyse how the complexity change.

* For the ODE modeling, add a feature that can change the function to different types, in order to be able to analyse the complexity in different settings and with more intersting changes

* Use chords instead of rhythm , to see how in can be percived in different ways the musical complexity.

One of the features that this model use, is the extension sound that allow us to make music, and with it, make the song with the ODE and cellular automata


The base model for cellular automata was taken from netlogo examples (computer science, cellular automata) in specific CA 1D Elementary

* Wilensky, U. (1999). NetLogo. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

* Instrumentational complexity of music genres and why simplicity sells
url :

* Wolfram, S. 1986. Theory and Applications of Cellular Automata: Including Selected Papers 1983-1986. World Scientific Publishing Co., Inc., River Edge, NJ.
* Wolfram, S. 2002. A New Kind of Science. Wolfram Media Inc. Champaign, IL

(back to the NetLogo User Community Models)