Re: Use markup in \replace when lilypond is expecting a string?

2022-06-15 Thread Valentin Petzel
Hello PJ,

\replace does simply add to the  prop 'replacement-alist. This is then used in 
text-interface.cc to replace substrings of string with other strings. This 
means you can only use \replace to substitute strings. Of course it would 
theoretically be possible to define a custom replace command that allows for 
this.

Cheers,
Valentin

Am Mittwoch, 15. Juni 2022, 20:41:23 CEST schrieb P J:
> Sorry if this is a silly question... but I am struggling with the
> \replace function.
> 
> Let's take this example:
> 
> ---
> 
> \markup \replace #'(("100" . "hundred")
> ("dpi" . "dots per inch")) "A 100 dpi."
> 
> ---
> 
> What code should I use if rather than replacing "100" with "hundred" I
> want, say, to replace "100" with a markup, for instance:
> 
> \markup \concat { "1" \translate-scaled #' (-0.5 . 0) "00" }
> 
> I have not been able to figure this out!
> 
> Thank you
> 
> PJ



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


is "pure positioning" done per score or per bookpart?

2022-06-15 Thread Jeff Olson

Jean,

I'm studying your "Overview of LilyPond’s inner workings" 
(https://extending-lilypond.readthedocs.io/en/latest/intro.html#overview-of-lilypond-s-inner-workings-and-how-you-might-hook-in-them) 
and trying to correlate the processing steps you describe with the INFO 
level output that I can see in the log.


Knowing my piece, I can discern in the log what's done e.g. for every 
score from things that are done for each bookpart:


   per compile:   "Parsing..."
   per score: "Interpreting music...[8][16][24][32][40][48]"
   per score: "Preprocessing graphical objects..."
   per bookpart:  "Finding the ideal number of pages..."
   per bookpart:  "Fitting music on 39 or 40 pages..."
   per bookpart:  "Drawing systems..."
   per compile:   "Converting to .pdf"

But what is not self-evident is whether the stage you label as "Pure 
Positioning" is done per score in "Preprocessing graphical objects..." 
or per bookpart in "Finding the ideal number of pages...".


Since pure positioning is done a priori, before breaks are decided, it 
could be per score.  But the word "ideal" in the log might alternatively 
match with "pure".


This off-by-one ambiguity cascades through the subsequent stages and 
their correlation with log messages, but surprisingly both possibilities 
arguably line up with the log.


I guess I could equivalently ask whether the stage "Writing Output" is 
done for each bookpart or once for the whole compilation.


If you're still taking suggestions re extending-lilypond.readthedocs.io, 
it might help others if each of the processing stages listed in the 
Overview explicitly said how they appear in the log, since those phrases 
are often familiar even to Frescobaldi users.


Thanks,
Jeff




Re: Use markup in \replace when lilypond is expecting a string?

2022-06-15 Thread David Kastrup
P J  writes:

> Sorry if this is a silly question... but I am struggling with the
> \replace function.
>
> Let's take this example:
>
> ---
>
> \markup \replace #'(("100" . "hundred")
> ("dpi" . "dots per inch")) "A 100 dpi."
>
> ---
>
> What code should I use if rather than replacing "100" with "hundred" I
> want, say, to replace "100" with a markup, for instance:
>
> \markup \concat { "1" \translate-scaled #' (-0.5 . 0) "00" }
>
> I have not been able to figure this out!

You'd use

\markup \replace #`(("100" . ,#{ \markup \concat { "1" \translate-scaled
#'(-0.5 . 0) "00" } #}) ("dpi" . "dots per inch")) "A 100 dpi."

if it were supported, which it isn't.  Text replacements are purely
string-to-string at the moment.  Logically that should not be required
since the replacements happen in the course of creating a stencil from a
string in ly:text-interface::interpret-string which has all the
information it needs to also properly interpret markups.

But it would make for quite trickier code paths.

-- 
David Kastrup



Use markup in \replace when lilypond is expecting a string?

2022-06-15 Thread P J
Sorry if this is a silly question... but I am struggling with the
\replace function.

Let's take this example:

---

\markup \replace #'(("100" . "hundred")
("dpi" . "dots per inch")) "A 100 dpi."

---

What code should I use if rather than replacing "100" with "hundred" I
want, say, to replace "100" with a markup, for instance:

\markup \concat { "1" \translate-scaled #' (-0.5 . 0) "00" }

I have not been able to figure this out!

Thank you

PJ


Re: [Help] How to type the symbol for indicating left/right hand

2022-06-15 Thread Robin Bannister

On 15.06.2022 09:37, xurc wrote:

Hi all,

Is it possible to type this right-angled symbol as seen in the attached image in LilyPond? 




Here is a recent answer to this question:
https://lists.gnu.org/archive/html/lilypond-user/2022-05/msg00449.html


Cheers,
Robin






Re: L-R reversed mensural flag

2022-06-15 Thread Adam M. Griggs
Cheers Andrew!

Without divulging any of your work's trade secrets, how does that work?
Just Ghostscript?

On Wed, 15 Jun 2022, 13:04 Andrew Bernard, 
wrote:

> I've been away from LilyPond for a few years but my work uses custom
> flags which you can set. You can describe any path and make it for the
> flag. I don't have my example on hand just now, but fear not, this can
> easily be achieved. I'm sure the others will give more detail.
>
> Andrew
>
>
> Adam M. Griggs wrote on 15/06/2022 1:53 PM:
> > Just a quick request today, if I may. What I'd like is a stem-down
> > fusa (mensural-style quaver or eighth-note) with its flag extending to
> > the right instead of the left. A mirror image of the regular engraving.
>
>
>


Re: L-R reversed mensural flag

2022-06-15 Thread Adam M. Griggs
Wonderful! Thank you!

On Wed, 15 Jun 2022, 14:34 Jean Abou Samra,  wrote:

>
>
> Le 15/06/2022 à 05:53, Adam M. Griggs a écrit :
> > Hello list,
> >
> > Just a quick request today, if I may. What I'd like is a stem-down
> > fusa (mensural-style quaver or eighth-note) with its flag extending to
> > the right instead of the left. A mirror image of the regular engraving.
> >
> > I can get close by overriding the flag back into standard style but I
> > want to retain the mensural shape, so that isn't ideal.
> >
> > Thank you!
>
>
> Something like this?
>
> \version "2.22.2"
>
> \new MensuralStaff {
>\override Flag.stencil =
>  #(grob-transformer
>'stencil
>(lambda (grob original)
>  (ly:stencil-scale original -1 1)))
>c''8
> }
>
>
> Best,
> Jean
>
>


Re: Exited with return code -1073741819

2022-06-15 Thread Ahanu Banerjee
Of course; just wanted to track progress and see if you still needed access
to a windows install to debug. Many thanks!

On Wed, Jun 15, 2022, 01:19 Jean Abou Samra  wrote:

> Le 15/06/2022 à 06:10, Ahanu Banerjee a écrit :
> > Hi, has an issue been created for this problem? I don't see one in
> gitlab.
>
>
> https://gitlab.com/lilypond/lilypond/-/issues/6361
>
>
> > Any progress in identifying the cause?
>
>
> It happens that yes, but I would like to remind that everyone in this
> project is a volunteer and thus you shouldn't expect fixes within days.
> 2.23 is a unstable release series after all. If things do not work,
> please downgrade to 2.22.
>
> Thanks,
> Jean
>
>