views:

71

answers:

3

I need to get some numbers so I can generate random numbers using ambient sound.

I want something on this level pseudo code:

import microphone
p = pitch.get()
print p

Edit:

This is in Windows 7, BTW

+2  A: 

Depends on the platform. On Windows, this SO question has some answers; for Linux, try this one instead.

Alex Martelli
A: 

You'd be better off using another source: Random Noise Sources

Hardware random number generator

Mitch Wheat
A: 

I don't know if it is as easy as you would like but I know that it is possible to access the microphone with tksnack. I think it is available on main platforms.

microphone access should be possible with the record method of the Sound class

I hope it helps

luc