Re: Guile REPL Server

2022-05-17 Thread Hendursaga
> Yes, it is an additional nuisance for building. I think the strategic value 
> of it would offset that.

I concur with David, although I'm not sure how much help I can be updating the 
build scripts. I personally would consider it low to medium priority, though 
I'm not sure how you maintainers and devs do triage.

~ Hendursaga



Re: Cross-staff beam slope and slur colliding with lyrics

2022-05-17 Thread David Kastrup
Michael Rivers  writes:

> I'm trying to replicate the attached bar of music from an edition of
> Ici-bas! by Fauré. I can't figure out how to flatten the cross-staff beam
> to be horizontal. For the slur, I can use \shape to flatten it, or I can
> put in an invisible note to push the vocal staff higher. However, this
> situation happens many times in the song, so I wonder if there is a better
> solution.

Here is the changed version:

\version "2.22.2"

global = {
  \key fis \minor
  \time 2/4
}

goUp = { \change Staff = "right" }
goDown = { \change Staff = "left" }

sopranoVoice = \relative c'' {
  \global
  \dynamicUp
  \autoBeamOff
  cis8.^\markup { \italic dolce } a16 fis4 |
  fis16 gis a b cis8 cis16 cis |
}

verse = \lyricmode {
  I -- ci -- bas tous les li -- las meu -- rent,
  Tous
}

right = \relative c'' {
  \global
  s2*2 |
}

left = \relative c' {
  \global
  \stemUp
  a16^( fis cis' a \goUp fis' d  fis) |
  \temporary \override Beam.damping = #+inf.0
  \goDown ^( \goUp fis' \goDown  \goUp fis' \goDown 
  \goUp eis' \goDown  \goUp fis')
  \revert Beam.damping
}

sopranoVoicePart = \new Staff { \sopranoVoice }
\addlyrics { \verse }

pianoPart = \new PianoStaff <<
  \new Staff = "right" \right
  \new Staff = "left" { \clef bass \left }
>>

\score {
  <<
\sopranoVoicePart
\pianoPart
  >>
}

-- 
David Kastrup


Re: Chord mode: changing N.C.

2022-05-17 Thread Jean Abou Samra




Le 17/05/2022 à 21:26, Stephan Schöll a écrit :
My impression that the mailing list has long delays somewhere seems to 
be confirmed... When I post to the mailinglist I don't get my own post 
in my inbox for a long time (an hour or so) I will keep an eye on 
that. Maybe it's on my side.



This is a problem that comes up from time to time. See

https://lists.gnu.org/archive/html/lilypond-user/2022-02/msg00031.html

and

https://lists.gnu.org/archive/html/lilypond-user/2015-11/msg00412.html

Jean





Re: moving sustainoff - I lost the answer and can't remember how to search for it

2022-05-17 Thread Jean Abou Samra




Le 18/05/2022 à 00:20, jh a écrit :
Hello all- a while back I asked how to move the sustainoff to after 
the last note and someone answered and I believed I saved it and now 
cannot find where I put that answer.

Please send it again..
AND- I think there's a way to search for something like this but I so 
seldom ever need to do this (not at all for the last 7 years) I have 
completely forgotten where to go for it.

So that would be welcome too.

Many apologies for misplacing this and having to ask again.
Jay




Likely this:


https://lists.gnu.org/archive/html/lilypond-user/2021-09/msg00337.html

You can search the archives here:

https://lists.gnu.org/archive/html/lilypond-user/

as mentioned here:

https://lilypond.org/contact.html

Best,
Jean



moving sustainoff - I lost the answer and can't remember how to search for it

2022-05-17 Thread jh
Hello all- a while back I asked how to move the sustainoff to after the 
last note and someone answered and I believed I saved it and now cannot 
find where I put that answer.

Please send it again..
AND- I think there's a way to search for something like this but I so 
seldom ever need to do this (not at all for the last 7 years) I have 
completely forgotten where to go for it.

So that would be welcome too.

Many apologies for misplacing this and having to ask again.
Jay

--
Thank you Sound & Silence

Beginning May 1, 2021 a new address; 1814 Lake Washington Blvd. So.,
Seattle, Wa. 98144

_206-328-7694 or messages at 206-308-8189_

www.soundand.com

and an online short (45 minute) concert of new material on Wayward in 
Limbo



https://www.waywardmusic.org/?p=6082



Re: Offset ClefTransposition number

2022-05-17 Thread Jean Abou Samra

Le 17/05/2022 à 23:38, Jean Abou Samra a écrit :

There is also the more traditional method of looking at the
end of the relevant section in the Notation Reference,
namely in this case:
https://lilypond.org/doc/v2.22/Documentation/notation/displaying-pitches#clef 


There is always a heading "See also", here it contains
(among others): "Internals Reference: Clef_engraver, Clef,
ClefModifier, clef-interface".



Oh, and actually, that section is pretty explicit:

"""
Known issues and warnings

Ottavation numbers attached to clefs are treated as separate grobs.
So any \override done to the Clef will also need to be applied, as
a separate \override, to the ClefModifier grob.

[example]
"""

To be clear, I absolutely don't want to blame anyone asking on the
lists: yes, there is a lot of material in the docs, and it's not
always easy to find your way. I am also the first person to ask
how to improve the docs. In this case, though, I think the documentation
is about as good as you can get ...

Jean




Re: Offset ClefTransposition number

2022-05-17 Thread Jean Abou Samra

Le 17/05/2022 à 16:15, Aaron Hill a écrit :

On 2022-05-17 7:05 am, Dimitris Marinakis wrote:

Is it possible to offset the little number that indicates the clef
transposition?
I searched the Clef internals but couldn't find anything relevant.


It is called the ClefModifier.  It would be useful to know what terms 
you used to search so we can improve the ability to find the grob for 
others in the future.




For what it's worth, if you look into the 2.23 (development version)
documentation, thanks to Werner, there is now a description of
each grob at the top of its page in the Internals Reference. In
particular, if you go to

http://lilypond.org/doc/v2.23/Documentation/internals/clef

the first thing you read is

"A clef. See also |ClefModifier| 
, 
|CueClef| 
, and 
|CueEndClef| 
."


There is also the more traditional method of looking at the
end of the relevant section in the Notation Reference,
namely in this case:
https://lilypond.org/doc/v2.22/Documentation/notation/displaying-pitches#clef
There is always a heading "See also", here it contains
(among others): "Internals Reference: Clef_engraver, Clef,
ClefModifier, clef-interface".


Best,
Jean




Re: Dot positions in chord with overlapping voices

2022-05-17 Thread Jean Abou Samra




Le 13/05/2022 à 00:29, Owen Lamb a écrit :

Hi all,

I'm engraving the following:

<<
  {
    \time 12/8
    g'4. ~ 8 f' e'
  }
  \\
  2.
>>

In order to keep the top dot and tie from colliding, I'd like the dots 
associated with the second voice to be placed on the left of the 
dotted quarter notehead. How can this be done?


N.B. My goal is also Gould's preferred way of engraving such chords; 
see p. 58: Overlapping Chords. By default, LilyPond outputs her 
example chords as she would have them "in cramped conditions":


<<
  {
    \cadenzaOn
    2. 
  } \\ {
    2. 
  }
>>




Hi Owen,

You could try something like this:

\version "2.22.2"

\layout {
  \context {
    \Staff
    \remove Dot_column_engraver
  }
  \context {
    \Voice
    \consists Dot_column_engraver
  }
}

<<
  {
    \cadenzaOn
    \once \override NoteColumn.force-hshift = 0.9
    2.
    \once \override NoteColumn.force-hshift = 1.05
    
  } \\ {
    \once \override Dots.extra-offset = #'(-0.2 . 0)
    2.
    \once \override Dots.extra-offset = #'(-2.4 . 0)
    
  }
>>


Moving the Dot_column_engraver from Staff to Voice gives each
voice a dot configuration that would be appropriate if it
were standalone (so it changes the vertical positions of the
dots). You may or may not want to keep it.

The rest is using extra-offset, which is a cheap solution, and
sadly the easiest solution because the padding of DotColumn
currently isn't configurable. (This may be worth opening
a feature request on the tracker.) It looks hardcoded at exactly
the width of one dot, if I have read dots.cc correctly.

As is often the case, you can also define a Scheme function
to override the positions manually, specifying them relative
to the note column and not relative to the default position
that is computed. This doesn't use extra-offset, so it also
has the theorical advantage of playing nicer with other
parameters that depend on this value.

\version "2.22.2"

dotsOffsets =
#(define-music-function (offs) (number-list?)
   #{
 \once \override Staff.DotColumn.positioning-done =
 #(lambda (dot-col)
    (let ((dots (ly:grob-array->list (ly:grob-object dot-col 'dots
  (for-each
   (lambda (d o)
 (ly:grob-translate-axis! d o X))
   (sort dots ly:grob-vertical2.
    \dotsOffsets #'(1.05 3.2 3.2 1.05)
    \once \override NoteColumn.force-hshift = 1.05
    
  } \\ {
    2.
    
  }
>>

Best,
Jean




Re: Guile REPL Server

2022-05-17 Thread David Kastrup
Jonas Hahnfeld via LilyPond user discussion 
writes:

> On Tue, 2022-05-17 at 09:57 +0200, Jean Abou Samra wrote:
>> Le 17/05/2022 à 00:29, Hendursaga a écrit :
>> > I'm trying to start a REPL server[1] inside LilyPond's Guile
>> interpreter, but I can't get it to even load readline support.
>> 
>> Readline support is an optional feature in Guile. It looks like
>> out new infrastructure for building binaries compiles Guile without
>> it. We may or may not want to do it (Readline is an extra dependency);
>> CCing Jonas on this matter.
>
> Right, this is intentional. I don't find it convincing that the
> official binaries should be bigger for everybody to enable an optional
> feature (readline support) in a dependency (Guile) that only a very
> tiny fraction might ever try to use...

Personally, I'd rather have it.  The tiny fraction that will want
readline support will want it for running scheme-sandbox or other forms
of REPL.  It greatly increases the friendliness of playing around with
Scheme stuff in the manner the manual suggests, and the people playing
around with Scheme stuff are the most likely candidates for becoming
future contributors.

We don't make the "Extending LilyPond" guide optional for a reason, and
it starts off right away with

1.1.1 Scheme sandbox


The LilyPond installation includes the Guile implementation of Scheme.
On most systems you can experiment in a Scheme sandbox by opening a
terminal window and typing ‘guile’.  On some systems, notably Windows,
you may need to set the environment variable ‘GUILE_LOAD_PATH’ to the
directory ‘../usr/share/guile/1.8’ in the LilyPond installation.  For
the full path to this directory see *note (lilypond-learning)Other
sources of information::.  Alternatively, Windows users may simply
choose ‘Run’ from the Start menu and enter ‘guile’.

   However, a hands-on Scheme sandbox with all of LilyPond loaded is
available with this command line:
 lilypond scheme-sandbox

Once the sandbox is running, you will receive a guile prompt:

 guile>

   You can enter Scheme expressions at this prompt to experiment with
Scheme.  If you want to be able to use the GNU readline library for
nicer editing of the Scheme command line, check the file
‘ly/scheme-sandbox.ly’ for more information.  If you already have
enabled the readline library for your interactive Guile sessions outside
of LilyPond, this should work in the sandbox as well.

I don't think we should put a roadblock here, in particular since it is
close to impossible to fudge a version of readline into the precompiled
binaries after the fact.

Yes, it is an additional nuisance for building.  I think the strategic
value of it would offset that.

-- 
David Kastrup



Re: Guile REPL Server

2022-05-17 Thread Jonas Hahnfeld via LilyPond user discussion
On Tue, 2022-05-17 at 09:57 +0200, Jean Abou Samra wrote:
> Le 17/05/2022 à 00:29, Hendursaga a écrit :
> > I'm trying to start a REPL server[1] inside LilyPond's Guile interpreter, 
> > but I can't get it to even load readline support.
> 
> Readline support is an optional feature in Guile. It looks like
> out new infrastructure for building binaries compiles Guile without
> it. We may or may not want to do it (Readline is an extra dependency);
> CCing Jonas on this matter.

Right, this is intentional. I don't find it convincing that the
official binaries should be bigger for everybody to enable an optional
feature (readline support) in a dependency (Guile) that only a very
tiny fraction might ever try to use...

Jonas


signature.asc
Description: This is a digitally signed message part


Re: Chord mode: changing N.C.

2022-05-17 Thread Carl Sorensen
On Tue, May 17, 2022 at 1:26 PM Stephan Schöll  wrote:

> Hi all
>
> My impression that the mailing list has long delays somewhere seems to be
> confirmed... When I post to the mailinglist I don't get my own post in my
> inbox for a long time (an hour or so) I will keep an eye on that. Maybe
> it's on my side.
>
> Carl, where can I find any documentation for noChordMarkup? The link you
> mentioned writes about noChordSymbol (1 occurence on the english version of
> the page). Even (my) Google doesn't find anything about noChordMarkup.
>

You can't.  I typed it wrong because I was working on my phone, instead of
my computer.  It is noChordSymbol.

You can read (a little bit) more about noChordSymbol in the Internals
Reference:
https://lilypond.org/doc/v2.22/Documentation/internals/tunable-context-properties

https://lilypond.org/doc/v2.22/Documentation/internals/chordnames

https://lilypond.org/doc/v2.22/Documentation/internals/chord_005fname_005fengraver

You can see where the default value of \markup{"N.C"} is set here :
https://lilypond.org/doc/v2.22/Documentation/internals/score

It's a bit hard to figure out where the default value is set.  If you start
with the ChordNames context you see that the Chord_name_engraver is part of
the ChordNames context, and it reads the noChordSymbol property.  You can't
find any interfaces to set the noChordSymbol property, so I just move up in
the context hierarchy.

I don't need any other contexts to support a ChordNames context, so I just
look at the Score context.

And there I can see that the noChordSymbol is set to "N.C.".   To fix it I
can just set it to some other value, using the \
set command as described in
https://lilypond.org/doc/v2.22/Documentation/notation/overview-of-modifying-properties

I'm sorry about the confusion.  I hope this helps.

Carl


Re: Chord mode: changing N.C.

2022-05-17 Thread Stephan Schöll

Hi all

My impression that the mailing list has long delays somewhere seems to
be confirmed... When I post to the mailinglist I don't get my own post
in my inbox for a long time (an hour or so) I will keep an eye on that.
Maybe it's on my side.

Carl, where can I find any documentation for noChordMarkup? The link you
mentioned writes about noChordSymbol (1 occurence on the english version
of the page). Even (my) Google doesn't find anything about noChordMarkup.

Stephan

Am 17.05.2022 um 13:05 schrieb Carl Sorensen:



On Tuesday, May 17, 2022, Henning Hraban Ramm  wrote:

Hi Ponders,

how can I change the rest symbol in chord mode from "N.C." to e.g.
"–"?


\set noChordMarkup = "–"

https://lilypond.org/doc/v2.22/Documentation/notation/displaying-chords#printing-chord-names

Carl


Re: Chord mode: changing N.C.

2022-05-17 Thread David Kastrup
Lukas-Fabian Moser  writes:

> Hi David,
>
>> Why would you want to place it at ChordNames level?  That would cause
>> trouble without end.
>>
>> Override and revert the setting at ChordNames level, and it is broken.
>> Override the setting at Score or StaffGroup level, and it has no effect.
>
> *facepalm*
>
> Thanks for explaining this.

There are a few settings where locality makes sense: like putting
settings specifically differing from normal system settings into
TabStaff (including settings that are actually interpreted at TabVoice
level, though, for similar reasons).

Another such setting is InstrumentName which a number of contexts
explicitly erase in order not to inherit it from a possibly surrounding
named StaffGroup.  It's not as much a matter of right/wrong but of most
convenience and/or predictability.

-- 
David Kastrup



Re: Chord mode: changing N.C.

2022-05-17 Thread Lukas-Fabian Moser

Hi David,


Why would you want to place it at ChordNames level?  That would cause
trouble without end.

Override and revert the setting at ChordNames level, and it is broken.
Override the setting at Score or StaffGroup level, and it has no effect.


*facepalm*

Thanks for explaining this.


Maybe there's a good reason for this, but maybe not: engraver-init.ly
deserves some cleanup anyway (I did a bit of this in a local branch
which I never got around to polishing).

I certainly hope you don't plan on a "cleanup" by relocating default
settings to the innermost level where they behave least predictably to
the user.


No. In particular, I only plan on cleaning up parts I actually 
understand. :-)


Lukas




Re: Chord mode: changing N.C.

2022-05-17 Thread Jean Abou Samra

Le 17/05/2022 à 12:39, Henning Hraban Ramm a écrit :

Hi Ponders,

how can I change the rest symbol in chord mode from "N.C." to e.g. "–"?



Hi,

I just put an improvement for the documentation example in an otherwise 
semi-related contribution:


https://gitlab.com/lilypond/lilypond/-/merge_requests/1366

Best,
Jean





Re: Chord mode: changing N.C.

2022-05-17 Thread David Kastrup
Lukas-Fabian Moser  writes:

> Hi Hraban,
>
> Am 17.05.22 um 12:39 schrieb Henning Hraban Ramm:
>> how can I change the rest symbol in chord mode from "N.C." to e.g. "–"?
>
> \set noChordSymbol = –
>
> You can give any string or (more generally) markup; in recent
> versions, no quotation marks are needed.
>
> If you want to change it globally:
>
> \layout {
>   \context {
>     \ChordNames
>     noChordSymbol = something
>   }
> }
>
> BTW, I'm a bit surprised to find the definition of noChordSymbol in
> ly/engraver-init.ly at \Score level instead of at \ChordNames
> level.

Why would you want to place it at ChordNames level?  That would cause
trouble without end.

Override and revert the setting at ChordNames level, and it is broken.
Override the setting at Score or StaffGroup level, and it has no effect.

> Maybe there's a good reason for this, but maybe not: engraver-init.ly
> deserves some cleanup anyway (I did a bit of this in a local branch
> which I never got around to polishing).

I certainly hope you don't plan on a "cleanup" by relocating default
settings to the innermost level where they behave least predictably to
the user.

-- 
David Kastrup



Re: Chord mode: changing N.C.

2022-05-17 Thread Lukas-Fabian Moser

Hi Hraban,

Am 17.05.22 um 12:39 schrieb Henning Hraban Ramm:

how can I change the rest symbol in chord mode from "N.C." to e.g. "–"?


\set noChordSymbol = –

You can give any string or (more generally) markup; in recent versions, 
no quotation marks are needed.


If you want to change it globally:

\layout {
  \context {
    \ChordNames
    noChordSymbol = something
  }
}

BTW, I'm a bit surprised to find the definition of noChordSymbol in 
ly/engraver-init.ly at \Score level instead of at \ChordNames level. 
Maybe there's a good reason for this, but maybe not: engraver-init.ly 
deserves some cleanup anyway (I did a bit of this in a local branch 
which I never got around to polishing).


Lukas



Re: Chord mode: changing N.C.

2022-05-17 Thread Henning Hraban Ramm

Hi Stephan,
thank you! Carl was faster, and his hint was enough for me.
Hraban

Am 17.05.22 um 14:29 schrieb Stephan Schöll:

Hraban,

Here's an example:

\version "2.22.0"

chordNames = \chordmode {
   a1 r d e
}

<<
   \new ChordNames {
     \set noChordSymbol = "Silence!"
     \chordNames
   }
   {
     \chordNames
   }
 >>

Am 17.05.2022 um 14:12 schrieb Stephan Schöll:


With

\set noChordSymbol = "???"

you may replace the "N.C." string with whatever string/text you like, 
even with an empty string which means that nothing will be displayed 
during chord rests.


see also LilyPond Notation Reference: 2.7.2 Displaying chords 



HTH

Stephan

Am 17.05.2022 um 12:39 schrieb Henning Hraban Ramm:

Hi Ponders,

how can I change the rest symbol in chord mode from "N.C." to e.g. "–"?

Thanks in advance!
Hraban






Re: Offset ClefTransposition number

2022-05-17 Thread Aaron Hill

On 2022-05-17 7:05 am, Dimitris Marinakis wrote:

Is it possible to offset the little number that indicates the clef
transposition?
I searched the Clef internals but couldn't find anything relevant.


It is called the ClefModifier.  It would be useful to know what terms 
you used to search so we can improve the ability to find the grob for 
others in the future.



{ \override Staff.ClefModifier.color = #red
  \override Staff.ClefModifier.padding = #1
  \clef "treble_8" b4 \clef "treble^8" b''4
  \clef "bass_8" d,4 \clef "bass^8" d'4 }



-- Aaron Hill



Offset ClefTransposition number

2022-05-17 Thread Dimitris Marinakis
Is it possible to offset the little number that indicates the clef
transposition?
I searched the Clef internals but couldn't find anything relevant.


Re: Chord mode: changing N.C.

2022-05-17 Thread Stephan Schöll

Hraban,

Here's an example:

\version "2.22.0"

chordNames = \chordmode {
  a1 r d e
}

<<
  \new ChordNames {
    \set noChordSymbol = "Silence!"
    \chordNames
  }
  {
    \chordNames
  }
>>

Am 17.05.2022 um 14:12 schrieb Stephan Schöll:


With

\set noChordSymbol = "???"

you may replace the "N.C." string with whatever string/text you like,
even with an empty string which means that nothing will be displayed
during chord rests.

see also LilyPond Notation Reference: 2.7.2 Displaying chords


HTH

Stephan

Am 17.05.2022 um 12:39 schrieb Henning Hraban Ramm:

Hi Ponders,

how can I change the rest symbol in chord mode from "N.C." to e.g. "–"?

Thanks in advance!
Hraban



Re: Chord mode: changing N.C.

2022-05-17 Thread Stephan Schöll

With

\set noChordSymbol = "???"

you may replace the "N.C." string with whatever string/text you like,
even with an empty string which means that nothing will be displayed
during chord rests.

see also LilyPond Notation Reference: 2.7.2 Displaying chords


HTH

Stephan

Am 17.05.2022 um 12:39 schrieb Henning Hraban Ramm:

Hi Ponders,

how can I change the rest symbol in chord mode from "N.C." to e.g. "–"?

Thanks in advance!
Hraban



Re: Chord mode: changing N.C.

2022-05-17 Thread Henning Hraban Ramm

Am 17.05.22 um 13:05 schrieb Carl Sorensen:



On Tuesday, May 17, 2022, Henning Hraban Ramm > wrote:


Hi Ponders,

how can I change the rest symbol in chord mode from "N.C." to e.g. "–"?


\set noChordMarkup = "–"

https://lilypond.org/doc/v2.22/Documentation/notation/displaying-chords#printing-chord-names 


Thank you, I overlooked that hint; BTW it’s noChordSymbol.

Hraban



Re: Chord mode: changing N.C.

2022-05-17 Thread Carl Sorensen
On Tuesday, May 17, 2022, Henning Hraban Ramm  wrote:

> Hi Ponders,
>
> how can I change the rest symbol in chord mode from "N.C." to e.g. "–"?


\set noChordMarkup = "–"

https://lilypond.org/doc/v2.22/Documentation/notation/displaying-chords#printing-chord-names

Carl


Chord mode: changing N.C.

2022-05-17 Thread Henning Hraban Ramm

Hi Ponders,

how can I change the rest symbol in chord mode from "N.C." to e.g. "–"?

Thanks in advance!
Hraban



Re: within \markup, how to \translate by width of another markup?

2022-05-17 Thread Werner LEMBERG
>> AFAICS, we are back to square one, needing the possibility to
>> `\translate` something by the width of another markup.  I will cook
>> something up and see how well it works.
>
>
> Probably
>
> ```
> \version "2.22.2"
>
> #(define-markup-command (translate-by-extent-of layout props axis direction 
> extent-source mkup)
>    (index? ly:dir? markup? markup?)
>    (let* ((stil (interpret-markup layout props mkup))
>   (source-stil (interpret-markup layout props extent-source))
>   (ext (ly:stencil-extent source-stil axis))
>   (trans (* direction (interval-length ext
>    (ly:stencil-translate-axis stil trans axis)))
>
>
> \markup \box \number \column {
>   \translate-by-extent-of #X #RIGHT 9 \right-align { 11 10 }
>   6 5 4 3 2 1
> }
> ```
>
>
> That being said, I think I would rather define an interface to
> align a markup on another markup.
>
> ```
> \version "2.22.2"
>
> #(define-markup-command (align-on-other layout props axis self-align-dir 
> other-align-dir
>     alignment-markup printed-markup)
>    (index? number? number? markup? markup?)
>    (let* ((stil (interpret-markup layout props printed-markup))
>   (stil-ext (ly:stencil-extent stil axis))
>   (align-stil (interpret-markup layout props alignment-markup))
>   (align-ext (ly:stencil-extent align-stil axis))
>   (trans (- (interval-index align-ext other-align-dir)
>     (interval-index stil-ext self-align-dir
>  (ly:stencil-translate-axis stil trans axis)))
>
> \markup \number \column {
>   \align-on-other #X #RIGHT #RIGHT 9 { 11 10 }
>   6 5 4 3 2 1
> }
> ```

Excellent, thanks!  I like `\align-on-other` very much.

> By the way, are you sur this is the canonical presentation for
> figured bass digits? \figures { <11 10 6 5 4 3 2 1> } seems to do a
> kind of \center-column (using the ad-hoc translation you mentioned),
> which what I would expect ...

I'm still investigating.  Whatever the outcome is, `\align-on-other`
serves all useful possibilities very well and is definitely better
than the current ad-hoc translation.


Werner


Re: Guile REPL Server

2022-05-17 Thread Jean Abou Samra

Hello Hendursaga,


Le 17/05/2022 à 00:29, Hendursaga a écrit :

Hello LilyPond users!

I'm trying to start a REPL server[1] inside LilyPond's Guile interpreter, but I 
can't get it to even load readline support.



Readline support is an optional feature in Guile. It looks like
out new infrastructure for building binaries compiles Guile without
it. We may or may not want to do it (Readline is an extra dependency);
CCing Jonas on this matter.



Note that I am running the precompiled Linux unstable release binary, because I 
want to be able to use Guile 2.

```
$ lilypond scheme-sandbox
GNU LilyPond 2.23.8 (running Guile 2.2)
Processing `/usr/local/share/lilypond/2.23.8/ly/scheme-sandbox.ly'
Parsing...
/usr/local/share/lilypond/2.23.8/ly/scheme-sandbox.ly:21:2: error: GUILE 
signaled an error for the expression beginning here
#
  (load-user-init)
no code for module (ice-9 readline)

GNU Guile 2.2.7
Copyright (C) 1995-2019 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(#{ g102}#)> (use-modules (system repl server))
scheme@(#{ g102}#)> (run-server)
system/repl/server.scm:75:36: In procedure make-tcp-server-socket:
In procedure module-lookup: Unbound variable: INADDR_LOOPBACK

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(#{ g102}#) [1]> ,q
scheme@(#{ g102}#)> ,q
Success: compilation successfully completed
```

Nor can the Guile debugger script run, either..



This is a known issue. The Guile debugger is broken under Guile 2.
It would need a rewrite, but I guess this hasn't been a priority
for anyone so far.



Any suggestions for getting this working? Perhaps the Scheme sandbox is, well, 
sandboxing access? My system Guile 2 can load readline support, for instance. 
The docs[2] don't mention an inability to access readline through the sandbox, 
so I'm not sure where I'm going wrong here.



If this is an essential feature for you, building LilyPond from source
with the version of Guile provided by your system is an option.

Best,
Jean




Re: within \markup, how to \translate by width of another markup?

2022-05-17 Thread Jean Abou Samra




Le 17/05/2022 à 07:49, Werner LEMBERG a écrit :

Sth like

\markup \box \number \column \with-dimensions-from \right-align "0"
\right-align { 11 10 6 5 4 3 2 1 }

While this is an ingenious solution – thanks! – it doesn't fit my
needs, alas, since two-digit numbers stick out to the left of the box.
This is exacerbated by the fact that in figured bass there are
sometimes prepended symbols like '#' – this can cause collisions with
other figured bass stacks on the left side in tight typesetting
situations.

In other words, the horizontal dimension of your solution is (0 . 100)
with some stuff sticking out to the left.  What I want is (-50 . 100),
without something sticking out to the left.

AFAICS, we are back to square one, needing the possibility to
`\translate` something by the width of another markup.  I will cook
something up and see how well it works.



Probably

\version "2.22.2"

#(define-markup-command (translate-by-extent-of layout props axis 
direction extent-source mkup)

   (index? ly:dir? markup? markup?)
   (let* ((stil (interpret-markup layout props mkup))
  (source-stil (interpret-markup layout props extent-source))
  (ext (ly:stencil-extent source-stil axis))
  (trans (* direction (interval-length ext
   (ly:stencil-translate-axis stil trans axis)))


\markup \box \number \column {
  \translate-by-extent-of #X #RIGHT 9 \right-align { 11 10 }
  6 5 4 3 2 1
}



That being said, I think I would rather define an interface to
align a markup on another markup.


\version "2.22.2"

#(define-markup-command (align-on-other layout props axis self-align-dir 
other-align-dir

    alignment-markup printed-markup)
   (index? number? number? markup? markup?)
   (let* ((stil (interpret-markup layout props printed-markup))
  (stil-ext (ly:stencil-extent stil axis))
  (align-stil (interpret-markup layout props alignment-markup))
  (align-ext (ly:stencil-extent align-stil axis))
  (trans (- (interval-index align-ext other-align-dir)
    (interval-index stil-ext self-align-dir
 (ly:stencil-translate-axis stil trans axis)))

\markup \number \column {
  \align-on-other #X #RIGHT #RIGHT 9 { 11 10 }
  6 5 4 3 2 1
}

By the way, are you sur this is the canonical presentation for
figured bass digits? \figures { <11 10 6 5 4 3 2 1> } seems to
do a kind of \center-column (using the ad-hoc translation you
mentioned), which what I would expect ...

Best,
Jean




Re: within \markup, how to \translate by width of another markup?

2022-05-17 Thread Werner LEMBERG

> Sth like
> 
> \markup \box \number \column \with-dimensions-from \right-align "0"
> \right-align { 11 10 6 5 4 3 2 1 }

While this is an ingenious solution – thanks! – it doesn't fit my
needs, alas, since two-digit numbers stick out to the left of the box.
This is exacerbated by the fact that in figured bass there are
sometimes prepended symbols like '#' – this can cause collisions with
other figured bass stacks on the left side in tight typesetting
situations.

In other words, the horizontal dimension of your solution is (0 . 100)
with some stuff sticking out to the left.  What I want is (-50 . 100),
without something sticking out to the left.

AFAICS, we are back to square one, needing the possibility to
`\translate` something by the width of another markup.  I will cook
something up and see how well it works.


Werner