Hi,
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 ?
Thanks.
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")) );
println("ok");
}
}
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.
Thanks for your answer
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
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?
Hi,
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.