Re: Unbound variable: \markup

2020-05-04 Thread David Kastrup
Lukas-Fabian Moser  writes:

> Hi Freeman,
>
> Am 04.05.20 um 16:02 schrieb Freeman Gilmore:
>> The first one below works fine but the second does not work when the
>> dollar is replaced with \markup \vcenter \huge \bold "$".   Please
>> explain why?Why is \markup bound in the first and not in the
>> second.I see \markup used in many places like to the second
>> example that works, what is the difference?
>
> The # in \override Accidental.before-line-breaking = #... enters
> Scheme-mode, so to speak. You may reference LilyPond variables (your 
> first version), but \markup ... is LilyPond syntax which cannot be
> used in Scheme mode. (Rule of thumb: No \anything inside of #...)
>
> (You see the difference even in the way you reference your dollar
> variable: In LilyPond mode, you'd have to write \dollar, but in Scheme 
> mode, it's just dollar.)
>
> Solution: Either construct your markup in Scheme mode, or use the
> wonderful #{ #} way of switching back to LilyPond mode. I'm not sure
> if the latter is available in 2.18.2 (which should be considered
> outdated by now!), since I lost track of when which syntax
> simplification was added (probably by David K.),

I may be mistaken, but I think it was the comparatively vaguely
described and actually rather small commit

commit d8ee829c73452cc35ef17c6c22abf5b47c754c15
Author: David Kastrup 
Date:   Sat Aug 27 22:23:44 2011 +0200

Make #{ #} accept everything an assignment accepts.
This also makes #{ #} return a void music event, and does not create
sequential music if not necessary.

which would correspond to version 2.15.9 .  So it's comparatively old
news.

> but you can try:
>
> (ly:grob-set-property! grob 'text #{ \markup \vcenter \huge
> \with-color #darkgreen \bold "$" #})
>
> If it doesn't work, or if you insist on writing everything in Scheme,
> you can find out what to write by using your dollar variable
>
> dollar = \markup \vcenter \huge \bold "$"
>
> and asking LilyPond what it looks like in Scheme:
>
> #(display-scheme-music dollar)
>
> which displays
>
> (markup #:vcenter (#:huge (#:bold "$")))
>
> Hence, you may write
>
> (ly:grob-set-property! grob 'text (markup #:vcenter (#:huge (#:bold "$"

Personally, I'd just recommend to go with #{ ... #} here.

-- 
David Kastrup



Re: Stanzas with different rhythms

2020-05-04 Thread Fr. Samuel Springuel
> On 4 May, 2020, at 3:20 PM, Fr. Samuel Springuel  
> wrote:
> 
> Now, I’m almost certain the answer is yes (at least in principle), but before 
> I start trying to write a music function that does [concatenates a variable 
> consisting of pairs of keys and music expressions into a single music 
> expression], I want to make sure that such a function doesn’t already exist.  
> If it doesn’t, I’d like to know from the scheme experts out there if there 
> are any technical reasons why such a function hasn’t been written, or if it’s 
> simply a case of no one’s thought of trying this before.
> 

Turns out that function is much simpler than I thought.  Attached is basic 
proof-of-concept.  Comments welcome.


✝✝
Fr. Samuel, OSB
(R. Padraic Springuel)
St. Anselm’s Abbey
4501 South Dakota Ave, NE
Washington, DC, 20017
202-269-2300
(c) 202-853-7036

PAX ☧ ΧΡΙΣΤΟΣ


null_voice.ly
Description: Binary data


Re: Stanzas with different rhythms

2020-05-04 Thread Fr. Samuel Springuel
> On 4 May, 2020, at 12:45 PM, David Wright  wrote:
> 
> Of course, you can break up the music into several variables
> from which you assemble the different versions, in order to
> localise the variation and make it easier to maintain.

So, attached is my first go at that sort of “assembly-required” structure.  
Originally I defined several music variables with “_a”, “_b”, etc. suffixes 
(preserved for alt_music).  However, I recalled from earlier list activity that 
one could also use “.1”, “.2”, etc. in variable names.  Now, as I understanding 
it, if I define music variables main_music.1, main_music.2, etc. then the 
underlying scheme creates a single variable main_music which is a list of 
pairs.  Each pair consists of the number as the first element (car) and the 
musical contents as the second element (cdr).  Now, I can just manually build 
up the whole main melody using { \main_music.1 \main_music.2 … } (as is 
currently done in the attached), but the scheme construction of it as a list 
got me thinking, is there a way to programmatically accomplish this 
concatenation?

Now, I’m almost certain the answer is yes (at least in principle), but before I 
start trying to write a music function that does this, I want to make sure that 
such a function doesn’t already exist.  If it doesn’t, I’d like to know from 
the scheme experts out there if there are any technical reasons why such a 
function hasn’t been written, or if it’s simply a case of no one’s thought of 
trying this before.

✝✝
Fr. Samuel, OSB
(R. Padraic Springuel)
St. Anselm’s Abbey
4501 South Dakota Ave, NE
Washington, DC, 20017
202-269-2300
(c) 202-853-7036

PAX ☧ ΧΡΙΣΤΟΣ


null_voice.ly
Description: Binary data


Re: Stanzas with different rhythms

2020-05-04 Thread Caio Barros
Em seg., 4 de mai. de 2020 às 13:46, David Wright 
escreveu:

> From your example's "music" variable, I would derive two simple
> versions, musicA and musicIII, each for one rhythm. The words
> would contain no specific indications, but set with NullVoice
> to the appropriate music.
>
> Of course, you can break up the music into several variables
> from which you assemble the different versions, in order to
> localise the variation and make it easier to maintain.
>

Maybe if we could separate durations and pitch or durations and syllables
in different variables this would be much simpler. I've been missing this
feature in Lilypond for many years. If you know a way of doing this please
let me know. Or maybe I will have some time to implement this now that I'm
stuck inside like everyone due to the pandemia.

Caio


Re: Unbound variable: \markup

2020-05-04 Thread Freeman Gilmore
Lukas and Kevin:
Thank you, this should do it.   Looks like it answers many question  I have
been having.
ƒg


On Mon, May 4, 2020 at 10:51 AM Kevin Barry  wrote:

> Hi Freeman,
>
> > The first one below works fine but the second does not work when the
> > dollar is replaced with \markup \vcenter \huge \bold "$".   Please
> > explain why?Why is \markup bound in the first and not in the
> > second.I see \markup used in many places like to the second
> > example that works, what is the difference?
>
> If you want to include lilypond syntax inside scheme syntax you have to
> put #{ #} around it. Here is your second example, with that included
> (which made the error go away for me):
>
> \layout {
>   \context {
> \Voice
> \override Accidental.before-line-breaking =
> #(lambda (grob)
>(if (eqv? (ly:grob-property grob 'alteration) SHARP)
>(begin
> (ly:grob-set-property!
>  grob 'horizontal-skylines
> ly:grob::horizontal-skylines-from-stencil)
> (ly:grob-set-property!
>  grob 'text #{ \markup \vcenter \huge \bold "$" #})
> (ly:grob-set-property!
>  grob 'stencil ly:text-interface::print
>   }
> }
>
> Hope that works for you
>
> Kevin
>


Re: Stanzas with different rhythms

2020-05-04 Thread Fr. Samuel Springuel
> On 4 May, 2020, at 12:45 PM, David Wright  wrote:
> 
> Well, in a sense, you haven't managed to localise the complications
> because the lyrics are stuffed with redundant associatedVoices when
> reused elsewhere.

Very true.  Getting the separation I want is still very much a work in progress.

> Where the differences are this minor (same syllable count, and
> mixed music that's easily distiguished), I would put all the
> complication where it's unavoidable: in the notes.
> 
> From your example's "music" variable, I would derive two simple
> versions, musicA and musicIII, each for one rhythm. The words
> would contain no specific indications, but set with NullVoice
> to the appropriate music.
> 
> Of course, you can break up the music into several variables
> from which you assemble the different versions, in order to
> localise the variation and make it easier to maintain.

Now that’s an idea I hadn’t thought of.  I just got a basic edition-engraver 
example working (see attached), but I’ll try this method out too and see which 
I like better.

✝✝
Fr. Samuel, OSB
(R. Padraic Springuel)
St. Anselm’s Abbey
4501 South Dakota Ave, NE
Washington, DC, 20017
202-269-2300
(c) 202-853-7036

PAX ☧ ΧΡΙΣΤΟΣ


lyrics-alternative.ly
Description: Binary data


Re: Stanzas with different rhythms

2020-05-04 Thread David Wright
On Mon 04 May 2020 at 11:14:43 (-0400), Fr. Samuel Springuel wrote:
> > On 3 May, 2020, at 3:57 PM, Caio Barros  wrote:
> > 
> > Personally I tend to use explicit durations (no \lyricsto) in complex cases 
> > like this, but a workaround would be simply:
> 
> I’m avoiding explicit durations in this project because each set of words can 
> be set to multiple possible tunes.  These tunes may have the same meter 
> (number of syllables per phrase) but not necessarily the same rhythm (indeed, 
> at least one alternative is usually a chant setting while at least one is 
> measured).  Explicit durations would mean having separate copies of the same 
> lyrics for each tune, something I’m trying to avoid.
> 
> Indeed, your workaround suffers from a similar problem, as that empty 
> syllable isn’t needed in the other melody.

Well, in a sense, you haven't managed to localise the complications
because the lyrics are stuffed with redundant associatedVoices when
reused elsewhere.

> > I guess what is happening here is that when you switch to the previous 
> > voice LilyPond will just align the next syllable to the next note in voice 
> > you switched to, ignoring the duration of the previous syllable.
> 
> Hmm… If that’s true, then what I need is a way of timing the \unset command 
> to happen 1/8 later for this melody.  Controlling when commands occur in time 
> makes me think of the Edition Engraver, which I’ve always meant to come to 
> terms with.  Perhaps this is the song which finally forces me down that route.

Where the differences are this minor (same syllable count, and
mixed music that's easily distiguished), I would put all the
complication where it's unavoidable: in the notes.

>From your example's "music" variable, I would derive two simple
versions, musicA and musicIII, each for one rhythm. The words
would contain no specific indications, but set with NullVoice
to the appropriate music.

Of course, you can break up the music into several variables
from which you assemble the different versions, in order to
localise the variation and make it easier to maintain.

Cheers,
David.
\language "english"

global = { \key f-sharp \minor \time 4/4 }

music = {
  f-sharp'4 e'8 f-sharp' << { \voiceOne a'4. a'8 } \new Voice = "v3" { 
\voiceTwo \teeny a'4_\markup{v.3} a' } >> \oneVoice |
  g-sharp'8( f-sharp') g-sharp' e' f-sharp'2 \bar "|."
}

musicA = {
  f-sharp'4 e'8 f-sharp' a'4. a'8 |
  g-sharp'8( f-sharp') g-sharp' e' f-sharp'2 \bar "|."
}

musicIII = {
  f-sharp'4 e'8 f-sharp' a'4 a' |
  g-sharp'8( f-sharp') g-sharp' e' f-sharp'2 \bar "|."
}

verseII = \lyricmode {
Tak -- ing our way, you walked with us there.
}

verseIII = \lyricmode {
Gen -- tle and strong one, Lord of our way.
}

\new Staff
<<
\new Voice { << \global \music >> }
\new NullVoice { << \global \musicA >> }
\addlyrics { \verseII }
\new NullVoice { << \global \musicIII >> }
\addlyrics { \verseIII }
>>


stanzas.pdf
Description: Adobe PDF document


Re: 2.21.1 change of behavior of \compressMMRests?

2020-05-04 Thread Paul Scott

On 5/4/20 2:10 AM, Mats Bengtsson wrote:


On 2020-05-04 08:14, Valentin Villenave wrote:

On 5/3/20, Paul Scott  wrote:

Out of simple curiosity what is the purpose of the \compressMMRests { }
structure rather than the \set or \override action I would think of?
I'm guessing \compressMMRests does \set \unset or \override \revert 
pairs.

As you can see if you open the music-functions-init.ly file in your
LilyPond installation, it’s a fairly simple music function that relies
on the skipBars property:
https://git.savannah.gnu.org/cgit/lilypond.git/tree/ly/music-functions-init.ly#n313 


As does compressEmptyMeasures, formerly compressFullBarRests -- but
these are just a mere override:
https://git.savannah.gnu.org/cgit/lilypond.git/tree/ly/property-init.ly#n168 



Now, your question is exactly why I felt the need to add a whole new
subsection to the Notation Reference:
http://lilypond.org/doc/v2.21/Documentation/notation/writing-parts#compressing-empty-measures 


I hope this can answer your question (as well as the rationale behind
the renaming of FullbarRests into EmptyMeasures); please do tell us if
that seems unclear to you or if you have some suggestions to improve
that part of the documentation.


What was the rationale to recommend (and only mention) 
\compressMMRests instead of \compressEmptyMeasures in 
http://lilypond.org/doc/v2.21/Documentation/notation/writing-rests#full-measure-rests? 
In my opinion, it's a bit more cumbersome to use the music function 
syntax than the macro \compressEmptyMeasures, especially for 
unexperienced LilyPond users. The situation with multi-measure note 
durations, described in your new subsection, should be extremely rare 
in practice (perhaps except in cases where the user made a typo in the 
input). During all my years of lilypond use, I've never suffered from 
the problem and I've used the predecessor of \compressEmptyMeasures 
quite a lot.


   Mats


Thank you, Mats.

I couldn't have said it better.

Paul





Re: Stanzas with different rhythms

2020-05-04 Thread Fr. Samuel Springuel
> On 3 May, 2020, at 3:57 PM, Caio Barros  wrote:
> 
> Personally I tend to use explicit durations (no \lyricsto) in complex cases 
> like this, but a workaround would be simply:

I’m avoiding explicit durations in this project because each set of words can 
be set to multiple possible tunes.  These tunes may have the same meter (number 
of syllables per phrase) but not necessarily the same rhythm (indeed, at least 
one alternative is usually a chant setting while at least one is measured).  
Explicit durations would mean having separate copies of the same lyrics for 
each tune, something I’m trying to avoid.

Indeed, your workaround suffers from a similar problem, as that empty syllable 
isn’t needed in the other melody.

> I guess what is happening here is that when you switch to the previous voice 
> LilyPond will just align the next syllable to the next note in voice you 
> switched to, ignoring the duration of the previous syllable.

Hmm… If that’s true, then what I need is a way of timing the \unset command to 
happen 1/8 later for this melody.  Controlling when commands occur in time 
makes me think of the Edition Engraver, which I’ve always meant to come to 
terms with.  Perhaps this is the song which finally forces me down that route.

✝✝
Fr. Samuel, OSB
(R. Padraic Springuel)
St. Anselm’s Abbey
4501 South Dakota Ave, NE
Washington, DC, 20017
202-269-2300
(c) 202-853-7036

PAX ☧ ΧΡΙΣΤΟΣ




Re: Unbound variable: \markup

2020-05-04 Thread Kevin Barry
Hi Freeman,

> The first one below works fine but the second does not work when the
> dollar is replaced with \markup \vcenter \huge \bold "$".   Please
> explain why?Why is \markup bound in the first and not in the
> second.I see \markup used in many places like to the second
> example that works, what is the difference?

If you want to include lilypond syntax inside scheme syntax you have to
put #{ #} around it. Here is your second example, with that included
(which made the error go away for me):

\layout { 
  \context { 
\Voice
\override Accidental.before-line-breaking = 
#(lambda (grob)
   (if (eqv? (ly:grob-property grob 'alteration) SHARP)
   (begin 
(ly:grob-set-property! 
 grob 'horizontal-skylines 
ly:grob::horizontal-skylines-from-stencil)
(ly:grob-set-property! 
 grob 'text #{ \markup \vcenter \huge \bold "$" #})
(ly:grob-set-property! 
 grob 'stencil ly:text-interface::print
  }
}

Hope that works for you

Kevin



Re: Unbound variable: \markup

2020-05-04 Thread Lukas-Fabian Moser

Hi Freeman,

Am 04.05.20 um 16:02 schrieb Freeman Gilmore:

The first one below works fine but the second does not work when the
dollar is replaced with \markup \vcenter \huge \bold "$".   Please
explain why?Why is \markup bound in the first and not in the
second.I see \markup used in many places like to the second
example that works, what is the difference?


The # in \override Accidental.before-line-breaking = #... enters 
Scheme-mode, so to speak. You may reference LilyPond variables (your 
first version), but \markup ... is LilyPond syntax which cannot be used 
in Scheme mode. (Rule of thumb: No \anything inside of #...)


(You see the difference even in the way you reference your dollar 
variable: In LilyPond mode, you'd have to write \dollar, but in Scheme 
mode, it's just dollar.)


Solution: Either construct your markup in Scheme mode, or use the 
wonderful #{ #} way of switching back to LilyPond mode. I'm not sure if 
the latter is available in 2.18.2 (which should be considered outdated 
by now!), since I lost track of when which syntax simplification was 
added (probably by David K.), but you can try:


(ly:grob-set-property! grob 'text #{ \markup \vcenter \huge \with-color #darkgreen \bold 
"$" #})

If it doesn't work, or if you insist on writing everything in Scheme, 
you can find out what to write by using your dollar variable


dollar = \markup \vcenter \huge \bold "$"

and asking LilyPond what it looks like in Scheme:

#(display-scheme-music dollar)

which displays

(markup #:vcenter (#:huge (#:bold "$")))

Hence, you may write

(ly:grob-set-property! grob 'text (markup #:vcenter (#:huge (#:bold "$"

Best
Lukas


Unbound variable: \markup

2020-05-04 Thread Freeman Gilmore
The first one below works fine but the second does not work when the
dollar is replaced with \markup \vcenter \huge \bold "$".   Please
explain why?Why is \markup bound in the first and not in the
second.I see \markup used in many places like to the second
example that works, what is the difference?

Thank you, ƒg

 \version "2.18.2"

 dollar = \markup \vcenter \huge \bold "$"

 \layout { \context { \Voice
\override Accidental.before-line-breaking = #(lambda (grob)
  (if (eqv? (ly:grob-property grob 'alteration) SHARP)
(begin (ly:grob-set-property! grob 'horizontal-skylines
 ly:grob::horizontal-skylines-from-stencil)
   (ly:grob-set-property! grob 'text dollar)
   (ly:grob-set-property! grob 'stencil
 ly:text-interface::print
 } }

 { e'4 fis' bes' gis' | fis'8 gisis' fis'2 r4 }

%

 \layout { \context { \Voice
\override Accidental.before-line-breaking = #(lambda (grob)
  (if (eqv? (ly:grob-property grob 'alteration) SHARP)
(begin (ly:grob-set-property! grob 'horizontal-skylines
 ly:grob::horizontal-skylines-from-stencil)
   (ly:grob-set-property! grob 'text \markup \vcenter
\huge \bold "$")
   (ly:grob-set-property! grob 'stencil
 ly:text-interface::print
 } }

 { e'4 fis' bes' gis' | fis'8 gisis' fis'2 r4 }



Re: resetting accidentals at word breaks

2020-05-04 Thread Kevin Barry
Hi Lukas/Samuel,

On Thu, Apr 30, 2020 at 10:24:27AM +0200, Lukas-Fabian Moser wrote:
> in contrast to my above definition of "lyric?" using music-is-of-type?.
> 
> 1) Which variant is to be preferred?
> 2) What is the difference between 'LyricEvent and 'lyric-event ?

Looking at the code, it appears that, for a lyrics event, the 'name
property of the music object will be 'LyricEvent whereas 'lyric-event
will be one of its 'types:

(LyricEvent
 . ((description . "A lyric syllable.  Must be entered in lyrics mode,
i.e., @code{\\lyrics @{ twinkle4 twinkle4 @} }.")
(iterator-ctor . ,ly:rhythmic-music-iterator::constructor)
(types . (rhythmic-event lyric-event event))
))

The music-is-of-type function checks the 'types list, so you would need
to check for 'lyric-event. If you are using ly:music-property, then you
would need to check the 'name for 'LyricEvent. It looks like 'LyricEvent
is the only class that includes lyric-event in its 'types, so as long as
that is true the two checks are equivalent (as far as I can tell).

Kevin



Re: Combining roughly 70 separate files into a single book

2020-05-04 Thread Brent Annable
Federico,

Thank you very much for this. I had no idea that's what I'd been doing
wrong all this time! I tried it many years ago and just assumed it was
impossible -- my eyes have been opened. Now I can get on with things.

With much gratitude,

Brent.

On Mon, 4 May 2020 at 19:56, Federico Bruni  wrote:

> Il giorno lun 4 mag 2020 alle 14:39, Brent Annable
>  ha scritto:
> > Your strategy seems like good advice, and I've changed the files
> > around so I can do it. But the master file is getting very long and
> > complicated with all the \score blocks, so I have a question: can you
> > put a \score block into a variable, to avoid all the extra code in
> > the master file? Whenever I try to do that I get an error message,
> > using the syntax below:
> >
>
> This is exactly what I do: I save each score block in a variable so I
> can use it wherever I want to.
>
> > myScore = { \score { \new Staff [etc.] } }
> >
> > \myScore
> >
> > Is there some special way of putting the \score block into a variable
> > so it doesn't produce an error?
>
> David has already given the solution: you should not wrap it using {}
>
>
>
>


Re: Re: 2.21.1 change of behavior of \compressMMRests?

2020-05-04 Thread Valentin Villenave
On 5/4/20, Mats Bengtsson  wrote:
> What was the rationale to recommend (and only mention) \compressMMRests
> instead of \compressEmptyMeasures in
> http://lilypond.org/doc/v2.21/Documentation/notation/writing-rests#full-measure-rests?

Well, precisely the fact that \compressEmptyMeasures is applied
blindly to all objects, not just rests.
https://sourceforge.net/p/testlilyissues/issues/3687/
https://sourceforge.net/p/testlilyissues/issues/4375/

> In my opinion, it's a bit more cumbersome to use the music function
> syntax than the macro \compressEmptyMeasures

I actually agree. Having to wrap stuff into a music function doesn’t
make things easier.

In fact, \compressFullBarRests (or \compressEmptyMeasures) was no
longer explained nor mentioned *anywhere* as soon as
\compressMMRests{} was implemented, which is why I thought it should
deserve a proper explanation in a subsection of its own.

Besides, the similarity between \compressEmptyMeasures and
\compressMMRests remains unfortunate and prone to confusion. (I
actually toyed with the idea of naming one of them
\contractEmptyMeasures, then opted against it.)

> The situation with multi-measure note
> durations, described in your new subsection, should be extremely rare in
> practice

Apparently this may occur in some old editions. Can’t say I’ve ever
encountered one myself.

Since you’re much more experienced than I am in dealing with newcomers
and fundamental ease-of-use, please feel free to suggest what sort of
implementation may make things easier.

V.



Re[3]: 2.21.1 change of behavior of \compressMMRests?

2020-05-04 Thread Trevor

Hi Mats

From: "Mats Bengtsson" 


What was the rationale to recommend (and only mention) \compressMMRests instead 
of \compressEmptyMeasures in 
http://lilypond.org/doc/v2.21/Documentation/notation/writing-rests#full-measure-rests?
 In my opinion, it's a bit more cumbersome to use the music function syntax 
than the macro \compressEmptyMeasures, especially for unexperienced LilyPond 
users. The situation with multi-measure note durations, described in your new 
subsection, should be extremely rare in practice (perhaps except in cases where 
the user made a typo in the input). During all my years of lilypond use, I've 
never suffered from the problem and I've used the predecessor of 
\compressEmptyMeasures quite a lot.
The issue which eventually led to this change was originally reported 
here:


https://lists.gnu.org/archive/html/lilypond-devel/2015-03/msg00212.html

so it did apparently affect some users adversely.

Trevor

Re: Combining roughly 70 separate files into a single book

2020-05-04 Thread Federico Bruni
Il giorno lun 4 mag 2020 alle 14:39, Brent Annable 
 ha scritto:
Your strategy seems like good advice, and I've changed the files 
around so I can do it. But the master file is getting very long and 
complicated with all the \score blocks, so I have a question: can you 
put a \score block into a variable, to avoid all the extra code in 
the master file? Whenever I try to do that I get an error message, 
using the syntax below:




This is exactly what I do: I save each score block in a variable so I 
can use it wherever I want to.



myScore = { \score { \new Staff [etc.] } }

\myScore

Is there some special way of putting the \score block into a variable 
so it doesn't produce an error?


David has already given the solution: you should not wrap it using {}






Re: Chordname - fret-diagram line - in different order

2020-05-04 Thread Noeck
Hi Rita,

you can put the chord names below the fret-boards:

\version "2.20.0"

chrd = \chordmode { a1 c1 }
<<
  \new FretBoards \chrd
  \new ChordNames \chrd
  \chrd
>>

By the way, in the second word of your lyrics, a space is missing and
you can see the double hyphen in the image. It should be

  ha -- lá -- lo -- san

instead of

  ha --lá -- lo -- san.

Best,
Joram



Re: gitar chordname - without sus

2020-05-04 Thread Thomas Morley
Am Mo., 4. Mai 2020 um 11:00 Uhr schrieb Rita Composer :
>
> Dear Helpers,
>
> I wrote in the ly file
>
>  \chordmode
> {   \germanChords a1 a2:4 s2 s1 a1 s1 a fis:m e a fis:m gis cis cis:m
> cis:m fis:m h cis:m
> cis:m fis:m h cis:m
>
> And in the note/score appeared
> A4sus3
>
> How can I manage simple A4?
>
> Thank you!
> Rita

As far as I can tell, "sus" is hardcoded.
You need to go for chordNameExceptions, see NR

Btw, a:4 will include the third. See:

chrds = \chordmode { a2:4 a:1.4 a:1.4.5 }

<<
\new ChordNames \chrds
\new Staff \chrds
>>

Cheers,
  Harm



Re: Re: 2.21.1 change of behavior of \compressMMRests?

2020-05-04 Thread Mats Bengtsson



On 2020-05-04 08:14, Valentin Villenave wrote:

On 5/3/20, Paul Scott  wrote:

Out of simple curiosity what is the purpose of the \compressMMRests { }
structure rather than the \set or \override action I would think of?
I'm guessing \compressMMRests does \set \unset or \override \revert pairs.

As you can see if you open the music-functions-init.ly file in your
LilyPond installation, it’s a fairly simple music function that relies
on the skipBars property:
https://git.savannah.gnu.org/cgit/lilypond.git/tree/ly/music-functions-init.ly#n313
As does compressEmptyMeasures, formerly compressFullBarRests -- but
these are just a mere override:
https://git.savannah.gnu.org/cgit/lilypond.git/tree/ly/property-init.ly#n168

Now, your question is exactly why I felt the need to add a whole new
subsection to the Notation Reference:
http://lilypond.org/doc/v2.21/Documentation/notation/writing-parts#compressing-empty-measures
I hope this can answer your question (as well as the rationale behind
the renaming of FullbarRests into EmptyMeasures); please do tell us if
that seems unclear to you or if you have some suggestions to improve
that part of the documentation.


What was the rationale to recommend (and only mention) \compressMMRests 
instead of \compressEmptyMeasures in 
http://lilypond.org/doc/v2.21/Documentation/notation/writing-rests#full-measure-rests? 
In my opinion, it's a bit more cumbersome to use the music function 
syntax than the macro \compressEmptyMeasures, especially for 
unexperienced LilyPond users. The situation with multi-measure note 
durations, described in your new subsection, should be extremely rare in 
practice (perhaps except in cases where the user made a typo in the 
input). During all my years of lilypond use, I've never suffered from 
the problem and I've used the predecessor of \compressEmptyMeasures 
quite a lot.


   Mats




Chordname - fret-diagram line - in different order

2020-05-04 Thread Rita Composer
Dear Helpers,

I would like to use fret-diagram just few time,
and I wish the chords above the tune.

How can I change...that the fret-diagram should be on the top?

Or It would be ok for me, if there is NO fret-diagram, the simple chords
would be on their normal place, not at so high.
[image: Screenshot 2020-05-04 10.16.59.png]

Thanks for your help,
Rita


gitar chordname - without sus

2020-05-04 Thread Rita Composer
Dear Helpers,

I wrote in the ly file

 \chordmode
{   \germanChords a1 *a2:4* s2 s1 a1 s1 a fis:m e a fis:m gis cis cis:m
cis:m fis:m h cis:m
cis:m fis:m h cis:m

And in the note/score appeared
A4sus3

How can I manage simple A4?

Thank you!
Rita


Re: Combining roughly 70 separate files into a single book

2020-05-04 Thread David Kastrup
Brent Annable  writes:

> Hi Federico,
>
> Your strategy seems like good advice, and I've changed the files around so
> I can do it. But the master file is getting very long and complicated with
> all the \score blocks, so I have a question: can you put a \score block
> into a variable, to avoid all the extra code in the master file? Whenever I
> try to do that I get an error message, using the syntax below:
>
> myScore = { \score { \new Staff [etc.] } }
>
> \myScore
>
> Is there some special way of putting the \score block into a variable so it
> doesn't produce an error?

Only a rather unspecial way.

myScore = \score { \new Staff [etc.] }

Like with () parens in Scheme, {} braces in LilyPond are not redundant
but carry meaning.  You cannot just add additional layers and expect
things to behave the same.

-- 
David Kastrup



Re: 2.21.1 change of behavior of \compressMMRests?

2020-05-04 Thread Paul Scott

Thank you for this, Valentin.

On 5/3/20 11:14 PM, Valentin Villenave wrote:

On 5/3/20, Paul Scott  wrote:

Out of simple curiosity what is the purpose of the \compressMMRests { }
structure rather than the \set or \override action I would think of?
I'm guessing \compressMMRests does \set \unset or \override \revert pairs.

As you can see if you open the music-functions-init.ly file in your
LilyPond installation, it’s a fairly simple music function that relies
on the skipBars property:
https://git.savannah.gnu.org/cgit/lilypond.git/tree/ly/music-functions-init.ly#n313
As does compressEmptyMeasures, formerly compressFullBarRests -- but
these are just a mere override:
https://git.savannah.gnu.org/cgit/lilypond.git/tree/ly/property-init.ly#n168

Now, your question is exactly why I felt the need to add a whole new
subsection to the Notation Reference:
http://lilypond.org/doc/v2.21/Documentation/notation/writing-parts#compressing-empty-measures
I hope this can answer your question (as well as the rationale behind
the renaming of FullbarRests into EmptyMeasures); please do tell us if
that seems unclear to you or if you have some suggestions to improve
that part of the documentation.


I did look at that documentation when this first came up and rejected 
\compressEmptyMeasures both because of the less logical (to me) name and 
this documentation whose first example suggests behavior that I wouldn't 
want for any music I work with, i.e. writing a whole note in 2/4 rather 
than two tied half notes.


Taking all the feedback I have received in this thread I believe all I 
should have ever used is


\set Score.skipBars = ##t

I just thought \compressFullBarRests was the sophisticated way and less 
vulnerable to lower level LilyPond code changes.


Stay well,

Paul




Cheers,
-- V.




Re: Combining roughly 70 separate files into a single book

2020-05-04 Thread Jacques Menu
Hello Brent,

I you use the same names in numerous files, you can change them automatically 
in all of them with a script of some sort to make them distinct, to avoid 
cumbersome manual editing.

JM

> Le 4 mai 2020 à 06:39, Brent Annable  a écrit :
> 
> Hi Federico,
> 
> Your strategy seems like good advice, and I've changed the files around so I 
> can do it. But the master file is getting very long and complicated with all 
> the \score blocks, so I have a question: can you put a \score block into a 
> variable, to avoid all the extra code in the master file? Whenever I try to 
> do that I get an error message, using the syntax below:
> 
> myScore = { \score { \new Staff [etc.] } }
> 
> \myScore
> 
> Is there some special way of putting the \score block into a variable so it 
> doesn't produce an error?
> 
> Regards,
> 
> Brent.
> 
> On Wed, 29 Apr 2020 at 06:37, Federico Bruni  > wrote:
> Il giorno mer 29 apr 2020 alle 02:36, Brent Annable 
> mailto:brentanna...@gmail.com>> ha scritto:
> > Does that do page numbers as well?  I'd really like to eliminate any 
> > extra steps if possible; my goal is to have a master file that I can 
> > adjust as necessary, and then just press a button to spit the whole 
> > thing out every time I need a new version.
> > 
> > Based on Jerry's suggestion I've done a little experimenting. Using a 
> > structure like this:
> > 
> > \book {
> > \bookpart {\include "O-Welt-ich-muss-dich.ly"}
> > \bookpart {\include "O-Welt-ich-muss-dich.ly"}
> > }
> > 
> > does produce scores in sequence with headings, etc. in place, but the 
> > music processing is full of errors and the output is nonsensical (see 
> > attachment). Can someone explain to me why this approach doesn't 
> > work? I thought that anything in a \bookpart block should be 
> > independent of everything around it, is that not the case? I even 
> > tried it with multiple \book blocks, but that produced nothing at all.
> 
> IIRC the reason is that you cannot include, within a bookpart, a file 
> which contains top level expressions.
> This means that, even if you remove the top level expressions (such as 
> \score), in any case you'll need an extra file to produce the PDF of 
> the single piece.
> 
> I usually follow this strategy:
> 
> - Piece-Name.ily: file containing only music variables (doesn't produce 
> any output), including a variable for the \score block. You'd better 
> use variable names which are unique within your project.
> - Piece-Name.ly: here I include above file and call the \score 
> variable, to print a single PDF.
> - If the piece is part of a collection, the collection.ly 
>  file will 
> include only the .ily file and call the \score variable.
> 
> HTH
> Federico
> 
> 



Re: lilybin

2020-05-04 Thread Valentin Villenave
On 5/3/20, Kevin Barry  wrote:
> I was able to find the broken link in our unstable documentation
> version. It looks like it's a bug arising from a switch to https (this
> link was probably changed unintentionally).

Indeed. Thanks Stefan, I’ve just pushed a fix and it should appear on
the next website update!

Cheers,
V.



Re: 2.21.1 change of behavior of \compressMMRests?

2020-05-04 Thread Valentin Villenave
On 5/3/20, Paul Scott  wrote:
> Out of simple curiosity what is the purpose of the \compressMMRests { }
> structure rather than the \set or \override action I would think of?
> I'm guessing \compressMMRests does \set \unset or \override \revert pairs.

As you can see if you open the music-functions-init.ly file in your
LilyPond installation, it’s a fairly simple music function that relies
on the skipBars property:
https://git.savannah.gnu.org/cgit/lilypond.git/tree/ly/music-functions-init.ly#n313
As does compressEmptyMeasures, formerly compressFullBarRests -- but
these are just a mere override:
https://git.savannah.gnu.org/cgit/lilypond.git/tree/ly/property-init.ly#n168

Now, your question is exactly why I felt the need to add a whole new
subsection to the Notation Reference:
http://lilypond.org/doc/v2.21/Documentation/notation/writing-parts#compressing-empty-measures
I hope this can answer your question (as well as the rationale behind
the renaming of FullbarRests into EmptyMeasures); please do tell us if
that seems unclear to you or if you have some suggestions to improve
that part of the documentation.

Cheers,
-- V.