Anonymous avatar Anonymous committed b0f6c97

testing

Comments (0)

Files changed (1)

     if event.unicode == "t":
         global bgcolor
         bgcolor = (255,255,255)
-        for row in rows:
+        for row in out_text:
             row.setColor(0,0,0)
     
 def handle_keyup(event):
         row.setFontFromFile(font, font_size)
         row.text = ""
         #row.text = str(i)*22
+        row.setColor( 0 , 255, 0)
         out_text.append(row)
     deck_A.load(fakedrive="test-data/freud-dreams.txt")
     deck_B.load(fakedrive="test-data/poe-perloined-letter.txt")
     
     skip_frame = True
     # update tempo 
-    # TODO: optimize exponential ops, only trigger on event
-    wordrate = 0.5 / ( (pycessing.getMouseY()+1) / float( pycessing.getHeight() ))
+    wordrate = 0.8 + 0.8 / ( (pycessing.getMouseY()+1) / float( pycessing.getHeight() ))
     #pycessing.framerate = wordrate + 0.25
-    print "wordrate " + str(wordrate +0.25)
+    #print "wordrate " + str(wordrate +0.25)
     
     # don't update if wordcount
     
-    setBackground(bgcolor[0], bgcolor[1], bgcolor[2])
+    #pycessing.screen.fill(bgcolor)
     # update x-fader
     xfader = pycessing.getMouseX() / float(pycessing.getWidth())
     #print "xfader " + str(xfader)
     
     global wordcounter 
-    print wordcounter
+    #print wordcounter
     wordcounter += 1
     if wordcounter > wordrate:
         wordcounter = 0
         # select deck and get next word  (TODO:skip for burroughs)
         if random.random() < xfader:
             cursor.text = deck_A.get_word(cursor.text)
-            cursor.setColor(255,255,0)
+            cursor.setColor(255, 0 ,0)
         else:
             cursor.text = deck_B.get_word(cursor.text)
-            cursor.setColor(0,255,255)
+            cursor.setColor(0, 0 ,255)
 
         #TODO: do burroughs here
         
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.