Problem with the FFT analyzer

Skip to first unread message

Jinggeng Lu

Jun 10, 2020, 6:40:43 PM6/10/20
to beadsproject
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);
  FFT fft = new FFT();
  ps = new PowerSpectrum();
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!

Ollie Bown

Jun 10, 2020, 6:54:54 PM6/10/20
Yes you should have one analysis chain for each sound to ensure the sounds don’t interfere. This might be too much CPU overhead. You’ll just have to see. You’d set the sfs input to each sample player individually.

sfs2.addInput(player2); etc.

Is that answering your question?



You received this message because you are subscribed to the Google Groups "beadsproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Jinggeng Lu

Jun 11, 2020, 7:40:58 PM6/11/20
to beadsproject

Thanks, Ollie, that helps
To unsubscribe from this group and stop receiving emails from it, send an email to
Reply all
Reply to author
0 new messages