Re: hairpin over bar line and over end of line

2024-06-11 Thread Jean Abou Samra
> How would I have found that in the documentation?


It's in the "expressive marks" snippets, though I admit I couldn't
have found it myself without searching the docs source code.

https://lilypond.org/doc/v2.24/Documentation/snippets/expressive-marks.html#expressive-marks-controlling-spanner-visibility-after-a-line-break



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


Re: hairpin over bar line and over end of line

2024-06-11 Thread Jean Abou Samra
> Probably a simple answer but how do I get a crescendo in this example to 
> continue to the next line?


\override Hairpin.after-line-breaking = ##f





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


Re: Fine-tuning footer alignment

2024-06-11 Thread Jean Abou Samra
\version "2.25.13"

\header {
  copyright = \markup {
\general-align #Y #DOWN \left-column {
  \line{© Cameron Horsburgh. This work is licensed under}
  \line{CC BY-ND 4.0. To view a copy of this license, visit }
  \line {https://creativecommons.org/licenses/by-nd/4.0}
}
  }
  tagline = \markup {
\general-align #Y #DOWN \right-column {
  \line{Check out LilyPond at}
  \line{www.lilypond.org}
}
\hspace #2
\general-align #Y #DOWN \override #'(quiet-zone-size . 0) \qr-code #10.0 
"https://www.lilypond.org;

  }
}

\score {
  \relative c{
c'4 c c c
  }
  \layout {
  }
}

\paper {
  oddFooterMarkup = \markup {
\fill-line {
  \fromproperty #'header:copyright
  \fromproperty #'header:tagline
}
  }
}



HTH
Jean



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


Re: Two adjacent clefs

2024-06-09 Thread Jean Abou Samra

> I think it's not uncommon for two clefs to appear side by side at the
> start of a piece (e.g. when a piano piece starts with both staves in
> bass clef so as to alert the pianist that the upper staff is not in
> treble clef).
> How is this done in LilyPond?

See
https://lsr.di.unimi.it/LSR/Item?id=792
and
https://lsr.di.unimi.it/LSR/Item?id=956


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


Re: wordwrap on argument of markup function

2024-06-01 Thread Jean Abou Samra
> (define-markup-command (freely layout props width-param text) (number?  
> markup?)
  
^^^

Make that `markup-list?`. Otherwise, your command is accepting only
a single markup. In your example, \line inside the command is working
perfectly (though not actually needed), but \freely gets applied multiple
times.

HTH
Jean



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


Re: fontconfig not using XDG directories

2024-06-01 Thread Jean Abou Samra
> I am running on Alpine Linux and I noticed that lilypond creates
> ~/.fontconfig/ with cache files every time I run it.
> 
> It seems like fontconfig is supposed to follow the XDG environment
> variables
> (https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/8c255fb),
> which I have defined on my system. Other programs on my system that
> depend on fontconfig all follow them and put cache files in
> $HOME/.cache/fontconfig.
> 
> Are there any configurations I can do to make lilypond respect the XDG
> environment variables, or to create the cache files somewhere else?



This was a bug, and has been fixed in version 2.25.5.

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






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


Re: Vertical alignement

2024-05-27 Thread Jean Abou Samra
Try

\version "2.24.3"

\markup \fill-line {
  \column {
\override #'(padding . 10)
  \table #`(,LEFT ,LEFT) {
\line {
  "1."
  \column {
"Поблискують черешеньки"
"В листі зелененькім,"
"Черешеньки ваблять очі"
"Діточкам маленьким."
  }
}
\line {
  "3."
  \column {
"Раді б вишню з'їсти –"
"Та високо лізти,"
"Ой раді зірвати –"
"Та годі дістати!"
  }
}
\vspace #1.5
\vspace #1.5
\line {
  "2."
  \column {
"Дівчаточко й хлоп'яточко"
"Під деревом скачуть,"
"Простягають рученята"
"Та мало не плачуть."
  }
}
\line {
  "4."
  \column {
"– Ой вишеньки-черешеньки,"
"Червонії, спілі,"
"Чого ж бо ви так високо"
"Виросли на гіллі?"
  }
}
  }
  }
}



HTH
Jean



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


Re: running lilypond

2024-05-24 Thread Jean Abou Samra
Le vendredi 24 mai 2024 à 07:23 -0600, ming tsang a écrit :
> I try to run the following code as lilypond .ly
> \version "2.24.3"
> lilypond -dbackend=eps -dno-gs-load-fonts -dinclude-eps-fonts myfile.ly

This looks like a command that you should run in a terminal, not LilyPond 
syntax.

In Frescobaldi, you can add the "-dbackend=eps -dno-gs-load-fonts 
-dinclude-eps-fonts"
arguments in the "Additional command line options" box inside "LilyPond > 
Engrave (custom)…".




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


Re: DIfferent note values within a chord

2024-05-21 Thread Jean Abou Samra
> Could someone give me a pointer for this?
> 
> This is a quite popular notation for bowed string instruments. I’m almost
> certain that I saw a way to achieve this before but could not find it this
> time.


\version "2.24.2"

{
  2
}


HTH
Jean



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


Re: Moving dynamics onto the staff

2024-05-20 Thread Jean Abou Samra
> So why would overriding the dynamic line spanner's outside-staff-priority
> change where the forte goes?  Isn't it DynamicText?  If anyone can clear this
> up for me, I would be very appreciative. 

When there are consecutive dynamics like \p \< ... \f \> ... \pp, they
need to be all vertically aligned. LilyPond achieves that by grouping
them into a same DynamicLineSpanner, so it's that object which is responsible
for the vertical placement of dynamics. In this case, there's only
one dynamic in the DynamicLineSpanner, but this still applies.



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


Re: Conditional code in the midi block

2024-05-20 Thread Jean Abou Samra

> nostaffmidi =
> #(define-scheme-function () ()
>(if TrackPerVoice #{ \context { \Staff \remove "Staff_performer" } #}))


Ah, that proves me wrong. I didn't recall the parser was smart enough for this.


> Although, I don't understand why the contents of the scheme functions cannot 
> be placed directly into the midi block like this
> 
> \midi {
>   #(if TrackPerVoice #{ \context { \Staff \remove "Staff_performer" } #})
>   #(if TrackPerVoice #{ \context { \Voice \consists "Staff_performer" } #})
> }


It works with $ instead of # , as explained in my other post.




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


Re: Conditional code in the midi block

2024-05-20 Thread Jean Abou Samra

> I would like to include some Staff and Voice context settings in the
> \midi block only if a flag is set to ##t and I have not been able to
> figure out how to do this.  When I try to wrap the \context blocks
> in a code block with #{…#} I get this error:
> trackPerVoiceMWE.ly:31:16: error: syntax error, unexpected '{', expecting
> SCM_IDENTIFIER or SCM_TOKEN or STRING or SYMBOL
>   \context {


Probably the easiest way is to include or exclude a whole \midi block like this:


\version "2.24.0"
\include "english.ly"

global = {
  \key c \major
  \time 4/4
}

TrackPerVoice = ##t
\score {
  \new ChoirStaff <<
\new Staff <<
  \new Voice = "soprano" <<
\global
\relative c' { c'4 d e f << g1 \\ { g4 f e2 } >> }
  >>
  \new Voice = "alto" <<
\global
\voiceTwo
\relative c' { c'4 b a g | f e d2 }
  >>
>>
  >>
  \layout { }
  #(if TrackPerVoice
   (begin
 (display "One track per Voice (may make too many voices with 
polyphony)")
 (display "Turn this off to get sop and alto combined in one track.")
 #{
   \midi {
 \context {
   \Staff
   \remove "Staff_performer"
 }
 \context {
   \Voice
   \consists "Staff_performer"
 }
   }
 #})
   #{ \midi { } #})
}



Alternatively, you can do it more like you were envisioning, but for technical
reasons, you have to start the Scheme code with $ , not # , and you also have
to include an extra \midi { } around the \context blocks (basically because
\context outside \layout or \midi is a different command).



\version "2.24.0"
\include "english.ly"

global = {
  \key c \major
  \time 4/4
}
TrackPerVoice = ##t
\score {
  \new ChoirStaff <<
\new Staff <<
  \new Voice = "soprano" <<
\global
\relative c' { c'4 d e f << g1 \\ { g4 f e2 } >> }
  >>
  \new Voice = "alto" <<
\global
\voiceTwo
\relative c' { c'4 b a g | f e d2 }
  >>
>>
  >>
  \layout { }
  \midi {
$(if TrackPerVoice
 (begin
   (display "One track per Voice (may make too many voices with 
polyphony)")
   (display "Turn this off to get sop and alto combined in one track.")
   #{
 \midi {
   \context {
 \Staff
 \remove "Staff_performer"
   }
   \context {
 \Voice
 \consists "Staff_performer"
   }
 }
   #}))
  }
}




The # vs $ issue is explained here: 
https://extending-lilypond.gitlab.io/en/extending/lily-and-scheme.html#hash-vs-dollar

HTH
Jean



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


Re: One-page PDF cut off after a certain height?

2024-05-20 Thread Jean Abou Samra

> I run into a problem when I create a (very high) single-page PDF file from a
> Lilypond score. 'After a certain time', the rest of the page is rendered in
> white.
> 
> In my use case, I wanted to make a large system staff, and white-on-black
> music, because of readability-reasons. Specifically: Puttin this on a tablet,
> and using one page for continuous scrolling to make the music less 'jumpy'
> (even staff spacing, not constrained to page height).
> 
> Can anyone shed a light on what goes wrong here? I've attached my files for
> reference.


You have

          \filled-box #'(-1000 . 1000) #'(-1000 . 4000) #0

in your color.ily file. That's painting a big black box for the background, but
the box just happens not to be big enough. Try adding an extra zero to the
second -1000 value.

Also, are you sure you need the big color-staff-lines function? It goes through
hoops to allow coloring each staff line in its own color, but if you just
want all staff lines in white, you can just add an
\override Score.StaffSymbol.color
with the other overrides in the \color function.

And also, LilyPond has supported CSS-style colors natively for a long time,
so this whole function:

color =
#(define-music-function (parser location color) (string?)
   (define (hexa->decimal x)
 (let ((num (string->number x 16)))
   (if (= 0 num)
   num
   (exact->inexact
(/ 255 num)
   (let* ((str (string-take
(if (string-prefix? "#" color)
(string-drop color 1)
color)
6))
  (r (string-take str 2))
  (g (string-drop (string-drop-right str 2) 2))
  (b (string-take-right str 2))
  (translated-color
   (map hexa->decimal
(list r g b)))
  (lily-color (primitive-eval
   (cons rgb-color translated-color
 #{
   \override Score.BarNumber.color = #lily-color
   [...]
 #}))


can be simplified to just

color =
#(define-music-function (parser location lily-color) (string?)
 #{
   \override Score.BarNumber.color = #lily-color
   [...]
 #})


HTH
Jean



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


Re: Looking for documentation for constants

2024-05-19 Thread Jean Abou Samra
> This is a very basic question.  I have see some examples that use
> constants like "$SELECTION" or ""$CURSOR'$ANCHOR". but despite doing all the
> obvious things (searching the documentation, etc.) I've not found any relevant
> information.
> 
> I would sincerely appreciate being pointed in the right direction.


This is a Frescobaldi thing, not a LilyPond thing. See Help > User guide >
Editing files > Snippets > Snippet editor in Frescobaldi.


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


Re: vertical spacing per score

2024-05-18 Thread Jean Abou Samra



> Le 19 mai 2024 à 02:53, Walt North  a écrit :
> 
> David, thanks, this did indeed accomplish my goal - so I'm happy.

Well, \bookpart will work *if* you are happy with having a page break between 
the two scores.





Re: vertical spacing per score

2024-05-18 Thread Jean Abou Samra



> Le 19 mai 2024 à 01:56, David Wright  a écrit :
> 
> Perhaps
> 
> https://lists.gnu.org/archive/html/lilypond-user/2024-04/msg00247.html


Indeed, but there was a more technical one, with Lukas I think.





Re: vertical spacing per score

2024-05-18 Thread Jean Abou Samra
> Hi.  I have a case where I want to have different vertical spacing between two
> different scores.  I can get system-system spacing to change for both scores
> using a \paper variable. But if I'm understanding the documentation correctly
> I should be able to use the same variable in a distinct layout block in each
> of the two scores.  If tried several different coding lines based on things
> I've found on google but have not found the correct coding yet.

Sorry, this isn't supported, it's a known issue
(https://gitlab.com/lilypond/lilypond/-/issues/1885 ; there are
no comments there, but IIRC there was a more recent discussion).





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


Re: manual repeat mark syntax question

2024-05-16 Thread Jean Abou Samra

>    \set Score.repeatCommands = #'((volta ,voltaOpt))
 ^^^

This should be ` not ' .




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


Re: Custom colors in fret diagrams

2024-05-15 Thread Jean Abou Samra
> Quick question on coloring dots in fret-diagrams. There is an option to use
> predefined colors from normal, CSS or X11 palettes which works perfectly well
> in the fret-diagram-verbose with the snippet below:
> 
> >  (place-fret 3 6 3 dodgerblue2)
> 
> For some reason I cannot get it working with custom RGB or Hex colors like
> this:
> 
> > (place-fret 3 6 3 #FF)


You should put quotes around it:

(place-fret 3 6 3 "#FF")

HTH
Jean




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


Re: italic phrase in lyrics

2024-05-15 Thread Jean Abou Samra
Le mercredi 15 mai 2024 à 17:05 -0400, David Olson a écrit :
> Suppose the lyrics contain two contradictory propositions:
> 
>    Ma -- the -- ma -- tics is in -- vent -- ed.
>   Ma -- the -- ma -- tics is dis -- cov -- ered.
> 
> Is this the only way to put the second proposition in italics? 
> 
> \markup { \italic Ma } --  
> \markup { \italic the }  -- 
> \markup { \italic ma } --  
> \markup { \italic tics } 
> \markup { \italic is }  
> \markup { \italic dis }  -- 
> \markup { \italic cov }  -- 
> \markup { \italic  ered. }


You could do it like this:

\version "2.24.2"

\lyrics {
  \override LyricText.font-shape = #'italic
  Ma -- the -- ma -- tics is dis -- cov -- ered.
}


or even like this:


\version "2.24.2"

\lyrics {
  \markupMap text \markup \italic \etc {
Ma -- the -- ma -- tics is dis -- cov -- ered.
  }
}


HTH
Jean



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


Re: layout problem - new issue

2024-05-14 Thread Jean Abou Samra

> I've tried placing the new bar in 3 different places on the treble 
> staff.  In the current pdf, the first 2 are commented out and the third 
> -- which I expected to work -- is active: placement after the >>.  
> Somehow a spurious bar is inserted, but I don't know where it's coming from.

You have

<<
  { R1 | [...] \bar "!" }

  \new Staff \with { alignAboveContext="RH" } { \chimes }

>>
es'4\mp es'4. es'8

but the \chimes takes one measure more than the { R1 | [...] \bar "!" }.
The duration of the << >> expression is the max of the two. Basically,
<< >> waits before *all* subexpressions are exhausted before yielding
back control.

You should simply move the line es'4\mp es'4. es'8 into the { R1 ... }.

Best,
Jean



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


Re: Frescobaldi?

2024-05-10 Thread Jean Abou Samra

> I've freshly installed Frescobaldi using mac port. When lauching the 
> frescobaldi.app,

Are you sure that this is the Frescobaldi that was installed by MacPorts?
It rather sounds like the (buggy) .app distributed in the Frescobaldi
releases. I think the MacPorts-installed Frescobaldi should be launched
by executing the `frescobaldi` command in a terminal — which was apparently
successful for you.


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


Re: \after positioning in voices

2024-05-07 Thread Jean Abou Samra
> 
>   % \after 2 \< \after 8*7 \!\> \after 2 \!
>   s2 d8(c b2)


Make that

      s2 d8(\< c \after 8 \> b2) <>\!

\after doesn't work the way you indented your code suggests you
think it does. The syntax is

\after DURATION ARTICULATION MUSIC

and gives something roughly equivalent to

<< { s DURATION   <>ARTICULATION  } MUSIC >>

So when you do

\after 8*7 \!\>

it is telling LilyPond "put \> here and \! at 8*7 after it".
The first thing to correct is to change that into

\after 8*7 \! \after 8*7 \> ...

or just

\after 8*7 \> ...

(since \> automatically ends the previous hairpin).

But you still have the problem that you're using \after
to put an articulation at 8*7 after the s2, and the
skip that delays it to 8*7 makes the length of

\after 8*7 \> s2

be 8*7, not 2.

In short, \after doesn't just "spawn something in parallel
at a given point". It needs a main music argument to put
the articulation in parallel with, and normally you don't
want that main music argument (usually a note) to be
longer than the delay of the articulation.

I feel that's not a very clear explanation, but it's the
best I could do, sorry :(



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


Re: Frescobaldi?

2024-05-06 Thread Jean Abou Samra
> Regarding MacOs porting, a valid alternative would be to run
> the linux version of Frescobaldi from a Docker container

Perhaps, but from the perspective of building .app bundles, that replaces
a headache (shipping Qt, PyQt, Poppler and python-poppler-qt5) with what
sounds like an even larger headache, and there's a myriad of ways it won't
integrate well with the macOS system around it (file dialogs, global menu,
and so on). If the goal is to just have something that works, the Homebrew
and MacPorts packages already work better.




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


Re: Re[4]: Frescobaldi?

2024-05-06 Thread Jean Abou Samra
> I'm an intermediate-level python programmer but I might be able to help with
> busy work like typing and documenting functions, with some feedback.  Anything
> to give back to a project that I use all the time!


Thanks. However, without wanting to stop you from contributing, I'll reiterate
that from my point of view, what the project needs right now is focus on macOS
distribution, and Qt 6. Other work is welcome but it will not really help
the project to get out of the current impasse.




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


Re: Re[4]: Frescobaldi?

2024-05-06 Thread Jean Abou Samra
Le lundi 06 mai 2024 à 14:05 +, Steph Phillips a écrit :
> Well, I'm glad you asked about feedback because I'm curious what other 
> folks who contribute to Frescobaldi might think.
> 
> After digging around in the codebase, I'm wondering if the application 
> might benefit from a more object-oriented design. It's definitely in 
> Python, but with more of C-style approach. You've worked on it, you know 
> what I'm talking about. Was wondering what your thoughts are.


I wouldn't focus on large-scale refactorings that will only pay off on the
long term without first (1) doing smaller things to get used to the code and
(2) doing what needs to get done on the short term to be able to do releases
and keep up to date with the rest of the world.



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


Re: Re[2]: Frescobaldi?

2024-05-06 Thread Jean Abou Samra

> Hey all, I've been looking over the Frescobaldi codebase for the last 
> few days, and it seems to be within the realm of something I could pick 
> up maintenance for.
> 
> There would definitely be a learning curve, so hopefully it doesn't 
> reach it's EOL too soon... But, I don't know, I feel pretty confident.
> 
> Not really sure what more info I can contribute to the public discourse 
> at this point, but I welcome anyone else interested with the upkeep of 
> Frescobaldi to get in touch with me so we can coordinate~



I'd encourage you to start by fixing some small issues to get acquainted
with the code. Then if you want to do the Qt 6 port, work on a branch
and make it public so I (for example) can have a look (don't wait for
having finished the port before seeking feedback).

Thanks,
Jean




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


Re: Frescobaldi?

2024-05-06 Thread Jean Abou Samra

> I’m wondering if the Frescobaldi approach is actually working out. Keep in 
> mind that originally Frescobaldi was just a project for adding support for 
> Lilypond to KATE, then it became a KDE parts solution, then it started to do 
> everything itself for more control. And this means you’ll need to maintain and
> develop many components for a niche community. Frescobaldi is essentially a 
> full text editor, solely for Lilypond. And I do not think the Lilypond 
> community is the best place for maintaining a whole text editor.
> 
> This also means you get a weird dependency situation which is hard to 
> maintain. Frescobaldi has a lot of qt-independent functionality, including a 
> reduced Lilypond parser and transformation tools and stuff. And it has a lot 
> of 
> interface stuff. This is the part that depends on qt5, and only one component 
> depends on the poppler integration.
> 
> So maybe instead of trying to maintain this collosus of tools it could make 
> sense to split it up into different parts:
> 
> → An LSP server
> → A transformative toolset
> → An editor using these features
> 
> This way no matter what might happen to Frescobaldi, much of the functionality
> would be still usable. With an LSP server any modern text editor with an LSP 
> client could benefit from understanding Lilypond syntax. And being able to a 
> toolset would make extending editors much more fun.
> 
> And this way the maintainance effort could be split. Maybe the LSP could even 
> become part of Lilypond itself (no need to implement a new parser if you 
> already have one), keeping it always up to date (rather than the always 
> outdated approch we have with Frescobaldi).


Well, what you call the "transformative toolset" is already separated, in the
form of the python-ly package. An LSP server might be nice, but it wouldn't
really take off that much functionality from Frescobaldi. I'd have to check
how advanced the LSP protocol exactly is now, but you definitely can't do
things like the MIDI player, the fonts dialog, or the manuscript viewer through 
LSP.

And of course, if we already have trouble maintaining the software as it is,
finding people to work on that kind of split is not going to be easier :(

Also, you cannot really use the LilyPond parser because it won't parse
LilyPond code without also interpreting it at the same time (e.g., music
functions can be defined dynamically). You don't want to pay the price
of parsing the full file every time a character changes, and you don't
want to lose syntax highlighting as soon as there is a syntax error.



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


Re: Frescobaldi?

2024-05-05 Thread Jean Abou Samra
> The technical stuff is way over my head, but this reads like the top-
> level description of a GSOC project (in case the mentioned friend
> doesn't take the bait)...



GSoC projects are nice for doing focused work on some specific part
of the code base. For overhauling just about everything, I'd be a lot
more skeptical, especially since there will unavoidably be fallout
to deal with afterwards in terms of bugs, and that's less nice to do
if the person who did the port isn't available after the summer to
do that part of the work.


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


Re: how difficult would it be to have “auto-correct spacing” (even for just a single measure)?

2024-05-04 Thread Jean Abou Samra

> > If you look at the first measure of the third system, you can see
> > that the note spacing is distorted by various things (lyrics,
> > accidentals, etc.). But clearly there’s more than enough horizontal
> > room to make those eighth notes absolutely even — in fact, that kind
> > of thing is what the majority of my post-data-entry tweak time is
> > dedicated to. [Again: When I used Finale , it took hours or
> > even days to get from “the data is all in” to looking like this
> > already looks… so I’m not complaining!]
> 
> You are aware of https://lsr.di.unimi.it/LSR/Item?id=1154 ?


It looks like the spacing is not really distorted by the lyrics here
but rather by the accidentals, so that snippet won't help much (what
it does is basically making the spacing engine forget about lyrics,
then space them itself). There might be ways to reduce the importance
of accidentals in the spacing problem, but I don't really recall this,
it's been a long time. It's interesting though that adding

  \override Score.SpacingSpanner.spacing-increment = 5

in \layout evens out the spacing a lot. Of course, for a longer score,
this will spread out the music, so it's not really a solution, but
it might be worth trying to flank that measure with \newSpacingSection
and give it a different spacing-increment.

Jean



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


Re: Fw: Frescobaldi ... panic alternatives?

2024-04-30 Thread Jean Abou Samra

> FYI, what I like the most about Frescobaldi are:
> 
>  * Templates and wizards
>  * Snippets
>  * Point and Click selection
>  * Syntax highlighting
> 
> If Frescobaldi for Mac does indeed vanish, what are my alternatives for a
> Lilypond editor?

Syntax highlighting should be doable in Emacs, VS Code or such. Point and click
can be arranged with various PDF viewers (see the LilyPond Usage manual).
The other two only exist in Frescobaldi AFAIK.

> Also, how can I help? (I'm not a programmer at all...) 


Thanks, but you cannot really help in a way meaningful for the current
issues without programming knowledge.

Also, for the record, Frescobaldi needs developers, but perhaps
even more importantly, it needs maintainers, i.e., people who will
not just work on a technical problem because they were told
it's important, but also proactively and autonomously respond
to GitHub issues and support questions, update the website,
figure out what parts of the code need regular maintenance like
lists of LilyPond commands and maintain them, monitor the
frescobaldi package in major Linux distros, and so on.
Unfortunately, it can be really hard to find maintainers (even for
projects that the entire world infrastructure relies on, cf. xz…).

Best,
Jean



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


Re: How to manually set MIDI channel # for a staff?

2024-04-29 Thread Jean Abou Samra
Le lundi 29 avril 2024 à 06:31 -0500, Jason Yip a écrit :
> Hi,
> 
> Does anyone know how to manually set the midi channel # for a staff to 
> something other than the default of channel 0/1? Without having to 
> create dummy staffs with just `s256` as the voice content preceding the 
> desired staff? The staff in question usually only has one voice, so I 
> modified the midi context as shown below simply made a bunch of dummy 
> voices with only `s256` as the content so that they don't at least 
> affect the graphical output:
> 
> ```
>   \midi {
>    \context {
>  \Staff
>  \remove "Staff_performer"
>    }
>    \context {
>  \Voice
>  \consists "Staff_performer"
>    }
>  }
> ```


You can do \set Score.midiChannelMapping = #'voice as an alternative to that.
Also \new Voice { } should work (untested) instead of \new Voice { s256 }.
I don't think there's a better way.



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


Re: Frescobaldi?

2024-04-29 Thread Jean Abou Samra
> yeah, I just had the package-manager in gentoo downgrade to the previous
> version of snappy, and then filed a bug with gentoo. It's a workaround for 
> now.
> 
> As another workaround, I'm trying to get my latex editor to use lilypond-book,
> but since it's on a nonstandard path, I don't seem able to use it. How do you
> integrate lilypond-book into a LaTeX toolchain?


lilypond-book isn't called by LaTeX, it's a preprocessor that you first have
to run on a .lytex file to get a .tex file, then you compile that .tex file
with TeX.

Consider lyLuaTeX, which is an alternative that runs inside the TeX process
directly, but requires LuaTeX. You can specify the path to the LilyPond
executable with \usepackage[program=/path/to/bin/lilypond]{lyluatex}.
See https://ctan.org/pkg/lyluatex

With both methods, you will lose point-and-click, though.


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


Re: Frescobaldi?

2024-04-29 Thread Jean Abou Samra

> It gets a bit more complicated now. See this bug:
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278633
> 
> That bug is for freeBSD, but I expect it applies to other
> distros as well (it certainly applies to gentoo, as I'm
> getting the exact same error). In short, snappy (an archiver)
> was updated to version 1.2.0 a few days ago, and it contains
> symbols that aren't defined in earlier versions.


Well, new symbols shouldn't be a problem (removed symbols would be,
if other packages expect them). Based on
https://github.com/conda-forge/snappy-feedstock/issues/35
what apparently happened is that the snappy developers released
1.2.0 but forgot to update the library soname even though they
changed function signatures. The lookup of that symbol

_ZN6snappy11RawCompressEPKcmPcPm

which is the mangled version of

snappy::RawCompress(char const*, unsigned long, char*, unsigned long*)

fails because the new version only has a (mangled) symbol for

snappy::RawCompress(char const*, unsigned long, char*, unsigned long*, 
snappy::CompressionOptions)

That's a bug in snappy, and it will affect things other than qtwebengine too…
You should probably ask the Gentoo developers to revert to the previous version
or patch it. There's probably a way to ask the Gentoo package manager
to downgrade the package, too.



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


Re: Frescobaldi?

2024-04-29 Thread Jean Abou Samra
> Would it maybe make things a bit easier to leave the whole MacOS
> business aside and take care of the Linux-specific stuff first?

Linux is not really causing us any specific problems. Packaging is a lot
easier, thanks to Linux distributions and Flatpak.

The only wrinkle is the oddities on Wayland that are related to Qt 5.

> And what actually about Windows - out of curiosity.

Windows is… a can of worms of its own.

The Windows installers for the past few releases were built by a user
(@19joho66 on GitHub) who apparently manages to them work by moving
shared libraries around manually :-(

> I myself am a Linux user (Mint), and so far Frescobaldi is still running 
> flawlessly.
> And - another question out of curiosity: Could it be a workaround (if
> Qt5 would be officially retired and no longer be available in the repos
> of the "big" distros like Mint, Ubuntu and the like) if one used a
> distro for older computers which might stick to Qt5 much longer?

I may be wrong, but I don't really foresee distros retiring Qt 5
soon since Frescobaldi should not be the only piece of software still
requiring it (as Qt is so widely used). In any case, the Flatpak package
can still ship it.

What's more likely to happen is that changes in the desktop environments
(like Xorg → Wayland) make Qt 5 work less and less well.



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


Re: Frescobaldi?

2024-04-28 Thread Jean Abou Samra
> […]
> Well, the explanation wasn't that brief. Sorry that I didn't have
> time to write a shorter one, as they say.


PS: Maybe I should mention that at the time I went down the rabbit
hole of Python packaging in general because of Frescobaldi, I wrote
two articles on the LinuxFR site, which may be of interest here if
one reads French:

https://linuxfr.org/news/l-installation-et-la-distribution-de-paquets-python-1-4
https://linuxfr.org/news/l-installation-et-la-distribution-de-paquets-python-2-4

(Yes, these are ~8 and ~14 pages long. Yes, they're only the two
first articles in a series of four. I haven't given up on publishing
the two others, but it's not my priority at the moment.)



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


Re: Frescobaldi?

2024-04-28 Thread Jean Abou Samra
> unfortunately, as I noted above, the problem seems to be that frescobaldi
> depends on a now-deprecated version of qtwebengine, and without updating
> it we'll eventually reach a point where it no longer runs. I looked into
> this because qtwebengine-5.15 failed to compile on my machine this morning,
> so I'm worried we're already approaching EOL on it. 

Note that we're talking about Qt as a whole, not just QtWebEngine which
is just a small part of it (well, for some definition of "small" since it
embeds Chromium's Web rendering engine…) that Frescobaldi only uses in a
few places (IIRC, the SVG viewer and the documentation browser).

Qt 5 *is* already EOL upstream, since May 2023.


> Jean: I have a colleague who does UI work and is "fairly" capable of dealing
> with python and Qt dependencies. Can you give me a brief (but as technical
> as it needs to be for a specialist to understand the issue) summary of where
> the sticking points are?

Frescobaldi uses the Poppler library in order to display PDF files. (It cannot
use Qt's native PDF viewer based on Chromium, because that one is not powerful
enough to support point-and-click.) Since Frescobaldi is written in Python and
Poppler is a C++ library, it needs an FFI wrapper, which is called python-
poppler-qt5 and written with a tool called sip that is developed by the
creator and maintainer of PyQt itself and also used for PyQt.

Thus there is a diamond dependency:

   Qt5 --> Poppler  (C++)
||
||
||
vv
  PyQt5 -> python-poppler-qt5  (Python extension modules)


python-poppler-qt5 is a little fiddly to build: it's multiple layers
with sip generating C++ code and QMake project files, then QMake
generating a Makefile and sip finally executing make on that Makefile.

On macOS, the platform favors distributing applications as .app bundles,
which are optimized for being created by the native app development
tools (Swift+XCode). These have a peculiar structure organized into
"frameworks", with data files separated from code files, shared library
lookup paths modified and that sort of thing (the specifics I do not know
or remember). Of course, that doesn't play well with Python packages
relying on a different structure, and Qt + PyQt also needing their
file structure. In fact there are whole tools written just to deploy
PyQt in a .app bundle, see pyqtdeploy.

Now throw python-poppler-qt5 into the mix, which needs to be loaded by
Python and find its linked Poppler and Qt and PyQt, and you should start
to understand the problem.

Basically, it's the Apple flavor of "things will work well but only
if you do it my way with the non-cross-platform tools from my walled
garden" in its full glory.

Add that macOS displays scary warnings to users if the app bundle
hasn't been signed with a certificate that costs real money.
Details are on
https://github.com/frescobaldi/frescobaldi/issues/1584

Also add that the tool Frescobaldi has used so far to create app
bundles, py2app, relies heavily on setuptools, which prevents
Frescobaldi from moving to a more modern and less complicated
build backend like hatchling.

Apart from these packaging issues, there's also an issue with
the global menu (the one at the top of the screen on macOS, it
doesn't appear on other platforms) which isn't really up-to-date
and has been a source of crashes.

There are also miscellaneous bugs that only reproduce on macOS
(they have the macOS label on GitHub) and it's not always easy
to understand why.

Well, the explanation wasn't that brief. Sorry that I didn't have
time to write a shorter one, as they say.



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


Re: Frescobaldi?

2024-04-28 Thread Jean Abou Samra

> I own a bunch of Macs. In fact, right here in my studio I have two late-2014
> Mac Minis with fresh Monterey installs which are completely unused. I also
> have a *really* excellent [fibre] internet connection — it usually hovers near
> 900Mbps up and down (though right now it’s only at 200Mbps for some reason?!)
> — and I’m happy to put a machine on a DMZ for external access.
> 
> Is there anything, non-programming-wise, I can do to help the cause?



Currently, I don't have the time or honestly the stamina to work on
Frescobaldi again, but if anyone does tackle macOS issues then I'm
sure that they would much appreciate access to these machines.

Perhaps one thing you can do right now is subscribe to notifications on
the Frescobaldi repository on GitHub ("Watch" button on the top right of
https://github.com/frescobaldi/frescobaldi when you're logged in)
so you get informed of any activity.



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


Re: Frescobaldi?

2024-04-28 Thread Jean Abou Samra
> Just had a quick look. It seems to me we need to create a python-poppler-qt6,
> port qpageview to Qt6 and of course frescobaldi itself. I would hope that
> qpageview and frescobaldi both basically mean moving from PyQt5 to PyQt6 which
> I expect to be mostly busy work. The poppler bindings seem to require
> understanding of what poppler does though.
> 
> All of the above is based on a brief look and thus not a reliable assessment.

Honestly, I have zero idea how hard porting to Qt 6 actually is. I think we
won't know until someone tries and finds out what exactly Frescobaldi uses that
is modified or removed in Qt 6 compared to Qt 5 as well as poppler-qt6 compared
to poppler-qt5.

> In any case, I do rely on Frescobaldi and am willing to help keep it alive.

If you want to attempt the port, of course feel free.



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


Re: Frescobaldi?

2024-04-28 Thread Jean Abou Samra
> If there is busy work that needs to be done on the project, I can do that, but
> I also don't own a Mac.

Thanks, but unfortunately the kind of work needed is deeply technical, not busy
work.


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


Re: Frescobaldi?

2024-04-28 Thread Jean Abou Samra
> Is Frescobaldi the most common tool on Linux, or what do the majority of
> Lilypond users use?

Frescobaldi is the most common LilyPond editor, on all OSes.



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


Re: Frescobaldi?

2024-04-28 Thread Jean Abou Samra
> Doing some system updates today, I see that frescobaldi is the only program
> that requires PyQtWebEngine:5, which in turn requires qtwebengine:5. Looking
> at the frescobaldi page, I see a somewhat concerning note that the project is
> on the verge of being unmaintained, due to this dependency on a deprecated
> version of qtwebengine. 
> 
> Is there any further information on this? I don't see any other IDE that works
> as well as frescobaldi for editing lilypond files, and I'm a bit worried that
> there hasn't been an update to the program in over a year. Any news would be
> appreciated.


You've basically nailed the problem. I was the last person to work on making
Frescobaldi actually work on macOS, and I gave up by lack of time (NB: I don't
own a macOS machine, which of course makes all testing very
difficult). Currently, there is close to no activity on the project.

I doubt Linux distributions are going to remove Qt 5 really soon, and the
Flatpak package can always provide it, but like every toolkit that's end-of-
life, it's only going to be a source of trouble going forward. For example,
Frescobaldi has some problems on Wayland (which is increasingly becoming the
default on the Linux desktop, for good reason) that are caused by Qt 5 bugs
fixed in Qt 6. I don't recall that anybody even attempted the Qt 6 migration.

Yes, if the current state continues, Frescobaldi will ultimately die a natural
death. Sorry that I cannot exactly bring an optimistic message here.

Best,
Jean



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


Re: Delayed turns etc

2024-04-17 Thread Jean Abou Samra
> That works for the last line of the whole score. The line I want to be
> "ragged" is the last line of a page. with more music on the next page.

There is no way to make just one system ragged except the last one in the score.
I'm afraid you need a second \score block if you want to do this.


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


Re: score with dynamic beats

2024-04-12 Thread Jean Abou Samra

> I note that in one solution one uses \remove and in the other \omit to 
> achieve the same thing.
> 
> Is there any prospect of  moving to a situation where only one operator 
> is used to achieve a result, possibly by having a preferred and 
> deprecated options first? This is a general point, not just  restricted 
> to this one case.


No, because they do completely different things in general, even though in
this case they happen to be more or less equivalent.

For example, try

\version "2.24.2"

\layout {
  \context {
\Voice
%\remove Note_heads_engraver
% vs.
\omit NoteHead
  }
}

{ c'8 8 8 8 }


Best,
Jean




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


Re: Installing 2.24.1

2024-04-11 Thread Jean Abou Samra
> Is there any reason for expecting me to install an unwanted program, in 
> order to get a program I do want? Or are you trying to force everybody 
> to use Frescobaldi? Why?


The default installation tutorial use Frescobaldi because it's a
newcomer-friendly IDE. That doesn't mean we're trying to "force"
people to use Frescobaldi. You may use the command line, or Emacs,
or VS Code, or whatever way of running an executable.


> Well, it doesn't appear to work ...
> 
> Bear in mind I'm running Windows, so I don't want to run lilypond from
> the command line. I double-click a .ly file, it runs lilypond, and my
> pdf appears (or at least it does, running the old version).


That particular workflow however is not supported out of the box anymore,
since the distributed artifacts are no longer .exe installers.

It might be possible to recreate it, but I don't know if Windows will let
you associate a file extension with an arbitrary program or if it only
supports associating with a GUI app.

In any case, you would need to write a script to redirect the log
to a separate file (since the -dgui option has disappeared as well,
commit 602c391915).


> What I did was open a command shell as administrator, and extracted
> lilypond into Program Files. I then opened a .ly file and - nothing
> happened!


Well, merely extracting a ZIP archive somewhere will just... create files
on your computer, that's all. It doesn't change file associations.


> Or rather, nothing useful happened. A popup window opened, and
> disappeared. No log files, no output, no nothing.
> 
> Okay. Tried to run it the un-windows way of using the command line.
> Complete pain in the ass, I'm afraid. And at least I can see the error
> messages ...
> 
> D:\Users\Anthony\My Git\music\GBB-Concert\_Grandioso>"c:\Program
> Files\lilypond-2.24.3\bin\lilypond.exe" partTromboneB.ly
> GNU LilyPond 2.24.3 (running Guile 2.2)
> Processing `partTromboneB.ly'
> Parsing...
> partTromboneB.ly:6:10: error: cannot find file: `voiceTromboneB.ily'
> (search path: `c:/Program
> Files/lilypond-2.24.3/share/lilypond/2.24.3/ly;c:/Program
> Files/lilypond-2.24.3/share/lilypond/2.24.3/ps;c:/Program
> Files/lilypond-2.24.3/share/lilypond/2.24.3/scm;c:/Program
> Files/lilypond-2.24.3/share/lilypond/2.24.3/fonts/otf/;c:/Program
> Files/lilypond-2.24.3/share/lilypond/2.24.3/fonts/svg/;')
> \include
>   "voiceTromboneB.ily"
> partTromboneB.ly:23:41: error: unknown escaped string: `\voiceTromboneB'
> 
>  \voiceTromboneB
> partTromboneB.ly:23:41: error: string outside of text script or \lyricmode
> 
>  \voiceTromboneB
> 
> Note: compilation failed and \version outdated, did you
> update input syntax with convert-ly?
> 
>  
> https://lilypond.org/doc/v2.24/Documentation/usage/updating-files-with-convert_002dly
> 
> Interpreting music...[8]
> Preprocessing graphical objects...
> Finding the ideal number of pages...
> Fitting music on 1 page...
> Drawing systems...
> Converting to `partTromboneB.pdf'...
> fatal error: failed files: "partTromboneB.ly"
> 
> D:\Users\Anthony\My Git\music\GBB-Concert\_Grandioso>
> 
> 
> So it looks like it's searching the program directory for my include
> files, and not the current directory where they actually are! Note that
> running the older lilypond correctly compiles the file.


Is voiceTromboneB.ily really in the *current* directory? Namely
D:\Users\Anthony\My Git\music\GBB-Concert\_Grandioso\ (and not, e.g.,
D:\Users\Anthony\My Git\music\GBB-Concert\)?

Note that the search path ends in a ';' which means that there is actually
an empty entry at the end, which should search the current directory (in other
words, LilyPond is not searching only its internal directories, it's searching
both these and the current directory, and that's perfectly normal).




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


Re: computer compatible

2024-04-11 Thread Jean Abou Samra
> Is Lilypond compatible with iMac sonoma 14.2?


Yes. As written on https://lilypond.org/download.html , current
versions of LilyPond are compatible with macOS 10.15 Catalina
and higher.




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


Re: \epsfile and SVG output

2024-04-10 Thread Jean Abou Samra
> Many thanks for the clarification that this approach will not work and
> alternative suggestions.
> 
> I presume that /image will only include PNGs in a SVG output and not EPS (the
> documentation reads a little unclearly on this as the section on backends is
> elided with comments on coloured backgrounds)?


In fact, PNG in \image works in all output formats/backends
(it is only if you want transparency that it has limitations,
but the default is to add a white background, so there is no
limitation in the default settings).


> For context I am using SVG output because my display target is a custom IOS
> app that uses skia as a backend. SKIA can be used to display SVGs easily
> within the context that I am working. SKIA does have a pdf backend but it
> isn’t exposed directly by the framework I’m using.
> 
> The reason to use EPS is that I want to bring in vector graphics made in
> Inkscape using a graphics tablet. It is a little frustrating that I can’t get
> these vector graphics into Lilypond SVG output, as they are basically SVG in
> the first place, but from what I understand so far that isn’t possible.


Yes, unfortunately the SVG backend isn't as well-developed as the
other backends and in particular doesn't support including SVG
(which it could easily do). The Cairo backend also supports outputting
SVG, but doesn't support including SVG either.


> Therefore, if I understand correctly my current options would be:
> 
> - render to pdf and work on a system to render pdfs within the framework I’m
> using (this is probably possible, but involves lots of unknowns)
> - rasterise the images and display as PNG, thus include the rasterised version
> in the SVG (not optimal in terms of file size or speed of render, but
> possible)
> - work on a system to convert SVG paths to Lilypond/Scheme paths in order to
> be able to draw in a vector within Lilypond to any backend.


That sounds right. Alternatively, you might be able to add a tag
with a specific id using the output-attributes property, then post-process
the file to replace the tag with that id with your custom content or
something like that.



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


Re: \epsfile and SVG output

2024-04-10 Thread Jean Abou Samra
> It would be possible to convert EPS to SVG with pstoedit or via PDF and 
> Inkscape. Both would avoid rastering vectors into a pixel image.



True, but LilyPond so far doesn't support including SVG images either.
(It does support \markup \path in SVG though.)



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


Re: \epsfile and SVG output

2024-04-10 Thread Jean Abou Samra
> An alternative, if you can use raster graphics, would be a PNG file added
> with the \image command.


P.S. \image is new in 2.25
https://lilypond.org/doc/v2.25/Documentation/notation/graphical-markup
(and I remember now that I wrote down what does and doesn't
support EPS in the 2.25 documentation, in the description of \image)


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


Re: \epsfile and SVG output

2024-04-10 Thread Jean Abou Samra
> I am trying to include an epsfile as a top-level markup (it is not in
> a score) and then output as SVG.


You can't (this should indeed be mentioned in the documentation). EPS files
are included by basically inlining them into the PS code that LilyPond 
generates,
which is then converted to PDF. In the SVG backend, LilyPond generates SVG
code directly and skips \epsfile markups. The Cairo backend is yet another
beast but it doesn't support outputting \epsfile other than in PS/EPS output.

An alternative, if you can use raster graphics, would be a PNG file added
with the \image command.

HTH
Jean



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


Re: PianoPedalBracket.to-barline doesn't always work as expected

2024-04-10 Thread Jean Abou Samra
Le mardi 09 avril 2024 à 23:55 +0200, Maurits Lamers via LilyPond user 
discussion a écrit :
> Hey all,
> 
> I encountered a situation where the PianoPedalBracket setting to-barline 
> doesn't always do what you'd expect. Given the following code, the pedal 
> bracket is not extended to the end of the bar:
> 
> %%%
> 
> \version "2.24.0"
> \score {
>    \new Staff {
>  \clef bass
>  \time 6/8
>  \relative c' {
>    c8 b a g e c |
>    \set Staff.pedalSustainStyle = #'mixed
>    \override Staff.PianoPedalBracket.to-barline = ##t
>    \repeat tremolo 12 { b,32\sustainOn b' } |
>    \repeat tremolo 12 { b,32 b'\sustainOff  } |
>    c8 e f g a
>  }
>    }
> }


Correct syntax is

\version "2.24.0"
\score {
   \new Staff {
 \clef bass
 \time 6/8
 \relative c' {
   c8 b a g e c |
   \set Staff.pedalSustainStyle = #'mixed
   \override Staff.PianoPedalBracket.to-barline = ##t
   \repeat tremolo 12 { b,32\sustainOn b' } |
   \repeat tremolo 12 { b,32 b' } |
   c8\sustainOff e f g a
 }
   }
}


The \sustainOff command is placed on the note where you *release*
the pedal. And because LilyPond uses post-fix syntax, it comes just
*after* that note.

Best,
Jean



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


Re: Minimize flats or sharps in transposed key signature?

2024-04-08 Thread Jean Abou Samra

> I'm using \transpose pretty heavily, and I'm running into an issue I don't
> quite know how to solve. I'm aware of the \naturalizeMusic hack described
> in the LilyPond documentation. I'm looking for something similar, but for
> key signatures.

This was discussed in the past, for example I posted a solution here:
https://lists.gnu.org/archive/html/lilypond-user/2021-04/msg00025.html


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


Re: nested beaming

2024-04-08 Thread Jean Abou Samra
Le lundi 08 avril 2024 à 09:22 -0700, Paul Scott a écrit :
> Many years ago I could nest square brackets in Lilypond. How can I write 
> this now incorrect code:
> 
> a16[[ 16 16] 16[ 16 16]]  i.e. two groups of 3 beamed 16th notes joined 
> by a single beam.
> 
> I have looked at NR 1,2,4


A little bit manual, but you can do

\version "2.24.2"

{
  \time 6/8
  a'16 16 \set stemRightBeamCount = 1 16 \set stemLeftBeamCount = 1 16 16 16
}



https://lilypond.org/doc/v2.24/Documentation/notation/beams.html#manual-beams



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


Re: Get name of music object

2024-04-02 Thread Jean Abou Samra
> I know how to get the properties from a music object - but how about the name?
> I cannot figure out how to get the name from a music object.


(ly:music-property the-object 'name)

HTH
Jean



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


Re: nested \set ?

2024-03-25 Thread Jean Abou Samra
> My Lilypond knowledge is small but have you tried the "\unset" command ??


\unset will simply remove the value. Werner is looking for
something that resets the previous value.





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


Re: nested \set ?

2024-03-25 Thread Jean Abou Samra
Le lundi 25 mars 2024 à 07:31 +, Werner LEMBERG a écrit :
> LilyPond provides `\temporary` and `\revert` to set a grob property
> temporarily, and afterwards the value of the grob property is the same
> as before.
> 
> Is there a similar possiblity for `\set` (or something usable in
> Scheme)?  I guess not, but I couldn't find this documented
> somewhere...


No, this doesn't exist OOTB. It could be implemented with a
Scheme engraver, but that would probably be overkill, unless
for some reason it's really important for what you're trying
to do?




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


Re: \enablePolymeter not working

2024-03-17 Thread Jean Abou Samra
> https://lilypond.org/doc/v2.23/Documentation/58/lily-fa68165d.ly


That's the LilyPond 2.23 documentation.


> I am using lilypond 2.22.1


Now you should understand the problem :)


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


Re: Time measurement

2024-03-15 Thread Jean Abou Samra
> Hi Jean,
> 
> As always… remarkable.
> 
> One question: How hard would it be to have this output more precise
> timings (e.g., 1/4 or 1/10th or 1/100th of a second, or SMPTE timecode
> in minutes:seconds:frames)? I could imagine this being *very* useful
> for film/video/media composers.


To get 2-digit precision on the number of seconds, you can simply replace

(format #f "~as" (round rest))

with

(format #f "~,2fs" rest)

in the format-time function.


For seconds:frames at 24 frames/second, replace format-time with

   (define (format-time seconds)
 (let* ((minutes (euclidean-quotient seconds 60))
(rest (euclidean-remainder seconds 60))
(seconds (euclidean-quotient rest 1))
(rest (euclidean-remainder rest 1)))
   (string-append (if (zero? minutes) "" (format #f "~a:" minutes))
  (format #f "~a:~a" seconds (round (* rest 24))


Best,
Jean




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


Re: Time measurement

2024-03-14 Thread Jean Abou Samra
> “This sounds like a job for… Custom Engraver!!”  :)

\version "2.24.2"

#(define (Custom_engraver!! context)
   (define (format-time seconds)
 (let ((minutes (euclidean-quotient seconds 60))
   (rest (euclidean-remainder seconds 60)))
   (string-append (if (zero? minutes) "" (format #f "~am" minutes))
  (format #f "~as" (round rest)
   (let ((wholes-per-minute 15)
 (last-time ZERO-MOMENT)
 (total-time 0)
 (marks '()))
 (make-engraver
  ((process-music engraver)
   (let* ((new-time (ly:context-current-moment context))
  (time-delta (ly:moment-main (ly:moment-sub new-time last-time)))
  (new-wholes-per-minute
(and=> (ly:context-property context 'tempoWholesPerMinute #f)
   ly:moment-main)))
 (set! total-time
   (+ total-time (* 60 (/ time-delta wholes-per-minute
 (set! last-time new-time)
 (when new-wholes-per-minute
   (set! wholes-per-minute new-wholes-per-minute
  (acknowledgers
   ((text-mark-interface engraver grob source-engraver)
(set! marks (cons grob marks
  ((process-acknowledged engraver)
   (for-each (lambda (grob)
   (when (assq-ref (ly:grob-property grob 'details) 'time-mark)
 (ly:grob-set-property! grob 'text (format-time 
total-time
 marks)
   (set! marks '())

\layout {
  \context {
\Score
\consists #Custom_engraver!!
  }
}

timeMark = \tweak details.time-mark ##t \tweak color "red" \textEndMark 
"Abracadabra"

{
  c'1
  \timeMark
  \tempo 4 = 120
  c'4 8. 16 2
  \timeMark
  \tempo 4 = 180
  c'2 2
  \timeMark
  \repeat unfold 180 c'4
  \timeMark
}



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


Re: Question regarding ChordNames

2024-03-13 Thread Jean Abou Samra
>  Mahalo, X. I am using the naturalizeMusic function and will look into 
> extending that.  Maybe that has some nuggets to mine.

`\naturalizeMusic` is not going to work well on `\chordmode` music (it will 
destroy the interval in chords, leading to wrong chord names), but you can use 
code like this instead:

```
\version "2.24.2"

enharmonization = { c cis d ees e f fis g gis a bes b }

converter = #(make-semitone->pitch (music-pitches enharmonization))

\layout {
  \set ChordNames.chordRootNamer =
#(lambda (pitch lowercase)
   (note-name->markup (converter (ly:pitch-semitones pitch)) lowercase))
}

bflat = \chordmode { cis dis e fis gis a bis cis bes }

\transpose cis' a {
  \new ChordNames { \bflat  }
}
```

Best,

Jean



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


Re: Omit TupletNumber problem

2024-03-12 Thread Jean Abou Samra
> I cannot figure out how to revert or reverse "\omit TupletNumber".

\undo \omit TupletNumber


Best,
Jean



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


Re: Control breaks in staff that I get from a variable?

2024-03-10 Thread Jean Abou Samra
Le dimanche 10 mars 2024 à 18:33 +, Werner LEMBERG a écrit :
> 
> Can you provide some additional sentence or sentences for the
> documentation so that we have something to start with?


See also https://gitlab.com/lilypond/lilypond/-/issues/6439



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


Re: search and replace on all included files on compile

2024-03-06 Thread Jean Abou Samra
Try

```
\version "2.24.2"

\paper {
  #(add-text-replacements!
'(("1↑" . "1")))
}

{ c'^\markup "1↑" }
```

Best,
 
Jean


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


Re: installation

2024-03-01 Thread Jean Abou Samra
Le vendredi 01 mars 2024 à 16:21 -0800, carsonm...@ca.rr.com a écrit :
> Went to \users\Mark\lilypond 2.24.3\gs

The program you should add is ...\lilypond(.exe), not ...\gs.


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


Re: slur into a repeat volta 2 section

2024-02-24 Thread Jean Abou Samra
Just replace `4\repeatTie` with `4`?



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


Re: Music generated by function confuses relative pitch

2024-02-22 Thread Jean Abou Samra
Hi Morten,

Le jeudi 22 février 2024 à 23:00 +0100, Morten Lemvigh a écrit :
> \version "2.24.1"
> 
> double =
> #(define-music-function (music)(ly:music?)
>    (let ((notes (ly:music-property music 'elements)))
>      (make-music 'SequentialMusic
>                  'elements
>                  (list
>                   (make-music 'SequentialMusic
>                               'elements notes)
>                   (make-music 'SequentialMusic
>                               'elements notes)
> 
> \relative c' {
>   \double {e4 e}
> }


Several things are wrong here.

First, although you are unwrapping `music`, you are not copying the individual
elements of `notes`. They end up duplicated in the output. This should never
happen, because music objects are mutable. \relative is in fact a good example
of this, but perhaps a simpler one is \scaleDurations: try

\scaleDurations 1/2 \double { e'1 1 }

and you will see that the whole notes are scaled by 1/4 instead of 1/2. The 
reason
is that calling [note1] and [note2] the two note objects, you end up with

  [note1] [note2] [note1] [note2]

and when \scaleDurations goes through the music and scales it, since [note1]
and [note2] both appear twice, they get scaled twice.

That's the reason you should always copy music with ly:music-deep-copy
or an equivalent if you need it to appear in several places.

In your example

\relative c' {
  \double {e4 e}
}

what happens is the following: \relative changes the first e4 into an absolute
e'4, to match the octave of c' . Then the second e is changed to e'4 as well,
to have the same octave as the first. Then the third e is processed, but it's
actually the same object as the first e4, which was mutated into e'4, so this
tells \relative to go an octave higher, and that e'4 is mutated a second time
into an e''4. And finally, the fourth e is processed, it's the same as the 
second
e which was turned into e', which goes an octave up, so it becomes e'''.
And that's why the end result is e''4 e''' e''4 e'''.

So this is already a better version:

double =
#(define-music-function (music)(ly:music?)
   (make-music 'SequentialMusic
   'elements (list (ly:music-deep-copy music)
   (ly:music-deep-copy music

or more simply put:

double =
#(define-music-function (music)(ly:music?)
   #{ $music $music #})

but in fact this is still not correct because \relative is a somewhat
special beast. The problem is that

\relative c' {
  \double {e'4 e}
}

now unfolds to

\relative c' {
  { e'4 e e'4 e }
}

where the third e'4 goes an octave up compared to the second, but you
don't want that, you want it to be the same as the first e'4. For that
case, there is a special macro called make-relative. It's used like this:

\version "2.24.1"

double =
#(define-music-function (music) (ly:music?)
   (make-relative (music) music
 #{ $music $music #}))


Best,
Jean



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


Re: Position coordinates fail

2024-02-22 Thread Jean Abou Samra

> Do you know how I can solve this problem? Consider that I have no error 
> messages.

We'll need an example where it fails. Preferably 
[tiny](https://lilypond.org/tiny-examples.html), but your full score (if you 
can share it) would work too.

Best,

Jean



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


Re: 5th anniversary conference? :)

2024-02-15 Thread Jean Abou Samra
> I was just waxing nostalgic about that fabulous Salzburg conference in 2020,
> and noted that in Jan 2025 — just under a year from now! — it will have been
> five years since we got together, talked music/notation, and raised [more
> than] a few pints together.
> 
> Any chance for a repeat? :)



Would be great. Count me as "will try to come if it gets organized".

Cheers,
Jean



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


Re: Control breaks in staff that I get from a variable?

2024-02-10 Thread Jean Abou Samra
> As some of us know, this does not work:
> 
> <<
>   \staffIGot
>   { s1*5 \break }
> >>
> 
> It introduces an extra staff. Not wanted.


The classic fix is

<<
  \new Devnull { s1*5 \break }
  \staffIGot
>>


Best,
Jean




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


Re: Texinfo documentation.

2024-02-10 Thread Jean Abou Samra
> I have recently upgraded from 2.22.2 to 2.24.3. However, as I only use
> LTS distributions of ubuntu, I had to download the tar.gz package. No
> problem. But how may I obtain the documentation in texinfo format for
> use with emacs? In fact, looking through the archive, it does not
> appear that there is any documentation at all!


Documentation is in a separate tarball, since most people don't want
to download it.

https://lilypond.org/all.html





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


Re: Score overruns page. Bug or something I did?

2024-02-06 Thread Jean Abou Samra
It's not a bug —  by default, LilyPond forbids line breaks on a bar line when 
there are notes straddling on that bar line. You can change this with


```
\layout {
  \context {
\Voice
\remove Forbid_line_break_engraver
  }
}
```

Best,

Jean




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


Re: Duration shortcut not working for rests

2024-02-03 Thread Jean Abou Samra
> Am I misunderstanding something, or is this a bug? Since the "r4" at the 
> start of the second measure is fully qualified, I was expecting the "4"s that 
> follow it to be quarter rests as well, but I'm seeing "c"s in the rendered 
> output.
> 
> ```
> \version "2.25.6"  
>   
> {  
>     c'4 r r r  
>     % The middle 4s are "c"s instead of rests  
>   | r4 4 4 b  
> }
> ```

It's on purpose (even though I tend to agree that it is a bit quirky). One 
reason is to simplify the writing of percussion lines, where the same drum name 
is often repeated over and over, mixed with rests.

Best,

Jean


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


Re: How to

2024-02-01 Thread Jean Abou Samra
Try

```
#(define (should-not-print-arranger layout props)  
   (equal? "" (chain-assoc-get 'header:arranger props)))
```

For one thing, `'header:arranger` just gives a 
[symbol](https://extending-lilypond.gitlab.io/en/scheme/quoting.html), it 
doesn't look up the arranger. A symbol is never equal to a string. For another, 
`eq?` is the wrong test; it checks [object 
identity](https://extending-lilypond.gitlab.io/en/scheme/quoting.html#identity-of-symbols)
 but you could have two empty strings which are equal but not the same object 
(unlike symbols). The links should provide more information.

Best,

Jean




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


Re: PDF Bookmarks

2024-01-30 Thread Jean Abou Samra
There is a known bug when combining `\tocItem` and `\bookpart`. See [issue 
#6355](https://gitlab.com/lilypond/lilypond/-/issues/6355). I've just posted a 
workaround on the issue.



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


Re: Numérotation des versets

2024-01-27 Thread Jean Abou Samra
Try the code here?

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

Best,
Jean



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


Re: Numérotation des versets

2024-01-27 Thread Jean Abou Samra
Hello,

This is the English-speaking list. You probably meant to send this to the 
French forum, user-fr@lilypond.community .





Re: zero-duration s to hold marks

2024-01-10 Thread Jean Abou Samra
Raphael:
> That strikes me as being a programmer's response, and I speak as a
> programmer for over 50 years. Using <> works, but it is unintuitive. If 
> s0 is more intuitive then that should be considered for future inclusion.

s1*0 works and is more or less equivalent to <> .



John:
> The second is for putting a mark, eg a coda, at the very end of a measure,
> over the barline (not over the last note, or the first note of the next 
> measure).

For that, see \repeat segno, or if your use case doesn't fit the possibilities
of \repeat segno, use \codaMark.

http://lilypond.org/doc/v2.24/Documentation/notation/long-repeats.html#segno-repeat-structure

For arbitrary markup use \textMark or \textEndMark.

http://lilypond.org/doc/v2.24/Documentation/notation/writing-text.html#text-marks




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


Re: Question about \include options

2024-01-08 Thread Jean Abou Samra
Le lundi 08 janvier 2024 à 12:04 -1000, John Helly a écrit :


> My default search engine is Google but I've also tried DuckDuckGo and Bing
> with similar, but different, results.  So, this problem falls into a use-case
> that I usually call 'the completeness and consistency of a search'.  


Is there an analogue of Gödel's theorem for search engines?




> IMHO, one 'simple' way around this would be to have a complete index somewhere
> in the Documentation tree.



This?

https://lilypond.org/doc/v2.24/Documentation/notation/lilypond-index

Ok, these specific terms are missing but it goes a long way already.


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


Re: Question about \include options

2024-01-08 Thread Jean Abou Samra
> If you do a web search for
> 
> lilypond "#f"
> 
> is the very first hit not sufficiently helpful?


In defense of the OP, the first hit for me on Qwant is

http://lilypond.org/doc/v2.25/Documentation/usage/advanced-command_002dline-options-for-lilypond

which would not be exactly helpful if I were learning the basics of LilyPond :(
And this is Google's first hit:

https://lilypond.org/doc/v2.23/Documentation/snippets/tweaks-and-overrides.fr.html

A pity, since this is clearly explained on

https://lilypond.org/doc/v2.24/Documentation/learning/types-of-properties.html



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


Re: Output PDF to stdout

2024-01-04 Thread Jean Abou Samra
This doesn't exist, sorry. It wouldn't be *that* straightforward to implement,
because there are multiple code paths for output (GhostScript via API, 
GhostScript
via subprocess, SVG backend and Cairo). I'm not even sure that direct PDF output
in GhostScript's PS → PDF conversion is not going through an intermediate file
under the hood. Either way, I really doubt this would make a significant speed
difference.



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


Re: Tweak Slur Position or Priority

2023-12-28 Thread Jean Abou Samra
You've mistyped "positions" as "position" (hence the warning “cannot find the
property type-check…”).



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


Re: How to put a big number in the upper left or right corner of a score?

2023-12-28 Thread Jean Abou Samra
Hi,


> Thank you Jean. I just now wanted to apply your tip, but it's not quite what 
> I expected. If I copy your script litterally, the number overlaps with the 
> \header (piece title, composer etc.). If I delete the \with-outline the 
> overlap is gone, but the number appears below the header, but I would like it 
> in the TOP corner, above the header. Is that possible?



Sorry for the very late reply. It's best to reply to the list also, this shares 
the burden of helping (I've added back in CC).

You could increase the distance from the top of the page to the header, as in, 
e.g.,

```
\version "2.24.2"

\paper {
  top-markup-spacing.minimum-distance = 10
}
\header {
  title = "ABC"
}
{ c' }
```


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


Re: Why has `NonMusicalPaperColumn` a width?

2023-12-19 Thread Jean Abou Samra
> I fully agree.  However, what I don't understand is why a zero-width
> non-musical paper column has a non-zero ideal spring distance.
> Additionally, this 0.5 value is hard-coded and undocumented,
> apparently present in the code since the very beginning.

Well, it's not zero-width, since it contains the rehearsal mark.

I do agree that the hardcoded 0.5 in `spacing-basic.cc` is suboptimal.


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


Re: Why has `NonMusicalPaperColumn` a width?

2023-12-19 Thread Jean Abou Samra
> it's the minimum distance to the last 

Correction: the *ideal* distance


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


Re: Why has `NonMusicalPaperColumn` a width?

2023-12-19 Thread Jean Abou Samra
> Why does the `NonMusicalPaperColumn` grob have a width of 0.5 units? Where it 
> is defined?

Are you referring to the blue arrow from the second-to-last non-musical column 
to the last rest? That's not a width, it's the minimum distance to the last 
rest's musical column.

Also, why would non-musical columns have no width in general? Since they're 
containers, is it not logical for them to have the same width as the set of 
grobs they contain?



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


Re: Lilypond on Fedora 38 "mostly broken"

2023-12-17 Thread Jean Abou Samra
This is not https://bugzilla.redhat.com/show_bug.cgi?id=2208744 but rather 
https://bugzilla.redhat.com/show_bug.cgi?id=2253842 , which is being fixed. The 
updates are in the "Testing" repositories. See 
https://bugzilla.redhat.com/show_bug.cgi?id=2253842#c3 for how to install the 
update on Fedora 38.




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


Re: error I can’t figure out

2023-12-16 Thread Jean Abou Samra
See https://lists.gnu.org/archive/html/lilypond-user/2023-11/msg00152.html


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


Re: property-defaults.fonts not working

2023-12-16 Thread Jean Abou Samra
> What is the minimum x for it to work as documented?

It's 6. See 
https://gitlab.com/lilypond/lilypond/-/commit/1346d30d183e38cb693c7d61f2ac76785130e449

Re: property-defaults.fonts not working

2023-12-16 Thread Jean Abou Samra
What's the exact value of x in 2.25.x?



Re: Running a system command from within Lilypond [Solved]

2023-12-15 Thread Jean Abou Samra
> I am on version Frescobaldi 3.2 and Lilypond 2.22.1 and do not appear 
> to have that option. At least, I have not found it. Anyway, I have 
> "automatic engraving" on.

It's in Edit > Preferences > LilyPond Preferences > Running LilyPond > Save
document if possible, but I don't think it's going to auto-save when the
engraving job is triggered by automatic engraving, unfortunately.


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


Re: Running a system command from within Lilypond [Solved]

2023-12-15 Thread Jean Abou Samra
> [Later] The error I am getting now is:
>  Processing `/tmp/frescobaldi-duowk0s5/tmpz726e77a/testGit.ly'
>   Parsing...fatal: not a git repository (or any of the parent 
> directories): .git


If the path is in `/tmp/`, it means that you did not save your file before 
compiling, so Frescobaldi put the contents of the current editing window in a 
temporay file and compiled that.

If you simply remember to always save before compiling (or turn on 
save-on-compile in the preferences), Frescobaldi will compile your file with 
the directory where it's saved as the current directory. If that's inside a Git 
repository, `git` commands should work.




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


Re: Running a system command from within Lilypond

2023-12-15 Thread Jean Abou Samra
> I keep my Lilypond files in a git repository. I would like to
> interpolate the repo's version number in the Lilypond output by running 
> a command like "git log|head -1". I can  do this from raw Scheme  using 
> the system() function, but this does not seem to work in Lilypond.



How does it fail? It should definitely work. It will just not capture the 
output. See [LSR 567](https://lsr.di.unimi.it/LSR/Item?id=567) for a snippet 
that uses `open-pipe*` from `(ice-9 popen)` to achive essentially the same need 
as yours.

> I realise that being able to do so opens up a massive security hole, but that 
> is not a problem here.

LilyPond does not attempt to securely compile the file if it untrusted. (There 
used to exist a `-dsafe` option, but it was found to be irreparably broken, and 
got removed.)


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


Re: Changes to Notename - lost some functionality

2023-12-13 Thread Jean Abou Samra
> There's may be one extra paren in there because it threw a syntax error.

Yes, sorry.

> Is that a proper fix, or is something else wrong?

I wouldn't call it a “proper” fix because it's a bit too dependent on details 
that can easily change (specifically, whether the default `NoteName` text is a 
markup that `markup->string` works well on). That's why I recommend 
`noteNameFunction` instead, it's also simpler.


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


Re: Changes to Notename - lost some functionality

2023-12-13 Thread Jean Abou Samra
This code is too big for me to digest it, but the basic problem is that 

```
   (let* ((default-name (ly:grob-property grob 'text))
  (new-name (assoc-get default-name newnames)))
```

is doing a lookup in your `newnames` alist with the value of `text` as the key. 
In more recent versions, `text` is not a string but a full markup, which you 
can see if you add `(display default-name)`. So the lookup fails, `assoc-get` 
returns false (`#f`), and you set the grob's text to false, which leads to a 
warning because false isn't a markup.

The quick fix here is to change

```
(let* ((default-name (ly:grob-property grob 'text)))
```

to

```
(let* ((default-name (markup->string (ly:grob-property grob 'text
```

in order to first get an approximate string representation of that markup that 
corresponds to the keys in your alist.

But instead of this fragile method of changing note names, it would be a lot 
better to write a custom `noteNameFunction`, e.g.,

```
\version "2.24.2"

\new NoteNames {
  \set noteNameFunction =
#(lambda (pitch context)
   ;; Write logic to compute the note name from `pitch` as a markup.
   "TODO")
  c' d' e'
}
```


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


Re: Continuation slur and key signature with many sharps

2023-12-13 Thread Jean Abou Samra
See [issue #6639](https://gitlab.com/lilypond/lilypond/-/issues/6639).



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


Re: lilypond "preprocessor"?

2023-12-12 Thread Jean Abou Samra
> One thing occurred to me.  If the original \score did not have a \midi
> block, would it be possible to ask lilypond to produce midi output
> without modifying the input file?



No, this is not currently possible, although it would be a nice addition.




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


Re: lilypond "preprocessor"?

2023-12-12 Thread Jean Abou Samra
> If I can find a way to append to the input file, I can probably get rid
> of that scraping/parsing code completely.  I came across -dread-file-
> list.  If I understand I would need to create a file:
> 
> ```
> $ cat list-of-files.txt
> first.ly
> song.ly
> last.ly
> ```
>
> And then
>
> ``` 
> lilypond -dread-file-list list-of-files.txt
> ```
>
> However, this doesn't join all the files into one long file.  It
> processes each file on it's own.
> 
> Right now I can do
>
> ``` 
> cat first.ly second.ly third.ly > out.ly
> lilypond out.ly
> ```
>
> But it's not portable.  I'd have to do the equivalent in python if
> there's no way to do it with lilypond.



Not sure I understand the need, why do you need to append at the end, as 
opposed to prepending with -dinclude-settings? (There is no equivalent of 
-dinclude-settings to append.)




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


Re: lilypond "preprocessor"?

2023-12-11 Thread Jean Abou Samra
> There is a case where I want to create a narrower page for a narrower
> screen.  I can easily append a /paper {} block to the original file to
> do this.  However, any manual breaks will probably not work at this
> newer width.  How would you recommend dealing with this?


Put

```
break = {}
pageBreak = {}
```

in the `-dinclude-settings` file?

> I don't disagree.  It would be great if lilypond had an option to
> unfold everything, but I suspect that it's hard to do?

In fact, I realized it's already possible.

You can put

```
#(set! toplevel-music-functions (cons unfoldRepeats toplevel-music-functions))
```

in `-dinclude-settings`.




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


Re: lilypond "preprocessor"?

2023-12-11 Thread Jean Abou Samra

> We need a copy so we can introduce the space time dumper code which
> boils down to a simple /include statement at the very top of the file.



You can do that via the `-dinclude-settings` option instead.

> It looks like ly2video also removes any \break, \noBreak, and
> \pageBreak it finds in the input.


I don't understand why it needs to do this. `\break` and `\pageBreak` are 
ignored with `#ly:one-line-breaking` anyway.


> > Normally, you'd spell out the \unfoldRepeats and stuff in the input
> > file directly.
> 
> I don't think the user should do this.  What I mean is that it's not
> user friendly.


ly2video or not, you need to unfold repeats as soon as you want correct MIDI 
output. I agree that requiring to do it explicitly is not very user-friendly, 
but auto-adding `\unfoldRepeats` sounds like solving the problem at the wrong 
level. Also, what ly2video does is not always correct since `\score { \midi { 
... } \music }` is valid but `\score { \unfoldRepeats \midi { ... } \music }` 
is not — it would need to be `\score { \midi { ... } \unfoldRepeats \music }`.

Lastly, I'm not sure why ly2video wants to parse the header block but the 
`--header` option may help.


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


Re: ly:set-option png backend broken?

2023-12-11 Thread Jean Abou Samra
> Is there any way to produce png output without --png in the command?

No, sorry.





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


  1   2   3   4   5   6   7   8   9   10   >