spectrum-analyzer-vis-fake


Information

Created with NetLogo version NetLogo 3.1.1
Running with NetLogoLite.jar version 314.


WHAT IS IT?


-------
This model produces a visual display akin to the audio spectrum analyzer visualizations that come with some popular music player software. This model, of course, has no sound input, just random turtle movement, yet when run while the right kind of music is playing (techno and other "busy" music especially), the minds gift for pattern matching tends to connect the random visual changes with the timed music changes, giving the illusion that the display is actually responding to the music.

Procedures

NetLogo Version: NetLogo 3.1.1

breed [ values value ]
breed [ readers reader ]

readers-own
[ vcount 
  column
]

patches-own
[ ccolor ]

to setup
   ca
   ask patches [ set pcolor black set ccolor 15 + 10 * int (((pxcor - min-pxcor) / world-width) * 13) ]
   cct-values 100
   [ set shape "squared"
     
     setxy random-pxcor random-pycor
     set heading random 360
   ]
   ask patches with [ pycor = min-pycor ]
   [ sprout 1
     [ set breed readers
       set shape "circle"

       set column patches with [ pxcor = pxcor-of myself ]
     ]
   ]
end

to go
   every ( 1 / 60 )
   [ no-display
     ask values
     [ rt -10 + random-float 20
       jump .05
     ]
     ask readers
     [ set vcount count values with [ pxcor = pxcor-of myself ]
     ]
     let maxv max values-from readers [ vcount ]
     ask readers
     [ set vcount min-pycor + (world-height * (vcount / maxv)) 
       set size world-height * .01 * vcount
       ask column 
       [ ifelse pycor <= vcount-of myself
         [ if pcolor != white [ set pcolor ccolor ] ]
         [ if pcolor != black [ set pcolor black ] ]
       ]
     ]
     if random 50 = 1 [ ask readers [ set hidden? not hidden? ] ]
     if random 35 = 1 [ let dir 90 * random 4 ask values [ set heading dir ] ]
     display
   ]
end
   
       
    
     
     
   

                    


Download Link

View or download the complete model file (to download: right-click, save-link-as):
-- Download spectrum-analyzer-vis-fake --