Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/GUI/Core/MainWindow.py
diff options
context:
space:
mode:
authorjames <james@loggerhead.localdomain>2006-10-27 19:32:54 (GMT)
committer james <james@loggerhead.localdomain>2006-10-27 19:32:54 (GMT)
commit34851a56e266f2834b4edae46e3a53871622b19c (patch)
tree780ac020e0e27cf8b841aae5a69e58ef08aee744 /GUI/Core/MainWindow.py
parent10410c157f9e26fd5fc889457e4ff84a33ab2ea2 (diff)
somewhat ported
Diffstat (limited to 'GUI/Core/MainWindow.py')
-rw-r--r--GUI/Core/MainWindow.py24
1 files changed, 23 insertions, 1 deletions
diff --git a/GUI/Core/MainWindow.py b/GUI/Core/MainWindow.py
index 1a9e9f4..10c1f83 100644
--- a/GUI/Core/MainWindow.py
+++ b/GUI/Core/MainWindow.py
@@ -1,6 +1,7 @@
import pygtk
pygtk.require( '2.0' )
import gtk
+import gobject
import time
@@ -26,6 +27,9 @@ from Framework.Core.Profiler import TP
from Framework.Generation.Generator import generator1, variate
+from Framework.Music import *
+from Framework.NoteLooper import *
+
#-----------------------------------
# The main TamTam window
#-----------------------------------
@@ -38,6 +42,7 @@ class MainWindow( gtk.Window ):
self.setupGUI()
self.initialize()
+ music_init()
self.handleConfigureEvent( None, None ) # needs to come after pages have been added in initialize()
@@ -305,11 +310,26 @@ class MainWindow( gtk.Window ):
def handlePlay( self, widget, data ):
if widget.get_active():
self.pagePlayer.startPlayback()
+ # self.playbackTimeout = gobject.timeout_add( 50, self.onTimeout )
else:
self.pagePlayer.stopPlayback()
-
+ # gobject.source_remove( self.playbackTimeout )
+
+ #self.noteLooper = NoteLooper( 48, 100, 20, 0, music_getNotes([0], range(6) ) )
+ #print self.noteLooper.next( )
+
self.keyboardInput.record = self.playButton.get_active() and self.keyboardRecordButton.get_active() and self.keyboardButton.get_active()
+ #def onTimeout(self):
+ # print self.noteLooper.next()
+
+ def shutOffCSound(self ):
+ for track in range( Constants.NUMBER_OF_TRACKS ):
+ for i in range( 3 ):
+ csoundInstrument = i + 101
+ CSoundClient.sendText( CSoundConstants.PLAY_NOTE_OFF_COMMAND % ( csoundInstrument, track ) )
+
+
def handleKeyboard( self, widget, data ):
self.keyboardInput.active = widget.get_active()
@@ -375,6 +395,8 @@ class MainWindow( gtk.Window ):
dict)
#print dict
+ music_addNotes_fromDict(dict)
+
self.pagePlayer.setTrackDictionary(dict)
self.updateTrackViews()