# Error in playing sound

**URL:** <https://discourse.processing.org/t/error-in-playing-sound/8908>\
**Category:** Libraries\
**Created:** [March 3, 2019, 6:32pm UTC](https://discourse.processing.org/t/error-in-playing-sound/8908 "2019-03-03T18:32:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CodeTime](https://avatars.discourse-cdn.com/v4/letter/c/71e660/32.png) [@CodeTime](https://discourse.processing.org/u/CodeTime)\
**Post date:** [March 3, 2019, 6:32pm UTC](https://discourse.processing.org/t/error-in-playing-sound/8908/1 "2019-03-03T18:32:13Z")

</div>

So I just started learning on how to add sound into the program but ran into a problem that I can’t exactly understand. I had this code

```auto
import processing.sound.*;

SoundFile file;

void setup() {
  size(500,500);
  background(0);
  file = new SoundFile(this, "Song.mp3");
  file.play();
}

void draw() {
  
}

```

But it gave me this error message when I played it

 ![Capture](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/c/cb7710e661cdf418b7a357ab9832fff30369fca8.png)  
Can someone explain to me what I am doing wrong and/or how to fix this?

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [March 4, 2019, 12:35am UTC](https://discourse.processing.org/t/error-in-playing-sound/8908/2 "2019-03-04T00:35:48Z")

</div>

pls read  
[https://processing.org/reference/libraries/sound/SoundFile.html](https://processing.org/reference/libraries/sound/SoundFile.html) mp3  
for this file type better use  
[http://code.compartmental.net/minim/minim\_method\_loadfile.html](http://code.compartmental.net/minim/minim_method_loadfile.html) (import needed)

File / Examples / Contributed Libraries / Minim / Basics / PlayAFile  
work perfect ( even on my 40 Euro computer. )

---

<div class="post-metadata">

**Author:** ![kevinstadler](https://avatars.discourse-cdn.com/v4/letter/k/bc79bd/32.png) [@kevinstadler](https://discourse.processing.org/u/kevinstadler)\
**Post date:** [March 18, 2019, 5:21am UTC](https://discourse.processing.org/t/error-in-playing-sound/8908/3 "2019-03-18T05:21:47Z")

</div>

@CodeTime despite the message being printed in red this isn’t actually an error message, just information about the Sound library starting up successfully. Was there actually a problem with the sound file not being played back?
