lilypond-user
[Top][All Lists]
Advanced

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

Re: accordion push/pull symbols


From: David Kastrup
Subject: Re: accordion push/pull symbols
Date: Thu, 25 Jul 2013 17:22:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

"Karol Majewski" <address@hidden> writes:

> I'm trying to make my own acordion push and pull symbols. Current LilyPond 
> symbols are not that common in my part of the world. So what I have is:
>
> %%%%%%%%%%%%%%%
>
> pull =
> #(let
>   ((m
>       (make-articulation "downbow")))
>   (set!
>     (ly:music-property m 'tweaks)
>     (acons 'stencil
>       (lambda
>         (grob)
>         (grob-interpret-markup grob #{
>           \markup {
>             \override #'(box-padding . 0) \override #'(thickness . 0) \box {
>               \path #0.15
>                 #'((moveto -0.375 2)
>                   (rlineto 0.75 0)
>                   (rlineto 0 -2))
>             }
>           }
>         #}))
>       (ly:music-property m 'tweaks))) m)
>
> push =
> #(let
>   ((m
>       (make-articulation "upbow")))
>   (set!
>     (ly:music-property m 'tweaks)
>     (acons 'stencil
>       (lambda
>         (grob)
>         (grob-interpret-markup grob #{
>           \markup {
>             \override #'(box-padding . 0) \override #'(thickness . 0) \box {
>               \path #0.15
>                 #'((moveto -0.6 2)
>                   (rlineto 0.6 -2)
>                   (rlineto 0.6 2))
>             }
>           }
>         #}))
>       (ly:music-property m 'tweaks))) m)
>
> %%%%%%%%%%%%%%%
>
> What I'm trying to do now, is to make those symbols scalable when using:
>
> \new Staff \with {
>   fontSize = #-3
>   \override StaffSymbol #'staff-space = #(magstep -3)
> }
>
> No Idea how to achieve this. I tried to combine my code with the code given 
> here:

It's probably easiest to make your own markup commands for the symbols.
Then you can specify
#(define-markup-command (push layout props) ()
  #:properties (font-size 0)
  (interpret-markup layout props
    #{ \scale #(cons (magstep font-size) (magstep font-size)) ... #}))

-- 
David Kastrup




reply via email to

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