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:
authorjaberg <james@localhost.localdomain>2006-12-14 10:07:51 (GMT)
committer jaberg <james@localhost.localdomain>2006-12-14 10:07:51 (GMT)
commitc92d8609af73ab325a43bf66967ac777964de3aa (patch)
tree4ed2768a0036a68fc08968e4542fd703b9f79116 /GUI/Core/MainWindow.py
parent9ff6a407f3aa0fe40c70c2424436397d4d1608c6 (diff)
day2
Diffstat (limited to 'GUI/Core/MainWindow.py')
-rw-r--r--GUI/Core/MainWindow.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/GUI/Core/MainWindow.py b/GUI/Core/MainWindow.py
index 50a44a1..2ae8e79 100644
--- a/GUI/Core/MainWindow.py
+++ b/GUI/Core/MainWindow.py
@@ -69,10 +69,8 @@ INIT_MUTE = [ 1.0 for i in INIT_INST ]
#-----------------------------------
class MainWindow( gtk.EventBox ):
-
def __init__( self ):
-
-
+ TP.Profile("MW::init")
def formatRoundBox( box, fillcolor ):
box.set_radius( 10 )
box.set_border_width( 1 )
@@ -476,7 +474,8 @@ class MainWindow( gtk.EventBox ):
self.show_all() #gtk command
- CSoundClient.sendText( "perf.destroy()" )
+ #CSoundClient.sendText( "perf.destroy()" )
+ TP.Profile("MW::init")
def updateFPS( self ):
t = time.time()
@@ -531,8 +530,10 @@ class MainWindow( gtk.EventBox ):
self.noteLooper.setTick(0) #TODO: get playback head position
self.noteLooper.setRate( round( self.tempoAdjustment.value, 0 ) * 0.2 )
- CSoundClient.sendText( "\n".join(self.noteLooper.next()) )
- self.playbackTimeout = gobject.timeout_add( 50, self.onTimeout )
+ cmds = self.noteLooper.next()
+ for c in cmds: CSoundClient.sendText( c )
+ time.sleep(0.001)
+ self.playbackTimeout = gobject.timeout_add( 100, self.onTimeout )
self.playing = True
else: #stop
@@ -547,7 +548,8 @@ class MainWindow( gtk.EventBox ):
pref="MainWindow::onTimeout "
TP.ProfileBegin( pref+"send" )
- CSoundClient.sendText( "\n".join(self.noteLooper.next()) )
+ cmds = self.noteLooper.next()
+ for c in cmds: CSoundClient.sendText( c )
TP.ProfileEnd( pref+"send" )
TP.ProfileBegin( pref+"update" )
@@ -780,6 +782,7 @@ class MainWindow( gtk.EventBox ):
# callback functions
#-----------------------------------
def selectPage(self, pageId):
+ print 'WARNING: skipping displayPage'
self.trackInterface.displayPage(pageId,int(round( self.beatsPerPageAdjustment.value)))
self.currentPageId = pageId