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: Jean Abou Samra
Subject: Re: Change size of all notes in one voice with partCombine
Date: Tue, 29 Jun 2021 18:26:15 +0200 (CEST)

> Le 29/06/2021 16:18, Knute Snortum <ksnortum@gmail.com> a écrit :
> 
> 
> On Mon, Jun 28, 2021 at 6:07 PM Dinh Hoang Tu <dhoangtu@gmail.com> wrote:
> >
> > Hello Knute Snortum,
> > Thanks for your reply.
> > I just tried \magnifyMusic but it makes both voices after \partCombine 
> > smaller, not only the selected voice.
> > Did I make a mistake here?
> > \version "2.22.1"
> > smallNote = \tweak font-size -3 \etc
> > soprano = { f'4 g'4 a'4 b'4 c''2 }
> > basso = { \smallNote d'4 \smallNote e' \smallNote f' \smallNote g' 
> > \smallNote a'2 }
> > tenor = { \magnifyMusic 0.65 { d'4 e' f' g' a'2 } }
> > \new Score { \new Staff << \partCombineUp \soprano \basso >> } % expected
> > \new Score { \new Staff << \partCombineUp \soprano \tenor >> } % not 
> > expected
> That's not what I expected either. Maybe someone with more experience
> will chime in.
> 
> (To make it easier on people, I've attached the output of the above code.)

\magnifyMusic works on Voice level. When \partCombine puts the notes together 
in chords, they are in the same Voice. Same problem with \override and similar. 
You could \tweak every note automatically with something like

\version "2.22.0"

localFontSize =
#(define-music-function (font-size music) (number? ly:music?)
   (music-map
     (lambda (m)
       (if (music-is-of-type? m 'rhythmic-event)
           (tweak 'font-size font-size m)
           m))
     music))

soprano = { d' e' f' g' f' g' a' b' }

tenor = \localFontSize -3 { d' e' f' g' d' e' f' g' }

\new Score { \new Staff << \partCombineUp \soprano \tenor >>  }

Best,
Jean



reply via email to

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