Re: ottava spanner terminates at the end of the note, not the end of the bar

2022-05-13 Thread Aaron Hill

On 2022-05-13 8:28 pm, Kenneth Wolcott wrote:

  The ottava spanner terminates at the end of the note, not at the end
of the bar.

  How to change this?

  Screenshots attached.


Consider the following:


\version "2.22.0"

\relative c'' {
  % Be careful not to stop the ottava too soon.
  \ottava 1 c4 e g f8 d | c2. \ottava 0 r4

  % This encompasses the rest as well but is still a little too short.
  \ottava 1 c4 e g f8 d | c2. r4 \ottava 0
  c8 d b c~ c2

  % This would be nice...
  % \override Staff.OttavaBracket.to-barline = ##t
  % ...but it would appear OttavaBracket is not a
  % line-spanner-interface, where to-barline lives.

  % A manual adjustment is possible:
  \once \offset shorten-pair #'(0 . -1) Staff.OttavaBracket
  \ottava 1 c4 e g f8 d | c2. r4 \ottava 0
  c8 d b c~ c2
  \bar "|."
}


Assuming you only have a few of these you need to manage, the manual 
offset might be sufficient to let you move onto other things in your 
score.  But you will need to review these if you make any changes that 
affect the measure length.  An automated approach might be possible, but 
really I think OttavaBracket should support to-barline.  Something to 
submit to the bug mailing list I guess.




Was almost about to hit send, but then I thought... what if you hid the 
OttavaBracket but used a TextSpanner in its place?



\relative c'' {
  \once \hide Staff.OttavaBracket
  \ottava 1

  c4 -\tweak to-barline ##t
 -\tweak dash-fraction #0.3
 -\tweak dash-period #1
 -\tweak bound-details.left.text
   \markup \vcenter \bold 8
 -\tweak bound-details.right.stencil
   #(make-line-stencil 0.1 0 0 0 -0.8)
 \startTextSpan
e g f8 d

  | c2. r4 \ottava 0
  c8\stopTextSpan d b c~ c2
}


Hmm... maybe not.  That is a lot of tweaks, and I do not think I matched 
the original OttavaBracket well enough.



-- Aaron Hill



Re: An issue with kerning in a defined dynamic "sfffz" solved

2022-05-13 Thread Werner LEMBERG

> Some time ago I wrote saying that I could not get the marking
> "sfffz" to kern properly.  Someone replied that it did for them, and
> I let it sit there, waiting until I needed a solution, which point I
> have now reached.  I have been slow and dense in recognising where
> the issue lies - I am using the BMusicFont (a version of Dorico's
> font, more recent than the "profondo" version).  The kerning works
> in Feta, but not in this font.

By the way, there was a bug in the script that generates the
Emmentaler font (now fixed, see
https://gitlab.com/lilypond/lilypond/-/merge_requests/1353); depending
on the used FontForge version it was possible that there was no
kerning at all for Feta dynamics and numbers.

> I have, however, managed an effective work-around:
> 
>   sfffzX = \markup\center-align\concat{"s" \dynamic"fff" \hspace #-0.5 
> "z"}
>   sfffz = #(make-dynamic-script sfffzX)
> 
> The "s" already kerns ok, and specifying the "fff" dynamic gets the
> fully-kerned version of those letters.  The "z" doesn't kern nicely,
> but can be pushed back to the required position.

Glad that you found a workable solution.  Note, however, that the
kerning problem with 'BMusicFont' is not a LilyPond problem – it
simply passes a string of glyphs to the rendering engine (Pango),
which takes care of applying OpenType features like 'kern'.  Attached
you can see the difference between kerning on and off while using the
Emmentaler font.

```
sfffz = #(make-dynamic-script "sfffz")
sfffzMarkup = \markup {
\override #'(font-features . ("-kern"))
  \dynamic "sfffz" }
sfffzX = #(make-dynamic-script sfffzMarkup)

{ c''2^"with kern" \sfffz }

{ c''2^"without kern" \sfffzX }
```

Maybe there are similar OpenType features present in 'BMusicFont'?
For example, I could imagine that you have to deactivate the 'liga'
feature so that the combination 'f' + 'f' doesn't get converted to
glyph 'ff', which seems to have different kerning (or a lack thereof).


Werner


An issue with kerning in a defined dynamic "sfffz" solved

2022-05-13 Thread Paul Hodges
Some time ago I wrote saying that I could not get the marking "sfffz" to kern 
properly.  Someone replied that it did for them, and I let it sit there, 
waiting until I needed a solution, which point I have now reached.  I have been 
slow and dense in recognising where the issue lies - I am using the BMusicFont 
(a version of Dorico's font, more recent than the "profondo" version).  The 
kerning works in Feta, but not in this font.


I have, however, managed an effective work-around:


      sfffzX = \markup\center-align\concat{"s" \dynamic"fff" \hspace #-0.5 "z"}

      sfffz = #(make-dynamic-script sfffzX)


The "s" already kerns ok, and specifying the "fff" dynamic gets the 
fully-kerned version of those letters.  The "z" doesn't kern nicely, but can be 
pushed back to the required position.


Paul



Re: Expressive marks

2022-05-13 Thread Mario Bolognani
Thanks Xavier, it is a simpler proposal even if the result may not be 
satisfactory…

Best 

Mario Bolognani

Inviato da iPhone

> Il giorno 13 mag 2022, alle ore 10:14, Xavier Scheuer  
> ha scritto:
> 
> 
> On Fri, 13 May 2022 at 09:25, Mario Bolognani  
> wrote:
> >
> > Any idea on how to obtain this kind of expressive marks?
> >
> > Many thanks for any useful suggestion
> 
> Hello,
> 
> I would probably use a TrillSpanner without "tr." left text.
> 
> \relative c'' {
>   \override TrillSpanner.bound-details.left.text = #'()
>   e8\startTrillSpan e c c\stopTrillSpan
> }
> 
> Cheers,
> Xavier
> 
> -- 
> Xavier Scheuer 
> 


Re: Expressive marks

2022-05-13 Thread Mario Bolognani
Many thanks Richard for your suggestion. I’ll try to understand.

Best

Mario

Inviato da iPhone

> Il giorno 13 mag 2022, alle ore 14:58, Richard Shann 
>  ha scritto:
> 
> On Fri, 2022-05-13 at 14:06 +0200, Stephan Schöll wrote:
>> I'm wondering if we need 340 lines of Scheme code or if we could /
>> why we can't use the TrillSpanner and just eliminate the "tr" prefix
>> and leave the wiggy line,
> 
> yes, that's good if you want exactly that wiggley line - the 340 lines
> of scheme code let you control the amplitude and frequency of the
> wiggles (and even modulate these as the line progresses IIRC), which
> can be important when matching early printed scores.
> 
> Richard
> 
> 
>> something based on (but not working since I don't understand Scheme
>> lists thoroughly):
>> \relative c'' {
>>\once \override TrillSpanner.bound-details = '((left (text
>> #
>>"scripts.trill")
>>  (stencil-offset -0.5 . -1)
>>  (padding . 0.5)
>>  (attach-dir . 0))
>>  (left-broken (end-on-note . #t))
>>  (right))
>>
>>e8\startTrillSpan e c c s\stopTrillSpan
>>  }
>> ... and simply replacing "scripts.trill" with an empty string or
>> void/null ...
>> 
>> Am 13.05.2022 um 09:37 schrieb Richard Shann:
>>> On Fri, 2022-05-13 at 09:12 +0200, Mario Bolognani wrote:
>>>  
>>> Any idea on how to obtain this kind of expressive marks?
>> There is a thread about this which I was involved in, the code that
>> resulted is here in Denemo's source LilyPond files:
>> 
>> http://git.savannah.gnu.org/gitweb/?p=denemo.git;a=blob;f=actions/lilypond/vibrato.ily;h=dadedd6859563a0bac0629b19ac729111ced29bd;hb=HEAD
>>  
>> 
>> from where you can pick it up and use it in raw LilyPond scores.
>> 
>> Richard Shann
>> 
>> 
>> 
>>   
> 
> 
> 



Alternate Notation Fonts

2022-05-13 Thread josh
I am having difficulty using alternative fonts. I believe that I have 
followed the fonts documentation correctly however I am not seeing results.


I am trying to use the available "profondo" and "improviso" fonts. I am 
using version 2.22.1 and I have all of the files correctly installed to 
the "LilyPond\usr\share\lilypond\current\fonts\otf" folder. I use the 
#(ly:font-config-add-directory "path/to/directory/") command for the 
FontConfig for Lilypond to recognize the fonts and I have used the 
#(ly:font-config-display-fonts) command to verify that it is recognized. 
All seems good there. I use the following command to call the fonts into 
the document:


\paper {
  #(set-paper-size "ansi a")
  #(define fonts
 (set-global-fonts
  #:music "profondo"
  #:brace "profondo"
  #:factor (/ staff-height pt 20)
  ))

I was switching between fonts to see which one I prefer but I am not 
seeing any change. What step am I missing?





Re: top-level markup in Scheme

2022-05-13 Thread Jean Abou Samra

Le 13/05/2022 à 15:30, Valentin Petzel a écrit :

Hello Werner,

if you intend to create Markup- or Score-Section from Scheme you might want to 
directly invoke (add-text some-markup) and (add-score some-score). This would 
allow you to cleanly handle stuff like inserting multiple markups and scores at 
the same time from a bit of scheme code.

Inserting a top level score or markup calls the top-level-score/markup-handler, 
which defaults to doing the same thing.




That would work too. Note, though, that $ is not restricted to
inserting a single markup or score at a time.

$(values (make-bold-markup "a") (make-italic-markup "a"))

Equivalently, this spelling may be easier to grasp for those
not familiar with Scheme's multiple values feature:

$@(list (make-bold-markup "a") (make-italic-markup "a"))

It is true, however, that you cannot do this from syntax functions.
I actually created an issue about that not long ago:

https://gitlab.com/lilypond/lilypond/-/issues/6333

So, I prefer the $ spelling, which is probably a matter of taste
(my reasons are: it's documented, it doesn't work via a side effect,
and some bad gut feelings about the current design of handlers). On
the other hand, it is a bit less powerful in the current state of
things. Also, it may (rarely) cause surprises due to lookahead, like

myA = "a"
$myA

which does not work, although this does:

myA = "a"
\void dummy
$myA


Jean




Re: top-level markup in Scheme

2022-05-13 Thread Valentin Petzel
Hello Werner,

if you intend to create Markup- or Score-Section from Scheme you might want to 
directly invoke (add-text some-markup) and (add-score some-score). This would 
allow you to cleanly handle stuff like inserting multiple markups and scores at 
the same time from a bit of scheme code.

Inserting a top level score or markup calls the top-level-score/markup-handler, 
which defaults to doing the same thing.

Cheers,
Valentin

13.05.2022 13:05:05 Werner LEMBERG :

> 
>>> On the other hand, a LilyPond input file containing only
>>> 
>>> ```
>>> #(make-italic-markup "foo")
>>> ```
>>> 
>>> prints nothing.  I now wonder how I can modify the latter to make
>>> it actually work – what is the 'appropriate hook'?
>> 
>> s/#/$
> 
> This did the trick, thanks!  Reading the documentation about '$' with
> the benefit of hindsight explains it...
> 
> 
>     Werner



Re: Expressive marks

2022-05-13 Thread Richard Shann
On Fri, 2022-05-13 at 14:06 +0200, Stephan Schöll wrote:
> I'm wondering if we need 340 lines of Scheme code or if we could /
> why we can't use the TrillSpanner and just eliminate the "tr" prefix
> and leave the wiggy line,

yes, that's good if you want exactly that wiggley line - the 340 lines
of scheme code let you control the amplitude and frequency of the
wiggles (and even modulate these as the line progresses IIRC), which
can be important when matching early printed scores.

Richard


>  something based on (but not working since I don't understand Scheme
> lists thoroughly):
> \relative c'' {
>    \once \override TrillSpanner.bound-details = '((left (text
> #
>    "scripts.trill")
>  (stencil-offset -0.5 . -1)
>  (padding . 0.5)
>  (attach-dir . 0))
>  (left-broken (end-on-note . #t))
>  (right))
>    
>    e8\startTrillSpan e c c s\stopTrillSpan
>  }
> ... and simply replacing "scripts.trill" with an empty string or
> void/null ...
> 
> Am 13.05.2022 um 09:37 schrieb Richard Shann:
> On Fri, 2022-05-13 at 09:12 +0200, Mario Bolognani wrote:
>  
> > Any idea on how to obtain this kind of expressive marks?
> There is a thread about this which I was involved in, the code that
> resulted is here in Denemo's source LilyPond files:
> 
> http://git.savannah.gnu.org/gitweb/?p=denemo.git;a=blob;f=actions/lilypond/vibrato.ily;h=dadedd6859563a0bac0629b19ac729111ced29bd;hb=HEAD
>  
> 
> from where you can pick it up and use it in raw LilyPond scores.
> 
> Richard Shann
> 
> 
> 
>   





Re: Expressive marks

2022-05-13 Thread Stephan Schöll

I'm wondering if we need 340 lines of Scheme code or if we could / why
we can't use the TrillSpanner and just eliminate the "tr" prefix and
leave the wiggy line, something based on (but not working since I don't
understand Scheme lists thoroughly):

\relative c'' {
  \once \override TrillSpanner.bound-details = '((left (text
#
  "*scripts.trill*")
    (stencil-offset -0.5 . -1)
    (padding . 0.5)
    (attach-dir . 0))
    (left-broken (end-on-note . #t))
    (right))

  e8\startTrillSpan e c c s\stopTrillSpan
}

... and simply replacing "scripts.trill" with an empty string or
void/null ...


Am 13.05.2022 um 09:37 schrieb Richard Shann:

On Fri, 2022-05-13 at 09:12 +0200, Mario Bolognani wrote:

Any idea on how to obtain this kind of expressive marks?

There is a thread about this which I was involved in, the code that
resulted is here in Denemo's source LilyPond files:

http://git.savannah.gnu.org/gitweb/?p=denemo.git;a=blob;f=actions/lilypond/vibrato.ily;h=dadedd6859563a0bac0629b19ac729111ced29bd;hb=HEAD
from where you can pick it up and use it in raw LilyPond scores.

Richard Shann





Re: top-level markup in Scheme

2022-05-13 Thread Werner LEMBERG

>> On the other hand, a LilyPond input file containing only
>> 
>> ```
>> #(make-italic-markup "foo")
>> ```
>> 
>> prints nothing.  I now wonder how I can modify the latter to make
>> it actually work – what is the 'appropriate hook'?
> 
> s/#/$

This did the trick, thanks!  Reading the documentation about '$' with
the benefit of hindsight explains it...


Werner


Re: top-level markup in Scheme

2022-05-13 Thread Jean Abou Samra



> Le 13 mai 2022 à 11:44, Werner LEMBERG  a écrit :
> 
> 
>>> What is the Scheme equivalent to a top-level markup like
>>> 
>>> ```
>>> \markup \italic "foo"
>>> ```
>>> 
>>> ?  I can't find it in the documentation.
>> 
>> I am not a fan of the markup macro, but of course
>> 
>> (make-italic-markup "foo")
>> 
>> will also work.
> 
> Thanks.
> 
>> It is not clear what you mean with "top-level" however.  Of course
>> at the top level of a LilyPond document, markup gets interpreted by
>> calling an appropriate hook.
> 
> Well, a LilyPond input file containing only
> 
> ```
> \markup \italic "foo"
> ```
> 
> prints something.  In the NR this usage of `\markup` is called a
> 'top-level expression'.  How do you call this?
> 
> On the other hand, a LilyPond input file containing only
> 
> ```
> #(make-italic-markup "foo")
> ```
> 
> prints nothing.  I now wonder how I can modify the latter to make it
> actually work – what is the 'appropriate hook'?
> 


s/#/$






Re: top-level markup in Scheme

2022-05-13 Thread Werner LEMBERG

>> What is the Scheme equivalent to a top-level markup like
>>
>> ```
>> \markup \italic "foo"
>> ```
>>
>> ?  I can't find it in the documentation.
>
> I am not a fan of the markup macro, but of course
> 
> (make-italic-markup "foo")
> 
> will also work.

Thanks.

> It is not clear what you mean with "top-level" however.  Of course
> at the top level of a LilyPond document, markup gets interpreted by
> calling an appropriate hook.

Well, a LilyPond input file containing only

```
\markup \italic "foo"
```

prints something.  In the NR this usage of `\markup` is called a
'top-level expression'.  How do you call this?

On the other hand, a LilyPond input file containing only

```
#(make-italic-markup "foo")
```

prints nothing.  I now wonder how I can modify the latter to make it
actually work – what is the 'appropriate hook'?


Werner


Re: top-level markup in Scheme

2022-05-13 Thread David Kastrup
Werner LEMBERG  writes:

> What is the Scheme equivalent to a top-level markup like
>
> ```
> \markup \italic "foo"
> ```
>
> ?  I can't find it in the documentation.

\void \displayScheme \markup \italic "foo"

outputs

(markup #:italic "foo")

I am not a fan of the markup macro, but of course

(make-italic-markup "foo")

will also work.  It is not clear what you mean with "top-level" however.
Of course at the top level of a LilyPond document, markup gets
interpreted by calling an appropriate hook.

-- 
David Kastrup



top-level markup in Scheme

2022-05-13 Thread Werner LEMBERG


What is the Scheme equivalent to a top-level markup like

```
\markup \italic "foo"
```

?  I can't find it in the documentation.


Werner



Re: Expressive marks

2022-05-13 Thread Xavier Scheuer
On Fri, 13 May 2022 at 09:25, Mario Bolognani 
wrote:
>
> Any idea on how to obtain this kind of expressive marks?
>
> Many thanks for any useful suggestion

Hello,

I would probably use a TrillSpanner without "tr." left text.

\relative c'' {
  \override TrillSpanner.bound-details.left.text = #'()
  e8\startTrillSpan e c c\stopTrillSpan
}

Cheers,
Xavier

-- 
Xavier Scheuer 


Re: Expressive marks

2022-05-13 Thread Richard Shann
On Fri, 2022-05-13 at 09:12 +0200, Mario Bolognani wrote:
> Any idea on how to obtain this kind of expressive marks?

There is a thread about this which I was involved in, the code that
resulted is here in Denemo's source LilyPond files:

http://git.savannah.gnu.org/gitweb/?p=denemo.git;a=blob;f=actions/lilypond/vibrato.ily;h=dadedd6859563a0bac0629b19ac729111ced29bd;hb=HEAD
> 
from where you can pick it up and use it in raw LilyPond scores.

Richard Shann





Expressive marks

2022-05-13 Thread Mario Bolognani
Any idea on how to obtain this kind of expressive marks?


Many thanks for any useful suggestion

Mario Bolognani
baroquemusic.it