X-Git-Url: https://svn.cri.ensmp.fr/git/minwii.git/blobdiff_plain/46f3ffd7fdde386f41020171b5733e55a8e64a85..6ac0f3c83c7f2b916038acfed564ba6c7fe8e9f4:/src/minwii/widgets/playingscreen.py?ds=sidebyside diff --git a/src/minwii/widgets/playingscreen.py b/src/minwii/widgets/playingscreen.py index 0735825..0e179dd 100755 --- a/src/minwii/widgets/playingscreen.py +++ b/src/minwii/widgets/playingscreen.py @@ -7,22 +7,22 @@ $Id$ $URL$ """ import pygame -from cursors import WarpingCursor -from column import Column -import events -from eventutils import event_handler, EventDispatcher, EventHandlerMixin import types -from musicxml import Tone -from config import FRAMERATE -from config import FIRST_HUE -from config import MIDI_VELOCITY_RANGE -from config import MIDI_PAN_RANGE -from config import MIDI_VELOCITY_WRONG_NOTE_ATTN +import minwii.events as events +from minwii.eventutils import event_handler, EventDispatcher, EventHandlerMixin +from minwii.musicxml import Tone +from minwii.config import FRAMERATE +from minwii.config import FIRST_HUE +from minwii.config import MIDI_VELOCITY_RANGE +from minwii.config import MIDI_PAN_RANGE +from minwii.config import MIDI_VELOCITY_WRONG_NOTE_ATTN +from minwii.globals import BACKGROUND_LAYER +from minwii.globals import CURSOR_LAYER +from minwii.globals import PLAYING_MODES_DICT -from globals import BACKGROUND_LAYER -from globals import CURSOR_LAYER -from globals import PLAYING_MODES_DICT +from cursors import WarpingCursor +from column import Column class PlayingScreenBase(pygame.sprite.LayeredDirty, EventHandlerMixin) : @@ -293,7 +293,10 @@ class SongPlayingScreen(PlayingScreenBase) : if self.currentColumn: self.currentColumn.update(False) note, verseIndex = self.noteIterator.next() - syllabus = note.lyrics[verseIndex].syllabus() + try : + syllabus = note.lyrics[verseIndex].syllabus() + except IndexError : + syllabus = u'…' column = self.columns[note.midi] column.update(True, syllabus) self.currentColumn = column