Beginners Interactive NetLogo Dictionary (BIND)
Farsi / Persian
NetLogo Models Library:
Note: If you download the NetLogo application, every model in the Models Library is included.
This model shows one way turtles can make interesting and varied sounds, or if you like, music. It uses some simple physics to make "machines" that twist, spin, turn, twitch, and bounce. When a part of the machine touches a wall, ceiling, or floor, it makes a sound. The pitch of the sound depends on the location of the touch.
You can start with a standard machine, or generate a random one. You can change and build machines yourself, by changing the characteristics of each part. You can sit back and let the machines play themselves, or you can use the mouse to move them around to control the sound yourself.
The machines are made up of levers. Levers can be different sizes and are pulled down by gravity (in proportion to their size) and subject to friction.
Each lever has one or two "hooks" to connect it to adjacent levers. Each lever rather simple-mindedly tries to move and rotate to keep its hooks attached (or at least pointing towards) its neighbors' hooks.
Some levers have additional constraints. A lever can be fixed in position so it can't move. It can also rotate, as if powered by a motor.
The rules aren't perfect; for example, sometimes the levers separate. Nonetheless, the behavior is often surprisingly realistic, and is rich enough to generate interesting motion which generates interesting sounds.
Press one of the SETUP... buttons to create a machine. If you want, change NUM-LEVERS first to get more or fewer levers.
Press GO to start the machine going. You should start hearing sounds, although if your machine never touches the wall (or ceiling or floor), you won't hear anything.
You can use the mouse to select a lever by clicking on it, or to move a lever by dragging it. The selected lever has a circle around it.
Once you have selected a lever, a variety of controls on the left let you change that lever's properties. They are not described in detail here; play with him and see for yourself what they do.
Some parameters affecting the entire system are on the bottom left and the right. F is friction, G is gravity. There are also controls for spin.
You can use the INSTRUMENT slider to pick a different musical instrument for the levers to play.
If you make a machine you especially like, you can use Export World and Import World on the File menu to save it out and load it back in again.
The simple rules followed by the levers produce some quite realistic-looking behavior.
Some machines don't do anything. Other machines make simple, repetitive motions. And others are wildly chaotic.
Try all of the different SETUP buttons.
Try all of the lever controls on the left.
Explore the effect of the parameters on the right.
See if you can make machines which are somewhat repetitive, but also somewhat unpredictable and chaotic. Sometimes these make the most pleasing "music".
Using the command center, tell the turtles to put their pens down (using the
pen-down command, abbreviated
pd). This generates some pleasing patterns. Use
cd) to start a new drawing.
There are endless possibilities for how the same basic physics engine could be used to generate sound. The levers could:
And so on.
How "normal" and "musical" can you make the model sound? Currently the rules of the model aren't based on scales or tonality; by choosing pitches more carefully, you might be able to produce music which is less strange, more like music composed by humans. You could also try to produce more regular rhythms by timing sounds to coincide with a regular beat.
Or, you could take the opposite approach, and see how wild, different, and unusual can you make the sounds. Make something that doesn't sound like anything you've ever heard before!
The model uses NetLogo's sound extension. The sound extension is described in the Sound section of the NetLogo User Manual.
This model is a streamlined variant of the Machines 2005 model created and submitted to the NetLogo User Community Models repository by James Steiner. Machines 2005 is available from http://ccl.northwestern.edu/netlogo/models/community/machines-2005.
Thanks to James for creating an earlier version which was silent; Seth Tisue for first adding sound to it; and James again for his further improvements, and for releasing the model under a Creative Commons License.
If you mention this model or the NetLogo software in a publication, we ask that you include the citations below.
For the model itself:
Please cite the NetLogo software as:
Copyright 2005 Uri Wilensky. Includes code by James P. Steiner.
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/2.5/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.