Re: Library to embed LilyPond in other programs

2023-05-30 Thread Andrew Bernard
I'd still be interested to know in rough outline how Denemo lets you add 
single notes in a GUI and have the feedback from lilypond so quickly.


Frescobaldi is a different matter as it compiles the whole score and 
then just displays the generated PDF.


And I wonder what the OP wants to achieve?

Andrew


On 31/05/2023 11:05 am, Jean Abou Samra wrote:

Le mercredi 31 mai 2023 à 11:00 +1000, Andrew Bernard a écrit :

How does Denemo do it? Mr Shann?




It generates LilyPond code (which you can also export if I'm not 
mistaken).


Re: Library to embed LilyPond in other programs

2023-05-30 Thread Jean Abou Samra
Le mercredi 31 mai 2023 à 11:00 +1000, Andrew Bernard a écrit :
> How does Denemo do it? Mr Shann?
> 


It generates LilyPond code (which you can also export if I'm not mistaken).




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


Re: chord.ly to extract notes from chords breaks with new Guile

2023-05-30 Thread Jean Abou Samra
Le mardi 30 mai 2023 à 20:39 -0400, msk...@ansuz.sooke.bc.ca a écrit :

> I need, at each point in time, to have at most one note per track, exactly one
> track per note, and silence in any leftover tracks, regardless of the
> voice/chord structure of the music.


That sounds like you want a performer-based approach. Like:

```
\version "2.24.1"

#(define ((Keep_only_engraver i) context)
   (let ((j 0))
 (make-performer
  (listeners
   ((note-event performer event)
(unless (eqv? i j)
  (ly:event-set-property! event 'pitch #f))
(set! j (1+ j
  ((stop-translation-timestep performer)
   (set! j 0)

#(define (scores n music)
   (apply values
  (map (lambda (i)
 #{
   \score {
 \midi { \context { \Score \consists #(Keep_only_engraver 
i) } }
 #music
   }
 #})
   (iota n

mus = <<
  \new Staff { c'1 d'2 d'4 e'4 }
  \new Staff << { g'1 a'2 a'4 b'4 } \\ { g1 g1 } >>
>>

{ \mus }

$(scores 3 mus) % 3 is the max number of simutaneous notes
```


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


Re: Library to embed LilyPond in other programs

2023-05-30 Thread Andrew Bernard

How does Denemo do it? Mr Shann?

Andrew


On 30/05/2023 4:22 pm, Jean Abou Samra wrote:


There is no liblilypond, but it is naturally possible, and common, to 
spawn LilyPond in a subprocess.






Re: chord.ly to extract notes from chords breaks with new Guile

2023-05-30 Thread mskala
On Wed, 31 May 2023, Gilles Thibault wrote:

> Not hardly tested but this should work :

Thanks for looking at it further.  I hate to impose on you because I've
already decided to solve this problem in external postprocessing of the
MIDI files, so I hope you won't put a lot of effort into trying to satisfy
my use case with modifications to your script.  I don't think doing it in
Lilypond is really the right solution for me because to really solve it I
need to automatically handle *all* cases of simultaneous notes.  I need,
at each point in time, to have at most one note per track, exactly one
track per note, and silence in any leftover tracks, regardless of the
voice/chord structure of the music.

The code you provide works for the specific example I gave, where the
desired silence comes from a note written as a single note instead of a
chord, but there are many other cases (illustrating the problem with
minimal examples).  In particular:

* change b2 to 2 and the b2 comes out in two tracks.  Maybe it would
  never occur to me to write a one-note chord, but a similar issue can
  happen between two- and three-note chords, or anywhere the number of
  notes per chord in a voice is not always the same.

* a one-voice passage added outside the << >> construct comes out in two
  tracks

* if each of two voices sometimes contains two simultaneous notes, but
  only at most three notes are simultaneous overall, then I need to either
  use four output tracks, or carefully split and then merge to bring it
  down to three, and handling this kind of thing becomes steadily more
  complicated as the number of voices and simultaneous notes grows.

Resolving these points and any other similar ones that may come up, seems
like a lot of work.  If an in-Lilypond solution means I need to do things
like maintain the same number of Voice contexts throughout the entire
piece of music, or think hard about which note/voice index needs to merge
with which other one to minimize the overall number of tracks without ever
having more than one note simultaneous in a track, then we quickly
approach a point where it would be less work for me to just write out the
intended output by hand and not have Lilypond calculate it at all.

In external MIDI processing it's relatively easy:  at every "Note on"
message in chronological order, I can route the note to an unused track or
else know unambiguously that I need more tracks.  At every "Note off," the
track in question becomes available again.  The external code basically
does the same thing that a polyphonic synthesizer would do, just with
output to new MIDI tracks instead of directly to hardware voices.  No need
for separate handling of Lilypond's "single note," "chord," and "voice"
concepts.

-- 
Matthew Skala
msk...@ansuz.sooke.bc.ca People before tribes.
https://ansuz.sooke.bc.ca/



Re: Fwd: Markup with text or text in dynamics font

2023-05-30 Thread Jean Abou Samra
Le mercredi 31 mai 2023 à 02:20 +0200, Jean Abou Samra a écrit :
> By the way, I'm also curious to understand why you chose to go the "install 
> from source" route instead of the "install Flatpak" route

by which I mean “install the Frescobaldi Flatpak package”

> . (I gave it because I thought there was no way to copy the old settings to 
> the Flatpak app, but in fact Federico later showed there is, i.e., step 3 in 
> my previous email. It's

by which I mean “the install from source” route

> useful if you want to develop Frescobaldi, but not the easiest if you don't, 
> and not especially useful unless you are allergic to Flatpak.)




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


Re: Fwd: Markup with text or text in dynamics font

2023-05-30 Thread Jean Abou Samra
Le mardi 30 mai 2023 à 10:00 -0700, Ralph Palmer a écrit :

> Thanks, Jean. I followed the long version as best I could. I'm not skilled or 
> super familiar with working from the terminal, so I'm not sure I did 
> everything exactly as I was supposed to. My main question would be whether I 
> was supposed to remain in frescobaldi-repositories after Step 2. I did,

Doesn't really matter. The frescobaldi-repositories directory is just there to 
group the repositories together in a single folder but you could put them 
wherever you wanted.


and I got a few errors in the later steps, but nothing that seemed disastrous 
or halted the operation,

Hmm, do you remember what those errors where? I'm currently working on this 
stuff (see https://github.com/frescobaldi/frescobaldi/pull/1597) and it's 
important to understand what issues people are encountering.

By the way, I'm also curious to understand why you chose to go the "install 
from source" route instead of the "install Flatpak" route. (I gave it because I 
thought there was no way to copy the old settings to the Flatpak app, but in 
fact Federico later showed there is, i.e., step 3 in my previous email. It's 
useful if you want to develop Frescobaldi, but not the easiest if you don't, 
and not especially useful unless you are allergic to Flatpak.)


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


Re: chord.ly to extract notes from chords breaks with new Guile

2023-05-30 Thread Gilles Thibault




in the hope of separating MIDI notes that don't have identical timing.
That is, if my input is
   << { a1 } \\ { b2 2 } >>

it would be nice to be able to separate it out into three separate 
outputs

for separate MIDI channels, like:
  { a1 }
  { b2 c2 }
  { r2 d2 }



Not hardly tested but this should work :

%%%
\version "2.24.1"

\include "chordsAndVoices.ly"

noteAloneToRest = #(define-music-function (music)(ly:music?)
  (map-some-music
(lambda(evt)
  (case (name-of evt)  ;; see chordsAndVoices.ly
((EventChord) evt) ;; not #f => stop iteration
((NoteEvent)   ;; note to rest
  (make-music 'RestEvent 'duration (ly:music-property evt 
'duration '(

(else #f)));; continue iteration
music))


music = << { a1 } \\ { b2 2 } >>

midiI = \extractVoice #1 \music
midiII = \extractVoice #2 \extractNote #1 \music
midiIII = \extractVoice #2 \extractNote #2 \noteAloneToRest \music

\score { <<
  \new Staff  { \midiI }   % { a1 }
  \new Staff  { \midiII }  % { b2 c2 }
  \new Staff  { \midiIII } % { r2 d2 }



% \midi
}




--
Gilles



Fwd: Markup with text or text in dynamics font

2023-05-30 Thread Ralph Palmer
On Tue, May 30, 2023 at 9:14 AM Jean Abou Samra  wrote:

> (Adding back the list)
>
> Le mardi 30 mai 2023 à 09:09 -0700, Ralph Palmer a écrit :
>
> Jean -
>
> I did get your messages. I took a quick look and felt confused and
> slightly overwhelmed. I'm going to try again. I appreciate your follow-up
> messages.
>
> All the best,
>
> Ralph
>
> To make it short and hopefully not overwhelming:
>
>1.
>
>Delete your existing version of Frescobaldi. Unfortunately this is a
>bit fraught because of the currently outdated packaging tooling that
>Frescobaldi currently uses (it's being changed at the moment). But if you
>look into your ~/frescobaldi-3.2 folder, you might find a file called
>installed.txt. If it's there, use cat installed.txt | xargs rm.
>2.
>
>flatpak install frescobaldi
>3.
>
>cp ~/.config/frescobaldi/frescobaldi.conf
>~/.var/app/org.frescobaldi.Frescobaldi/config/frescobaldi/frescobaldi.conf
>
> Thanks, Jean. I followed the long version as best I could. I'm not skilled
or super familiar with working from the terminal, so I'm not sure I did
everything exactly as I was supposed to. My main question would be whether
I was supposed to remain in frescobaldi-repositories after Step 2. I did,
and I got a few errors in the later steps, but nothing that seemed
disastrous or halted the operation, and when I closed the terminal and
checked my Frescobaldi, I found I do, in fact, have 3.3.

All the best,

Ralph

__
Ralph Palmer
Seattle
USA
(he, him, his)
palmer.r.vio...@gmail.com


Re: Markup with text or text in dynamics font

2023-05-30 Thread Jean Abou Samra
(sorry, typoed the list address)

Le mardi 30 mai 2023 à 18:14 +0200, Jean Abou Samra a écrit :
> (Adding back the list)
> Le mardi 30 mai 2023 à 09:09 -0700, Ralph Palmer a écrit :
> > Jean -
> > I did get your messages. I took a quick look and felt confused and slightly 
> > overwhelmed. I'm going to try again. I appreciate your follow-up messages.
> > All the best,
> > Ralph
> To make it short and hopefully not overwhelming:
>1. 
>   Delete your existing version of Frescobaldi. Unfortunately this is a 
> bit fraught because of the currently outdated packaging tooling that 
> Frescobaldi currently uses (it's being changed at the
>   moment). But if you look into your ~/frescobaldi-3.2 folder, you might 
> find a file called installed.txt. If it's there, use cat installed.txt | 
> xargs rm.
>2. 
>   flatpak install frescobaldi
>3. 
>   cp ~/.config/frescobaldi/frescobaldi.conf 
> ~/.var/app/org.frescobaldi.Frescobaldi/config/frescobaldi/frescobaldi.conf



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


Re: Custom text in repeats

2023-05-30 Thread Jean Abou Samra
Le mardi 30 mai 2023 à 16:50 +0200, Jakob Pedersen a écrit :

>  Dear Robin,  
>
>  Thank you! How delightfully simple!  
>
>  I should probably have inferred this from the example, and I apologise for 
> not doing so and spamming the list with an idiotic question!  
>
>  Perhaps the use of \text to add whatever text the user would want could be 
> expanded upon in the documentation, but that's a minor issue, obviously, and 
> perhaps not likely to crop up very often. To my knowledge, this is the only 
> place the \text command is used.



Documentation edits happen in the development branch, which is currently the 
2.25.x series, and in those versions, it's even more delightfully simple: you 
don't even need `\text`, it just works as-is. Change documented 
[here](https://lilypond.org/doc/v2.25/Documentation/changes/text-and-font-improvements.html).

Conversely, "1-4" isn't drawn in a music font anymore, so you would have to 
change it to use `\markup \volta-number`. Or you could just use `\repeat volta` 
and only override one text instead of expressing everything as repeat commands 
(which also yields a correct MIDI rendition):

```
\version "2.25.5"
\language "deutsch"

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

\relative {
  \global
  \repeat volta 5 {
b'4 a g f
\alternative {
  \volta 1,2,3,4 {
f f2 r4
  }
  \volta 5 {
\once \override Score.VoltaBracket.text = "Efter sidste vers."
f2 r2
  }
}
  }
}
```

(And the `\text` command is also being separately replaced with other commands, 
but that's another story.)

Best,

Jean


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


Re: Custom text in repeats

2023-05-30 Thread Jakob Pedersen

Dear Robin,

Thank you! How delightfully simple!

I should probably have inferred this from the example, and I apologise 
for not doing so and spamming the list with an idiotic question!


Perhaps the use of \text to add whatever text the user would want could 
be expanded upon in the documentation, but that's a minor issue, 
obviously, and perhaps not likely to crop up very often. To my 
knowledge, this is the only place the \text command is used.


Best wishes,

Jakob

On 30.05.2023 15.58, Robin Bannister wrote:

Jakob Pedersen wrote:


Is there any way to force lilypond to assume that it's simply text


voltatekst = \markup \text { Efter sidste vers. }


Cheers,
Robin



Re: Library to embed LilyPond in other programs

2023-05-30 Thread Lucas Monteiro
Thank you very much.

On Tue, May 30, 2023 at 3:22 AM Jean Abou Samra  wrote:

>
>
> Le 30 mai 2023 à 07:22, Lucas Monteiro  a
> écrit :
>
> 
> Hello everyone.
>
> I'd like to know if there is any way of embedding a LilyPond interpreter
> in a C/C++ program (For example: A library that provides the functionality
> to the regular downloaded executable).
>
>
>
> Welcome. For your information, I had to approve your post manually as a
> moderator because you aren't subscribed to the list. I suggest that you
> subscribe on https://lists.gnu.org/mailman/listinfo/lilypond-user; you
> may then opt out of receiving posts to the list in your member preferences
> if you wish.
>
> There is no liblilypond, but it is naturally possible, and common, to
> spawn LilyPond in a subprocess.
>
> Best,
>
> Jean
>
>
>
>


Re: Custom text in repeats

2023-05-30 Thread Robin Bannister

Jakob Pedersen wrote:


Is there any way to force lilypond to assume that it's simply text


voltatekst = \markup \text { Efter sidste vers. }


Cheers,
Robin



Custom text in repeats

2023-05-30 Thread Jakob Pedersen

Hello all

I'm trying to replicate this original that has non-standard text in the 
final volta of the repeats.


The original music

Having used the instructions about manual repeats in section 1.4.1 of 
the documentation, I've come up with this:


\version "2.24.1"
\language "deutsch"

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

voltatekst = \markup { Efter sidste vers. }

\relative { \global
  b'4 a g f
  \set Score.repeatCommands = #'((volta "1-4"))
  f f2 r4
  \set Score.repeatCommands = #(list(list 'volta voltatekst) 'end-repeat)
  f2 r2 \bar "|."
  \set Score.repeatCommands = #'((volta #f) end)
}

That produces this rather festive result:

My attempt

I assume this is because the text is being interpreted as dynamic 
expressions and whatnot.


Is there any way to force lilypond to assume that it's simply text and 
not any sort of musical expression?



Best wishes,

Jakob Pedersen

Re: Proportional duration and cross-staff notation

2023-05-30 Thread Lib Lists
@Jean, thank you for your help. Leo is correct, I'm looking for
spacing based on the stems and not the noteheads (or maybe based on
different parts of the notehead).

@Leo, thank you, your example works very well (and it's much more
readable than mine!). The only problem is the shorter space at the end
of the bar. To solve it, I inverted your 'up' and 'down' definitions
that also grought the advantage of aligning with grid lines, but of
course I now get too little space at the beginning of the bar...

See attached picture with grid lines. Basically this would work, if
the space between the beginning of the bar and the first note was the
same as in the other notes.
Thank you all so far for your help!

For reference, here's the code for the attached picture:

#(ly:set-option 'crop #t)
\version "2.25.5"

up = { \change Staff = "up"  \stemDown \revert NoteColumn.X-offset }
down = { \change Staff = "down" \stemUp \temporary\override
NoteColumn.X-offset = #-1.2 }

\score {
  \new PianoStaff  <<

\new Staff = "up"  {
  \time 12/8
  \clef bass
  \new Voice { s1. s1. }
}

\new Staff = "down" {
  \override Beam.positions = #'( 6 . 6 )
  \clef bass
  \down b8[ c'  \up c' b]
  \down b8[  \up c' b]
  \down c'[  \up c']
  \down b8  \up c' b
   \down b8[ c'  \up c' b]
  \down b8[  \up c' b]
  \down c'[  \up c']
  \down b8  \up c' b
}

  >>

\layout {
  \context {
\Score
proportionalNotationDuration = #(ly:make-moment 1/8)
\override SpacingSpanner.uniform-stretching = ##t
\consists "Grid_line_span_engraver"
  }
  \context {
\Staff
\consists "Grid_point_engraver"
gridInterval = #(ly:make-moment 1/24)
\override Beam.positions = #'( 6 . 6 )
\override NoteSpacing.stem-spacing-correction = #-2

  }
}
}



On Tue, 30 May 2023 at 13:44, Leo Correia de Verdier
 wrote:
>
> But I have probably understood it wrong, because in that case I cannot see 
> what’s wrong with the default spacing...
>
> > 30 maj 2023 kl. 13:34 skrev Leo Correia de Verdier 
> > :
> >
> > I think what was asked for was for the proportional spacing to be done 
> > based on the stems position rather than the noteheads, with the result akin 
> > to this horrible hack:
> >
> > %
> >
> > up = { \change Staff = "up" \stemDown \temporary\override 
> > NoteColumn.X-offset = #1 }
> > down = { \change Staff = "down" \stemUp \revert NoteColumn.X-offset }
> >
> > \score {
> >  \new PianoStaff  <<
> >
> >\new Staff = "up"  {
> >  \time 12/8
> >  \clef bass
> >  \new Voice { s1. }
> >}
> >
> >\new Staff = "down" {
> >  \override Beam.positions = #'( 6 . 6 )
> >  \clef bass
> >  \stemUp b8[ c'  \up c' b]
> >  \down b8[  \up c' b]
> >  \down c'[  \up c']
> >  \down b8  \up c' b
> >}
> >
> >>>
> >
> > \layout {
> >  \context {
> >\Score
> >proportionalNotationDuration = #(ly:make-moment 1/12)
> >\override SpacingSpanner.uniform-stretching = ##t
> >  }
> > }}
> > 
> >
> >> 30 maj 2023 kl. 12:41 skrev Jean Abou Samra :
> >>
> >> Le lundi 29 mai 2023 à 10:45 +0200, Lib Lists a écrit :
> >>
> >>> Hello,
> >>>
> >>> I am trying to reproduce the notation used in Ligeti's 'Der 
> >>> Zauberlehrling' piano etude. See attached a fragment from the original 
> >>> and my attempt in Lilypond.
> >>>
> >>> Everything works fine, except that I cannot find a way to reproduce the 
> >>> proportional notation used by the original copist. It looks to me that 
> >>> the proportional spacing was made according to the stems and not the 
> >>> noteheads, because of the cross-staff notation (that's only partly true, 
> >>> as the first four notes seems to be have a slightly bigger gap between 
> >>> the second and third note, but that's a relatively minor detail).
> >>>
> >>> Here is my Lilypond file for the second bar of the original example. As 
> >>> you can see, I tried to use the tools for proportional notation, but 
> >>> without much success. Apologies for the long example, I thought this 
> >>> would be more helpful than a smaller one.
> >>>
> >>> Any help would be really appreciated.
> >>>
> >> With
> >>
> >> \layout {
> >>  \context {
> >>\Score
> >>proportionalNotationDuration = #(ly:make-moment 1/12)
> >>\override SpacingSpanner.uniform-stretching = ##t
> >>  }
> >> }
> >>
> >> it looks quite OK, doesn't it?
> >>
> >> Jean
> >>
> >
>


2305301447_LILYPOND_Der_Zauberlehrling_fragment_002.cropped.pdf
Description: Adobe PDF document


Re: Frescobaldi issue 16: .ly is missing by saving

2023-05-30 Thread Federico Bruni
You are the only one so far reporting that .ly is not automatically 
added.

Maybe it's because you are using an older version of KDE Plasma.

Il giorno lun 29 mag 2023 alle 17:06:17 -0500, jimmyg...@gmail.com ha 
scritto:

Federico,

Just tested with my system, FB 3.3.0 (Flatpak install) did NOT add 
the .ly extension.


I'm running MXLinux 21.3, based on Debian 11.7, KDE Plasma 5.20.5.


On Mon, May 29, 2023 at 22:47, Federico Bruni  
wrote:

Hi all

I'm wondering if we can close this old Frescobaldi issue:


In some desktops (like GNOME) Frescobaldi used to save a new file 
without the .ly file extension. This is no longer the case today, at 
least on Windows 10 and GNOME Linux.
Can you please report what happens in other OSes and desktop 
environments?


We are missing feedback from MacOS and KDE Linux in particular, but 
any comment is helpful.


Thanks
Federico







Re: Frescobaldi issue 16: .ly is missing by saving

2023-05-30 Thread Jakob Pedersen
Frescobaldi 3.3.0 on Manjaro with Xfce 4.18 desktop: Automatically saves 
to .ly without problems.


On 29.05.2023 22.47, Federico Bruni wrote:

Hi all

I'm wondering if we can close this old Frescobaldi issue:
https://github.com/frescobaldi/frescobaldi/issues/16

In some desktops (like GNOME) Frescobaldi used to save a new file 
without the .ly file extension. This is no longer the case today, at 
least on Windows 10 and GNOME Linux.
Can you please report what happens in other OSes and desktop 
environments?


We are missing feedback from MacOS and KDE Linux in particular, but 
any comment is helpful.


Thanks
Federico





Re: Proportional duration and cross-staff notation

2023-05-30 Thread Leo Correia de Verdier
But I have probably understood it wrong, because in that case I cannot see 
what’s wrong with the default spacing...

> 30 maj 2023 kl. 13:34 skrev Leo Correia de Verdier 
> :
> 
> I think what was asked for was for the proportional spacing to be done based 
> on the stems position rather than the noteheads, with the result akin to this 
> horrible hack:
> 
> %
> 
> up = { \change Staff = "up" \stemDown \temporary\override NoteColumn.X-offset 
> = #1 }
> down = { \change Staff = "down" \stemUp \revert NoteColumn.X-offset }
> 
> \score {
>  \new PianoStaff  <<
> 
>\new Staff = "up"  {
>  \time 12/8
>  \clef bass
>  \new Voice { s1. }
>}
> 
>\new Staff = "down" {
>  \override Beam.positions = #'( 6 . 6 )
>  \clef bass
>  \stemUp b8[ c'  \up c' b]
>  \down b8[  \up c' b]
>  \down c'[  \up c']
>  \down b8  \up c' b
>}
> 
>>> 
> 
> \layout {
>  \context {
>\Score
>proportionalNotationDuration = #(ly:make-moment 1/12)
>\override SpacingSpanner.uniform-stretching = ##t
>  }
> }}
> 
> 
>> 30 maj 2023 kl. 12:41 skrev Jean Abou Samra :
>> 
>> Le lundi 29 mai 2023 à 10:45 +0200, Lib Lists a écrit :
>> 
>>> Hello,
>>> 
>>> I am trying to reproduce the notation used in Ligeti's 'Der Zauberlehrling' 
>>> piano etude. See attached a fragment from the original and my attempt in 
>>> Lilypond.
>>> 
>>> Everything works fine, except that I cannot find a way to reproduce the 
>>> proportional notation used by the original copist. It looks to me that the 
>>> proportional spacing was made according to the stems and not the noteheads, 
>>> because of the cross-staff notation (that's only partly true, as the first 
>>> four notes seems to be have a slightly bigger gap between the second and 
>>> third note, but that's a relatively minor detail).
>>> 
>>> Here is my Lilypond file for the second bar of the original example. As you 
>>> can see, I tried to use the tools for proportional notation, but without 
>>> much success. Apologies for the long example, I thought this would be more 
>>> helpful than a smaller one.
>>> 
>>> Any help would be really appreciated.
>>> 
>> With
>> 
>> \layout {
>>  \context {
>>\Score
>>proportionalNotationDuration = #(ly:make-moment 1/12)
>>\override SpacingSpanner.uniform-stretching = ##t
>>  }
>> }
>> 
>> it looks quite OK, doesn't it?
>> 
>> Jean
>> 
> 




Re: Proportional duration and cross-staff notation

2023-05-30 Thread Leo Correia de Verdier
I think what was asked for was for the proportional spacing to be done based on 
the stems position rather than the noteheads, with the result akin to this 
horrible hack:

%

up = { \change Staff = "up" \stemDown \temporary\override NoteColumn.X-offset = 
#1 }
down = { \change Staff = "down" \stemUp \revert NoteColumn.X-offset }

\score {
  \new PianoStaff  <<

\new Staff = "up"  {
  \time 12/8
  \clef bass
  \new Voice { s1. }
}

\new Staff = "down" {
  \override Beam.positions = #'( 6 . 6 )
  \clef bass
  \stemUp b8[ c'  \up c' b]
  \down b8[  \up c' b]
  \down c'[  \up c']
  \down b8  \up c' b
}

  >>

\layout {
  \context {
\Score
proportionalNotationDuration = #(ly:make-moment 1/12)
\override SpacingSpanner.uniform-stretching = ##t
  }
}}


> 30 maj 2023 kl. 12:41 skrev Jean Abou Samra :
> 
> Le lundi 29 mai 2023 à 10:45 +0200, Lib Lists a écrit :
> 
>> Hello,
>> 
>> I am trying to reproduce the notation used in Ligeti's 'Der Zauberlehrling' 
>> piano etude. See attached a fragment from the original and my attempt in 
>> Lilypond.
>> 
>> Everything works fine, except that I cannot find a way to reproduce the 
>> proportional notation used by the original copist. It looks to me that the 
>> proportional spacing was made according to the stems and not the noteheads, 
>> because of the cross-staff notation (that's only partly true, as the first 
>> four notes seems to be have a slightly bigger gap between the second and 
>> third note, but that's a relatively minor detail).
>> 
>> Here is my Lilypond file for the second bar of the original example. As you 
>> can see, I tried to use the tools for proportional notation, but without 
>> much success. Apologies for the long example, I thought this would be more 
>> helpful than a smaller one.
>> 
>> Any help would be really appreciated.
>> 
> With
> 
> \layout {
>   \context {
> \Score
> proportionalNotationDuration = #(ly:make-moment 1/12)
> \override SpacingSpanner.uniform-stretching = ##t
>   }
> }
> 
> it looks quite OK, doesn't it?
> 
> Jean
> 




Re: Lilypond 2.24.1 repeat sego with DC : music found after \fine

2023-05-30 Thread Jean Abou Samra
Le mardi 30 mai 2023 à 08:52 +0200, Hans Aikema a écrit :

> Not sure whether that text would be easy to customise (could not find a 
> reference for it on a quick search, only for an alternative Fine text, not 
> for an alternative D.C. al Fine text)



Here is an example:

```
\version "2.24.1"

\repeat segno 2 {
  c'1
  \volta 1 \fine
  \volta 2 {
c'1
\set Score.dalSegnoTextFormatter = #(lambda _ #{ "D.C." #})
  }
}
```

Best,

Jean


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


Re: Lilypond 2.24.1 repeat sego with DC : music found after \fine

2023-05-30 Thread Jean Abou Samra
Le lundi 29 mai 2023 à 17:00 -0700, Kenneth Wolcott a écrit :
> Hi;
> 
>   Warning message from Lilypond 2.24.1 regarding a repeat segno
> attempt with a DC:
> 
> When_You_and_I_Were_Young_Maggie.ly:50:12: warning: found music after \fine
>   \volta 2
>    \fine
> 
> I have two screenshots (one that looks a little dirty is a png from a
> pdf from a photo), the other is from my engraving.
> 
> My engraving "almost" looks correct but the "DC" is missing.
> 



This seems to be pretty much the same problem as 
https://lists.gnu.org/archive/html/lilypond-user/2023-05/msg00142.html ... 
(modulo the fact that \repeat volta should be \repeat segno).

Best,

Jean





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


Re: Proportional duration and cross-staff notation

2023-05-30 Thread Jean Abou Samra
Le lundi 29 mai 2023 à 10:45 +0200, Lib Lists a écrit :

> Hello,
>
> I am trying to reproduce the notation used in Ligeti's 'Der
> Zauberlehrling' piano etude. See attached a fragment from the original
> and my attempt in Lilypond.
>
> Everything works fine, except that I cannot find a way to reproduce
> the proportional notation used by the original copist. It looks to me
> that the proportional spacing was made according to the stems and not
> the noteheads, because of the cross-staff notation (that's only partly
> true, as the first four notes seems to be have a slightly bigger gap
> between the second and third note, but that's a relatively minor
> detail).
> 
> Here is my Lilypond file for the second bar of the original example.
> As you can see, I tried to use the tools for proportional notation,
> but without much success. Apologies for the long example, I thought
> this would be more helpful than a smaller one.
> 
> Any help would be really appreciated.

With


```
\layout {
  \context {
\Score
proportionalNotationDuration = #(ly:make-moment 1/12)
\override SpacingSpanner.uniform-stretching = ##t
  }
}
```

it looks quite OK, doesn't it?

Jean




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


Re: Markup with text or text in dynamics font

2023-05-30 Thread Jean ABOU SAMRA
Ralph,


I'm currently running LilyPond 2.24.0 and Frescobaldi 3.2 (still having
> problems figuring out how to install 3.3) under Linux/Ubuntu  22.04.2 LTS.
>
>
>
I'm a bit puzzled here because I tried to help you on

https://groups.google.com/g/frescobaldi/c/gKehyaVmAxo?pli=1
and
https://lists.gnu.org/archive/html/lilypond-user/2023-05/msg00150.html

but you did not follow up on either thread.

Did you actually receive my messages? I'm sending this message from a GMail
address to make it more spam-filter-proof; sometimes messages from my
normal address (@abou-samra.fr) end up in spams for people on GMail.

Best,

Jean


Re: Lilypond 2.24.1 repeat sego with DC : music found after \fine

2023-05-30 Thread Hans Aikema


> On 30 May 2023, at 02:00, Kenneth Wolcott  wrote:
> 
> Hi;
> 
>  Warning message from Lilypond 2.24.1 regarding a repeat segno
> attempt with a DC:
> 
> When_You_and_I_Were_Young_Maggie.ly:50:12: warning: found music after \fine
>  \volta 2
>   \fine
> 
> I have two screenshots (one that looks a little dirty is a png from a
> pdf from a photo), the other is from my engraving.
> 
> My engraving "almost" looks correct but the "DC" is missing.
> 
> Thanks,
> Ken Wolcott
>  16.54.42.png>


According to 
https://lilypond.org/doc/v2.24/Documentation/notation/long-repeats#al_002dfine-repeats

The \volta1 and \volta2 sections should be within the curly braces of the 
repeat block.
If you then change your repeats from volta to segno you get a ‘D.C. al Fine’ at 
the end and no errors (volta gets you the repeat bar at the end). Not sure 
whether that text would be easy to customise (could not find a reference for it 
on a quick search, only for an alternative Fine text, not for an alternative 
D.C. al Fine text)


Kind regards
Hans

Re: Library to embed LilyPond in other programs

2023-05-30 Thread Jean Abou Samra


> Le 30 mai 2023 à 07:22, Lucas Monteiro  a écrit :
> 
> 
> Hello everyone.
> 
> I'd like to know if there is any way of embedding a LilyPond interpreter in a 
> C/C++ program (For example: A library that provides the functionality to the 
> regular downloaded executable).


Welcome. For your information, I had to approve your post manually as a 
moderator because you aren't subscribed to the list. I suggest that you 
subscribe on https://lists.gnu.org/mailman/listinfo/lilypond-user; you may then 
opt out of receiving posts to the list in your member preferences if you wish.

There is no liblilypond, but it is naturally possible, and common, to spawn 
LilyPond in a subprocess.

Best,

Jean