projects
/
minwii.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
restitution des mouvements du curseur.
[minwii.git]
/
src
/
app
/
widgets
/
playingscreen.py
diff --git
a/src/app/widgets/playingscreen.py
b/src/app/widgets/playingscreen.py
index
736dd06
..
67039e7
100755
(executable)
--- a/
src/app/widgets/playingscreen.py
+++ b/
src/app/widgets/playingscreen.py
@@
-23,14
+23,14
@@
from globals import BACKGROUND_LAYER
from globals import CURSOR_LAYER
from globals import PLAYING_MODES_DICT
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.
"""
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
self.synth = synth
self.distinctNotes = distinctNotes
self.keyboardLength = 0
@@
-47,16
+47,10
@@
class _PlayingScreenBase(pygame.sprite.LayeredDirty, EventHandlerMixin) :
""" création des espaces réservés pour
afficher les colonnes.
"""
""" 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()
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()
self.dispWidth = dispWidth = screen.get_width()
self.dispHeight = dispHeight = screen.get_height()
@@
-94,7
+88,7
@@
class _PlayingScreenBase(pygame.sprite.LayeredDirty, EventHandlerMixin) :
EventDispatcher.dispatchEvents()
dirty = self.draw(pygame.display.get_surface())
pygame.display.update(dirty)
EventDispatcher.dispatchEvents()
dirty = self.draw(pygame.display.get_surface())
pygame.display.update(dirty)
- clock.tick(
FRAMERATE
)
+ clock.tick()
def stop(self) :
self._running = False
def stop(self) :
self._running = False
@@
-153,7
+147,7
@@
class _PlayingScreenBase(pygame.sprite.LayeredDirty, EventHandlerMixin) :
return pan
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]
"fenêtre de jeu pour improvisation"
scale = [55, 57, 59, 60, 62, 64, 65, 67, 69, 71, 72]
@@
-177,7
+171,7
@@
class PlayingScreen(_PlayingScreenBase) :
self.synth.noteoff(0, tone.midi)
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 __init__(self, synth, song, mode=PLAYING_MODES_DICT['EASY']) :
super(SongPlayingScreen, self).__init__(synth, song.distinctNotes)
@@
-244,4
+238,5
@@
class SongPlayingScreen(_PlayingScreenBase) :
def stop(self) :
pygame.time.set_timer(events.NOTEEND, 0)
super(SongPlayingScreen, self).stop()
def stop(self) :
pygame.time.set_timer(events.NOTEEND, 0)
super(SongPlayingScreen, self).stop()
-
+
+
\ No newline at end of file