Created
September 30, 2018 17:45
-
-
Save memish/e5fbb07b4866371fd85f01386750d4ad to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Imports needed | |
| import ddf.minim.analysis.*; | |
| import ddf.minim.*; | |
| //object needed to access microphone | |
| AudioInput input; | |
| //works with input to access microphone sound | |
| Minim minim; | |
| //needed analyze the sound | |
| FFT fft; | |
| void setup() | |
| { | |
| size(640, 480); | |
| minim = new Minim(this); | |
| input = minim.getLineIn(); | |
| //input will be based on your computers input capabilities | |
| fft = new FFT(input.bufferSize(), input.sampleRate()); | |
| } | |
| void draw() | |
| { | |
| background(0); | |
| stroke(255); | |
| fft.forward(input.mix); | |
| println(fft.specSize()); | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment