So I happened to look in a box of my old junk and found an old usb headset that had a mic.
So that code sample seems to work fine. It's a little heavy on the processor but as I said it is a first draft.
I've come up with a new way to implement it using numpy, and that works a lot better.
I also noticed that it was really easy to also add output to the raspberryPi's audio out jack. So there is no need to use a splitter on the line-in, you could also probable just use the the usb sound cards audio out also (the headset I have is really old, usb 1.1, and I had a few hiccups).
After the latest pull requests get finished I up these mods for review.
On Monday, June 29, 2015 at 8:51:36 PM UTC-7, Tom Enos wrote:
I've been playing with the algorithm that Todd has pointed out in synchronized_lights.py
I can only test it out by using it in play_song(), (I don't have a usb sound card) but it looks like it works great (in fact the initial playback of an audio file looks very close to playback using a sync file. It might be worth adding it in there to for initial playback of audio files.
I've attached the RunningStats module and synchronized_lights with the audio_in() function setup to test the algorithm. Could someone test it out and let me know if I am at least going in the right direction?
This is just a first draft. I'm sure there well be a few things that need to be worked out. For example I did not account for not connected channels. But if this first draft at least shows promise then it should be an easy matter to add that in.