- def highlightColumn(self, index) :
- for i, sprite in enumerate(self.sprites()) :
- sprite.update(i==index)
- self.draw(pygame.display.get_surface())
+ def run(self):
+ self._running = True
+ clock = pygame.time.Clock()
+ pygame.display.flip()
+ while self._running :
+ EventDispatcher.dispatchEvents()
+ dirty = self.draw(pygame.display.get_surface())
+ pygame.display.update(dirty)
+ clock.tick(FRAMERATE)
+
+ @event_handler(pygame.KEYDOWN)
+ def handleKeyDown(self, event) :
+ if event.key == pygame.K_q:
+ self._running = False
+
+
+ @event_handler(pygame.MOUSEMOTION)
+ def handleMouseMotion(self, event) :
+ pass
+
+
+class PlayingScreen(_PlayingScreenBase) :
+ "fenêtre de jeu pour improvisation"
+ scale = [55, 57, 59, 60, 62, 64, 66, 67, 69, 71, 72]
+
+ def __init__(self) :
+ distinctNotes = []
+ for midi in self.scale :
+ tone = Tone(midi)
+ distinctNotes.append(tone)