# Error in sound player

**URL:** https://discourse.processing.org/t/error-in-sound-player/30717
**Category:** Libraries
**Tags:** homework
**Created:** [June 15, 2021, 4:58am UTC](https://discourse.processing.org/t/error-in-sound-player/30717 "2021-06-15T04:58:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Pauls](https://avatars.discourse-cdn.com/v4/letter/p/b3f665/32.png) [@Pauls](https://discourse.processing.org/u/Pauls)
#### Post date: [June 15, 2021, 4:58am UTC](https://discourse.processing.org/t/error-in-sound-player/30717/1 "2021-06-15T04:58:27Z")

</div>

I tried to test sound file but there is no respond. Can some one tell me the reason. The music.play become yellow and the following error is on consol: NullPointerException

Here is the code:

import processing.sound.\*;  
SoundFile music;

void setup() {  
size(400, 400);  
music = new SoundFile(this, “music.mp3”);  
music.play();  
}

void draw() {

}

---

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [June 17, 2021, 4:05pm UTC](https://discourse.processing.org/t/error-in-sound-player/30717/2 "2021-06-17T16:05:23Z")

</div>

Hello,

Take a look at the example in the reference:  
[https://processing.org/reference/libraries/sound/SoundFile.html](https://processing.org/reference/libraries/sound/SoundFile.html)

Do you have a sound file in the correct folder and using the correct name?

Explore the menu and look for "Show Sketch Folder:  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/3/391df779e1453bada053f4572b8f44cfbf628350.png)

There is a mention in here of _NullPointerException_:

> **[Processing 2.x and 3.x Forum](https://forum.processing.org/two/discussion/8093/frequently-asked-questions#latest)**
>
> Processing is an electronic sketchbook, a language and a worldwide community. This is its forum.

The guidelines in the Processing FAQ ask:

> **Please help us help you** by formatting your code on this forum. Formatted code is not only easier to read, it sometimes cannot be cut-pasted and run correctly if not formatted, making it difficult for others to help you.

Link to Processing FAQ:  
[https://discourse.processing.org/faq#format-your-code](https://discourse.processing.org/faq#format-your-code)

``:)`
