lilypond-user
[Top][All Lists]
Advanced

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

Re: Ritardando and accelerando


From: Thomas Morley
Subject: Re: Ritardando and accelerando
Date: Tue, 27 Jan 2015 21:56:23 +0100

2015-01-27 9:56 GMT+01:00 Pierre Perol-Schneider
<address@hidden>:
> Hi Peter, Hi Joram,
>
> How about:
>
> \version "2.18.2"
>
> \layout {
>   ragged-last = ##t
> }
>
> #(define (text-spanner-start-stop mus)
>     (let ((elts (ly:music-property mus 'elements)))
>     (make-music 'SequentialMusic 'elements
>        (append
>           (list (make-music 'TextSpanEvent 'span-direction -1))
>           (reverse (cdr (reverse elts)))
>           (list (make-music 'TextSpanEvent 'span-direction 1))
>           (list (last elts))))))



Hi Pierre,

this will fail under certain circumstances:

#(define (text-spanner-start-stop mus)
    (let ((elts (ly:music-property mus 'elements)))
    (make-music 'SequentialMusic 'elements
       (append
          (list (make-music 'TextSpanEvent 'span-direction -1))
          (reverse (cdr (reverse elts)))
          (list (make-music 'TextSpanEvent 'span-direction 1))
          (list (last elts))))))

ritAtempo = #(define-music-function (parser location music)(ly:music?)
      #{
         \override TextSpanner.bound-details.left-broken.text = ##f
         \override TextSpanner.bound-details.left.text = "rit. "
         \override TextSpanner.bound-details.right-broken.text = ##f
         \override TextSpanner.bound-details.right.text = " a Tempo."
         $(text-spanner-start-stop music)
      #})

\relative c' {
  c1
  \ritAtempo {
    d8 d d d d d d d
    d8 d d d d d d d
  }
  c1
}

\relative c' {
  c1
  \ritAtempo {
    \repeat unfold 8 d8
    \repeat unfold 8 d8
  }
  c1
}

There was a discussion here:
http://lilypond.1069038.n5.nabble.com/review-of-a-Mutopia-file-why-TabStaff-gives-error-here-td136690.html
Though, we didn't found a real sollution.


Cheers,
  Harm



reply via email to

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