>
> ---------- Forwarded message ----------
> From: Flaming Hakama by Elaine <[email protected]>
> To: Lilypond-User Mailing List <[email protected]>
> Date: Fri, 3 Aug 2018 13:50:32 -0700
> Subject: Re:changing symbols used by Measure_grouping_engraver
>
>
> We have a winner!
>
>
> Thanks you, this works perfectly.
>
> Much appreciated.
>
>
> Sincerely,
>
> Elaine Alt
>
\version "2.19.82"
%{
To follow up after playing around with this,
there are a few things that might be useful to point out.
I wonder if such an example should be included in the docs?
One is that the grouping symbol is only printed when there is a note/rest
on the beat.
For dotted halfs in compound time, for example, only one beat is shown.
This is easy enough to fix by paralleling in some spacers that show all the
beats.
But is there a setting that would do this automatically?
The other thing is that they are not printed on the same y axis.
This can be consisted [sic] by moving them to their own staff.
But then, you need to adjust the staff spacing to get them close enough.
%}
#(define triangle->vertical-line-stencil
(lambda (grob)
(let* ((style (ly:grob-property grob 'style))
(thickness (ly:grob-property grob 'thickness))
(staff-line-thick (ly:staff-symbol-line-thickness grob))
(thick (* thickness staff-line-thick))
(height (ly:grob-property grob 'height)))
(if (eq? style 'triangle)
(make-line-stencil
thick ;width
;; 0.5 is my choice, probably catch NoteColumn and take half of
;; its extent
0.5 ;startx
0 ;starty
0.5 ;endx
height ;endy
)
ly:measure-grouping::print))))
global = {
\time 15/8
\set Timing.beatStructure = 3,3,3,3,3
s1*15/8
}
beatPattern = \relative c' {
\override Staff.MeasureGrouping.stencil =
#triangle->vertical-line-stencil
s4. s s s s
}
music = \relative c' {
c8 ( e g ) c8 ( e g ) c8 ( e g ) g,2.
}
% This one successfully uses the #triangle->vertical-line-stencil
% But it doesn't show all beats
% And the grouping marks are not on the same vertical line
\score {
<<
\new Staff {
<<
\global
\override Staff.MeasureGrouping.stencil =
#triangle->vertical-line-stencil
\music
>>
}
>>
\layout {
\context {
\Staff
\consists "Measure_grouping_engraver"
}
}
}
% Showing all beats by including a spacer subdivision
% Getting consistent vertical alignment by including the grouper on a new
rhythmic staff
% But the beat symbols are too far away.
\score {
<<
\new RhythmicStaff {
<<
\global
\beatPattern
>>
}
\new Staff {
<<
\global
\music
>>
}
>>
\layout {
\context {
\RhythmicStaff
\remove "Time_signature_engraver"
\remove "Clef_engraver"
\override BarLine.transparent = ##t
\override StaffSymbol.line-count = #0
\consists "Measure_grouping_engraver"
}
}
}
% Showing all beats by including a spacer subdivision
% Getting consistent vertical alignment by including the grouper on a new
rhythmic staff
% And then moving it closer to the music staff by setting
staff-staff-spacing.
\score {
<<
\new RhythmicStaff \with {
\override VerticalAxisGroup.staff-staff-spacing.basic-distance
= #4
} {
<<
\global
\beatPattern
>>
}
\new Staff {
<<
\global
\music
>>
}
>>
\layout {
\context {
\RhythmicStaff
\remove "Time_signature_engraver"
\remove "Clef_engraver"
\override BarLine.transparent = ##t
\override StaffSymbol.line-count = #0
\consists "Measure_grouping_engraver"
}
}
}
Please let me know if you think the docs could benefit from such an
example,
or at least mentioning the behavior about long notes, and vertical
alignment.
Thanks,
Elaine Alt
415 . 341 .4954 "*Confusion is
highly underrated*"
[email protected]
Producer ~ Composer ~ Instrumentalist
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user