Load files in Background

Hey,
I have a music file, that needs to load a while (120 MB). So my idea is, to run the Programm and run music = new SoundFile(this, "data/music.mp3"); in the Background while the programm is played.

Is there a way to do this?

Explore what you could do within a separate thread (but if your main code requires the file to be fully loaded you might have to wait in the main (animation) thread.

As the documentation mentions

Use thread() to load files or do other tasks that take time. When the task is finished, set a variable that indicates the task is complete, and check that from inside your draw() method.