+
+class SongPlayingScreen(_PlayingScreenBase) :
+
+ def __init__(self, synth, song, mode=PLAYING_MODES['NORMAL']) :
+ super(SongPlayingScreen, self).__init__(synth, song.distinctNotes)
+ self.song = song
+ self.currentColumn = None
+ self.noteIterator = self.song.iterNotes()
+ self.displayNext()
+
+ def displayNext(self) :
+ if self.currentColumn:
+ self.currentColumn.update(False)
+ note, verseIndex = self.noteIterator.next()
+ syllabus = note.lyrics[verseIndex].syllabus(encoding="iso-8859-1")
+ column = self.columns[note.midi]
+ column.update(True, syllabus)
+ self.currentColumn = column
+ self.currentNotePlayed = False
+
+ @event_handler(events.COLDOWN)
+ def handleColumnDown(self, event) :
+ col = event.column
+ if col.state:
+ self.synth.noteon(0, col.tone.midi, DEFAULT_MIDI_VELOCITY)
+ self.currentNotePlayed = True