lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: changing symbols used by Measure_grouping_engraver


From: Torsten Hämmerle
Subject: Re: changing symbols used by Measure_grouping_engraver
Date: Fri, 3 Aug 2018 03:25:39 -0700 (MST)

Flaming Hakama by Elaine wrote
> In particular, how to change the symbol used to denote the dotted 8th
> value
> in compund time:
> instead of a triangle, how do I get a vertical bar (or slash)?

Hi Elaine,

The two options "triangle" and "bracket" are pretty much hardcoded.
But you can set the height (thus squeezing both forms into a vertical line
when you set height to 0) and thickness (to make this line as thick as you
like):

      \override Staff.MeasureGrouping.height = 0

That way, you'll get a vertical line (unfortunately the bracket will be
indistinguishable then from the triangle).

But you might define a custom stencil quite easily that sets the height to 0
if style is #'triangle and then calls the original print stencil.
In the following example, I've used the original snipped coding as a basis,
because in your example, there were no brackets at all.

%%%%%%%
\version "2.19.81"

#(define (custom-grouping-stencil grob)
   (let ((style (ly:grob-property grob 'style)))
     (if (eq? style 'triangle)
         (ly:grob-set-property! grob 'height 0))
     ly:measure-grouping::print))

\score {
  \new Voice \relative c'' {
    \time 9/8
    g8 g d d g g a( bes g) |
    \set Timing.beatStructure = 2,2,2,3
    g8 g d d g g a( bes g) |
    \time 4,5 9/8
    g8 g d d g g a( bes g) |
    \time 5/8
    a4. g4 |
  }
  \layout {
    \context {
      \Staff
      \consists "Measure_grouping_engraver"
      \override MeasureGrouping.stencil = #custom-grouping-stencil
    }
  }
}
%%%%%%%

<http://lilypond.1069038.n5.nabble.com/file/t3887/measure-grouping-lines.png> 

HTH,
Torsten




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]