Copied! Thank you David.
Pierre

2016-01-29 12:36 GMT+01:00 David Kastrup <[email protected]>:

> Pierre Perol-Schneider <[email protected]> writes:
>
> > Hi List,
> >
> > I'd like to add glissandi to a group of notes except the last one.
> > Here's the function:
> >
> > glissandi =
> > #(define-music-function (parser location music) (ly:music?)
> >   "Add a glissando to all but last note"
> >   (let ((all-but-last-note (drop-right (ly:music-property music
> > 'elements))))
> >     (set!
> >      (ly:music-property all-but-last-note 'articulations)
> >         (cons (make-music 'GlissandoEvent)
> >               (ly:music-property all-but-last-note 'articulations)))
> >   music))
> >
> > \relative c' {
> >   \glissandi { c d e f }
> >   c
> > }
> >
> > It seems that 'drop-right' is not the right procedure. What else should I
> > use?
>
> drop-right is fine but you forgot the second argument.
>
>  -- Scheme Procedure: drop-right lst i
>  -- Scheme Procedure: drop-right! lst i
>      Return the a list containing all but the I last elements of LST.
>
>      `drop-right' always returns a new list, even when I is zero.
>      `drop-right!' may modify the structure of the argument list LST in
>      order to produce the result.
>
> --
> David Kastrup
>
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to