From cdf342536db6ebfe63e08eb38974423d72c309de Mon Sep 17 00:00:00 2001 From: Victor Lazzarini Date: Tue, 18 Mar 2008 22:46:52 +0000 Subject: added Waves activity example --- (limited to 'Waves.activity/waves.py') diff --git a/Waves.activity/waves.py b/Waves.activity/waves.py new file mode 100644 index 0000000..15b0307 --- /dev/null +++ b/Waves.activity/waves.py @@ -0,0 +1,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() -- cgit v0.9.1