title: How do I add p5.sound to React using react-p5-wrapper?
body: <p>I'm trying to get figure how I can include p5.sound to my p5 Sketch.
  Currently I'm using react-p5-wrapper <a href="https://github.com/and-who/react-p5-wrapper/" rel="nofollow noreferrer">https://github.com/and-who/react-p5-wrapper/</a> to get p5 into React.</p>
  <p>There's a similar issue raised in the repo and I've asked the same question there too, <a href="https://github.com/and-who/react-p5-wrapper/issues/11#issuecomment-728986112" rel="nofollow noreferrer">https://github.com/and-who/react-p5-wrapper/issues/11#issuecomment-728986112</a> but I can't quite figure out the steps they recommended to solve the problem.</p>
  <p>I've added <code>import * as p5 from &quot;p5&quot;</code> and <code>import &quot;p5/lib/addons/p5.sound&quot;</code> in my Sketch file but it isn't working. I got the error as per the screenshot.</p>
  <p>I'm just trying to follow this tutorial <a href="https://www.youtube.com/watch?v=8HEgeAbYphA&amp;feature=emb_logo" rel="nofollow noreferrer">https://www.youtube.com/watch?v=8HEgeAbYphA&amp;feature=emb_logo</a> but try to do it in React.</p>
  <pre><code>import * as React from &quot;react&quot;
  import * as p5 from &quot;p5&quot;
  import &quot;p5/lib/addons/p5.sound&quot;
  import * as ml5 from &quot;ml5&quot;
  
  export default function sketch(p5) {
      p5.setup = () =&gt; {
          p5.createCanvas(400, 400)
  
          env = new p5.Envelope()
          env.setADSR(0.05, 0.1, 0.5, 1)
          env.setRange(1.2, 0)
  
          wave = new p5.Oscillator()
          wave.setType(&quot;sine&quot;)
          wave.start()
          wave.freq(440)
          wave.amp(env)
  ...
  </code></pre>
  <p><a href="https://i.stack.imgur.com/YHdk0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YHdk0.png" alt="enter image description here" /></a></p>