Connect earphones to Teensy

I would like to connect earphones to the Headphone port of a laptop. Instead of using the earphones directly for audio output, I would like to connect the Left/Right channel wires of the earphones to the teensy. The goal is to capture the frequency(actually peak frequencies) from audio coming from the computer?

Can this be done? If so, can you provide a link to other projects that havedone this or suggestion how to set this up. I am a newbie but I catch on quickly.
 
hi,
mainly look here: https://www.pjrc.com/store/audio_tutorial_kit.html
By help of the tutorial, you will find all you need...
If your decision is only to connect an audio source to Teensy, you must use an analogue input with a bias-supply like the little drawing shows.
Analog IN.jpg
With 'analogRead(analogPIN)' you will get digital values between 0 and 1023 correspondent to input voltage. Silence will show '512'.
have fun!
 
Thank you for your response. What I don't understand is, the earphones have a left and right channel. I don't know where these two wires should be connected on the Teensy.
 
hi Sheon,
Teensy himself is not able to process audio streams. You can digitize audio like shown with my little scheme. It's not HIFI....
Real audio processing needs an audioshield to be added. Take a look to the link I provided. With audioshield teensy is able to do many things with audiostreams. The audio library just has a lot of examples.
 
Back
Top