This application is based on a simulation of collective dynamics of sheeps in a herd. The behaviour of the herd is used to generate music, the user is encouraged to affect both these aspects in various ways.
Sheeps are represented by point-like agents able to perceive and respond to their local environment.
Stationary sheeps don’t change their position, while walking and running ones do.
Given the three states for each sheep as 0 for stationary, 1 for walking and 2 for running, a sheep decides whether to change its state according to the following probabilities.
Here's a video showing some of the dynamics that result from the model.
The user is encouraged to change some of the parameters that govern the behaviour using the sliders.
The user can select the scale in which the sheeps play, as well as the mode, the waveshape, the bpm, whether or not to have drums playing along and a delay effect with multiple time signatures of their choice.
Here's how music generation works.
The application features binaural audio effects, it is therefore recommended to use headphones.
Sound is perceived as if the user were in the position of the sheperd (listener), in respect to the centroid of the herd (source). The user can control the sheperd using WASD and listen to the music moving around them. Drums are heard moving all around the listener.
The user can also scare the sheeps using the microphone, the sound intensity threshold is a function of the distance between the sheperd and the centroid of the herd, meaning you need softer sounds if the sheperd is closer to the herd. However, moving the sheeps towards the boundary of the field only results in them being shocked.
Here's a clip showing how sheeps react to external inputs.
Furthermore, the user may try out Challenge Mode, in which a series of grass patches appears and the user must scare the sheep towards the patches in order to feed them and bring them back in the little house before the wolf comes after time runs out. While in Challenge Mode, the control over the modal scales is suspended, as it depends on how happy the sheeps are (which is related to the amount of grass they ate).
Here's a video showing how this works.
Have fun!