lilypond-user
[Top][All Lists]
Advanced

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

Re: Controlling stem lengths in a global way


From: Knute Snortum
Subject: Re: Controlling stem lengths in a global way
Date: Mon, 15 Aug 2022 16:52:54 -0700

On Mon, Aug 15, 2022 at 4:27 PM Aaron Hill <lilypond@hillvisions.com> wrote:
>
> Another option is to use grob-transformer, which allows for smarter
> logic such as handling stem direction:
>
> %%%%
> ns = \once {
>    \normalsize
>    \override Beam.positions =
>    #(grob-transformer 'positions (lambda (grob orig)
>      (let ((dir (ly:grob-property grob 'direction)))
>       (cons (+ (car orig) (* dir 0.75)) (cdr orig)))))
> }
>
> \relative d'' {
>    \magnifyMusic #2/3 {
>      \scaleDurations 2/3 {
>        %% Some upward stem examples...
>        \ns d16 f, g c, f g
>        \ns c e, g c, e g
>        %% Some downward stem examples...
>        \ns f d' c e d c
>        \ns g d' b f' d b |
>      }
>    }
> }
> %%%%
>
>
> -- Aaron Hill

Amazing.  Thanks!

--
Knute Snortum



reply via email to

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