by Yilin Ye & Sofia Pace
Work in pairs. Due in 2 weeks. Create a 60s sound composition. No visuals. Just sound.
how do you feel?
body - connection - rhythm : words to describe this project
For our sound project we wanted to explore making an interactive sound composition.
To realize this we’re mainly working with different rhythm and beats sounds that are activated when the sketch senses body/moment through the camera.
For the movement detection we are using the ml5 BodyPose library .
https://docs.ml5js.org/#/reference/bodypose?id=step-by-step-guide
To make sure that each sounds is played once at a time and not in quick succession, we used the millis() function.
This is established in this manner in the code:
let soundsLoaded = false;
let lastSoundTime = 0; // used to trake the time of the last sound played
let delayTime = 500; // delay time between sounds in milliseconds
//....
if (soundsLoaded && millis() - lastSoundTime > delayTime) {
//conditions that alternate between sound patterns and combinations
}
lastSoundTime = millis(); //if the if statment conditions are met, lastSoundTime is updated to the current time
}
To create change through the duration of the sketch we incorporated a gradual and somewhat randomized alteration of the played sounds’ “bpm.”
a help from chatGPT: