Visualizing FFT values on a 3D object using microphone input from Android Device.

edited November 2016 in Android Mode


I am having trouble with an audio reactive project I am working on. So far I have a 3D environment that is using the Minim library to analyze FFT values drawn from the microphone of my PC to change the size of the objects in the environment. I am trying to get this effect to work on my Android phone with the "Google Cardboard" library ( I am able to display the environment and look around perfectly in VR, however I am unable to analyze the microphone input from my phone. I understand this is not possible with Minim, and I have spent hours looking for, and trying various alternative solutions. I am relatively new to programming and many explanations I have found are very advanced. Is there a simple way to achieve this?

Thank you so much.



  • I am trying to get this effect to work on my Android phone

    The link shows a VR environment example but I don't see the reference to the FFT. What do you want to get from the FFT? What effect are you looking to implement? In other words, what minim functions were you thinking in using?


  • edited November 2016

    ``I have the following code which changes the size of a sphere based on in.right.get(i+1)*50. I am trying to get something working like this on the Android device so I can implement it in VR. I can get the Sphere to display just fine, however I am just having trouble with the audio portion. I have been trying to follow this link but am having trouble.

    Thank you!

        import ddf.minim.*;
        Minim minim;
        AudioInput in;
        void setup()
          size(1500, 1500, P3D);
          minim = new Minim(this);
          // use the getLineIn method of the Minim object to get an AudioInput
          in = minim.getLineIn();
        void draw()
          for (int i = 0; i < in.bufferSize() - 1; i++)
            translate(width/2, height/2);
            sphere(300 + in.right.get(i+1)*50 );
  • Did you try the audioInput example from the Ketai library?

    Notice that as fas as I know, minim kibrary doesn't work in Android.


  • I encourage you to work in java mode and using minim to create a demo of your effect using FFT. This will give you a better understanding how to implement your code in Android mode. In java mode you will have the advantage of your code being executed faster and debugging will be less painful.


  • edited November 2016


    --you cannot use minim with the android mode

    --in order to capture the mic you have to use the AudioRecord class from android:: see here for more details

    -- with this class you (normally) can save your input then read it

    -- but you can also read it without saving using a buffer and an audio track

    -- as for applying fft in real time to that best way (as for me) is to use the tarsosdsp lib

Sign In or Register to comment.