Skip to content

Sound Test

Make sure you add the following line to your .html file:

1
    <script src="../js/p5.sound.min.js"></script>

The line can be place right after the loading of the p5.js library in the html head section.

1
2
3
4
5
<head>
    <meta charset="UTF-8">
    <title>String Harmonics</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.js"></script>
    <script src="../js/p5.sound.min.js"></script>

We suggest having the default mode of a sim have the sound off. Add a button to turn the sound on.