> -----Original Message----- > From: Kieren MacMillan [mailto:[email protected]] > Sent: Wednesday, December 19, 2012 2:38 PM > To: Daniel Rosen > Cc: Xavier Scheuer; [email protected] > Subject: Re: MetronomeMark alignment after break > > Hi Daniel, > > > Any ideas as to how to work around it in the meantime? > > This hack (can't remember who did this for me?) seems to work. > > Hope it helps! > Kieren. > > \layout { > \context { > \Score > \override MetronomeMark #'after-line-breaking = > #(lambda (grob) > (and > ;; probably overkill, but better to be on the safe side > (= (ly:item-break-dir grob) RIGHT) > ;; if the X-parent is suicided, it was originally > ;; a copy of the BarLine at the end of the previous > ;; system, which means there are no useful break-aligned > ;; anchors (e.g., TimeSignature) for the MetronomeMark > (not (grob::is-live? (ly:grob-parent grob X))) > (let* ((system (ly:grob-system grob)) > ;; all the useful grobs inside this system as a list > (elts (ly:grob-array->list > (ly:grob-object system 'elements))) > ;; get the BreakAlignment at the start of the > ;; system so we can use its extent to translate the > ;; mark away from prefatory matter > (alignment (car (filter > (lambda (g) > (grob::has-interface g > 'break-alignment-interface)) > elts))) > ;; get length of BreakAlignment relative to system and add a > little > ;; padding to ensure skylining doesn't push the mark up > (offset (+ 0.5 (interval-length (ly:grob-extent alignment > system X))))) > > ;; move MetronomeMark past BreakAlignment > (ly:grob-translate-axis! grob offset X))) > ;; call default callback > (ly:side-position-interface::move-to-extremal-staff grob)) > } > }
Fantastic, thanks! DR _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
