# Sound library: Error when instantiating SoundFile object

**URL:** <https://discourse.processing.org/t/sound-library-error-when-instantiating-soundfile-object/4836>\
**Category:** Libraries\
**Created:** [October 24, 2018, 7:57pm UTC](https://discourse.processing.org/t/sound-library-error-when-instantiating-soundfile-object/4836 "2018-10-24T19:57:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RustedBot](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@RustedBot](https://discourse.processing.org/u/RustedBot)\
**Post date:** [October 24, 2018, 7:57pm UTC](https://discourse.processing.org/t/sound-library-error-when-instantiating-soundfile-object/4836/1 "2018-10-24T19:57:47Z")

</div>

Processing: v3.4  
Sound Library: v2.0.2

I’m trying to use the Sound library but when I instantiate a SoundFile object I receive this error in the console:

```auto
ArrayIndexOutOfBoundsException: 16

Oct 24, 2018 8:53:33 PM com.jsyn.devices.javasound.JavaSoundAudioDevice <init>
INFO: JSyn: default output latency set to 80 msec for Windows 7
Oct 24, 2018 8:53:33 PM com.jsyn.engine.SynthesisEngine start
INFO: Pure Java JSyn from www.softsynth.com, rate = 44100, RT, V16.8.0 (build 463, 2017-10-16)

```

This is the code which results in the error:

```auto
import processing.sound.*;

SoundFile file;

void setup()
{
  size(800, 600);
  
  file = new SoundFile(this, "song.mp3");
}

void draw()
{
  
}

```

Would be able to help me to resolve this issue? Thank you.

---

<div class="post-metadata">

**Author:** ![TheWizardBear](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/thewizardbear/32/3552_2.png) [@TheWizardBear](https://discourse.processing.org/u/TheWizardBear)\
**Post date:** [October 25, 2018, 8:04pm UTC](https://discourse.processing.org/t/sound-library-error-when-instantiating-soundfile-object/4836/2 "2018-10-25T20:04:22Z")

</div>

I think [the sound library isn’t working at the moment](https://discourse.processing.org/t/sound-library-error-when-playing-sound-files/306).  
Try the minim library.
