lilypond-user
[Top][All Lists]
Advanced

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

Function for tweaks


From: Helge Kruse
Subject: Function for tweaks
Date: Sat, 6 Oct 2018 12:12:03 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Hi,

I want to use kneed beams for my score. These look ugly if the system
system distance is too small. Therefor I extend the spacing as in the
following example. Removing the percent character gives a reasonable
spacing.

\version "2.18.2"
\language "deutsch"

staffUpper = { \change Staff="upper" }
staffLower = { \change Staff="lower" }

upper = \relative c'' {
    c1 % -\tweak #'stencil #(ly:make-stencil '() '(0 . 0.1) '(0 . 6.) ) _""
}

lower = \relative c' {
  \clef bass
  \override Beam.auto-knee-gap = #-8
  f,16 [ \staffUpper d'16 \staffLower
  as16 \staffUpper d16 ] \staffLower
  f,16 [ \staffUpper d'16 \staffLower
  as16 \staffUpper d16 ] \staffLower
  fis,16 [ \staffUpper es'16 \staffLower
  a,16 \staffUpper es'16 ] \staffLower
  fis,16 [ a16 \staffUpper es'16 \staffLower a,16 ]
}

\score {
  \new PianoStaff <<
    \new Staff = "upper" \upper
    \new Staff = "lower" \lower
  >>
}

I want to save typing and it's tedious to write the complete tweak each
time. But the Y size must be adapted each time. Therefore a function is
necessary to change the current required value that is 6 in the example.

I've experimented with define-markup-command and define-music-function
by GUILE always outputs errors.

How can this tweak be folded in a function? What kind of function is
required?

Best regards
Helge



reply via email to

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