Hello !
I'm working on a project that needs about 10 generated small samples (about 1 or 2 seconds long each) to be played from time to time, and sometimes generated again with some modifications.
I first tried to use ess but had a lot of problems with it, especially of latency. Now, I want to try with Minim.
With Ess, I would do something like this :
Quote:
float[] sound = new float[50000];
AudioChannel chan= new AudioChannel();
void generateASound() {
//generates a sound here
//and puts it into sound[]
setTheSound();
}
void setTheSound() {
chan.initChannel(sound.length);
for (int i=0;i<sound.length;i++) {
chan.samples=son[i];
}
}
void playTheSound() {
chan.play(1);
}
And then call generateASound() and playTheSound() when needed.
Is there an equivalent of this in Minim ? (Note that I want to synthesize the sounds, not to load them from files).
I tried to put separate parts of the sounds directly in each successive AudioOutput buffers but I heard a little clic between each buffer.
Is there a way to set arrays of values between -1 & 1 into AudioSample objects and then simply trigger them when they have to be played ?