Minim problem with loading multiple FilePlayer

I would like to use my raspberry pi 3 and processing to mix sound files.
My problem is that minim crashes after loading 6 FilePlayer.
I tried it on different setups : raspbian + processing pi, raspbian image provided on the site, Ubuntu + processing pi. The problem is always the same.
Please note it works on a linux PC.
Here is the minimal code to reproduce the problem. Is there a solution to load more sound file ? Would someone try this on a raspberry 4 ?

import ddf.minim.*;
import ddf.minim.ugens.*;

Minim minim;
AudioOutput output;

FilePlayer[] soundfile = new FilePlayer[10];

void setup(){
  minim = new Minim(this);
  output = minim.getLineOut();
  for (int c=0; c<soundfile.length; c++) {
    print("load soundfile " + c + " ...");
    soundfile[c] = new FilePlayer( minim.loadFileStream(dataPath("beastie.wav")) );


console error :

load soundfile 0 …ok
load soundfile 1 …ok
load soundfile 2 …ok
load soundfile 3 …ok
load soundfile 4 …ok
load soundfile 5 …ok
load soundfile 6 …==== JavaSound Minim Error ====
==== Couldn’t open the line: line with format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian not supported.


1 Like

yes, i hit same limitation ( RPI3 ),

find a way to have not all files loaded at same time
or try a other library ?beads?

sorry also not have a RPI4 to test.


Thanks for your answer :slight_smile:
unfortunately, I have to load all sound at startup, so I can mix them with no delay.
I could use bead, but it would be a lot of work, as it is a big project working on PC, that I want to put on a raspberry.
If someone could confirm that the problem would be solved with a PI 4, I would buy one immediately :grin:

1 Like

I have tried the same code on a RPI4, and there is exactly the same problem.
It was a model B 4GB with raspbian freshly installed and processing pi downloaded and installed from the site.

Maybe there is way of reducing your memory requirements from six+ simultaneous full loads. When you say ‘mix’ what do you mean? Are you crossfading, or playing everything simultaneously? Are these sort sounds that could be played as samples?

1 Like

I have to mix several 10s loops together. All the loops have to be played simultaneous, I control the volume of each loop with a midi controller, and want to avoid a load delay during playing.
I will try to use the Beads library, and will give you feedback if I find a solution.