lilypond-user
[Top][All Lists]
Advanced

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

Re: slashed circle for harmonium organ stops


From: Thomas Morley
Subject: Re: slashed circle for harmonium organ stops
Date: Sun, 4 Dec 2016 12:54:17 +0100

2016-12-04 8:57 GMT+01:00 arnepe <address@hidden>:
> hello list,
>
> has anybody written or transcribed music for harmonium (pump organ) ?
> Circled numbers/letters show the organ stops, and slashed circles are used
> when the organ stop is deactivated (example image from Rossini's Petite
> messe solennelle").
>
> So far I've used "nVier = \markup { {\circle 4 } }" (MWE attached) - is
> there a way to create a slashed version of "\circle" ?


In
http://lilypond.org/doc/v2.19/Documentation/music-glossary-big-page#functional-harmony
you can find the markup-command 'diagonal-stroke' (click on the image).

So probably:

#(define-markup-command (diagonal-stroke layout props arg)
  (markup?)
  #:category font
  #:properties ((font-size 0) (thickness 1.5) (extension 0.07))
  (let*
   ((thick (* (magstep font-size)
      (ly:output-def-lookup layout 'line-thickness)))
    (underline-thick (* thickness thick))
    (markup (interpret-markup layout props arg))
    (x1 (car (ly:stencil-extent markup X)))
    (x2 (cdr (ly:stencil-extent markup X)))
    (y1 (car (ly:stencil-extent markup Y)))
    (y2 (cdr (ly:stencil-extent markup Y)))
    (dx (* extension (- x2 x1)))
    (dy (* extension (- y2 y1)))
    (line (make-line-stencil underline-thick
      (- x1 dx) (- y1 dy)
      (+ x2 dx) (+ y2 dy))))
   (ly:stencil-add markup line)))

\markup { \diagonal-stroke  \circle 4  }


Cheers,
  Harm



reply via email to

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