lilypond-user
[Top][All Lists]
Advanced

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

Re: Change size of all notes in one voice with partCombine


From: Aaron Hill
Subject: Re: Change size of all notes in one voice with partCombine
Date: Thu, 01 Jul 2021 22:44:53 -0700
User-agent: Roundcube Webmail/1.4.9

On 2021-07-01 10:11 pm, Dinh Hoang Tu wrote:
Yes, I did try \partCombineChords, but it doesn't seem what I expect.
Expectation is 2 notes on same stem, one upper, one lower, not on separate
stems.

Below is the test and attached result (2 notes have separate stems)

\version "2.22.1"
localFontSize =
#(define-music-function (font-size music) (number? ly:music?)
   (for-some-music
     (lambda (m)
       (if (music-is-of-type? m 'rhythmic-event)
           (begin
             (set! (ly:music-property m 'tweaks)
                   (cons `(font-size . ,font-size)
                         (ly:music-property m 'tweaks)))
             #t)
           #f))
     music)
   music)

soprano = { f'4 g'4 a'4 b'4 c''2 }
basso = { d'4 e' f'' g' a'2 }
alto = { d'4 e' \stemUp f'' g' a'2 }
tenor = { d'4 e' f'' g' a'2 }
\new Score { \new Staff << \partCombineChords \soprano \basso >> }
\new Score { \new Staff << \partCombineChords \soprano \alto >> }
\new Score { \new Staff << \partCombineChords \soprano \localFontSize -3
\tenor >> }

Please advice if any mistake or missing.

\partCombineChords is not a substitute for \partCombine.

The former just sets an internal state for the part combiner, however you must use \partCombine to invoke the combiner. Consider:

%%%%
soprano = { f'4 g'4 a'4 b'4 c''2 }
tenor = { d'4 e' f'' g' a'2 }
\partCombine
  { \partCombineChords \soprano }
  { \stemUp \localFontSize -3 \tenor }
%%%%


-- Aaron Hill

Attachment: part-combine.cropped.png
Description: PNG image


reply via email to

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