# Help with playing a sound

**URL:** <https://discourse.processing.org/t/help-with-playing-a-sound/12866>\
**Category:** Processing.py\
**Created:** [July 21, 2019, 2:39pm UTC](https://discourse.processing.org/t/help-with-playing-a-sound/12866 "2019-07-21T14:39:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![proc8888](https://avatars.discourse-cdn.com/v4/letter/p/f19dbf/32.png) [@proc8888](https://discourse.processing.org/u/proc8888)\
**Post date:** [July 21, 2019, 2:39pm UTC](https://discourse.processing.org/t/help-with-playing-a-sound/12866/1 "2019-07-21T14:39:56Z")

</div>

Hi,  
I created an ‘oscillator’ using the sound library but it is not working.  
Please help, thanks.

Here’s the code:

```auto
add_library('sound')

def setup():
    size(200,200)
    v_osc=SinOsc(this)
    v_osc.play(440,0.5)
    # v_osc.freq(440)
    # v_osc.amp(0.5)

```

---

<div class="post-metadata">

**Author:** ![proc8888](https://avatars.discourse-cdn.com/v4/letter/p/f19dbf/32.png) [@proc8888](https://discourse.processing.org/u/proc8888)\
**Post date:** [July 21, 2019, 2:43pm UTC](https://discourse.processing.org/t/help-with-playing-a-sound/12866/2 "2019-07-21T14:43:26Z")

</div>

To clarify, the program runs but no sound is played.

---

<div class="post-metadata">

**Author:** ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Post date:** [July 21, 2019, 9:40pm UTC](https://discourse.processing.org/t/help-with-playing-a-sound/12866/3 "2019-07-21T21:40:54Z")

</div>

It turns out that you have to close and reopen the sketch:  
[https://github.com/processing/processing-sound/issues/23](https://github.com/processing/processing-sound/issues/23)

You might also need to add a:

```auto
def draw():
    pass

```
