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 i开发者_如何学JAVAs in Windows 7, BTW
Depends on the platform. On Windows, this SO question has some answers; for Linux, try this one instead.
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
精彩评论