ICM – Part II – Week 4 – Sound

This week, we were tasked with creating a project that sequences, synthesizes or analyzes sound. For mine, I created a sketch with a window shade that, when lowered, will change sound and image below, and, then, when lifted, reveal a different  image and related sound.

I had a difficult time getting the sounds to play, since they were loaded into the sound array as both a .wav file and as functions. Once I got the sounds to play, I had issues getting them to rotate through.

I got totally stuck with trying to get an ‘i’ variable to increase and ended up going to the Code Lab to get help. With the help of James, I was able to get my code up and working. Getting it to work involved setting up a state machine.

Here’s the code:

https://editor.p5js.org/gfm262/sketches/LfWzCS3f6