Mercurial > hg > chourdakisreiss2016
view experiment-reverb/code/pyaudioplay.py @ 2:c87a9505f294 tip
Added LICENSE for code, removed .wav files
author | Emmanouil Theofanis Chourdakis <e.t.chourdakis@qmul.ac.uk> |
---|---|
date | Sat, 30 Sep 2017 13:25:50 +0100 |
parents | 246d5546657c |
children |
line wrap: on
line source
# -*- coding: utf-8 -*- """ Created on Tue Jun 9 16:39:46 2015 @author: mmxgn """ from numpy import * from matplotlib.pyplot import * import pyaudio SR = 44100 t = linspace(0, 1, SR) f0 = 440. y = 0.5*sin(2*pi*f0*t) player = pyaudio.PyAudio() stream = player.open(format=pyaudio.paFloat32, channels=1,rate=SR,output=True) stream.start_stream() stream.write(y) stream.close() #plot(t, y)