Adding sound effects that are tied to events in your animation can add a ton of character. Imagine a circle on screen moving onscreen: the sound it makes when it hits the edges can totally change the character and feel of the scene! The p5.js Sound library lets us load, play, and loop sounds like in the Background Music example as well as some other modifications like panning and changing volume.
👩💻 https://editor.p5js.org/jeffThompson/...
ALL THE VIDEOS IN THIS UNIT
🎥 • CP1: Week 09 (Animation)
CHALLENGES
❓ Look in the assets folder and try changing the sound effect that's played. How does it change the feel of the animation?
❓ What color/shape makes sense with this sound effect? Try swapping out different sounds and match a shape to them.
❓ Can you create two different circles that move in random directions, each with a different sound effect?