Hi all, I met a problem when I was doing my project. In my project, I have multiple music samples.
for (int i = 0; i < listOfFiles.length; i++) {
if (listOfFiles[i].isFile()) {
//here is where I created the sample players
player[i] = new SamplePlayer(ac, SampleManager.sample(listOfFiles[i].getAbsolutePath()));
selectedMusic[i] = true;
musicList[i] = new musicController(player[i],i);
}
}
And I've also used an analyzer in my program to get the frequency of the output
sfs = new ShortFrameSegmenter(ac);
sfs.addInput(ac.out);
FFT fft = new FFT();
sfs.addListener(fft);
ps = new PowerSpectrum();
fft.addListener(ps);
ac.out.addDependent(sfs);
But the problem is that when I want to get the frequencies of different objects as I want to visualize the frequency of each sample player individually.
Currently what I want to do is draw a ball for each music sample and the ball will move based on its music sample's frequency, but when there are some overlaps between different sounds, it seems that the movements of different balls will be affected by other music samples. Is there any method to append different analyzers to different music samples or Glide object etc?
Thank you very much!