Re: Whiteout staff lines behind beams

2022-12-20 Thread Werner LEMBERG

> When a beam group (especially 1/16 or shorter) crosses a staff line, it can
> create some annoying skinny triangles that can be visually
> distracting.  [...]
>
> Is there a way to turn the stencil into a composite of the original
> with a big block of whiteout that follows the entire group's outer
> skyline so it hides the staff lines? Would be a nice feature, IMO.
> I know the stems can be "frenched", but would be cool if the staff
> lines could be instead.

I think this is the wrong approach.  In classical typsetting, it
wasn't common to remove already engraved staff lines, and the engraver
always started with drawing the staff lines.

What's needed IMHO is an improved algorithm to better quantize
vertical start and end positions of beams so that the number of
grazing intersections is reduced and/or optimized.

But maybe I'm wrong, and the approach you suggest produces more
legible scores – at the cost of maybe a somewhat strange, non-standard
look.

BTW, do you know whether the feature you suggest is available in other
score writing programs?


Werner


Re: extension fingerings, key sigs

2022-12-20 Thread Matthew Pierce
Excellent, thank you.  Your suggested \markup syntax got me close enough for a 
final fingering tweak, as follows:

d4^\markup{\finger " 1  x2"} e fis-4 g-0 etc.

I suspected separate score blocks might be the best way out. Off to try that 
next!

-Matt





From: William Rehwinkel
Sent: Tuesday, December 20, 2022 7:28 PM
To: Matthew Pierce; lilypond-user@gnu.org
Subject: Re: extension fingerings, key sigs


Dear Matt,


This snippet should answer both of your questions, let me know if you have any 
other questions about this.


Depending on exactly what you were intending to do, you may want to consider 
putting each exercise in a separate score block, like shown in the example. 
This avoids all problems with setting new time signatures showing on the 
previous lines, and will show you the time signature at the beginning of the 
line even if it is the same. The second score block shows how you can disable 
the time signature showing at the end of the line if you change it on the next 
system. The first score block shows you how you can type any text in the font 
style used for fingering indications.


Thanks,

-will

%--

\version "2.24.0"

\paper {
indent=0
ragged-right=##f
}


%first line
\score {
\relative c' {
c8-\markup{\finger "1x2 4"} d e f g a b c
}
}

%second line
\score {
\relative c' {
\override Score.TimeSignature.break-visibility = #begin-of-line-visible
c8 d e f g a b c \break \time 3/4 c8 d e f g a
}
}
%copy-paste as needed

\layout{}


%--


On 12/20/22 20:02, Matthew Pierce wrote:
I am writing a scale page for my cello students. Since each line is a new 
scale, each line has a new key signature.

Two basic questions:

How do I keep the new key signature from also appearing at the end of the 
previous line?

Also, how can I write { 1 x 2 4 } in the fingering font, adding an "x" between 
the notes to signify the extension between "1" and "2"?

I am using version 22.2.2.

Thank you all,
Matt
--
William Rehwinkel


Re: extension fingerings, key sigs

2022-12-20 Thread William Rehwinkel

Dear Matt,


This snippet should answer both of your questions, let me know if you 
have any other questions about this.



Depending on exactly what you were intending to do, you may want to 
consider putting each exercise in a separate score block, like shown in 
the example. This avoids all problems with setting new time signatures 
showing on the previous lines, and will show you the time signature at 
the beginning of the line even if it is the same. The second score block 
shows how you can disable the time signature showing at the end of the 
line if you change it on the next system. The first score block shows 
you how you can type any text in the font style used for fingering 
indications.



Thanks,

-will

%--

\version "2.24.0"

\paper {
    indent=0
    ragged-right=##f
}


%first line
\score {
    \relative c' {
    c8-\markup{\finger "1x2 4"} d e f g a b c
    }
}

%second line
\score {
    \relative c' {
    \override Score.TimeSignature.break-visibility = 
#begin-of-line-visible

    c8 d e f g a b c \break \time 3/4 c8 d e f g a
    }
}
%copy-paste as needed

\layout{}

%--


On 12/20/22 20:02, Matthew Pierce wrote:
I am writing a scale page for my cello students. Since each line is a 
new scale, each line has a new key signature.


Two basic questions:

How do I keep the new key signature from also appearing at the end of 
the previous line?


Also, how can I write { 1 x 2 4 } in the fingering font, adding an "x" 
between the notes to signify the extension between "1" and "2"?


I am using version 22.2.2.

Thank you all,
Matt

--
William Rehwinkel


OpenPGP_signature
Description: OpenPGP digital signature


extension fingerings, key sigs

2022-12-20 Thread Matthew Pierce
I am writing a scale page for my cello students. Since each line is a new 
scale, each line has a new key signature.

Two basic questions:

How do I keep the new key signature from also appearing at the end of the 
previous line?

Also, how can I write { 1 x 2 4 } in the fingering font, adding an "x" between 
the notes to signify the extension between "1" and "2"?

I am using version 22.2.2.

Thank you all,
Matt


Whiteout staff lines behind beams

2022-12-20 Thread Abraham Lee
All,

When a beam group (especially 1/16 or shorter) crosses a staff line, it can
create some annoying skinny triangles that can be visually distracting.

Here's what I mean:

https://notat.io/download/file.php?id=3646

And here's an example of what the solution might look like:

https://notat.io/download/file.php?id=3641

Here's the snippet to reproduce it:

%<

\version "2.24"
\language "english"

\relative {
  \clef bass
  \time 4/4
  f8 g16 a b c df e f e df c b a g f |
  e8 f16 g a b c df e df c b a g f e |
}

%<

Is there a way to turn the stencil into a composite of the original with a
big block of whiteout that follows the entire group's outer skyline so it
hides the staff lines? Would be a nice feature, IMO. I know the stems can
be "frenched", but would be cool if the staff lines could be instead.

Best,
Abraham


Re: Difficulty running convert-ly under Linux/Ubuntu

2022-12-20 Thread Ralph Palmer
On Mon, Dec 19, 2022 at 8:21 PM Michael Werner  wrote:

> I'm also on Ubuntu here (well, to be a bit more precise I'm using the
> KUbuntu distro, but should be close enough). I tried your command and had
> it fail. But, when I altered it just a bit it worked. All I had to do was
> specify the full path to the convert.ly file, like this:
> find . -name '*.ly' -exec
> /home/michael/lilypond/lilypond-2.24.0/bin/convert-ly -e '{}' \;
> Maybe give that a shot and see what happens.
>
> Michael
>
> On Mon, Dec 19, 2022 at 9:53 PM Ralph Palmer 
> wrote:
>
>> Greetings -
>>
>> Jean Abou Samra kindly pointed me in the right direction for the
>> installation of 2.24.0 in Linux with Frescobaldi.
>>
>> I was successful. Then I tried running convert-ly for all my .ly files,
>> using
>>
>> find . -name '*.ly' -exec convert-ly -e '{}' \;
>>
>> on the command line. That was unsuccessful.
>>
>> I also tried
>>
>> convert-ly -e $(find . -name '*.ly' -print)
>>
>> but both of those commands were unsuccessful. In both cases, I got the
>> message
>>
>> 6: exec: /home/rpalmer/lilypond/usr/bin/python3: not found
>>
>> even though Python 3.10 is in the LilyPond directory. Ah, but I don't see
>> my usr/bin directory. I'm still confused.
>>
>
Worked perfectly, Michael! Thanks so much for your help.

All the best,

Ralph

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


Count the number of notes

2022-12-20 Thread | || | |

I need to count the number of notes between to functions. For Example:

\new Staff{

 c4-- \startCount d8-> e8-> f8-> g8-> \stopCount

 #(display how-much-notes-selected)

}

This will be develop for more complex function that will change 
proportionally scale of every notehead in that kind of block, do the 
same as cresc. hairpins  but will act on every notehead instead of using 
spanner.



Cheers,

| || | |




Re: acciaccatura slur direction

2022-12-20 Thread David Kastrup
"Joel C. Salomon"  writes:

> What am I doing wrong here?
>
> ```
> \version "2.24.0"
> down = {
>   \clef bass
>   \slurUp
>   \acciaccatura g,8 d'2 % works
>   \acciaccatura d8 d'2 | % doesn't
> }
> \score {
>   \down
> }
> ```
>
> Adding `\slurUp` to a redefinition of `\startAcciaccaturaMusic` works,
> so why does the code above not work?

Acciaccature have their own built-in slur direction, so if you want to
override it, you need to do it within the acciaccatura:

\version "2.24.0"
down = {
  \clef bass
  \acciaccatura { \slurUp g,8 } d'2 % works
  \acciaccatura { \slurUp d8 } d'2 | % doesn't
}
\score {
  \down
}

That your first \slurUp works is sort of an accident: at the immediate
start of the Voice, the synchronisation mechanism that can distinguish

\slurUp \acciaccatura { ...

from

\acciaccatura { \slurUp ...

even though the event happens at the same point of musical time is not
yet set up, and instead a fallback mechanism that cannot make that
distinction takes over.

-- 
David Kastrup



Re: Modify flat flag appearance like beamed notes

2022-12-20 Thread Pierre Perol-Schneider
Le mar. 20 déc. 2022 à 11:09, Jean Abou Samra  a écrit :
...

> OK, here is another solution using an actual beam:
>
 ...
Very clever Jean! Thanks for the tip!!
Cheers,
Pierre


acciaccatura slur direction

2022-12-20 Thread Joel C. Salomon
What am I doing wrong here?

```
\version "2.24.0"
down = {
  \clef bass
  \slurUp
  \acciaccatura g,8 d'2 % works
  \acciaccatura d8 d'2 | % doesn't
}
\score {
  \down
}
```

Adding `\slurUp` to a redefinition of `\startAcciaccaturaMusic` works,
so why does the code above not work?

Adapted from the example in
:
```
startAcciaccaturaMusic = {
  <>(
  \override Flag.stroke-style = #"grace"
  \slurUp
}

stopAcciaccaturaMusic = {
  \revert Flag.stroke-style
  \slurNeutral
  <>)
}
```

-- Joel



Re: Problems with musicxml2ly

2022-12-20 Thread Jacques Menu
Well, well, it seems I’m getting too old to try and help other users, and that 
the only misleading thing is my environment being set to have ‘.mxl’ files 
opened by MuseScore...

Sorry for the (large) noise!

JM




Re: tremolo: 3/4 time, one dotted-half note chord, double-slash tremolo question

2022-12-20 Thread Jean Abou Samra

Le 20/12/2022 à 02:41, Kenneth Wolcott a écrit :

   I'm still do not understand the math (I'd like to generate a
formula!) for tremolos.



I also remained confused by this for a long time till I understood
that the rules are pretty simple. The thing to keep in mind is that
\repeat tremolo and : don't work the same.
The rules are:

- The appearance of the notes in a tremolo determines the
  total duration. (Even if there are two notes, they count
  for this duration once.)

- The beaming of the notes determines the duration of the
  notes in the fully developed form where you replace the
  tremolo notation with actual repeated notes, like
  \unfoldRepeats does.

- The number passed to \repeat tremolo is the number of
  times the pattern is repeated.

- In the syntax :, the
   is the total tremolo duration, and
   is the duration of one note in
  the developed form.


So your tremolo can be written as

\relative d' {
    \time 3/4
    d2.:16
}

as William suggested, or

\relative d' {
    \time 3/4
    \repeat tremolo 12 d16
}


since "duration of dotted half note / duration of sixteenth note = 12".

Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Re: Problems with musicxml2ly

2022-12-20 Thread Silvain Dupertuis

I tried this:

1. opening the file with MuseScore (3.6 portable) 2. reexporting in MusicXML format, 3, 
then importing the resulting file into Lilypond:


Now the import works, but there are still a certain number of errors in the Lilypond file 
when I try to process the file (warnings are in French). I do not have the time and did 
not try and correcting them...


AbsoluteDynamicEvent non attaché
Avertissement : liaison de prolongation non terminée (3×)

Avertissement : trait d'union sans suite ; escamoté

and the process stops with error code 6

Le 20.12.22 à 09:36, Jacques Menu a écrit :

Hello Mark,


Unfortunately I do not know any way to produce a small xml  that will give this 
error.
The file I wanted was "O holy night" by Adolphe Adam (translated into English) 
adapted
by P. Le Bas.
It came from this address:

https://www.cpdl.org/wiki/index.php/Minuit,_chr%C3%A9tiens_(O_Holy_Night)_(Adolphe_Charles_Adam)#In_English_translation.2C_.22O_Holy_Night.22


The legend on this page is misleading: the files that can be downloaded clicking on the 
supposedly MusicXML icon have a ‘.mxl’ suffix, i.e. they are MuseScore files in fact:




I know, it’s unfortunate that this suffix is so close to ‘.xml’…

The first page this gives in the recent MuseScore 4.0.0r is:




Exporting all the parts to MusicXML produces the attached O_Holy_Night.xml file. Note 
that MusicXML is a textual format, and one can open such files with any text editor:




Here again. a suffix point: historically, MusicXML has used ‘.xml’, which is marked as 
obsolete by MuseScore. An attempt to change that to ‘.musicxml’ doesn’t seem to have 
gained approval yet, though.


Converting O_Holy_Night.xml to LilyPond with:

*musicxml2ly (LilyPond) 2.23.82*

*Copyright (c) 2005--2022 by*

*    Han-Wen Nienhuys ,*

*    Jan Nieuwenhuizen  and*

*    Reinhold Kainhofer *

*    Patrick L. Schmidt *


produces the attached O_Holy_Night.ly, converted to the attached O_Holy_Night.pdf file 
by LilyPond.


HTH!

JM








--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org 

Re: Difficulty running convert-ly under Linux/Ubuntu

2022-12-20 Thread Jean Abou Samra

Le 20/12/2022 à 03:52, Ralph Palmer a écrit :

Greetings -

Jean Abou Samra kindly pointed me in the right direction for the 
installation of 2.24.0 in Linux with Frescobaldi.


I was successful. Then I tried running convert-ly for all my .ly 
files, using


find . -name '*.ly' -exec convert-ly -e '{}' \;

on the command line. That was unsuccessful.




In fact, speaking of 'installation' for this is a bit of a misnomer.
It's just unpacking the archive and running the binaries from there.
This is totally different from the 2.22 installation method, with the
.sh file that created commands available globally. Now, the 'installation'
process doesn't do anything at all to the system. If you want to
run convert-ly from the 2.24 binaries, run it with its full path,
as Michael suggested. Alternatively, Frescobaldi has a nice tool
for that, in Tools > Update with convert-ly.

You *can* also make 'convert-ly' available globally, by making a symlink
to its executable in a directory that is on your $PATH, typically ~/bin.
If you do that, you will be able to run convert-ly with 'convert-ly' in
a shell instead of '/path/to/lilypond-2.24.0/bin/convert-ly'.
Some have complained that this became less easy to do with the new
installation method. I personally view it as a big advantage, because
several installations never interfere, it's always clear what version
you are running, and it makes it clear in the head of the user that
there is no problem with having several versions of LilyPond 'installed'
(in fact just present on the computer!) in parallel.




I also tried

convert-ly -e $(find . -name '*.ly' -print)

but both of those commands were unsuccessful. In both cases, I got the 
message


6: exec: /home/rpalmer/lilypond/usr/bin/python3: not found

even though Python 3.10 is in the LilyPond directory. Ah, but I don't 
see my usr/bin directory. I'm still confused.





This one means you have an install of an older version around, and
it's broken somehow. Well, don't care; use the new one anyway.

Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Re: Problems with musicxml2ly

2022-12-20 Thread Paul Hodges

From:   Jacques Menu  





The legend on this page is misleading: the files that can be downloaded 
clicking on the supposedly MusicXML icon have a ‘.mxl’ suffix, i.e. they are 
MuseScore files in fact:

.mxl files are the standard compressed form of Music XML files; the Music XML 
file is compressed as a .zip file which is then renamed .mxl.









As to the original issue - my experience is that Music XML files always require 
a lot of processing to get acceptable output - I just treat them as a means of 
inputting notes, and remove all the extraneous formatting, and simplify and 
rewrite the score layout until it's correct.  Music XML is far from a 
satisfactory medium for transmitting formatted scores.


Sometimes I find it helps to read the Music XML into Dorico and write a new 
Music XML file from there; but in this case Dorico sees similar problems, with 
five staves for the organ, and also overlaid words in some places which 
LilyPond manages better.


Paul





Re: Modify flat flag appearance like beamed notes

2022-12-20 Thread Jean Abou Samra



Le 20/12/2022 à 10:53, Jean Abou Samra a écrit :

Le 20/12/2022 à 06:23, William Rehwinkel a écrit :

Dear list,

In the following tiny example, I override some variables to do with 
how beamed notes are rendered, and also configure to use the 
flat-flag stencil. I was wondering if it was possible to modify how 
the unbeamed flag stencil was rendered so that it would look 
identical to the lines rendered for beams? My apologies, wasn't able 
to find anything for this when looking at the flag reference.



In the source code, flat-flag is defined as (straight-flag 0.55 1.0 0 
1.0 0 1.0) here:
https://gitlab.com/lilypond/lilypond/-/blob/master/scm/flag-styles.scm#L125 



You can modify those parameters as well as Stem.length to your liking:



OK, here is another solution using an actual beam:

\version "2.24.0"
\relative g' {
    \override Flag.stencil = #flat-flag
    r8. \set stemLeftBeamCount = 0 g16[] g g g g
    \override Beam.beam-thickness = #0.6 \override Beam.length-fraction 
= #1.0

    r8. g16 g g g g
}


Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Re: Problems with musicxml2ly

2022-12-20 Thread m.tarensk...@kpnmail.nl
MusicXml files can have .xml .mxl or .musicxml filename extension.Musescore file format uses .mscz extension.Verzonden vanaf mijn Huawei mobiele telefoon Oorspronkelijk bericht Onderwerp: Re: Problems with musicxml2lyVan: Jean Abou Samra Aan: Jacques Menu ,mark damerell Cc: lilypond-user Le 20/12/2022 à 09:36, Jacques Menu a écrit :> Hello Mark,>>> Unfortunately I do not know any way to produce a small xml  that will >> give this error.>> The file I wanted was "O holy night" by Adolphe Adam (translated into >> English) adapted>> by P. Le Bas.>> It came from this address: https://www.cpdl.org/wiki/index.php/Minuit,_chr%C3%A9tiens_(O_Holy_Night)_(Adolphe_Charles_Adam)#In_English_translation.2C_.22O_Holy_Night.22>> The legend on this page is misleading: the files that can be > downloaded clicking on the supposedly MusicXML icon have a ‘.mxl’ > suffix, i.e. they are MuseScore files in fact:Are you sure? I think .mxl is the extension for MusicXML files compressed in a standard way. Seehttps://www.w3.org/2021/06/musicxml40/tutorial/compressed-mxl-files/So the issue smells like a musicxml2ly bug to me, but I didn't investigate much more.Best,Jean

Re: Modify flat flag appearance like beamed notes

2022-12-20 Thread Jean Abou Samra

Le 20/12/2022 à 06:23, William Rehwinkel a écrit :

Dear list,

In the following tiny example, I override some variables to do with 
how beamed notes are rendered, and also configure to use the flat-flag 
stencil. I was wondering if it was possible to modify how the unbeamed 
flag stencil was rendered so that it would look identical to the lines 
rendered for beams? My apologies, wasn't able to find anything for 
this when looking at the flag reference.



In the source code, flat-flag is defined as (straight-flag 0.55 1.0 0 
1.0 0 1.0) here:

https://gitlab.com/lilypond/lilypond/-/blob/master/scm/flag-styles.scm#L125

You can modify those parameters as well as Stem.length to your liking:

\version "2.24.0"

\relative g' {
    \override Flag.stencil = #(straight-flag 0.5 0.8 0 1.0 0 1.0)
    \override Stem.length = 6.1
    r8. g16 g g g g
    \override Beam.beam-thickness = #0.6 \override Beam.length-fraction 
= #1.0

    r8. g16 g g g g
}



Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature


Re: Problems with musicxml2ly

2022-12-20 Thread Silvain Dupertuis

I do not think the problem is with the msl format, which is an archive 
containing a xml file.
I tried on another mxl file directly and it worked. But it was actually a score coming 
from Lilypond.
In the case of Minuit, I tried extracting the xml file from the mxl file and using 
musicxml2ly on the mxl archive gives the same result (and the same errors)...



Le 20.12.22 à 09:36, Jacques Menu a écrit :

Hello Mark,


Unfortunately I do not know any way to produce a small xml  that will give this 
error.
The file I wanted was "O holy night" by Adolphe Adam (translated into English) 
adapted
by P. Le Bas.
It came from this address:

https://www.cpdl.org/wiki/index.php/Minuit,_chr%C3%A9tiens_(O_Holy_Night)_(Adolphe_Charles_Adam)#In_English_translation.2C_.22O_Holy_Night.22


The legend on this page is misleading: the files that can be downloaded clicking on the 
supposedly MusicXML icon have a ‘.mxl’ suffix, i.e. they are MuseScore files in fact:




I know, it’s unfortunate that this suffix is so close to ‘.xml’…

The first page this gives in the recent MuseScore 4.0.0r is:




Exporting all the parts to MusicXML produces the attached O_Holy_Night.xml file. Note 
that MusicXML is a textual format, and one can open such files with any text editor:




Here again. a suffix point: historically, MusicXML has used ‘.xml’, which is marked as 
obsolete by MuseScore. An attempt to change that to ‘.musicxml’ doesn’t seem to have 
gained approval yet, though.


Converting O_Holy_Night.xml to LilyPond with:

*musicxml2ly (LilyPond) 2.23.82*


*Copyright (c) 2005--2022 by*

*    Han-Wen Nienhuys ,*

*    Jan Nieuwenhuizen  and*

*    Reinhold Kainhofer *

*    Patrick L. Schmidt *


produces the attached O_Holy_Night.ly, converted to the attached O_Holy_Night.pdf file 
by LilyPond.


HTH!

JM









--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org 

Re: Problems with musicxml2ly

2022-12-20 Thread Jean Abou Samra



Le 20/12/2022 à 09:36, Jacques Menu a écrit :

Hello Mark,

Unfortunately I do not know any way to produce a small xml  that will 
give this error.
The file I wanted was "O holy night" by Adolphe Adam (translated into 
English) adapted

by P. Le Bas.
It came from this address:

https://www.cpdl.org/wiki/index.php/Minuit,_chr%C3%A9tiens_(O_Holy_Night)_(Adolphe_Charles_Adam)#In_English_translation.2C_.22O_Holy_Night.22


The legend on this page is misleading: the files that can be 
downloaded clicking on the supposedly MusicXML icon have a ‘.mxl’ 
suffix, i.e. they are MuseScore files in fact:



Are you sure? I think .mxl is the extension for MusicXML files 
compressed in a standard way. See


https://www.w3.org/2021/06/musicxml40/tutorial/compressed-mxl-files/

So the issue smells like a musicxml2ly bug to me, but I didn't 
investigate much more.


Best,
Jean



OpenPGP_signature
Description: OpenPGP digital signature