Hi Harm,

Well and indeed! Using this technique solves the problem. Thank you.
Curiously, I make heavy use of this in my scores, but just could not see my
way around it in this instance.

Image of exact solution attached. The crux of it is the transition between
up and down beaming where you can just say something like this for the
d-sharp in question:

 \once \override Stem.beaming = #'((0 1 2) . (14 15 16)) dis'''32

For anybody who comes across this matter in the future, my example code is
attached - a bit too involved to be an MWE I am afraid.

Gratitude to all for helping with this one!

Andrew



On 25 March 2017 at 08:25, Thomas Morley <thomasmorle...@gmail.com> wrote:

>
> Nevertheless, a hint (no idea whether it will be really helpful):
>
> {
>     b'16^[
>     \once \override Stem.beaming = #(cons (list 0  1) (list 0))
>     g''16
>     \once \override Stem.beaming = #(cons (list 0  1) (list 3 4 5))
>     dis'16
>     fis''32]
> }
>
>
\version "2.19.58"

% functions ======

setBeamPosAll =
#(define-music-function
  (left right)
  (number? number?)
  "Manually set beam position for following groups."
  #{
    \override Beam.positions = #(cons left right)
  #})

setBeams =
#(define-music-function
  (left right)
  (number? number?)
  "Set the number of beams on each side of a beamed note.
  Only designed to be used for 'normal' cases.
  Specify the number of beams for the left and the number for the right side."
  (define seq
    ;; (seq start count)
    ;; make a sequence of integers, as a list
    ;; start: starting integer
    ;; count: how many elements
    (lambda (start count)
      (let r ((i (+ start (- count 1))) (lis '()))
        (if (< i start)
            lis
            (r (- i 1) (cons i lis))))))
  #{
    \once \override Stem.beaming = #(cons (seq 0 left) (seq 0 right))
  #})

setBeaming =
#(define-music-function
  (positions)
  (pair?)
  "Specify left and right beaming and individual beams.
  Arg is a pair of lists of beam positions."
  #{
    \once \override Stem.beaming = #(cons (car positions) (cdr positions))
  #})

% abbreviations ======

#(define t tuplet)
#(define sb setBeams)
#(define sbm setBeaming)
% stems and staff changes
tsd = { \change Staff = treble \stemDown }
tsu = { \change Staff = treble \stemUp }
bsu = { \change Staff = bass \stemUp }
bsd = { \change Staff = bass \stemDown }
#(define su stemUp)
#(define sd stemDown)


% exmaple ======

treble = {
  \clef "treble^8"
  \cadenzaOn % just remove barlines to declutter example
  \su
  \setBeamPosAll 8 8
  b'''16[ \t 5/4 { \sb 1 2 dis''' cis'' dis''' b'' \sb 2 1 f''' }
  \t 5/4 { \sb 1 2 d'' f''' bes'' f''' \sb 2 1 gis'' } \sb 1 2 b'' g'''^>
  \bsu \clef "treble^8"
  \sbm #'((0 1 2) . (14 15 16)) dis'''32
  \tsd
  \revert Beam.positions
  \sbm #'((0 1 2 ) . (1 0)) fis''''32
  \bsu
  \sbm #'((0 1) . (-1 0 1)) gis''' \tsd
  \sbm #'((-1 -2) . (-1 -2)) a''''16
  cis'''' cis'''' \sb 3 1 a''''32
  \bsu
  \sbm #'((0) . (0 -1 -2)) dis''''
  \tsd \sb 3 2 g'''' \bsu
  \sbm #'((0 1) . (1 0 -1)) cis''''
  \tsd
  bes'''']
}

bass = {
  \clef bass
  s4 * 6
}

\score {
  \new PianoStaff \with {
    \override VerticalAxisGroup.staff-staff-spacing =
    #'((basic-distance . 14)
       (minimum-distance . 4)
       (padding . 1)
       (stretchability . 8))
  }
  <<
    \new Staff = "treble" \with {
    }
    { \treble }

    \new Staff = "bass" \with {
    }
    { \bass }
  >>

  \layout {
    \context {
      \Score
      \accidentalStyle Score.dodecaphonic
    }
  }
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to