One-note spanners

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

One-note spanners

Ethan Meltzer
LilyPond doesn't seem to like using a spanner over one note. Writing a one-note spanner like this leads to an error:

\version "2.18.2"
\language"english"

\relative{
\time 2/4
c2 \f \< \!
}

Please help!

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: One-note spanners

Dave Hartley
Try something like this:

\version "2.18.2"
\language"english"

\relative{
\time 2/4
c2*15/16 \f \< s2*1/16 \!
}

On Sat, 20 Oct 2018 at 13:44, Ethan Meltzer <[hidden email]> wrote:
LilyPond doesn't seem to like using a spanner over one note. Writing a one-note spanner like this leads to an error:

\version "2.18.2"
\language"english"

\relative{
\time 2/4
c2 \f \< \!
}

Please help!
_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user


--
Stop the Madness.  Boycott Word attachments.

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: One-note spanners

Kieren MacMillan
Hi Ethan,

> Try something like this:
>
> \version "2.18.2"
> \language"english"
>
> \relative{
> \time 2/4
> c2*15/16 \f \< s2*1/16 \!
> }

Another solution is to include and employ David K’s very useful \after function:

\version "2.18.2"
\language"english"

after =
#(define-music-function (parser location t e m)
     (ly:duration? ly:music? ly:music?)
     #{
         \context Bottom <<
             #m
             { \skip $t <> -\tweak extra-spacing-width #empty-interval $e }
         >>
     #})

\relative{
  \time 2/4
  \after 32*15 \! { c2\f \< }
}

Hope that helps!
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: One-note spanners

Schneidy
Hi,

How about a shorter way:

\version "2.18.2"
\language"english"

\relative{
  \time 2/4
  c2 \f \< <>\!
}

Cheers,
Pierre

Le sam. 20 oct. 2018 à 03:36, Kieren MacMillan <[hidden email]> a écrit :
Hi Ethan,

> Try something like this:
>
> \version "2.18.2"
> \language"english"
>
> \relative{
> \time 2/4
> c2*15/16 \f \< s2*1/16 \!
> }

Another solution is to include and employ David K’s very useful \after function:

\version "2.18.2"
\language"english"

after =
#(define-music-function (parser location t e m)
     (ly:duration? ly:music? ly:music?)
     #{
         \context Bottom <<
             #m
             { \skip $t <> -\tweak extra-spacing-width #empty-interval $e }
         >>
     #})

\relative{
  \time 2/4
  \after 32*15 \! { c2\f \< }
}

Hope that helps!
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: One-note spanners

Kieren MacMillan
Hi Pierre,

> How about a shorter way:

Yes! Thanks for pointing that one out.
I’m glad to see it isn’t ruined by music after it:

\version "2.18.2"
\language"english"

\relative{
  \time 2/4
  c2 \f \< <>\!
  c2
}

I do think the \after function is a good one to know — useful and flexible enough that it should probably be in the main distro!

Best,
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: One-note spanners

Simon Albrecht-2
On 20.10.2018 15:01, Kieren MacMillan wrote:
> I do think the \after function is a good one to know — useful and flexible enough that it should probably be in the main distro!

IIRC, there are two main reasons why it isn’t (apart from the usual
“nobody added it”): the name is a little to ‘impromptu’ to match the
style of the official commands, and this implementation only works for
post-events.

Best, Simon

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user