https://pypi.python.org/pypi/audio/1.5.0
https://people.csail.mit.edu/hubert/pyaudio/docs
http://stackoverflow.com/questions/892199/detect-record-audio-in-python
Install pyaudio on OSX
Installing python things in general and pyaudio in particular on OSX seems to be a matter of choosing one install mechanism and sticking to it. Here is a way to install pyaudio based on Homebrew. Of course this assumes that you already have Homebrew installed. See instructions on the website.
Depending on what is already installed on your system, some of these steps may be skipped.
$ brew update $ brew doctor $ brew upgrade python $ brew upgrade portaudio $ brew uninstall python $ brew install python $ brew linkapps python $ brew link --overwrite port audio $ pip install pyaudio
Example
basic_sine.pyAssignments
- make a stereo version of the sine wave generator with different frequencies for each channel
- make a sweep that runs from 200 to 1500 Hz in 10 seconds and then stops
- make at least one other waveform, e.g. square wave with controllable duty
- cycle or saw wave additive synthesis: add 3 sine waves