I'm working on an audio visualization project that is based off of Minim. For part of this project, I need an array of frequency amps (I'll use this array to determine heights for the monitor bars). I have never used Minim before, so I apologize for my limited knowledge on this subject in advance. The audio source is the input from a virtual audio cable that is returning any output sound from my PC.
The issue I'm having is that my amp[] (made of floats) is filled with 0.0 's; in other words, it isn't filling with the amplitudes of the various frequencies (despite my blasting of Zedd music!).
Here is my code (written in Eclipse):
import processing.core.*;
import java.awt.*;
import ddf.minim.signals.*;
import ddf.minim.*;
import ddf.minim.analysis.*;
import ddf.minim.effects.*;
public class MinimTest2 extends PApplet {
Minim minim;
FFT fft;
AudioInput in;
float[] amp = new float[2000];
public void settings() {
  size(800, 600);
}
   public MinimTest2()
  {
   minim = new Minim(this);
   in = minim.getLineIn(Minim.STEREO, 2048); 
   fft = new FFT(in.bufferSize(), in.sampleRate()); 
   fft.logAverages(30, 5); 
  }
   public float[] getAmps(){
    int index = 0;
    for (int k=0; k<20000; k+=10){
        amp[index]=fft.getFreq(k);
        index++;
    }
    return amp;
   }
}
When the client class calls/prints getAmps(), 0.0's are printed. I believe the highest sound a human can hear is 20kHz (hence the condition in the for loop). The array should have amp samples every 10Hz, so amp[7] would have the amp value at 70Hz. Am I using the wrong method, potentially? I've been reading the documentation for Minim here, with the getFreq() FFT method I am using documented here.
Thanks for your patience and guidance! It's my first time with stack overflow.
UPDATE! I have a working audio visualizer now (at least, while you drag the mouse (placeholder while I work on other pieces). See answer for code.
 
                        
This works.
MinimTest2:
Client (Work in progress):
}