[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Beam subdivision
From: |
Thomas Morley |
Subject: |
Re: Beam subdivision |
Date: |
Tue, 10 Mar 2015 23:16:25 +0100 |
2015-03-10 22:29 GMT+01:00 Trevor Daniels <address@hidden>:
> tisimst wrote Tuesday, March 10, 2015 4:52 PM
>
>> The other question the OP was asking is can
>> the group default to have TWO full beams
>> across the group, ...
>> I had a look through the IR and couldn't find
>> anything that says it will only use a SINGLE
>> beam across the whole group.
>
> The snippet in NR 1.2.4 Beams which shows how to subdivide beams says:
>
> "When set, multiple beams will be subdivided at intervals defined by the
> current value of baseMoment by reducing the multiple beams to just one beam
> between the sub-groups."
>
> But you're right in the sense that there is no accessible property that
> controls the number of inter-group beams, and there should be, or even
> better, LilyPond should just do the correct subdivision if subdivideBeams is
> set. In "Behind Bars", on pages 156-157, Elaine Gould makes it quite
> explicit that using a single beam to separate groups of four 64th notes is
> wrong. She says, "the number of beams separating the groups [should be]
> equal to the duration of the groups they separate". A group of four 64th
> notes equals a 16th, so two such groups should be separated by a 16th beam,
> i.e. two beams. Four such groups should have two beams between first and
> second and between third and fourth groups, and a single beam between second
> and third. She gives an example showing exactly this.
>
> There is an enhancement request for this: see
> https://code.google.com/p/lilypond/issues/detail?id=2361
>
> Trevor
I'm with Trevor, LilyPond's default should do it correctly, if
subdivideBeams = ##t
Nevertheless, maybe the following is of some help for the current request.
Although trying to typeset the example David Bobroff gave in said
issue is not really convincing.
\version "2.19.16"
set-connected-beam-counts =
#(define-music-function (parser location val music)(integer? ly:music?)
#{
\temporary
\override Stem.after-line-breaking =
#(lambda (grob)
(let*((beaming (ly:grob-property grob 'beaming)))
(if (>= val 0)
(begin
(if (and (list? (car beaming))
(= (caar beaming) 0))
(ly:grob-set-property! grob 'beaming
(cons (iota val) (cdr beaming))))
(if (and (list? (cdr beaming))
(= (cadr beaming) 0))
(ly:grob-set-property! grob 'beaming
(cons (car beaming) (iota val)))))
(ly:message "negative beam-count detected, ignoring"))))
$music
\revert Stem.after-line-breaking
#})
%%%%%%%%%%%%%%%%%%%%%%
%% EXAMPLE
%%%%%%%%%%%%%%%%%%%%%%
\paper { line-width = 80 indent = 0 }
mI = \tuplet 5/4 { e,32[ c' bes e d bes' g d' d, aes'] \bar "" \break }
mII = \tuplet 5/4 { e,128[ c' bes e d bes' g d' d, aes'] \bar "" \break }
mIII = { c64[ d e f g f e d c d e f] \bar "" \break }
\version "2.18.2"
\relative c'' {
\cadenzaOn
\set subdivideBeams = ##t
\set beatStructure = #'(5)
\set baseMoment = #(ly:make-moment 1/20)
\set-connected-beam-counts 2
\mI
\set baseMoment = #(ly:make-moment 1/80)
\set-connected-beam-counts 0
\mII
\set-connected-beam-counts 1
\mII
\set-connected-beam-counts 2
\mII
\set-connected-beam-counts 3
\mII
\set-connected-beam-counts 4
\mII
\set-connected-beam-counts 5
\mII
\set-connected-beam-counts 6
\mII
\set-connected-beam-counts 7
\mII
\set baseMoment = #(ly:make-moment 2/64)
\set-connected-beam-counts 1
\mIII
\set baseMoment = #(ly:make-moment 3/64)
\set-connected-beam-counts 2
\mIII
\set baseMoment = #(ly:make-moment 4/64)
\set-connected-beam-counts 3
\mIII
}
%% https://code.google.com/p/lilypond/issues/detail?id=2361
%% typesetting the example by David Bobroff
\relative c {
\clef bass
\key e \major
\omit Staff.TimeSignature
\time 3/8
\set subdivideBeams = ##t
\set baseMoment = #(ly:make-moment 1/16)
fis8~
fis32.
\set-connected-beam-counts 2
{ gis64 fis32.} gis64
fis32.
\set-connected-beam-counts 2
{ gis64 fis32. }
gis64
}
Cheers,
Harm