2018-08-05 13:26 GMT+02:00 James Lowe <pkx1...@runbox.com>: > Hello, > > > > On 05/08/18 08:38, James Lowe wrote: >> >> Harm, >> >> >> On 03/08/18 16:03, Thomas Morley wrote: >>> >>> 2018-08-03 16:51 GMT+02:00 James Lowe <pkx1...@runbox.com>: >>>> >>>> Hello >>>> >>>> >>>> On 03/08/18 13:32, Thomas Morley wrote: >>>>> >>>>> Hi, >>>>> >>>>> while playing with the Measure_grouping_engraver >>>>> see: >>>>> >>>>> >>>>> http://lilypond.1069038.n5.nabble.com/changing-symbols-used-by-Measure-grouping-engraver-td215283.html >>>>> I noticed two things which may qualify as bugs. >>>>> >>>>> (1) A documentation issue >>>>> >>>>> I tried to get MeasureGrouping in default 4/4-time, but nothing >>>>> happened. >>>>> One has to set beatStructure and baseMoment accordingly. The current >>>>> docs make it sound it should work out of the box, though. >>>>> >>>>> \version "2.19.82" >>>>> >>>>> \new Staff \with { \consists "Measure_grouping_engraver" } >>>>> { >>>>> %% to get MeasureGrouping, next two lines need to be >>>>> uncommented >>>>> %\set Timing.beatStructure = 4,4 >>>>> %\set Score.baseMoment = #(ly:make-moment 1/8) >>>>> \repeat unfold 8 a'8 >>>>> } >>>> >>>> >>>> Is this just a documentation issue though? >>>> >>>> *should* it work out of the box (to use your phrase) and so >>>> documentation is >>>> correct and the bug is in the code? >>>> >>>> We don't document bugs after all. >>>> >>>> James >>> >>> Hi James, >>> >>> this is not a bug in the code, afaik. >>> >>> But the functionality of MeasureGrouping relies on appropriate >>> settings for beatStructure and baseMoment. >>> This should be documented, that's all. > > > I don't know how this cannot be a bug in the code or perhaps I don't > understand how this should work but giving an example for 4/4 with the one > example doesn't help anyone either. > > For instance in an attempt to edit the existing snippet, I played about with > different \time settings to see if I could show the differences - it's > always good to show a negative before showing a positive I find. > > Why would using using \time values of 6/8, 5/8, 4/8 engrave something > (triangles) and 3/8 not? > > Playing about with the form > > \score { > { > \time X/Y > \repeat unfold 16 a'4 > } > \layout { > \context { > \Staff > \consists "Measure_grouping_engraver" > } > } > } > > Where X and Y change I cannot figure out why I get some engraving with some > values and not other > > I've attached a screenshot of some random output values. > > Why do I get something for 4/8 and not 7/8 is it because of the value of the > note and how we define a group? I cannot work out the logic to it. > > So explaining it for 4/4 makes no sense in that there has to be something > more fundamental in the explanation or it is a bug. > > Can you or anyone help? > > James > > > >
Hi James, If I understand correctly: In general the time-signature says about a measure: how many beats are present and how long are those beats. P.e. in 3/8 there are 3 beats, each a 8th note long In LilyPond we add a structure (`beatStructure`) to those beats (`baseMoment`), reflecting the most common accents and determine the auto-beaming. p.e. 9/8 is structered as three groups of three 8th-notes. For beamings not according to `beatStructure` we set `beamExceptions`, p.e. for 3/8 Now, MeasureGrouping may annotate groups of beats, _if_ groups are defined by `beatStructure`, see 9/8. Single beats will not cause any MeasureGrouping, see 3/8. Here some test-code: displaySomeContextPoperties = \context Timing \applyContext #(lambda (ctx) (newline) (format #t "timeSignatureFraction: ~a\n\tbeatStructure: ~a\n\tbaseMoment: ~a \tbeamExceptions: ~a\n" (ly:context-property ctx 'timeSignatureFraction) (ly:context-property ctx 'beatStructure) (ly:context-property ctx 'baseMoment) (ly:context-property ctx 'beamExceptions))) \new Staff \with { \consists "Measure_grouping_engraver" } { \time 3/8 \displaySomeContextPoperties \repeat unfold 3 { a'8 } \time 4/8 \displaySomeContextPoperties \repeat unfold 4 { a'8 } \time 5/8 \displaySomeContextPoperties \repeat unfold 5 { a'8 } \time 6/8 \displaySomeContextPoperties \repeat unfold 6 { a'8 } \time 7/8 \displaySomeContextPoperties \repeat unfold 7 { a'8 } \time 8/8 \displaySomeContextPoperties \repeat unfold 8 { a'8 } \time 9/8 \displaySomeContextPoperties \repeat unfold 9 { a'8 } \time 1/4 \displaySomeContextPoperties \repeat unfold 2 { a'8 } \time 2/4 \displaySomeContextPoperties \repeat unfold 4 { a'8 } \time 3/4 \displaySomeContextPoperties \repeat unfold 6 { a'8 } \time 4/4 \displaySomeContextPoperties \repeat unfold 8 { a'8 } } Terminal-output: timeSignatureFraction: (3 . 8) beatStructure: (1 1 1) baseMoment: #<Mom 1/8> beamExceptions: ((end (1/8 3))) timeSignatureFraction: (4 . 8) beatStructure: (2 2) baseMoment: #<Mom 1/8> beamExceptions: () timeSignatureFraction: (5 . 8) beatStructure: (3 2) baseMoment: #<Mom 1/8> beamExceptions: () timeSignatureFraction: (6 . 8) beatStructure: (3 3) baseMoment: #<Mom 1/8> beamExceptions: () timeSignatureFraction: (7 . 8) beatStructure: (1 1 1 1 1 1 1) baseMoment: #<Mom 1/8> beamExceptions: () timeSignatureFraction: (8 . 8) beatStructure: (3 3 2) baseMoment: #<Mom 1/8> beamExceptions: () timeSignatureFraction: (9 . 8) beatStructure: (3 3 3) baseMoment: #<Mom 1/8> beamExceptions: () timeSignatureFraction: (1 . 4) beatStructure: (1) baseMoment: #<Mom 1/4> beamExceptions: () [ timeSignatureFraction: (2 . 4) beatStructure: (1 1) baseMoment: #<Mom 1/4> beamExceptions: () timeSignatureFraction: (3 . 4) beatStructure: (1 1 1) baseMoment: #<Mom 1/4> beamExceptions: ((end (1/8 6) (1/12 3 3 3))) timeSignatureFraction: (4 . 4) beatStructure: (1 1 1 1) baseMoment: #<Mom 1/4> beamExceptions: ((end (1/8 4 4) (1/12 3 3 3 3))) So, MeasureGrouping does not happen for time-signatures where the `beatStructure` is a list of single beats, like 3/8 or 7/8 or 3/4 etc. At least not per default. One can try playing with `beatStructure` and probably `baseMoment` to get MeasureGrouping, though. See: \new Staff \with { \consists "Measure_grouping_engraver" } { \time 3/8 a'8 8 8 \set Timing.beatStructure = #'(3) 8 8 8 } Changing `beatStructure` and probably `baseMoment` ofcourse affects auto-beaming. We explain this already elsewhere, but probably we'll should mention it in the section for MeasureGrouping as well. HTH, Harm _______________________________________________ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond