lilypond-user
[Top][All Lists]
Advanced

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

Re: Ad lib glissando


From: Helge Kruse
Subject: Re: Ad lib glissando
Date: Mon, 21 May 2018 17:29:16 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

Am 21.05.2018 um 12:38 schrieb Ben:
> Hello,
>
> Maybe this code can help you?
> (see attached)

Ben,

thanks for reply. Unfortunately this works only for half and quarter
notes. If you have \quaver it's necessary to add "\omit Beam\omit Flag".

But the approach has a side effect. The next ordinary glissando after
the addGliss block has the glissando attached to the right side of the
note head. So I had to add more code to revert to the previous state. As
the previously PNG file shows I need also to attach the last glissando
to a chord.

This results in this working example. But it looks clumsy for me:

Regards
Helge


\version "2.19.15"

#(define (add-gliss m)
   (case (ly:music-property m 'name)
     ((NoteEvent) (set! (ly:music-property m 'articulations)
                      (append (ly:music-property m 'articulations)
                         (list (make-music (quote GlissandoEvent)))))
                   m)
     (else #f)))

addGliss = #(define-music-function (parser location music)
                 (ly:music?)
           (map-some-music add-gliss music))

\relative c'' {
  \override Glissando.thickness = #2
  \override Glissando.bound-details =#'(
     (right (attach-dir . 1) (padding . 0))
     (left  (attach-dir . 1) (padding . 0)))
  \override NoteHead.no-ledgers = ##t
  \addGliss {
    d,2
    \omit Stem
    \omit Beam
    \omit Flag
    \override NoteHead.transparent = ##t
    f' d, f'8 e, g'
  }

  \override Glissando.bound-details =
  #'(
      (right (attach-dir . -1) (padding .0))
      (left (attach-dir . 1) (padding .0)))
  d,\glissando

  \revert Glissando.bound-details
  \revert Glissando.thickness
  \revert NoteHead.transparent
  \revert Stem.stencil
  \revert Beam.stencil
  \revert NoteHead.no-ledgers

  <f' d b>


  <c, a>\glissando d'
}



reply via email to

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