notes.
* music.py (ClefEvent.__init__): add
(NoteEvent.ly_expression): add
(Music.has_children): new method.
2005-07-29 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * notation.py (Notation.change_duration_log): duration logs of all
+ notes.
+
* ikebana.py (NotationApplication.tree_selection_changed): new
function.
class ArpeggioEvent(Music):
def name (self):
return 'ArpeggioEvent'
+ def ly_expression (self):
+ return '\\arpeggio'
class RhythmicEvent(Event):
def __init__ (self):
if ( self.music_cursor.name() == 'NoteEvent'
or self.music_cursor.name() == 'RestEvent'):
+ m = self.music_cursor
dur = self.music_cursor.duration
dl = dur.duration_log
dl += dir
- if dl <= 6 and dl >= -2:
- dur.duration_log = dl
+ if dl > 6 and dl < -2:
+ return None
+
+ evs = [x for x in m.parent.elements if x.name() in ('NoteEvent', 'RestEvent')]
+ for e in evs:
+ e.duration.duration_log = dl
self.touch_document ()
-
def ensure_note (self):
if self.music_cursor.name() == 'RestEvent':
m = self.music_cursor