lilypond-user
[Top][All Lists]
Advanced

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

Re: Automatic beaming


From: Trevor Daniels
Subject: Re: Automatic beaming
Date: Sun, 5 Apr 2009 11:08:23 +0100

Helge

This works with 2.11.65:

% "real score", automatic beaming, does NOT work
% Works with added revert  -td
\score {
 \relative c'' {
   \clef treble \key as \minor \time 2/4
   #(revert-auto-beam-setting '(end * * 2 4) 1 4 'Staff)
   \set Staff.beatLength = #(ly:make-moment 1 8)
%    \set Staff.beatGrouping = #'(2 2 2 2 2 2 2 2 )
%    \set Staff.beatGrouping = #'(8 8 8 8)

   << { r8 ces r ces }
      \\
      { \times 2/3 { r16 as b }
 \times 2/3 { ces b as }
 \times 2/3 { s as b }
 \times 2/3 { ces b as }
      }
    >>
 }
\layout { \context { \Staff \consists "Measure_grouping_engraver" } }
}

Trevor

----- Original Message ----- From: "Helge Kruse" <address@hidden>
To: "Trevor Daniels" <address@hidden>
Cc: <address@hidden>
Sent: Sunday, April 05, 2009 9:10 AM
Subject: Re: Automatic beaming


Trevor Daniels wrote:

Helge Kruse wrote Sunday, April 05, 2009 7:22 AM

I write a piece with where are a lot of triplets in one variation. It looks nice to have the beaming in the same length as the triplets as it
is done in the hand writing original.

I found in the manual (1.2.4 Beams) that I can manually set beaming. But since the piece has a regulare structure (almost only triples), I wanted to use automatic beaming. Unfortunately I did get i working. I attach the samples in one file (tuplet.ly) with some samples. The handwritten original score is placed here: http://dj1na.gmxhome.de/pg-0009.JPG


Sample:1 got from the manual works, shows the use of beatGrouping.

Sample:2 I modified it using beatLength, shows that automatic beaming
works with triplets.

Sample:3 This is an excerpt of the "real score", but using manual beaming. The object is to setup automatic beaming, that it produces the
same output.

Sample:4 My Playground, where no combination of beatLength and
beatGrouping gave any acceptible result.


Can you tell we, what must I do to fix this?

Setting beatLength to 1/8 will work fine, but you
must revert all the beam-ending rules for that time
signature and beam duration which are set in auto-beam.scm,
otherwise setting beatLength will not work.  There
is no need to use beatGrouping here.

In your example the required revert command is

#(revert-auto-beam-setting '(end * * 2 4) 1 4 'Staff)

This can be reverted in Voice, Staff or Score contexts.
If you use 32nd beams there are also two more rules
to revert.

You can read about this in section 1.2.4 in the Notation
Reference under Setting sutomatic beam behaviour.


Best Regards,
Helge


Trevor


Trevor,

thanks for reply. I added the line you mentioned -- it didnt show any
change. So I added these lines

    #(set-time-signature 2 4 '(1 1))
    #(revert-auto-beam-setting '(end * * 2 4) 1 4 'Staff)

assuming I have a 2/4 measure. This gives an NULL pointer exception in
lilypond.exe at address 0x00762a59 accessing memory at address
0x0000000d. I can use these settings:

    #(set-time-signature 8 16 '(2 2 2 2))
    #(revert-auto-beam-setting '(end * * 2 4) 1 4 'Staff)

But this changes the display time signature, what is not wanted. I
attached a sample that can be compiled with lilypond as it is. Could you change the last score in the file to give an appropriate result, please?


Thanks,
Helge



--------------------------------------------------------------------------------


\version "2.11.63"
\include "deutsch.ly"

% sample:1
% from snippet repository, two explicit voices, works fine
\score {
 \new Staff <<
   \time 7/8
   \new Voice {
     \relative c'' {
\set Staff.beatGrouping = #'(2 3 2)
a8 a a a a a a
     }
   }
   \new Voice {
     \relative c' {
\voiceTwo
\set Voice.beatGrouping = #'(1 3 3)
f8 f f f f f f
     }
   }
 >>
% \layout { \context { \Staff \consists "Measure_grouping_engraver" } }
}

% sample:2
% based on snippet repository shows beatGrouping with triplets, works fine % but give unexpected behavior, when the \time is changed to 4/8 or 2/4
\score {
 \new Staff <<
   \time 7/8
   \new Voice {
     \relative c'' {
\voiceTwo
\set Staff.beatLength = #(ly:make-moment 1 8)
\times 2/3 { a16 a a } \times 2/3 { a a a }
     }
   }
 >>
% \layout { \context { \Staff \consists "Measure_grouping_engraver" } }
}

% sample:3
% "real score", manual beaming, works
% but this requires manual beaming for all measures
\score {
 \relative c'' {
   \clef treble \key as \minor \time 2/4

   << { r8 ces r ces }
      \\
      { \times 2/3 { r16 as[ b] }
\times 2/3 { ces[ b as] }
\times 2/3 { s as[ b] }
\times 2/3 { ces[ b as] }
      }
    >>
   }
\layout { \context { \Staff \consists "Measure_grouping_engraver" } }
}

% "real score", automatic beaming, does NOT work
\score {
 \relative c'' {
   \clef treble \key as \minor

%    \set Staff.beatLength = #(ly:make-moment 1 8)
%    \set Staff.beatGrouping = #'(2 2 2 2 2 2 2 2 )
%    \set Staff.beatGrouping = #'(8 8 8 8)

%  causes exception
%    #(set-time-signature 1 4 '(1 1))

% cases wrong time signature
   #(set-time-signature 8 16 '(2 2 2 2))

   #(revert-auto-beam-setting '(end * * 2 4) 1 4 'Staff)

   << { r8 ces r ces }
      \\
      { \times 2/3 { r16 as b }
\times 2/3 { ces b as }
\times 2/3 { s as b }
\times 2/3 { ces b as }
      }
    >>
 }
\layout { \context { \Staff \consists "Measure_grouping_engraver" } }
}






reply via email to

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