[Tutor] python and snack

mike re-v mrmrmr50 at yahoo.com
Sat Nov 22 09:46:26 EST 2003


please help
#!/usr/bin/python

from Tkinter import *
root = Tk()
import tkSnack#!/usr/bin/python

from Tkinter import *
root = Tk()
import tkSnack
tkSnack.initializeSnack(root)

mysound = tkSnack.Sound()
mysound1 = tkSnack.Sound()
mysound2 = tkSnack.Sound()
afile = open('/home/re-v/good.wav','w')
mysound.read('/home/re-v/clm/doggrowl.wav')
mysound1.read('/home/re-v/clm/dogbark.wav')
mysound2.read('/home/re-v/sound/scream.wav')
 
	
mysound.play()
	 
        
mysound1.play()

mysound2.play()
this is the problem#>>>>>afile.write(mysound2)<<<<<
root.mainloop()


GOAL
There are three sound files which are opened and
played. Since thay are not blocked they play at the
same time. I'd like to not only play thru the
speakers, which the code does now{this is nice for
interactive editing}, I'd also like to be able to save
the sound in a file
there is a method in snack .write
mysound.write('foo.wav') however the 'play at the same
time feature is needed.
Thanks
re-v

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/



More information about the Tutor mailing list