tkSnack or other sound tool

jmdeschamps jmdeschamps at cvm.qc.ca
Wed Feb 11 10:59:14 EST 2004


I'm trying to play programmed music by iteratively applying filter
changes to a playing Sound object.

It almost seem to work but i can't control duration of sounds???

Using tkSnack 2.2.4 for Python (naturlïch!)
with python 2.3.some

Thanks,
Jean-Marc
(maybe I should investigate other tool for my synthesizing
experiments?, - which one then???)

PS my code:
from Tkinter import *
from tkSnack import *
import time
root = Tkinter.Tk()

initializeSnack(root)

s = Sound()

filt = Filter('generator', 440.0)
filt.configure(440, 1000, 00.7, "rectangle", 5000)

def play():
   s.play(filter=filt)
   for i in range(100):
      filt.configure(i+440)
      
def stop():
   s.stop()

f = Frame(root)
f.pack()

fb = Frame(root)
fb.pack(side='bottom')
Button(fb, bitmap='snackPlay', command=play).pack(side='left')
Button(fb, bitmap='snackStop', command=stop).pack(side='left')

root.mainloop()



More information about the Python-list mailing list