This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: window.setCoords(0,-32000,999,32000) for col in range(1000): index=int((col/999.0)*(len(sound)-1)) Point(col,sound[index]).draw(window) x1=window.getMouse().getx() x2=window.getMouse().getx() Check for letters in a file: for line in file: for letter in line: if letter==C: freq=261.63 elif letter==D: freq=293.66 else:freq=0 for line in file: if line==X print found X Accumulate a song from separate tones: LENGTH=0.5 chord=int(LENGTH*44100)* tone=[10000*sin(i*freq*2*pi/44100) for i in range(int(LENGTH*44100))] chord=[chord[i]+tone[i] for i in range(int(LENGTH*44100))] song=song+chord...
View Full Document
This note was uploaded on 04/02/2008 for the course CSCI 1300 taught by Professor Lewis,clay during the Spring '08 term at Colorado.
- Spring '08