lilypond-user
[Top][All Lists]
Advanced

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

Re: always glissandi


From: David Nalesnik
Subject: Re: always glissandi
Date: Thu, 23 Jun 2016 18:14:50 -0500

Hi Tobias,

On Thu, Jun 23, 2016 at 5:15 PM, Tobias Hagedorn
<address@hidden> wrote:
> Hello everybody!
> Does anybody know how to get always glissandi without writing \glissando 
> after every Note?
> Thanks for answer!
> Tobias
>

You need to define a music function for this.

How about:

\version "2.19.30"

addGlissandi =
#(define-music-function (music) (ly:music?)
   (music-map
    (lambda (mus)
      (if (music-is-of-type? mus 'event-chord)
          (append! (ly:music-property mus 'elements)
            (list (make-music 'GlissandoEvent))))
      (if (music-is-of-type? mus 'note-event)
          (set! (ly:music-property mus 'articulations)
                (cons (make-music 'GlissandoEvent)
                  (ly:music-property mus 'articulations))))

      mus)
    music)
   music)


{
  \addGlissandi { c'4 g' c'' g' }
  c'1
  \addGlissandi { <c' e'>4 <g' c''> <c'' e''> <g' c''> }
  <c' e'>1
}

%%%

Hope this helps,
David



reply via email to

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