Re: N.C. No Chord poll

2023-05-20 Thread Jean Abou Samra
Le vendredi 19 mai 2023 à 22:35 -0400, David Olson a écrit :
> 
> 
> 
> the default setting for LilyPond chord engraving is: whenever there is a 
> rest, to display "N.C." 
> Iteration after iteration, this default setting has persisted in all the 
> versions of Lilypond I have ever used. 
> 
> Having always found this bizarre, I'm wondering now what other's think. 
> 
> 1. How many Lilyponders think that "N.C." is elegant?



Whether music notation is “elegant” is a personal opinion. Are beams or flags 
“elegant”? N.C. is standard, which is enough for LilyPond to do it by default.

N.C. is standard enough to be mentioned on Wikipedia

https://en.wikipedia.org/wiki/Chord_notation#Other_symbols

or, e.g., here:

https://www.studybass.com/lessons/reading-music/reading-chord-symbols/



> 2. How many guitar teachers instruct their students to keep strumming when 
> they see a rest?
> 
> 3. In what genres is it normative for guitars to continue strumming through 
> every rest? 
> 
> 4. If genres exist where it is normative for guitar players to strum 
> throughout a rest, in these genres is it also normative for the other 
> musicians to sustain or fiddle throughout a rest? 
> 
> 
> MORE SPECIFICALLY, the  page has a section:
> 
> Customizing the no-chord symbol
> By default, rests in a ChordNames context cause the “N.C.” symbol to be 
> printed. This markup can be customized. 
> 
> • Two options are given for customization: a bar over the rest, and the text 
> "Ssh!"
> 
> 5. Has anyone ever seen sheet music that uses the convention "Ssh!" over a 
> rest? 


This is a humoristic example, as Knute explained.


> 6. Has anyone ever seen sheet music that places a bar over the rest? 
> 
> 7. The decision with every LilyPond iteration not to allow a third option, 
> namely, normative blank over the rest, i.e. suppress the "N.C." gimmick -- 
> what are the reasons which LilyPond insiders
> have found so persuasive over the years?
> 
> 8. How many people feel that LilyPond is being clueless when it comes to 
> making "N.C." the default setting? 


Here you make assumptions about people, namely that LilyPond developers have 
deliberately restricted configurability, and these are simply untrue. Honestly, 
it would be wise to inform yourself more
before making statements such as calling LilyPond “clueless”.


> 9. How many people feel frustrated that the  page does not 
> contain any information, or links to information, on suppressing the "N.C." 
> symbol? 
> 
> NOTE THAT
> 
> 
> \set noChordSymbol = ""
> \set noChordSymbol = " "
> 
> still results in "N.C." being engraved. 



Over here, compiling

\version "2.24.1"

\chords {
\set noChordSymbol = ""
c1 r1
c1
}


results in



> Even in songs for children, I've never seen "Shh!" appear above a rest in the 
> chords line. Has anybody?
> 
> Why is this helpful? 
> 
> If the intention is not to be helpful, but cute, then it's an insult to 
> anyone who wants to suppress the "N.C."


Likewise, assuming an “insult” is unnecessary and simply wrong.


All the best,

Jean



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


Re: reducing gap between vertical volta lines

2023-05-20 Thread Jean Abou Samra
Le samedi 20 mai 2023 à 05:43 +, Werner LEMBERG a écrit :

As the attached image shows (Henle, Beethoven's violin sonatas
> vol. 1), the vertical lines of the volta repeat are very near, much
> nearer than what LilyPond produces by default.  What is the best way
> to achieve this layout?

Is `shorten-pair` enough for you?

```
\version "2.24.1"

\repeat volta 2 {
  c'1
  \alternative {
\volta 1 {
  \once \override Score.VoltaBracket.shorten-pair = #'(0 . -0.6)
  c'1
}
\volta 2 { c'1 }
  }
}
```






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


Re: reducing gap between vertical volta lines

2023-05-20 Thread Werner LEMBERG

>> As the attached image shows (Henle, Beethoven's violin sonatas
>> vol. 1), the vertical lines of the volta repeat are very near, much
>> nearer than what LilyPond produces by default.  What is the best
>> way to achieve this layout?
> 
> Is `shorten-pair` enough for you?
> 
> ```
> \version "2.24.1"
> 
> \repeat volta 2 {
>   c'1
>   \alternative {
> \volta 1 {
>   \once \override Score.VoltaBracket.shorten-pair = #'(0 . -0.6)
>   c'1
> }
> \volta 2 { c'1 }
>   }
> }
> ```

Thanks for your solution.  Unfortunately, it doesn't work globally: as
soon as the barline becomes wider, this offset must be adjusted anew,
see attached image for the following example.

```
\version "2.24.1"

\repeat volta 2 {
  c'1
  \alternative {
\volta 1 {
  \once \override Score.VoltaBracket.shorten-pair = #'(0 . -0.6)
  c'1
}
\volta 2 {
  \repeat volta 2 { c'1 }
}
  }
}
```

Perhaps a new property for `VoltaBracket` is needed, say,
`edge-distance`:

* If set to `#f`, position the right vertical line of the left volta
  bracket at the left side of the barline (which is the default
  behaviour right now).
* If set to a numeric value, it specifies the distance between the
  right vertical line of the left volta bracket to the left vertical
  line of the right volta bracket (the position of the latter is
  fixed).

Shall I open an issue?


Werner


Re: Defining variables mid-stream in a music expression using tags.

2023-05-20 Thread Valentin Petzel
Hello David,

> I do have a difference in the the output of the code below, which does
> not use \new Staff.
> 
> Without \textLengthOn, it makes two staves. With \textLenthOn, it
> combines the two music expressions into one stave. Why is that happening?

That is one of the many pitfalls with automatic defaultchild contexts. 
Basically a score will automatically create a Staff when it encounters a music 
expression without having a Staff. Now, doing an override in front does not 
require Lilypond to create a second staff in that case, which is why it then 
continues with a single staff.

Generally you should avoid using automatic context instantiation (at least on 
the Staff level. On the Voice level you’d generally have only one voice or be 
specific about it, so it is fine). You can see the same problem reduced to its 
essence by doing this:

<<
  { c }
  { c }
>>

<<
  { \override TextScript.stencil = ##f c }
  { \override TextScript.stencil = ##f c }
>>
 
> I like your "non-music function" examples. I see that your second and
> third example use primitive-eval. What does primitive-eval do and where
> could I read about it?

Uh, please don’t like it enough to actually use it for anything that is not 
extremely specific. In scheme language uses the same data structure as data. So
(function arg1 arg2 ...)
can be seen as the list
(list 'function arg1 arg2 ...)

This means we can interpret data as language and evaluate that language. This 
is what the scheme procedure eval does. But eval also takes an environment (so 
some sort of scoping context for this), while primitive-eval evaluates in the 
current environment (in fact eval simply changes the environment, evaluates, 
and changes back again).

For details checkout the guile docs for on-the-fly evaluation:

https://www.gnu.org/software/guile/manual/html_node/Fly-Evaluation.html

> The third example uses scheme code that is beyond my comprehension, at
> the moment. I do not understand how you declared the music expression
> with myCode = #'#{ ... #}.  I have not seen that construction before.

In Scheme we have the concept of quoting, which essentially tells scheme to 
only parse the expression, but not evaluate it. You might have already seen it 
abused as a fast way to create lists like '(a b c).

Now, what is important is that #{ ... #} is implemented in the parser, and 
will be replaces by a scheme call, which at evaluation time parses the 
content. You can see this by doing

#(display '#{ c d e #})

which should print something like

((@@ (lily) read-lily-expression-internal)  c d e  /tmp/frescobaldi-kuuoq7me/
tmpp2t5xmo3/document.ly 0 (list))

(here the c d e is not the symbols c, d and e, but the string " c d e " of 
what is between #{ and #}).
This is to be read as:

(@@ (lily) read-lily-expression-internal): get the binding read-lily-
expression-internal from the lily-module ([1])
([1] cdef [filename] 0 (list)): call that function with this string, (the other 
arguments are the file name, the line number, and an empty list of closures).

[By the way this teaches you how to access internal scheme functions not 
exported by Lilypond (if at any time you feel the need to be naughty). Use the 
syntax
(@@ (lily) symbol) to resolve the binding for symbol. This comes directly from 
guiles module system:
https://www.gnu.org/software/guile/manual/html_node/Using-Guile-Modules.html
Of course, using internal functions like that is not the best idea if you 
strife for stability, as these internal functions might change behaviour at 
any time, that is, Lilypond does not guarantee any sort of interface]

Now, the point is: Since #{ #} is converted to a scheme function call during 
parsing (before the scheme expression is evaluated) we can quote the resulting 
scheme expression by prefixing it with an '... or by calling (quote ...).

Essentially we see that Lilypond integrates guile so well that you can use 
very specific concepts of schmeme on very specific contexts of Lilypond.

To get some more details on quoting you might want to check out the point in 
Jean’s Extending-Lilypond manual:

https://extending-lilypond.gitlab.io/en/scheme/quoting.html

Cheers,
Valentin


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


clef and volta issues

2023-05-20 Thread Werner LEMBERG

Consider this example.

```
{
  c'1 |
  \repeat volta 2 {
c'1 \clef bass |
\alternative {
  \volta 1 {
c1 \clef treble |
  }
  \volta 2 {
\clef bass c |
  }
}
  }
}
```

There should be a change treble clef right before the repeat barline,
and there should also be a reminder bass clef right after the repeat
barline.  How can I achieve this?

Ideally, the volta engraver should be able to manage this
automatically (i.e., it should do what's written in the LilyPond
example code above), but I guess that this is a hard problem because
there are two clef change events at the same musical moment...

Such situations do actually happen in piano music.


Werner


Alternative Key on satb template

2023-05-20 Thread Fernando Gil
Dear list,

I’m trying to add the functionality of this snippet
https://lsr.di.unimi.it/LSR/Item?id=1075 to the satb.ly template bundled in
lilypond, but I am having trouble in finding the way to do so.

I tried adding the code snippet to the template, also directly into my
file, first attempt was to use \alternativeKey c f \major within the Key
variable of the template a second attempt was to declare a normal \key c
\major on the Key variable and then put the \alternativeKey c f \major at
the beginning of a voice variable such as SopranoMusic. Either way compiles
successfully but doesn’t show the alternative key.

I’m pretty sure I’m missing something but I’m unsure where to start. Hope
you can help.
Thanks in advance.

Fernando


MMWE.log
Description: Binary data


MMWE.ly
Description: Binary data


Re: Defining variables mid-stream in a music expression using tags.

2023-05-20 Thread dfro

Valentin,

Thank you, for the detailed explanation and the links.

 Jean's website-book is a wonderful resource.


Peace,

David





Fonts and Tempo

2023-05-20 Thread Greg Lindstrom
Good evening -

Let me start off by saying I'm loving working with lilypond to engrave
music. Well Done!!

Questions. How can I do this (an umlaut over the o??)

[image: image.png]

And on tempo markings (the "ca." after the equal sign. I could do it as all
text but wanted to know if there's a more "lilypond" way to do it).

[image: image.png]


And as long as I'm asking (and you're still reading). How about this (a
half note = a quarter note. I'd be happy to do it without the arrows --
which I think borders on silly -- but I'll give extra credit):

[image: image.png]

Thanks for any help you can provide. I have the Lilypond 2.12 Notation
Reference so if you even point me to the section to reference I'll work it
out.

Kind Regards,
--greg


Re: Fonts and Tempo

2023-05-20 Thread Andrew Bernard
For a start you would be well advised to upgrade to the latest stable 
version 2.24.1. 2.12 is positively ancient.


It will make it easier for people to help you for a start.

There is a script called convert-ly that can help with syntax changes if 
need be.


Andrew


On 21/05/2023 12:42 pm, Greg Lindstrom wrote:
Thanks for any help you can provide. I have the Lilypond 2.12 Notation 
Reference so if you even point me to the section to reference I'll 
work it out.




Re: Fonts and Tempo

2023-05-20 Thread Andrew Bernard
Just enter the character. Lilypond supports Unicode. Use whatever 
character map tool you like.


What platform are you on? PopChar is good on Windows.

Andrew


On 21/05/2023 12:42 pm, Greg Lindstrom wrote:

Questions. How can I do this (an umlaut over the o??)




Re: Fonts and Tempo

2023-05-20 Thread William Rehwinkel via LilyPond user discussion

Dear Greg,

For the umlaut, as long as you enter the character with umlaut into the 
file, it should work. for Example, on vim I type -K, then colon 
(:), then "o", and it enters ö.


For the second question, I found 
https://lsr.di.unimi.it/LSR/Snippet?id=1008 (also attached to this 
email) but it unfortunately requires a lot of copy-pasting. If you add 
"\version "2.21.2"" and then run convert-ly it looks like it still works 
on 2.25.4.


For the third I hacked together the following, which you can tinker with 
to your liking


% --
\version "2.25.4"

\relative c' {
  c4 d e f | \mark \markup \smaller {\super\combine \draw-line #'(2 . 
0) \arrow-head #X #LEFT ##t \rhythm {2 } = \rhythm { 4 } \super\combine 
\draw-line #'(-2 . 0) \arrow-head #X #RIGHT ##t} g4

}
% --

Thanks,
-William

On 5/20/23 22:42, Greg Lindstrom wrote:

Good evening -

Let me start off by saying I'm loving working with lilypond to engrave 
music. Well Done!!


Questions. How can I do this (an umlaut over the o??)

image.png

And on tempo markings (the "ca." after the equal sign. I could do it 
as all text but wanted to know if there's a more "lilypond" way to do it).


image.png


And as long as I'm asking (and you're still reading). How about this 
(a half note = a quarter note. I'd be happy to do it without the 
arrows -- which I think borders on silly -- but I'll give extra credit):


image.png

Thanks for any help you can provide. I have the Lilypond 2.12 Notation 
Reference so if you even point me to the section to reference I'll 
work it out.


Kind Regards,
--greg


--
+ --- +
|   William Rehwinkel - Oberlin College and   |
|  Conservatory '24   |
|will...@williamrehwinkel.net  |
| PGP key:|
|https://ftp.williamrehwinkel.net/pubkey.txt  |
+ --- +

%%
%  Metronome markup formatter, with more options than the Lilypond
%  default formatter, and changes in sizing (see below).
%  Properties read:
%  - tempoEquationText:text to be put between note and tempo value(s)
%  Default: "="
%  - tempoBetweenText: text to be put between the tempo values. Used
%  only in ranges of tempo values.
%  Default: "-"
%  - tempoHideParenthesis: boolean. If true, the parenthesis are hide.
%  Default: false.
%  - tempoNumberColor: color. If set, the tempo value will be formatted
%  to this color.
%  Default: not set.
%  The size of the text ("Allegro" etc) is a bit larger than Lilypond default.
%  Similarly, the size of the note is smaller than Lilypond default.
%
%  To use this snippet, just \include this file. To revert default
%  Lilypond formatter inside the score:
%  \set Score.metronomeMarkFormatter = #format-metronome-markup
%
%  tested: Version "2.21.2"
%
%  This snippet is based on a snippet by Arnold Theresius. The original
%  snippet create a formatter called  "format-metronome-markup-approx",
%  and the default value to tempoEquationText in that snippet is "≈".
%  I changed back this default to Lilypond default, and added the
%  tempoBetweenText property.
%
%  Original header of the Theresius snippet:
%% http://lsr.di.unimi.it/LSR/Item?id=869

%by: ArnoldTheresius

%tested: Version "2.21.2"


% lilypond 2.14.x:
% Almost copied from .../scm/translation-functions.scm:
% --> added »-approx« to the function names of
% »format-metronome-markup« and »metronome-markup«
% --> replaced "=" with "≈" (approx. instead of equal)

#(define-public (format-metronome-markup-custom event context)
  (let ((eq-sym-def (ly:context-property context 'tempoEquationText))   
  ; added option
(bet-sym-def (ly:context-property context 'tempoBetweenText))   
  ; added option
(hide-paren (eq? #t (ly:context-property context 
'tempoHideParenthesis))) ; added option
(num-color (ly:context-property context 'tempoNumberColor #f))  
  ; added option
(hide-note (ly:context-property context 'tempoHideNote #f))
(text (ly:event-property event 'text))
(dur (ly:event-property event 'tempo-unit))
(count (ly:event-property event 'metronome-count)))

(metronome-markup-custom text dur count hide-note eq-sym-def bet-sym-def 
hide-paren num-color)))

#(define-public (metronome-markup-custom text dur count hide-note eq-sym-def 
bet-sym-def hide-paren col)
  (let* ((note-mark (if (and (not hide-note) (ly:duration? dur))
(make-teeny-markup; note 
smaller than Lilypond default
 (make-note-by-number-markup (ly:duration-log dur)
 (ly:duration-dot-count dur)
 1))
#f))

Re: Fonts and Tempo

2023-05-20 Thread William Rehwinkel via LilyPond user discussion
My apologies for double-posting...after writing I looked some more and 
found that you can use *\char ##x* to enter unicode characters in a 
markup block as in here 
https://lilypond.org/doc/v2.25/Documentation/notation/unicode


On 5/20/23 23:24, William Rehwinkel via LilyPond user discussion wrote:

Dear Greg,

For the umlaut, as long as you enter the character with umlaut into 
the file, it should work. for Example, on vim I type -K, then 
colon (:), then "o", and it enters ö.


For the second question, I found 
https://lsr.di.unimi.it/LSR/Snippet?id=1008 (also attached to this 
email) but it unfortunately requires a lot of copy-pasting. If you add 
"\version "2.21.2"" and then run convert-ly it looks like it still 
works on 2.25.4.


For the third I hacked together the following, which you can tinker 
with to your liking


% --
\version "2.25.4"

\relative c' {
  c4 d e f | \mark \markup \smaller {\super\combine \draw-line #'(2 . 
0) \arrow-head #X #LEFT ##t \rhythm {2 } = \rhythm { 4 } 
\super\combine \draw-line #'(-2 . 0) \arrow-head #X #RIGHT ##t} g4

}
% --

Thanks,
-William

On 5/20/23 22:42, Greg Lindstrom wrote:

Good evening -

Let me start off by saying I'm loving working with lilypond to 
engrave music. Well Done!!


Questions. How can I do this (an umlaut over the o??)

image.png

And on tempo markings (the "ca." after the equal sign. I could do it 
as all text but wanted to know if there's a more "lilypond" way to do 
it).


image.png


And as long as I'm asking (and you're still reading). How about this 
(a half note = a quarter note. I'd be happy to do it without the 
arrows -- which I think borders on silly -- but I'll give extra credit):


image.png

Thanks for any help you can provide. I have the Lilypond 2.12 
Notation Reference so if you even point me to the section to 
reference I'll work it out.


Kind Regards,
--greg


--
+ --- +
|   William Rehwinkel - Oberlin College and   |
|  Conservatory '24   |
|will...@williamrehwinkel.net  |
| PGP key:|
|https://ftp.williamrehwinkel.net/pubkey.txt  |
+ --- +


--
+ --- +
|   William Rehwinkel - Oberlin College and   |
|  Conservatory '24   |
|will...@williamrehwinkel.net  |
| PGP key:|
|https://ftp.williamrehwinkel.net/pubkey.txt  |
+ --- +



OpenPGP_signature
Description: OpenPGP digital signature