LorenzoCurcio / Progetto-ACTAM

0 stars 2 forks source link

Overview

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.

alt text

Behavioral Modeling

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.

image

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.

image

Here's a video showing some of the dynamics that result from the model.

https://user-images.githubusercontent.com/93775089/153226152-7b1c399c-bf97-4f19-b011-de88cbe9cf76.mp4

The user is encouraged to change some of the parameters that govern the behaviour using the sliders.

Music Modeling

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.

alt text alt text

alt text

Here's how music generation works.

alt text

User Interaction

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.

alt text alt text

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.

alt text alt text

Here's a clip showing how sheeps react to external inputs.

https://user-images.githubusercontent.com/93775089/153227489-03732bc1-dbfe-4e6d-aca8-1e640630928a.mp4

Challenge Mode

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.

https://user-images.githubusercontent.com/93775089/153228129-f591c0d2-d01f-4864-b530-887b572fe7bc.mp4

Have fun!