Using a microphon/using snack/using pymedia

Hey guys, i’m currently trying to make something using a microphone as an interface.
Basically i want to compare the dB values of the left and the right channel of a microphone line-in so i can determine where the sound is coming from.
After looking around some on the net i think there are two choices, pymedia or snack.
Snack is great but uses Tkinter to run and i don’t know how to implement this directly into blender (i got the seperate file working but don’t know how to communicate between a python script and blender…).
Pymedia is great too, but i haven’t found a way yet of calculating the dB-values.
If anyone out there can help me, it would be highly appreciated, i know a lot of people have already tried this and i wondered if someone succeeded yet. Anyway, thanx


How do you even get pymedia to run in Blender? I’m lost.

if you have a full python install, blender only adds to python. If you have it working in the interpreter or idle, it should work fine in blender. just import the same modules, in fact, just copy and paste the entire thing into blenders text editor and it’ll behave just like it did in idle.

i don’t know much about tkinter, but it should act exactly the same… try it! any script, for example this one, should work fine just copied and pasted into blender if you have the moduale. blender’s terminal should work just like the terminal you’d usually run it in…

after re-reading your post, some questions:

do you know how to make a blender script within blender (in the txt editor)?
What exactly does the Snack script do? (i.e., what does it return? an offset? db levels?)

I can help you port it to blender if you can get it working in the interpreter or idle. If it can return something that I can use to offset an empty (i.e., empty is at 0,0,0, offset value is -5, I can make empty move to -5,0,0)