lilypond-user
[Top][All Lists]
Advanced

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

Re: Automatic beams


From: Hans Aikema
Subject: Re: Automatic beams
Date: Sun, 08 Apr 2012 16:26:45 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1

On 8-4-2012 12:50, Helge Kruse wrote:
Hello,

I need to typeset a piece but want to keep the original beaming. The beams that Lilypond uses per default does not match. I know I can add the [] to manually control beaming, but I hope I can do this more declarative as described in notation reference "1.2.4 Beams".

In this measure I want to break up the sextuplets in treble to a 3+3 group. The semiquavers should be grouped 2+2.
The quavers in the base staff should be grouped 2+2.

\version "2.14.2"
\new PianoStaff <<
  \new Staff {
    \time 4/4 \key g \major
    \set Timing.baseMoment = #(ly:make-moment 1 16)
    \set Timing.beatStructure = #'(2 2 2 2)
    \relative c'' {
      \times 4/6{c'16 a b c b a } \times 4/6{r e fis g fis e }
      fis16 d fis a r fis a c | % 24
    }
   }
  \new Staff {
    \time 4/4 \key g \major \clef bass
    \set Timing.baseMoment = #(ly:make-moment 1 8)
    \set Timing.beatStructure = #'(2 2 2 2)
    \relative c {
      fis8 d' g, d' a d b d | % 24
    }
  }
>>


I can change the beaming with beatStructure, but baseMomemt doesn't change anything. I also tried with Staff and Voice context but got the same result.

How can I achieve the described grouping?

Regards,
Helge


_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user
.

The way to get the desired grouping would be overriding the beamExceptions:
(see also NR chapter 1.2.4: http://lilypond.org/doc/v2.14/Documentation/notation/beams#setting-automatic-beam-behavior)

In this modified source I've set the autobeam exceptions globally on the Timing context to affect both staves. It needs to be after the last \time because \time also sets Timing.beamExceptions. (you could also set Staff.beamExceptions per staff after the \time of that staff)

\version "2.14.2"
\new PianoStaff <<
  \new Staff {
    \time 4/4 \key g \major
    \relative c'' {
      \times 4/6{c'16 a b c b a } \times 4/6{r e fis g fis e }
      fis16 d fis a r fis a c | % 24
    }
   }
  \new Staff {
    \time 4/4 \key g \major \clef bass
    \set Timing.beamExceptions =
    #'(                         ;start of alist
     (end .                   ;entry for end of beams
      (                       ;start of alist of end points
       ((1 . 8) . (2 2 2 2))   ;rule for 1/8 beams -- end each 1/4
((1 . 16) . (2 2 2 2 2 2 2 2)) ;rule for 1/16 beams -- end each 1/8
      )))                     %close all entries
    \relative c {
      fis8 d' g, d' a d b d | % 24
    }
  }
>>

I found out that this override needs to be present only on the second staff to be effective on both. Not sure if that's intended Lilypond behaviour or a bug, but putting it only on the first staff does absolutely nothing.

regards,
Hans



reply via email to

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