d 2017-08-03 19:05 GMT+02:00 Kieren MacMillan <kieren_macmil...@sympatico.ca>: > Hello all, > > In the snippet included below, I'm using a custom ScoreMarks context to show > MetronomeMarks (plus, in the real world, RehearsalMarks and other things) > above the system. The problem is, in order to have the MetronomeMark align > correctly with the TimeSignature, I must (?) include the TimeSignature in > some form or other. But I don't want the actual grob to appear, or affect > spacing in any way *other than* helping with alignment. > > All the attempts I've tried (\omit-s, stencil tweaks, etc.) throw "cyclic > chain in pure-Y-offset callbacks" errors, which I have just been ignoring > (for years now). But I'd like to solve this once and for all, if possible… > > 1. Is the error more serious than a simply aesthetic problem? > > 2. If not, is there some way to avoid seeing the errors? > > 3. In any case, is there a better way of doing what I'm trying to do (i.e., > one that won't cause the error in the first place)? > > Thanks, > Kieren. > > %%% SNIPPET BEGINS > \version "2.19" > > \layout { > \context { > \type "Engraver_group" > \name ScoreMarks > \consists "Staff_collecting_engraver" > \consists "Axis_group_engraver" > \override VerticalAxisGroup.staff-affinity = #DOWN > \consists "Metronome_mark_engraver" > \override MetronomeMark.break-align-symbols = > #'(left-edge staff-bar clef time-signature key-signature) > \override MetronomeMark.non-break-align-symbols = > #'(paper-column-interface) > } > \context { > \Score > \remove "Metronome_mark_engraver" > \remove "Mark_engraver" > \accepts ScoreMarks > } > } > > global = { > \tempo "Testing" > \time 2/2 > s1 > } > > \markup "No TimeSignature in ScoreMarks = incorrect alignment:" > \score { > << > \new ScoreMarks \global > \new Staff << \global c''1 >> > >> > } > > \markup "TimeSignature in ScoreMarks = correct alignment + unwanted grob + > error:" > \score { > << > \new ScoreMarks \global > \new Staff << \global c''1 >> > >> > \layout { > \context { > \ScoreMarks > \consists "Time_signature_engraver" > } > } > } > > \markup "TimeSignature included in and then \omit-ed from ScoreMarks = > correct alignment + error:" > \score { > << > \new ScoreMarks \global > \new Staff << \global c''1 >> > >> > \layout { > \context { > \ScoreMarks > \consists "Time_signature_engraver" > \omit TimeSignature > } > } > } > %%% SNIPPET ENDS > > ________________________________ > > Kieren MacMillan, composer > ‣ website: www.kierenmacmillan.info > ‣ email: i...@kierenmacmillan.info
Hi Kieren, if I understand correctly, consisting "Staff_collecting_engraver" is part of the Problem. This makes sense only if ScoreMarks would be of type staff, which it isn't currently. More, your setting of \override VerticalAxisGroup.staff-affinity = #DOWN let me think you don't _want_ it to be of type staff. See NR 4.4.1: "Setting staff-affinity to UP, CENTER, or DOWN causes a staff to be spaced as a non-staff line." Other problem is MetronomeMark.break-align-symbols can't do proper aligning to time-signature if "Time_signature_engraver" is not in ScoreMarks. So delete the "Staff_collecting_engraver" from ScoreMarks, consist the "Time_signature_engraver" and omit TimeSignature If you really want the "Staff_collecting_engraver" in, consists "Staff_symbol_engraver" and do \override StaffSymbol.line-count = #0 Probably, don't set staff-affinity and space ScoreMarks vertically with staff-staff-spacing. \layout { \context { \type "Engraver_group" \name ScoreMarks \consists "Axis_group_engraver" \override VerticalAxisGroup.staff-affinity = #DOWN \override VerticalAxisGroup.nonstaff-relatedstaff-spacing.padding = 10 \consists "Time_signature_engraver" \omit TimeSignature \consists "Metronome_mark_engraver" \override MetronomeMark.break-align-symbols = #'(left-edge staff-bar clef time-signature key-signature) \override MetronomeMark.non-break-align-symbols = #'(paper-column-interface) } %% Or: %{ \context { \type "Engraver_group" \name ScoreMarks \consists "Staff_collecting_engraver" \consists "Staff_symbol_engraver" \override StaffSymbol.line-count = #0 \consists "Axis_group_engraver" \override VerticalAxisGroup.staff-staff-spacing.padding = 10 \consists "Time_signature_engraver" \omit TimeSignature \consists "Metronome_mark_engraver" \override MetronomeMark.break-align-symbols = #'(left-edge staff-bar clef time-signature key-signature) \override MetronomeMark.non-break-align-symbols = #'(paper-column-interface) } %} \context { \Score \remove "Metronome_mark_engraver" \remove "Mark_engraver" \accepts ScoreMarks } } global = { \tempo "Testing" \time 2/2 s1 } \markup "correct" \score { << \new ScoreMarks \global \new Staff << \global c''1 >> >> } HTH, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user