We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › Minim: Audio Input Frequency
Page Index Toggle Pages: 1
Minim: Audio Input Frequency (Read 3212 times)
Minim: Audio Input Frequency
Jul 2nd, 2008, 11:56pm
 
Hey guys, I am working on a project where I visually display the notes on a piano.  I have a keyboard plugged into the computer, and I want to get the frequency so that I can determine what note is being played.  I know that you can get frequencies using the FFT class, but I can't figure out if you can get the frequency for AudioInput.  Thanks.
Re: Minim: Audio Input Frequency
Reply #1 - Jul 3rd, 2008, 12:14am
 
(just in case you are using a MIDI keyboard, it would be much easier to just retrieve the MIDI signals using proMidi library, for example)


Quote:
I can't figure out if you can get the frequency for AudioInput.

see the FFT example code
http://code.compartmental.net/tools/minim/manual-fft/

and replace what refers to the audio sample by your pointer to audio input. something like:

Code:
in = Minim.getLineIn(Minim.STEREO, 512, 11050);
...
fft.forward(in.left);
Page Index Toggle Pages: 1