Re: A contribution (was Re: snippet to properly align dynamics with expressive text)

2017-07-09 Thread Richard Shann
On Sat, 2017-07-08 at 16:58 +0200, Simon Albrecht wrote:
> On 08.07.2017 15:49, Richard Shann wrote:
> > I was intrigued by this, as I have a patch to the figured bass formatter
> > that has been hanging around because the route to making contributions
> > that I knew about involved a virtual machine which I can't get working
> > on my current system.
> 
> The method Urs named is possible with openLilyLib, but not with the 
> LilyPond source.  That
> means you would have to get a VM to work, or install a Unix system in 
> parallel – both a lot of
> effort for one small patch obviously.  Or you just e-mail your patch to 
> the devel list and ask for
> someone to shepherd it through the review process and into the code base 
> for you, which is done
> from time to time.
Thanks - here is such a small patch then. It fixes the centering of
isolated accidentals and digits on whole notes which is currently too
far to the left.
Here is a snippet that illustrates the problem.
8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
<<
   {
c''1 c'' c'' c''
c''4 c'' c'' c''

  }
  \new FiguredBass {
\figuremode {
  <_+>1 <_-> <3> <3+>
  <_+>4 <_-> <3> <3+>
}
  }
>>
8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><

Richard

--- ORIG_translation-functions.scm	2017-07-08 12:36:17.716097042 +0100
+++ translation-functions.scm	2017-07-09 11:34:13.248080809 +0100
@@ -184,13 +184,10 @@ way the transposition number is displaye
   (set! alt-markup #f)))
 
 
-;; hmm, how to get figures centered between note, and
-;; lone accidentals too?
-
-;;(if (markup? fig-markup)
-;;  (set!
-;;   fig-markup (markup #:translate (cons 1.0 0)
-;;  #:center-align fig-markup)))
+(if (and (eqv? 0 (ly:duration-log  (ly:event-property event 'duration))) (markup? fig-markup))
+(set!
+fig-markup (markup #:translate (cons 1.0 0)
+#:center-align fig-markup)))
 
 (if alt-markup
 (set! fig-markup
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: A contribution (was Re: snippet to properly align dynamics with expressive text)

2017-07-09 Thread Malte Meyn



Am 09.07.2017 um 12:50 schrieb Richard Shann:

Thanks - here is such a small patch then. It fixes the centering of
isolated accidentals and digits on whole notes which is currently too
far to the left.


From your patch:

+(if (and (eqv? 0 (ly:duration-log  (ly:event-property event 
'duration))) (markup? fig-markup))


Shouldn’t you consider negative duration logs (\breve and longer notes) 
too, i. e. “>=” instead of “eqv?”?


(if (and (>= 0 (ly:duration-log  (ly:event-property event 'duration))) 
(markup? fig-markup))


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: A contribution (was Re: snippet to properly align dynamics with expressive text)

2017-07-09 Thread Richard Shann
On Sun, 2017-07-09 at 13:15 +0200, Malte Meyn wrote:
> 
> Am 09.07.2017 um 12:50 schrieb Richard Shann:
> > Thanks - here is such a small patch then. It fixes the centering of
> > isolated accidentals and digits on whole notes which is currently too
> > far to the left.
> 
>  From your patch:
> 
> +(if (and (eqv? 0 (ly:duration-log  (ly:event-property event 
> 'duration))) (markup? fig-markup))
> 
> Shouldn’t you consider negative duration logs (\breve and longer notes) 
> too, i. e. “>=” instead of “eqv?”?
> 
> (if (and (>= 0 (ly:duration-log  (ly:event-property event 'duration))) 
> (markup? fig-markup))

it seems so, I was unsure what values duration log could take, perhaps
being set sometimes to #f so I used eqv? to be safe.
Attached is the revised patch which works on this:

8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
<<

{

\time 4/2 c''\breve c'' c''1 c''

c''4 c'' c'' c''


}

\new FiguredBass {

\figuremode {

<_+>\breve <_-> <3>1 <3+>

<_+>4 <_-> <3> <3+>

}

}

>>
8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><

Richard


--- ORIG_translation-functions.scm	2017-07-08 12:36:17.716097042 +0100
+++ translation-functions.scm	2017-07-09 14:05:34.084003967 +0100
@@ -184,13 +184,10 @@ way the transposition number is displaye
   (set! alt-markup #f)))
 
 
-;; hmm, how to get figures centered between note, and
-;; lone accidentals too?
-
-;;(if (markup? fig-markup)
-;;  (set!
-;;   fig-markup (markup #:translate (cons 1.0 0)
-;;  #:center-align fig-markup)))
+(if (and (>= 0 (ly:duration-log  (ly:event-property event 'duration))) (markup? fig-markup))
+(set!
+fig-markup (markup #:translate (cons 1.0 0)
+#:center-align fig-markup)))
 
 (if alt-markup
 (set! fig-markup
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Place text next to rehearsal mark, or with left edge over barline if there is none

2017-07-09 Thread caagr98
As you can see on the screenshot, both texts are misaligned. The first 
one, a \tempo, is placed *under* the rehearsal mark instead of next to 
it. The second one, the name of a song, is too far too the right, since 
it's attached to the note instead of the barline (it's a <>^"").


How can I move the texts to be next to the rehearsal mark (without 
manual adjustments)?


And is there a version of <>^"" that is attached to a moment instead of 
a note, to be more semantically correct? I think \mark is supposed to do 
that, but it only supports one mark at a time.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Place text next to rehearsal mark, or with left edge over barline if there is none

2017-07-09 Thread Jacques Menu Muzhic
Hello caagr98,

The second score in the example below can help you solve the first issue.

JM.




\version "2.17.19"

{
  \markLengthOn
  \mark\default
  \tempo "This is a really long tempo mark"
  c''4 d'' e'' f''
  \mark\default \tempo 4=60
  g'' 1
}



\score {
  <<
\new MarkLine {
  \mark \default
  \tempo \markup "This is a really long long tempo mark"
  s1
  \mark \default
  \tempo 4=60
  s1
}
\new Staff {
  c''4 d'' e'' f''
  g'' 1
}
  >>
  \layout {
\context {
  \name "MarkLine"
  \type "Engraver_group"
  \consists Axis_group_engraver
  \consists Output_property_engraver
  \consists Mark_engraver
  \consists Metronome_mark_engraver
  \consists Text_spanner_engraver
  \consists Time_signature_engraver
  \override TimeSignature #'stencil = #point-stencil
  \override MetronomeMark #'Y-offset = #0
  \override RehearsalMark #'Y-offset = #0
  \override RehearsalMark #'extra-spacing-width = #'(0 . 0.5)
  \override MetronomeMark #'extra-spacing-width = #'(0 . 1.5)
  \override VerticalAxisGroup #'staff-staff-spacing = #'((padding . 1))
}
\context {
  \Score
  \remove Metronome_mark_engraver
  \remove Mark_engraver
  \accepts MarkLine
}
  }
}



> Le 9 juil. 2017 à 18:24, caag...@gmail.com a écrit :
> 
> As you can see on the screenshot, both texts are misaligned. The first one, a 
> \tempo, is placed *under* the rehearsal mark instead of next to it. The 
> second one, the name of a song, is too far too the right, since it's attached 
> to the note instead of the barline (it's a <>^"").
> 
> How can I move the texts to be next to the rehearsal mark (without manual 
> adjustments)?
> 
> And is there a version of <>^"" that is attached to a moment instead of a 
> note, to be more semantically correct? I think \mark is supposed to do that, 
> but it only supports one mark at a time.
> <2017-07-09_18-13-35.png>___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Place text next to rehearsal mark, or with left edge over barline if there is none

2017-07-09 Thread Jacques Menu Muzhic
And this one for the second issue:


\version "2.19.44"


\paper {
  % First page spacing after header
  markup-system-spacing.padding = #6

  % Subsequent page spacing after header
  top-system-spacing.minimum-distance = #18

  % Spacing in between systems
  system-system-spacing.minimum-distance = #12
}

\header {
  title = \markup { \fontsize #-0.5 \bold "Something"}
  poet = "Another thing"
}

\relative c' {
  \clef treble
  \key e \minor
  \time 3/4
  \tempo 4 = 200
  \set Score.markFormatter = #format-mark-box-alphabet

  % Introduction
  \mark #9
  \once \override TextScript.outside-staff-priority = #2000
  \once \override TextScript.extra-offset = #'(-4 . 3)
  r8^\markup { IABACA } b' d g b d |
  c8 b a g a g |
  c8 b a g a g |
  c8 b a g a g |
  c8 b a g a g |
}


JM


> Le 9 juil. 2017 à 18:29, Jacques Menu Muzhic  a écrit :
> 
> Hello caagr98,
> 
> The second score in the example below can help you solve the first issue.
> 
> JM.
> 
> 
> 
> 
> \version "2.17.19"
> 
> {
>  \markLengthOn
>  \mark\default
>  \tempo "This is a really long tempo mark"
>  c''4 d'' e'' f''
>  \mark\default \tempo 4=60
>  g'' 1
> }
> 
> 
> 
> \score {
>  <<
>\new MarkLine {
>  \mark \default
>  \tempo \markup "This is a really long long tempo mark"
>  s1
>  \mark \default
>  \tempo 4=60
>  s1
>}
>\new Staff {
>  c''4 d'' e'' f''
>  g'' 1
>}
>>> 
>  \layout {
>\context {
>  \name "MarkLine"
>  \type "Engraver_group"
>  \consists Axis_group_engraver
>  \consists Output_property_engraver
>  \consists Mark_engraver
>  \consists Metronome_mark_engraver
>  \consists Text_spanner_engraver
>  \consists Time_signature_engraver
>  \override TimeSignature #'stencil = #point-stencil
>  \override MetronomeMark #'Y-offset = #0
>  \override RehearsalMark #'Y-offset = #0
>  \override RehearsalMark #'extra-spacing-width = #'(0 . 0.5)
>  \override MetronomeMark #'extra-spacing-width = #'(0 . 1.5)
>  \override VerticalAxisGroup #'staff-staff-spacing = #'((padding . 1))
>}
>\context {
>  \Score
>  \remove Metronome_mark_engraver
>  \remove Mark_engraver
>  \accepts MarkLine
>}
>  }
> }
> 
> 
> 
>> Le 9 juil. 2017 à 18:24, caag...@gmail.com a écrit :
>> 
>> As you can see on the screenshot, both texts are misaligned. The first one, 
>> a \tempo, is placed *under* the rehearsal mark instead of next to it. The 
>> second one, the name of a song, is too far too the right, since it's 
>> attached to the note instead of the barline (it's a <>^"").
>> 
>> How can I move the texts to be next to the rehearsal mark (without manual 
>> adjustments)?
>> 
>> And is there a version of <>^"" that is attached to a moment instead of a 
>> note, to be more semantically correct? I think \mark is supposed to do that, 
>> but it only supports one mark at a time.
>> <2017-07-09_18-13-35.png>___
>> lilypond-user mailing list
>> lilypond-user@gnu.org
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
> 


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Place text next to rehearsal mark, or with left edge over barline if there is none

2017-07-09 Thread Wols Lists
On 09/07/17 17:24, caag...@gmail.com wrote:
> As you can see on the screenshot, both texts are misaligned. The first
> one, a \tempo, is placed *under* the rehearsal mark instead of next to
> it. The second one, the name of a song, is too far too the right, since
> it's attached to the note instead of the barline (it's a <>^"").
> 
> How can I move the texts to be next to the rehearsal mark (without
> manual adjustments)?
> 
> And is there a version of <>^"" that is attached to a moment instead of
> a note, to be more semantically correct? I think \mark is supposed to do
> that, but it only supports one mark at a time.
> 
It's a bodge rather than a true fix, but try putting spaces in front of
"Slightly slower". It should shift the text to the right, and then the
rehearsal mark will drop down into the space.

Cheers,
Wol


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \partcombine and decrescendo spanner

2017-07-09 Thread David Kastrup
Kieren MacMillan  writes:

> Hi David,
>
 What is \etc ?
>>> A rather brilliant addition by David K. (I believe?),
>> when it is applicable, it's sort of tacky.
>
> Not sure which definition (or perhaps definitions?) of 'tacky' you are
> intending here?
> The meaning "not having or exhibiting good taste" surely doesn’t apply
> (at least IMO).

  2: tastelessly showy; "a flash car"; "a flashy ring"; "garish
 colors"; "a gaudy costume"; "loud sport shirts"; "a
 meretricious yet stylish book"; "tawdry ornaments" [syn:
 {brassy}, {cheap}, {flash}, {flashy}, {garish}, {gaudy},
 {gimcrack}, {loud}, {meretricious}, {tacky}, {tatty},
 {tawdry}, {trashy}]

It is a bit of a show-off.

>> when describing a feature for hiding complexity, I don't manage
>> to confine the description's complexity in a similar manner.
>
> Documentation is so often more verbose than coded features — just
> think of the volumes of prose required to explain, in even a cursory
> way, something like

A 4590 line graphic file?

exp(i pi) + 1 = 0

does not seem like a lot and has the same descriptive content (arguably,
the exponential function is more basic and well-defined anyway than
powers where negative and/or complex exponents are concerned).  And I
can add its power series definition in one paragraph, and the definition
of complex numbers as polynomials modulo i^2+1 in another and still take
up less space...

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Place text next to rehearsal mark, or with left edge over barline if there is none

2017-07-09 Thread caagr98

On 07/09/2017 06:29 PM, Jacques Menu Muzhic wrote:
> Hello caagr98,
>
> The second score in the example below can help you solve the first issue.
>
> JM.

That makes them aligned vertically, which I'm not too bothered about. It 
doesn't help with horizontal alignment, though


On 07/09/2017 06:30 PM, Jacques Menu Muzhic wrote:
> And this one for the second issue:

That's exactly the kind of manual adjustment I'd prefer to avoid.

On 07/09/2017 06:32 PM, Wols Lists wrote:

It's a bodge rather than a true fix, but try putting spaces in front of
"Slightly slower". It should shift the text to the right, and then the
rehearsal mark will drop down into the space.

Cheers,
Wol


That's clever, but still too close to "manual adjustment" for me to be 
comfortable with it.


Maybe I should look up how hairpins do, since they act pretty much the 
way I want with dynamic texts.


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Place text next to rehearsal mark, or with left edge over barline if there is none

2017-07-09 Thread Simon Albrecht

On 09.07.2017 18:24, caag...@gmail.com wrote:

As you can see on the screenshot, both texts are misaligned.


That’s your opinion.

The first one, a \tempo, is placed *under* the rehearsal mark instead 
of next to it.


Well, both are placed exactly according to standard conventions: the 
center of the RehearsalMark aligned to the bar line, and the left edge 
of the MetronomeMark aligned to the note at the same moment. And since 
the former has a higher outside-staff-priority (see 
) 
it is further away from the staff.


The second one, the name of a song, is too far too the right, since 
it's attached to the note instead of the barline (it's a <>^"").


Well, you explained that one yourself. I think it’s perfectly fine like 
that (except perhaps alignment should disregard the quotes for a more 
balanced look), but if you want the text to refer to the section instead 
of the notes, the question might be “How do I combine \mark\default and 
a custom text into a single RehearsalMark?”. I don’t know that off the 
top of my head…


How can I move the texts to be next to the rehearsal mark (without 
manual adjustments)?


Write an intelligent algorithm that decides when it makes sense to shift 
one of the objects? …
What’s so bad about having a manual adjustment? I’d rather Lily were 
cleverer in such situations, but this is asking _very_ much. Maybe you 
want to separate presentation and content, so using the edition engraver 
would be a good choice.


And is there a version of <>^"" that is attached to a moment instead 
of a note, to be more semantically correct?


TextScriptEvent 
 
is a post-event, not a rhythmic-event, so no, there isn’t. But the empty 
chord solution is pretty elegant for input, isn’t it?


Best, Simon

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Place text next to rehearsal mark, or with left edge over barline if there is none

2017-07-09 Thread Wols Lists
On 09/07/17 18:38, Simon Albrecht wrote:
> On 09.07.2017 18:24, caag...@gmail.com wrote:
>> As you can see on the screenshot, both texts are misaligned.
> 
> That’s your opinion.

See below. The result can EASILY be unplayable music ...
> 
>> The first one, a \tempo, is placed *under* the rehearsal mark instead
>> of next to it.
> 
> Well, both are placed exactly according to standard conventions: the
> center of the RehearsalMark aligned to the bar line, and the left edge
> of the MetronomeMark aligned to the note at the same moment. And since
> the former has a higher outside-staff-priority (see
> )
> it is further away from the staff.

The problem with this is firstly, it's horribly ugly and no real (ie a
person) engraver would ever do this if he took any pride in his work,

and secondly and far more importantly for me, it makes playing the music
hard-to-impossible. What's the point of having sheet music if it's
unplayable?

A real engraver who wanted to stick to those conventions would
presumably shift the note to the right so it cleared the rehearsal mark
and let the metronome mark drop down.

Personally I've engraved stuff with lily where I've ended up with up to
four different marks stacked vertically. The result is widely varying
inter-staff gaps so the music looks awful. And I've just come back from
giving a concert - one of the pieces was a nightmare to play because it
had page turns in it. Turning the page isn't the problem, trying not to
lose the piece as the wind tries to whip it off your stand is!

As you may remember from my previous missives to this list, eliminating
wasted white space is high on my list of priorities - from a purely
practical playability approach!

Cheers,
Wol

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Place text next to rehearsal mark, or with left edge over barline if there is none

2017-07-09 Thread Simon Albrecht

On 09.07.2017 20:01, Wols Lists wrote:

On 09/07/17 18:38, Simon Albrecht wrote:

On 09.07.2017 18:24, caag...@gmail.com wrote:

As you can see on the screenshot, both texts are misaligned.

That’s your opinion.

See below. The result can EASILY be unplayable music ...

What an exaggeration.

The first one, a \tempo, is placed *under* the rehearsal mark instead
of next to it.

Well, both are placed exactly according to standard conventions: the
center of the RehearsalMark aligned to the bar line, and the left edge
of the MetronomeMark aligned to the note at the same moment. And since
the former has a higher outside-staff-priority (see
)
it is further away from the staff.

The problem with this is firstly, it's horribly ugly and no real (i.e. a
person) engraver would ever do this if he took any pride in his work,

and secondly and far more importantly for me, it makes playing the music
hard-to-impossible. What's the point of having sheet music if it's
unplayable?


And why exactly would the effect be so disastrous? Because it gets a 
little more difficult to get good page turns?



A real engraver who wanted to stick to those conventions would
presumably shift the note to the right so it cleared the rehearsal mark
and let the metronome mark drop down.


A real engraver would probably have shifted everything just a little so 
it fell in place looking like he had done nothing extraordinary at all. 
There are many things to be desired in LilyPond whose implementation 
would require algorithms much more sophisticated than those we have now. 
And until a crew of such genius to do that comes about, we have to live 
with making manual adjustments. That’s the point I was trying to make. 
It’s not like this could be fixed by changing a few settings.


Best, Simon

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re:Place text next to rehearsal mark, or with left edge over barline if there is none

2017-07-09 Thread Flaming Hakama by Elaine
> Le 9 juil. 2017 à 18:24, caag...@gmail.com a écrit :
>
> As you can see on the screenshot, both texts are misaligned. The first
one, a \tempo, is placed *under* the rehearsal mark instead of next to it.


Another perspective is that the tempo is placed at the point of the tempo
change, rather than what you want, which is to place it at a point in time
after that change is supposed to have occurred.

> How can I move the texts to be next to the rehearsal mark (without manual
adjustments)?


Well, you are asking for a manual change (due to a non-standard placement
of tempo), so please expect all solutions will necessarily be manual.

Since you want the tempo to appear over beat 2, you could try placing the
tempo there, rather than at the downbeat.

Your desired solution is non-semantic, so it's coding will reflect that.



Finally, these two statements are contradictory:

A real engraver who wanted to stick to those conventions would

presumably shift the note to the right



wasted white space is high on my list of priorities

Cheers,
Wol
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Place text next to rehearsal mark, or with left edge over barline if there is none

2017-07-09 Thread David Wright
On Sun 09 Jul 2017 at 20:28:56 (+0200), Simon Albrecht wrote:
> On 09.07.2017 20:01, Wols Lists wrote:
> >On 09/07/17 18:38, Simon Albrecht wrote:
> >>On 09.07.2017 18:24, caag...@gmail.com wrote:
> >>>As you can see on the screenshot, both texts are misaligned.
> >>That’s your opinion.
> >See below. The result can EASILY be unplayable music ...
> What an exaggeration.
> >>>The first one, a \tempo, is placed *under* the rehearsal mark instead
> >>>of next to it.
> >>Well, both are placed exactly according to standard conventions: the
> >>center of the RehearsalMark aligned to the bar line, and the left edge
> >>of the MetronomeMark aligned to the note at the same moment. And since
> >>the former has a higher outside-staff-priority (see
> >>)
> >>it is further away from the staff.
> >The problem with this is firstly, it's horribly ugly and no real (i.e. a
> >person) engraver would ever do this if he took any pride in his work,
> >
> >and secondly and far more importantly for me, it makes playing the music
> >hard-to-impossible. What's the point of having sheet music if it's
> >unplayable?
> 
> And why exactly would the effect be so disastrous? Because it gets a
> little more difficult to get good page turns?

We've been here before, just over a year ago. Wols/Anthonys sets
band parts, where you expect there to be _no_ page turns; the music
might be in a plastic bag if it's raining. So it's a niche use of
the term "unplayable".

> >A real engraver who wanted to stick to those conventions would
> >presumably shift the note to the right so it cleared the rehearsal mark
> >and let the metronome mark drop down.
> 
> A real engraver would probably have shifted everything just a little
> so it fell in place looking like he had done nothing extraordinary
> at all. There are many things to be desired in LilyPond whose
> implementation would require algorithms much more sophisticated than
> those we have now. And until a crew of such genius to do that comes
> about, we have to live with making manual adjustments. That’s the
> point I was trying to make. It’s not like this could be fixed by
> changing a few settings.

Cheers,
David.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Place text next to rehearsal mark, or with left edge over barline if there is none

2017-07-09 Thread Wols Lists
On 09/07/17 19:28, Simon Albrecht wrote:
> On 09.07.2017 20:01, Wols Lists wrote:
>> On 09/07/17 18:38, Simon Albrecht wrote:
>>> On 09.07.2017 18:24, caag...@gmail.com wrote:
 As you can see on the screenshot, both texts are misaligned.
>>> That’s your opinion.
>> See below. The result can EASILY be unplayable music ...
> What an exaggeration.
 The first one, a \tempo, is placed *under* the rehearsal mark instead
 of next to it.
>>> Well, both are placed exactly according to standard conventions: the
>>> center of the RehearsalMark aligned to the bar line, and the left edge
>>> of the MetronomeMark aligned to the note at the same moment. And since
>>> the former has a higher outside-staff-priority (see
>>> )
>>>
>>> it is further away from the staff.
>> The problem with this is firstly, it's horribly ugly and no real (i.e. a
>> person) engraver would ever do this if he took any pride in his work,
>>
>> and secondly and far more importantly for me, it makes playing the music
>> hard-to-impossible. What's the point of having sheet music if it's
>> unplayable?
> 
> And why exactly would the effect be so disastrous? Because it gets a
> little more difficult to get good page turns?

No. Because a good page turn has nothing to do with having a convenient
place to do it, and everything to do with whether turning a page is
POSSIBLE, in a purely *practical* sense.
> 
>> A real engraver who wanted to stick to those conventions would
>> presumably shift the note to the right so it cleared the rehearsal mark
>> and let the metronome mark drop down.
> 
> A real engraver would probably have shifted everything just a little so
> it fell in place looking like he had done nothing extraordinary at all.
> There are many things to be desired in LilyPond whose implementation
> would require algorithms much more sophisticated than those we have now.
> And until a crew of such genius to do that comes about, we have to live
> with making manual adjustments. That’s the point I was trying to make.
> It’s not like this could be fixed by changing a few settings.
> 
I know it's a hard problem. I've moaned about it, and I understand the
difficulties.

But I'd love to see you make a quick page turn when your music is
clamped to the stand with four or five clothes pegs or magnetic clamps -
where you've got to hold your instrument with one hand, and unclamp,
turn, and reclamp it with the other, and you've only got one or two bars
to do it in. I've seen far too many sheets of music - my own included -
get whipped away by the wind when you try. THAT is what I mean by
unplayable - I don't have the luxury of playing in a nice building where
I can rely on my music staying (for the most part - I have known that
problem in a concert hall :-) where I put it.

Take today, I had a piece of music with turns between pages 1 & 2, and
between 3 & 4. Plenty of time with rests if I was giving a recital in a
hall or something, it only takes a couple of seconds per turn. But out
in the park, it was hard to stop the music blowing everywhere even
though it was clamped - I was trying to play my trombone one-handed
while also trying to make sure my music didn't take off.

Cheers,
Wol


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Place text next to rehearsal mark, or with left edge over barline if there is none

2017-07-09 Thread David Wright
On Sun 09 Jul 2017 at 12:06:05 (-0700), Flaming Hakama by Elaine wrote:
> > Le 9 juil. 2017 à 18:24, caag...@gmail.com a écrit :
> >
> > As you can see on the screenshot, both texts are misaligned. The first
> one, a \tempo, is placed *under* the rehearsal mark instead of next to it.
> 
> 
> Another perspective is that the tempo is placed at the point of the tempo
> change, rather than what you want, which is to place it at a point in time
> after that change is supposed to have occurred.
> 
> > How can I move the texts to be next to the rehearsal mark (without manual
> adjustments)?
> 
> 
> Well, you are asking for a manual change (due to a non-standard placement
> of tempo), so please expect all solutions will necessarily be manual.
> 
> Since you want the tempo to appear over beat 2, you could try placing the
> tempo there, rather than at the downbeat.
> 
> Your desired solution is non-semantic, so it's coding will reflect that.
> 
> 
> 
> Finally, these two statements are contradictory:
> 
> A real engraver who wanted to stick to those conventions would
> 
> presumably shift the note to the right
> 
> 
> 
> wasted white space is high on my list of priorities

Same as my previous post. It's vertical whitespace that's being
prioritised; a _little_ horizontal waste would be less critical.

Cheers,
David.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Place text next to rehearsal mark, or with left edge over barline if there is none

2017-07-09 Thread Wols Lists
On 09/07/17 20:06, Flaming Hakama by Elaine wrote:
> 
> > Le 9 juil. 2017 à 18:24, caag...@gmail.com
>  a écrit :
> >
> > As you can see on the screenshot, both texts are misaligned. The
> first one, a \tempo, is placed *under* the rehearsal mark instead of
> next to it.
> 
> 
> Another perspective is that the tempo is placed at the point of the
> tempo change, rather than what you want, which is to place it at a point
> in time after that change is supposed to have occurred. 
> 
> > How can I move the texts to be next to the rehearsal mark (without
> manual adjustments)?
> 
> 
> Well, you are asking for a manual change (due to a non-standard
> placement of tempo), so please expect all solutions will necessarily be
> manual.
> 
> Since you want the tempo to appear over beat 2, you could try placing
> the tempo there, rather than at the downbeat.  
> 
> Your desired solution is non-semantic, so it's coding will reflect that.
> 
Maybe, but placing all related marks one after the other is just as
semantically correct as placing them one on top of the other ...
> 
> 
> Finally, these two statements are contradictory:
> 
> A real engraver who wanted to stick to those conventions would
> 
> presumably shift the note to the right 
> 
> 
> 
> wasted white space is high on my list of priorities
> 
How come? Shifting the notes to the right wastes maybe one note-width of
one stave. Stacking marks on top of each other wastes an entire line of
text - bad enough in portrait music but appalling in landscape (where
saving space tends to be extremely important - the music is only A5 to
start with!)

Cheers,
Wol

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Place text next to rehearsal mark, or with left edge over barline if there is none

2017-07-09 Thread caagr98
I guess I'll just have to go with EditionEngraver. The main reason I 
didn't use it before was that I couldn't figure out how to install it, 
but I managed to figure that out.


On 07/09/2017 07:38 PM, Simon Albrecht wrote:

On 09.07.2017 18:24, caag...@gmail.com wrote:

As you can see on the screenshot, both texts are misaligned.


That’s your opinion.

The first one, a \tempo, is placed *under* the rehearsal mark instead 
of next to it.


Well, both are placed exactly according to standard conventions: the 
center of the RehearsalMark aligned to the bar line, and the left edge 
of the MetronomeMark aligned to the note at the same moment. And since 
the former has a higher outside-staff-priority (see 
) 
it is further away from the staff.


The second one, the name of a song, is too far too the right, since 
it's attached to the note instead of the barline (it's a <>^"").


Well, you explained that one yourself. I think it’s perfectly fine like 
that (except perhaps alignment should disregard the quotes for a more 
balanced look), but if you want the text to refer to the section instead 
of the notes, the question might be “How do I combine \mark\default and 
a custom text into a single RehearsalMark?”. I don’t know that off the 
top of my head…


How can I move the texts to be next to the rehearsal mark (without 
manual adjustments)?


Write an intelligent algorithm that decides when it makes sense to shift 
one of the objects? …
What’s so bad about having a manual adjustment? I’d rather Lily were 
cleverer in such situations, but this is asking _very_ much. Maybe you 
want to separate presentation and content, so using the edition engraver 
would be a good choice.


And is there a version of <>^"" that is attached to a moment instead 
of a note, to be more semantically correct?


TextScriptEvent 
 
is a post-event, not a rhythmic-event, so no, there isn’t. But the empty 
chord solution is pretty elegant for input, isn’t it?


Best, Simon


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Place text next to rehearsal mark, or with left edge over barline if there is none

2017-07-09 Thread Simon Albrecht

On 09.07.2017 21:21, Wols Lists wrote:

On 09/07/17 20:06, Flaming Hakama by Elaine wrote:

 > How can I move the texts to be next to the rehearsal mark (without
 manual adjustments)?

Well, you are asking for a manual change (due to a non-standard
placement of tempo), so please expect all solutions will necessarily be
manual.

Since you want the tempo to appear over beat 2, you could try placing
the tempo there, rather than at the downbeat.

Your desired solution is non-semantic, so it's coding will reflect that.


Maybe, but placing all related marks one after the other is just as
semantically correct as placing them one on top of the other ...


That’s nonsense, and it is for the same reason that it’s not a trivial 
decision to loosen horizontal alignment in general. If you shift a tempo 
indication a tiny bit to the side, it makes no difference. But if it’s a 
slightly larger bit, such as the width of a quarter note, then the tempo 
change applies to a different moment. And preservation of semantic 
information (almost) always has to take precedence over elegant layout.



Finally, these two statements are contradictory:

 A real engraver who wanted to stick to those conventions would
 presumably shift the note to the right

 wasted white space is high on my list of priorities


How come? Shifting the notes to the right wastes maybe one note-width of
one stave. Stacking marks on top of each other wastes an entire line of
text - bad enough in portrait music but appalling in landscape (where
saving space tends to be extremely important - the music is only A5 to
start with!)


It’s obvious that your use case is special in its extremely tight 
restrictions on paper size and page turns. So I’m afraid you have to 
lower your expectations as to how well Lily will cope with that special 
situation in difficult circumstances. I assume you’re aware of 
possibilities like


\paper {
  page-count = 2
  system-count = 10
  systems-per-page = 5
}

– your use case might take benefit from specifying _all three_ of these.

Best, Simon

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Place text next to rehearsal mark, or with left edge over barline if there is none

2017-07-09 Thread Thomas Morley
2017-07-09 18:24 GMT+02:00  :
> As you can see on the screenshot, both texts are misaligned. The first one,
> a \tempo, is placed *under* the rehearsal mark instead of next to it. The
> second one, the name of a song, is too far too the right, since it's
> attached to the note instead of the barline (it's a <>^"").
>
> How can I move the texts to be next to the rehearsal mark (without manual
> adjustments)?
>
> And is there a version of <>^"" that is attached to a moment instead of a
> note, to be more semantically correct? I think \mark is supposed to do that,
> but it only supports one mark at a time.
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>

Hi,

please always post an (minimal) example demonstrating the problem.
I wasted some minutes to reproduce your first problem. But I was
annoyed not being able to do so. Hence I decided to try solving the
problem instead of continuing finding an code-example triggering the
problem.
You could have done this.

That said, how about:

\version "2.19.63"

#(define (combine-marks mrkup)
  (lambda (grob)
(let* ((default-stencil (ly:grob-property grob 'stencil))
   (mrkp-stencil (grob-interpret-markup grob mrkup))
   (new-stencil
 (ly:stencil-combine-at-edge
   (ly:stencil-aligned-to default-stencil Y CENTER)
   X
   RIGHT
   (ly:stencil-aligned-to mrkp-stencil Y CENTER)
   0.5 ;; padding
   ))
   (new-stencil-length
 (interval-length (ly:stencil-extent new-stencil X)))
   (default-stencil-length
 (interval-length (ly:stencil-extent default-stencil X

  (ly:grob-set-property! grob 'self-alignment-X
(/ (- new-stencil-length default-stencil-length)
   (* -1 new-stencil-length)))
  (ly:grob-set-property! grob 'stencil
new-stencil

rM =
#(define-music-function (mark mrkp)(ly:music? markup?)
  #{
\once \override Score.RehearsalMark #'before-line-breaking =
  #(combine-marks mrkp)
$mark
  #})

{
  R1*2
  \mark \default
  R
  \rM
  \mark \default \markup \bold \fontsize #-2 "Slightly Slower"
  R1*5
  \rM
  \mark \default \markup \fontsize #-2 "\"Come And Get Your Love\""
  R1*2
  \mark \default
  R1
}

Cheers,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Place text next to rehearsal mark, or with left edge over barline if there is none

2017-07-09 Thread caagr98

On 07/09/2017 11:07 PM, Thomas Morley wrote:

Hi,

please always post an (minimal) example demonstrating the problem.
I wasted some minutes to reproduce your first problem. But I was
annoyed not being able to do so. Hence I decided to try solving the
problem instead of continuing finding an code-example triggering the
problem.
You could have done this.


Yeah, I forgot; sorry about that.




That said, how about:


That seems to work (though it seems a bit difficult if there are both a 
mark, tempo, and song name). I decided to use Edition Engraver, though, 
so I won't use that script. Thanks anyway.



Cheers,
   Harm



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Can't use edition engraver to place \time and \tempo

2017-07-09 Thread caagr98
I'd expect the two scores created by this to be identical, but the 
second one only has the \key applied (other stuff such as \bar and <>^"" 
works too), not the \time or \tempo. What am I doing wrong?


Also, it seems only the fourth argument is used for selecting editions 
(with \editionID); what's the first argument for?


```
\version "2.19.63"
\include "edition-engraver/edition-engraver.ily"

\consistToContexts #edition-engraver Score.Staff.Voice
\addEdition time
\editionMod time 1 0/0 E.Staff \key g \major
\editionMod time 1 0/0 E.Score \time 4/4
\editionMod time 1 0/0 E.Score \tempo "Some text" 4=120
\editionMod time 2 0/0 E.Score \time 2/4
\editionMod time 3 0/0 E.Score \time 4/4

\book {
  \score { \new Staff <<
{ b'1 2 1 }
{ \key g \major \time 4/4 \tempo "Some text" 4=120 s1 \time 2/4 s2 
\time 4/4 s1}

  >> }
  \score {
\new Staff { b'1 2 1 }
\layout {
  \context {
\Score
\editionID E
  }
}
  }
}
```

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Music fonts in local directory

2017-07-09 Thread David Bellows
I fear I already know the answer to this question but I thought I'd try anyway.

I have a project that generates music and sheet music using Lilypond.
I want to allow the user to use any music font they want (the free
music fonts). But I want to keep things as simple as possible. So I
don't want for them to have to figure out how to install the music
fonts into the standard places that Lilypond looks for them.

Instead I'd love for them to be able to download my software and keep
those music fonts in a subdirectory of my project and for Lilypond to
be able to find them.

I've experimented a lot with this and cannot get anything to work. And
based on what I've read I don't think it is possible, but I'm hoping
this isn't the case. I really don't want to have to deal with making
people install these fonts when it feels like I can just include them
with my project.

Thanks,
Dave Bellows

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Music fonts in local directory

2017-07-09 Thread Urs Liska


Am 10. Juli 2017 04:29:35 MESZ schrieb David Bellows :
>I fear I already know the answer to this question but I thought I'd try
>anyway.
>
>I have a project that generates music and sheet music using Lilypond.
>I want to allow the user to use any music font they want (the free
>music fonts). But I want to keep things as simple as possible. So I
>don't want for them to have to figure out how to install the music
>fonts into the standard places that Lilypond looks for them.
>
>Instead I'd love for them to be able to download my software and keep
>those music fonts in a subdirectory of my project and for Lilypond to
>be able to find them.
>
>I've experimented a lot with this and cannot get anything to work. And
>based on what I've read I don't think it is possible, but I'm hoping
>this isn't the case. I really don't want to have to deal with making
>people install these fonts when it feels like I can just include them
>with my project.
>
>Thanks,
>Dave Bellows

If your software is able to determine the lilypond installation directory it 
could create the appropriate symlinks.

Apart from that I think I recall someone wrote you can add the font directory 
to LilyPond's include path.

HTH
Urs
>
>___
>lilypond-user mailing list
>lilypond-user@gnu.org
>https://lists.gnu.org/mailman/listinfo/lilypond-user

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: A contribution (was Re: snippet to properly align dynamics with expressive text)

2017-07-09 Thread Urs Liska


Am 08.07.2017 um 16:58 schrieb Simon Albrecht:
> On 08.07.2017 15:49, Richard Shann wrote:
>> I was intrigued by this, as I have a patch to the figured bass formatter
>> that has been hanging around because the route to making contributions
>> that I knew about involved a virtual machine which I can't get working
>> on my current system.
>
> The method Urs named is possible with openLilyLib, but not with the
> LilyPond source.  That
> means you would have to get a VM to work, or install a Unix system in
> parallel – both a lot of
> effort for one small patch obviously.  Or you just e-mail your patch
> to the devel list and ask for
> someone to shepherd it through the review process and into the code
> base for you, which is done
> from time to time.
>
> Best, Simon

I have to add something here.

Simon is correct that I described a method for openLilyLib, not
LilyPond. The Github copy of the LilyPond code is not up-to-date and is
basically a mirror that *can* at any time made ready for people to
contribute with a lower entry barrier than setting up a developer
account on LilyPond's proper repository.
However, this would still require a developer *with* such an account to
process a patch, i.e. pull it to his local machine and upload it to
LilyPond as a patch for review. So nothing would be won with that for
your use-case, Richard.

HOWEVER:
Linux (i.e. for you, a virtual machine) is required for BUILDING
LilyPond, not actually for contributing. If you don't have that you by
definition can't do any modifications that require building LilyPond but
you can only work on the LilyPond and Scheme files.

What you need for contributing, i.e. sending patches into the review
line and eventually the code base is:

* Git
* git-cl
(http://lilypond.org/doc/v2.19/Documentation/contributor/git_002dcl)
* Accounts on the sourceforge tracker and the savannah git repository

git-cl is a Python script, so that should be possible to install on any
computer.
So essentially, if you are planning to contribute .scm or .ly files only
(and as you don't have a build system I assume this is the case) I'm
sure you can set up a proper contribution toolchain on your OS of choice.

Urs


-- 
u...@openlilylib.org
https://openlilylib.org
http://lilypondblog.org


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user