File: playnotes.py

package info (click to toggle)
snack 2.2.9-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,628 kB
  • ctags: 3,536
  • sloc: ansic: 35,290; sh: 8,950; tcl: 1,037; python: 701; makefile: 490
file content (19 lines) | stat: -rwxr-xr-x 306 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /usr/bin/env python

from Tkinter import *
from tkSnack import *

root = Tkinter.Tk()
initializeSnack(root)

s = Sound()
filt = Filter('generator', 440, 30000, 0.0, 'sine', 8000)

def beep(freq):
   filt.configure(freq)
   s.play(filter=filt,blocking=1)

beep(261.6)
beep(293.7)
beep(329.7)
beep(349.3)