from globals import CURSOR_LAYER
from globals import PLAYING_MODES_DICT
-class _PlayingScreenBase(pygame.sprite.LayeredDirty, EventHandlerMixin) :
+class PlayingScreenBase(pygame.sprite.LayeredDirty, EventHandlerMixin) :
def __init__(self, synth, distinctNotes=[]) :
"""
distinctNotes : notes disctinctes présentes dans la chanson
triées du plus grave au plus aigu.
"""
- super(_PlayingScreenBase, self).__init__()
+ super(PlayingScreenBase, self).__init__()
self.synth = synth
self.distinctNotes = distinctNotes
self.keyboardLength = 0
""" création des espaces réservés pour
afficher les colonnes.
"""
- #ambitus = self.distinctNotes[-1].midi - self.distinctNotes[0].midi
- #if ambitus <= 12 :
- # self.keyboardLength = 8
- #else :
- # self.keyboardLength = 11
self.keyboardLength = len(self.distinctNotes)
screen = pygame.display.get_surface()
- # taille de la zone d'affichage utile (bordure autour)
self.dispWidth = dispWidth = screen.get_width()
self.dispHeight = dispHeight = screen.get_height()
return pan
-class PlayingScreen(_PlayingScreenBase) :
+class PlayingScreen(PlayingScreenBase) :
"fenêtre de jeu pour improvisation"
scale = [55, 57, 59, 60, 62, 64, 65, 67, 69, 71, 72]
self.synth.noteoff(0, tone.midi)
-class SongPlayingScreen(_PlayingScreenBase) :
+class SongPlayingScreen(PlayingScreenBase) :
def __init__(self, synth, song, mode=PLAYING_MODES_DICT['EASY']) :
super(SongPlayingScreen, self).__init__(synth, song.distinctNotes)
def stop(self) :
pygame.time.set_timer(events.NOTEEND, 0)
super(SongPlayingScreen, self).stop()
-
+
+
\ No newline at end of file