Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
| p5js-sound1 [2024/03/19 23:25] – renick | p5js-sound1 [2024/03/19 23:27] (current) – renick | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== the basics of sound in p5js ====== | ====== the basics of sound in p5js ====== | ||
| + | |||
| + | All of the documentation for sound-related functions in p5js is here: https:// | ||
| ===== making a sound play and loop ===== | ===== making a sound play and loop ===== | ||
| + | |||
| + | Let's get a sound playing in p5js. | ||
| + | |||
| + | This works, but notice the problem when you click the square more than once! | ||
| + | |||
| < | < | ||
| <iframe src=" | <iframe src=" | ||
| </ | </ | ||
| - | |||
| ===== making a sound play only when the mouse is clicked ===== | ===== making a sound play only when the mouse is clicked ===== | ||
| Line 15: | Line 21: | ||
| <iframe src=" | <iframe src=" | ||
| </ | </ | ||
| - | |||
| ===== the problem: clicking ===== | ===== the problem: clicking ===== | ||
| Line 25: | Line 30: | ||
| <iframe src=" | <iframe src=" | ||
| </ | </ | ||
| - | |||
| ===== stopping a loop ===== | ===== stopping a loop ===== | ||