TextScript baseline in Dynamics context

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

TextScript baseline in Dynamics context

Daniel Rosen
How do I get TextScripts to sit on the same baseline as DynamicTexts within a Dynamics context? Everything I've tried leaves all or some of them sitting higher or lower.

MWE of the problem:

<<
  \new Voice { \repeat unfold 6 { c'4 } }
  \new Dynamics { s2\f-"Text" s-"Text" s^"Text" }
  \new Voice { \repeat unfold 6 { c'4 } }
>>

DR


Reply | Threaded
Open this post in threaded view
|

RE: TextScript baseline in Dynamics context

Daniel Rosen
I mean, that is a possibility, but it’s pretty labor-intensive.
       
This should be a feature of, at the very least, the Dynamics context, IMHO. Am I right that this hasn't been requested before? (If I am I'll submit it to the bugs list.)
       
DR

> From: Stefano Troncaro [mailto:[hidden email]]
> Sent: Friday, December 27, 2019 10:50 AM
> To: Daniel Rosen <[hidden email]>
> Subject: Re: TextScript baseline in Dynamics context

> Hi Daniel, I never found a stafisfying solution for that, so I just create custom DynamicTexts (that are always aligned) instead of mixing DynamicTexts and TextScripts. See:

> text = #(make-dynamic-script (markup #:normal-text #:italic "Text"))
> <<
>   \new Voice { \repeat unfold 6 { c'4 } }
>   \new Dynamics { s2\f s\text s-"Text" }
>   \new Voice { \repeat unfold 6 { c'4 } }
> >>

> Bear in mind that you can't place 2 simultaneous dynamic events, so if you want it to display "f Text" you have to create a "f Text" dynamic. Also, dynamics are centered on the note by default, so you might want to change that. For example:

> #(define make-dynamic-text (define-event-function (text) (markup?)
>   #{
>      \tweak self-alignment-X #-1
>      \tweak extra-offset #'(-0.65 . 0)
>      #(make-dynamic-script
>        (markup #:normal-text #:italic text))
>   #} ) )

> text = #(make-dynamic-text (markup #:normal-text #:italic "Text"))

> <<
>   \new Voice { \repeat unfold 6 { c'4 } }
>   \new Dynamics { s2\f s\text s-"Text" }
>   \new Voice { \repeat unfold 6 { c'4 } }
> >>

> Hope this helps!
> Stéfano

> > El vie., 27 dic. 2019 a las 12:18, Daniel Rosen (<[hidden email]>) escribió:
> > How do I get TextScripts to sit on the same baseline as DynamicTexts within a Dynamics context? Everything I've tried leaves all or some of them sitting higher or lower.

> > MWE of the problem:

> > <<
> >   \new Voice { \repeat unfold 6 { c'4 } }
> >   \new Dynamics { s2\f-"Text" s-"Text" s^"Text" }
> >   \new Voice { \repeat unfold 6 { c'4 } }
> > >>

> > DR

Reply | Threaded
Open this post in threaded view
|

Quoted text in markup line

Mike iLL Kilmer
In reply to this post by Daniel Rosen
Not finding an example in the docs.

Can someone tell me how to include “quoted text” in `\markup { \line { \”like this\”? }}`?

\version "2.18.2"

\header {
title = "Quotes in Markup Line"
}


\markup {
    \column {
        \line { \null }
        \line { Single quotes are easy, like 'this'. }
        \line { I want double quotes. }
        \line { This creates no "quotes". }
\line { This doesn't \"Work\".  }
\line { Neither does `"this`".  }
\line { This makes a ‘“little mess'".  }
    }
}

Thanks much. Happy Holidays. The days are getting lighter.

Mike
Reply | Threaded
Open this post in threaded view
|

Re: Quoted text in markup line

David Kastrup

Please do _not_ reply to other posts when creating a new topic.  Your
mail client creates headers associating that mail with the thread which
you replied to, making a mess of the thread display for most people.

Mike Kilmer <[hidden email]> writes:

> Not finding an example in the docs <http://lilypond.org/doc/v2.18/Documentation/notation/writing-text>.
>
> Can someone tell me how to include “quoted text” in `\markup { \line { \”like this\”? }}`?
>
> \version "2.18.2"
>
> \header {
> title = "Quotes in Markup Line"
> }
>
>
> \markup {
>     \column {
>         \line { \null }
>         \line { Single quotes are easy, like 'this'. }
>         \line { I want double quotes. }
>         \line { This creates no "quotes". }
> \line { This doesn't \"Work\".  }
> \line { Neither does `"this`".  }
> \line { This makes a ‘“little mess'".  }
>     }
> }
>
> Thanks much. Happy Holidays. The days are getting lighter.

\line { This does "\"work\"." }

Bit of a nuisance, but within double quotes, \" creates a double quote mark.

--
David Kastrup

Reply | Threaded
Open this post in threaded view
|

Re: Quoted text in markup line

Thomas Morley-2
In reply to this post by Mike iLL Kilmer
Am Fr., 27. Dez. 2019 um 18:44 Uhr schrieb Mike Kilmer <[hidden email]>:

> Can someone tell me how to include “quoted text” in `\markup { \line { \”like this\”? }}`?

\markup "Inside of strings,  \" needs to be escaped by \\"

In native guile there are some more characters which needs escaping, though.

> The days are getting lighter.

Indeed :)

Best,
  Harm

Reply | Threaded
Open this post in threaded view
|

Re: Quoted text in markup line

Mike iLL Kilmer
In reply to this post by David Kastrup
Thank you and apologies for inadvertently hijacking a thread.

Peace.

> On Dec 27, 2019, at 11:55 AM, David Kastrup <[hidden email]> wrote:
>
>
> Please do _not_ reply to other posts when creating a new topic.  Your
> mail client creates headers associating that mail with the thread which
> you replied to, making a mess of the thread display for most people.
>
> Mike Kilmer <[hidden email]> writes:
>
>> Not finding an example in the docs <http://lilypond.org/doc/v2.18/Documentation/notation/writing-text>.
>>
>> Can someone tell me how to include “quoted text” in `\markup { \line { \”like this\”? }}`?
>>
>> \version "2.18.2"
>>
>> \header {
>> title = "Quotes in Markup Line"
>> }
>>
>>
>> \markup {
>>    \column {
>>        \line { \null }
>>        \line { Single quotes are easy, like 'this'. }
>>        \line { I want double quotes. }
>>        \line { This creates no "quotes". }
>> \line { This doesn't \"Work\".  }
>> \line { Neither does `"this`".  }
>> \line { This makes a ‘“little mess'".  }
>>    }
>> }
>>
>> Thanks much. Happy Holidays. The days are getting lighter.
>
> \line { This does "\"work\"." }
>
> Bit of a nuisance, but within double quotes, \" creates a double quote mark.
>
> --
> David Kastrup


Reply | Threaded
Open this post in threaded view
|

Re: Quoted text in markup line

Kieren MacMillan
Hi Mike,

I always prefer typographer’s quotes

    \markup \line { "“like this”" }

and it’s a bonus that they can be stored right in the code/file without any extra fuss.  =)

Hope that helps!
Kieren.
________________________________

Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: TextScript baseline in Dynamics context

Kieren MacMillan
In reply to this post by Daniel Rosen
Hi Daniel,

> I mean, that is a possibility, but it’s pretty labor-intensive.

Not if you already have the function made up.  ;)

I just write

   d'4\custdyn "{ffff} screeching"

and everything aligns itself perfectly.

> This should be a feature of, at the very least, the Dynamics context, IMHO.

That might be a nice feature, for sure. Thanks for submitting the request!

Best,
Kieren.
________________________________

Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: TextScript baseline in Dynamics context

Paul Scott
Kieren, I don't have the rest of this thread but is "custdyn" already in Lily or did you define it somewhere?

Thank you,

Paul

On Dec 27, 2019, at 11:55 AM, Kieren MacMillan <[hidden email]> wrote:

> Hi Daniel,
>
>> I mean, that is a possibility, but it’s pretty labor-intensive.
>
> Not if you already have the function made up.  ;)
>
> I just write
>
>   d'4\custdyn "{ffff} screeching"
>
> and everything aligns itself perfectly.
>
>> This should be a feature of, at the very least, the Dynamics context, IMHO.
>
> That might be a nice feature, for sure. Thanks for submitting the request!
>
> Best,
> Kieren.
> ________________________________
>
> Kieren MacMillan, composer (he/him/his)
> ‣ website: www.kierenmacmillan.info
> ‣ email: [hidden email]
>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: TextScript baseline in Dynamics context

Kieren MacMillan
Hi Paul,

> is "custdyn" already in Lily or did you define it somewhere?

Harm built it (see, e.g., https://lists.gnu.org/archive/html/lilypond-user/2019-09/msg00159.html), but I changed the name of the function in my own include file(s).

Hope that helps!
Kieren.
________________________________

Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Quoted text in markup line

Simon Albrecht-2
In reply to this post by Kieren MacMillan
On 27.12.19 19:52, Kieren MacMillan wrote:
> I always prefer typographer’s quotes
>
>      \markup \line { "“like this”" }
>
> and it’s a bonus that they can be stored right in the code/file without any extra fuss.  =)


That is, even the ‘programming quotes’ in the code example by Kieren
wouldn’t be necessary.

How best to input typographer’s quotes depends on your setup (keyboard
layout, editor, OS…).

Best, Simon


Reply | Threaded
Open this post in threaded view
|

Re: Quoted text in markup line

David Kastrup
Simon Albrecht <[hidden email]> writes:

> On 27.12.19 19:52, Kieren MacMillan wrote:
>> I always prefer typographer’s quotes
>>
>>      \markup \line { "“like this”" }
>>
>> and it’s a bonus that they can be stored right in the code/file
>> without any extra fuss.  =)
>
>
> That is, even the ‘programming quotes’ in the code example by Kieren
> wouldn’t be necessary.

"“like this”" is one word, “like this” are two words.  That's important
in lyrics mode and in some other respects like line-wrapping.

--
David Kastrup

Reply | Threaded
Open this post in threaded view
|

Re: TextScript baseline in Dynamics context

Stefano Troncaro
In reply to this post by Kieren MacMillan
Hi Kieren, I was not aware of that function. Thank you for sharing it and thank you Harm for coding it!

El vie., 27 dic. 2019 a las 16:24, Kieren MacMillan (<[hidden email]>) escribió:
Hi Paul,

> is "custdyn" already in Lily or did you define it somewhere?

Harm built it (see, e.g., https://lists.gnu.org/archive/html/lilypond-user/2019-09/msg00159.html), but I changed the name of the function in my own include file(s).

Hope that helps!
Kieren.
________________________________

Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: TextScript baseline in Dynamics context

foxfanfare
Stefano Troncaro wrote
> Hi Kieren, I was not aware of that function. Thank you for sharing it and
> thank you Harm for coding it!

Very interesting function! But I think there is a bug when using a separate
Dynamics line. See the following example:

\version "2.20.0"

<<

  \new Staff \relative c' {
    c4\dynamicH "{ppp} misterioso"
    \repeat unfold 15 {
      c4
    }
  }

  <<
    \new Staff \relative c' {
      \repeat unfold 16 {
        c4
      }
    }
    \new Dynamics {
      s1\dynamicH "{ppp} misterioso"
    }
  >>

>>

I don't know why, but in the the second example, the dynmics "ppp" are not
centered correctly with the notehead.
<http://lilypond.1069038.n5.nabble.com/file/t5604/00.png>



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html