Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Waves.activity/waves.py
blob: 15b030701bc19f458538e213efbf4319bb4168f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import csndsugui
from sugar.activity import activity


class Waves(activity.Activity):

 def __init__(self, handle):
  
   activity.Activity.__init__(self, handle)

 
   # colours
   red = (0xFFFF,0,0)
   bg  = (0xF000, 0xFF00, 0xFFFF)
   win = csndsugui.CsoundGUI(self,bg)
 
   win.csd("waves.csd")
   txt = win.text("Making Waves")
   sfbox = win.box(False)
   bfbox = win.box(False)
   sbox = win.framebox("frequencies", False, sfbox, red, 40) 
   bbox = win.framebox("oscillators", False, bfbox, red, 40)

   win.buttonbank(8,bbox)
   win.spin(0,0,10,0.5,1,bbox,0, "main_volume")
   win.vsliderbank(8,400.0,400.0,500.0,80,200,sbox)

   win.play()