]> git.donarmstrong.com Git - lilypond.git/commitdiff
* notation.py (Notation.change_duration_log): duration logs of all
authorhanwen <hanwen>
Fri, 29 Jul 2005 11:58:48 +0000 (11:58 +0000)
committerhanwen <hanwen>
Fri, 29 Jul 2005 11:58:48 +0000 (11:58 +0000)
notes.

* music.py (ClefEvent.__init__): add
(NoteEvent.ly_expression): add
(Music.has_children): new method.

ChangeLog
music.py
notation.py

index e188fcc52091dc101e6f32f79bc84a42ebc4a9f2..c4e90c10d1665335a00057df9341fb0451616901 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 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.
 
index 4db0b8e26af8e9bd76120e4761deecc4d666dcea..cd804b3c4a292927d14c4e5c10b3753a251d6740 100644 (file)
--- a/music.py
+++ b/music.py
@@ -258,6 +258,8 @@ class Event(Music):
 class ArpeggioEvent(Music):
        def name (self):
                return 'ArpeggioEvent'
+       def ly_expression (self):
+               return '\\arpeggio'
        
 class RhythmicEvent(Event):
        def __init__ (self):
index 457dd14ee9cc2d7a379f6044fa737399f47fb873..b06513765a57137e9dc4f8209ee6b5eb816df830 100644 (file)
@@ -401,15 +401,19 @@ class Notation:
         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