Re: Version 2.22.1 problem

2021-11-21 Thread Helge Kruse

On 21.11.2021 18:52, Leonid Hrabovsky wrote:

Ok, I will check. My Windows version is 8. The errors are:

"Error opening file for writing:

C:\Program Files (x86)\LilyPond\usr\ bin\libexpat-1.dll

Ther is a space in front of the "bin" in the directory name. That's
strange. If this is not a typo in the mail but an actually present part
of the path, it could be a problem.

Regards,
Helge



Re: Version 2.22.1 problem

2021-11-21 Thread Brian Barker

At 15:32 21/11/2021 -0500, Leonid Hrabovsky wrote:

Unfortunately, Run as an administrator option ...


It's not necessarily sufficient to "run as *an* administrator", as 
you put it: you need to use "Run as administrator".



... doesn't help to install - the .dlls are missing


I've still not seen the evidence that these files are "missing".

You may have permissions problems in the relevant folder. You may 
need local help to diagnose this. Remember that Lilypond does install 
seamlessly for others.


Brian Barker 





Re: lyrics and melismas

2021-11-21 Thread Kees van den Doel
Darn, of course I find it in the docs as soon as I ask:

melisma

\melismaEnd


On Sun, Nov 21, 2021 at 9:59 PM Kees van den Doel  wrote:

> I'd like to indicate long melismas in the notes instead of counting - - -
> in the lyrics, but I don't want a gigantic slur showing.
> Is there an alternative to using () slur marks to do this?
> Thanks,
> Kees
>
>


lyrics and melismas

2021-11-21 Thread Kees van den Doel
I'd like to indicate long melismas in the notes instead of counting - - -
in the lyrics, but I don't want a gigantic slur showing.
Is there an alternative to using () slur marks to do this?
Thanks,
Kees


Re: print log content to a pdf

2021-11-21 Thread David Wright
On Sun 21 Nov 2021 at 16:01:43 (-0500), ming tsang wrote:

> The following lilypond code
> 
> #(ly:font-config-display-fonts)
> 
> generate a log output.
> 
> Is it possible to generate a pdf by lilypond?

$ lilypond your-fontname-generator-code.ly > fontslist
$ edit fontslist (because there's other stuff in the file)
$ paps fontslist --header | ps2pdf - fontslist.pdf

AFAICT LP typesets /music/ into PDF files, but not its log output.

Cheers,
David.



Dotted \markup \note - tweaking the dot position

2021-11-21 Thread Adam M. Griggs
Hello again,

I'm working with version 2.23.4.

Looking at the documentation for \note and \note-by-number
(https://lilypond.org/doc/v2.23/Documentation/notation/music), it
lists style, flag-style and font-size as overridable if I'm reading it
correctly.

In a dotted \markup \note, a dotted minim for example, is it possible
for me to vertically shift the dot?



ANN: Pygments support for LilyPond

2021-11-21 Thread Jean Abou Samra

Pygments, a syntax highlighter written in Python,
just received support for LilyPond. This means that,
using the latest version of Pygments, you can get
highlighted LilyPond source in LaTeX documents,
Sphinx documentation, Wordpress sites, the output
of various other tools, and any format you like.
(It's also used on Wikipedia, but we'll have to
wait until a release.) To get the latest Pygments,
the short story is

python3 -m pip install --user 
https://github.com/pygments/pygments/archive/master.zip


The long story is that you should start by installing
Python. On most GNU/Linux systems, it comes out of the
box or in package managers. On macOS or Windows, download
it from https://www.python.org/downloads/. Then, you need
pip to install packages. If you don't have pip yet, do
'sudo apt install python3-pip' on Debian/Ubuntu, or
'python3 -m ensurepip --user' pretty much anywhere. Finally,
run the command above to let pip install Pygments.

Importantly, you must use the 'lilypond' style. Other styles
(such as the default one) will not produce good-looking
output because they don't know about LilyPond's concepts
(grobs, engravers, etc.).

To use with Sphinx, add to your conf.py:

highlight_language = "lilypond"
pygments_style = "lilypond"


Here is an example of how to use it in LaTeX with the
minted package:


\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{minted}
\usemintedstyle{lilypond}

\begin{document}

\begin{minted}{lilypond}
\version "2.23.4"

\header {
  title = \markup \bold "Yes!"
}

\relative { c' }
\addlyrics { Oh! }
\end{minted}
\end{document}


Please report any issues at
https://github.com/pygments/pygments/issues
and mention me (@Jean-Abou-Samra).

Thanks go to Matthaüs G. Chajdas, one of the two Pygments
maintainers, for reviewing the code, and to Dan Eble and
Jonas Hahnfeld for their feedback.



print log content to a pdf

2021-11-21 Thread ming tsang
Dear lilyponders,
The following lilypond code

#(ly:font-config-display-fonts)

generate a log output.

Is it possible to generate a pdf by lilypond?

Shalom,
yMing.


-- 
ming (lyndon) tsang


Re: Version 2.22.1 problem

2021-11-21 Thread Anders Eriksson
One thing that I do that might help is NOT letting Lilypond install 
under Program files (x86), whichis default. I always change this to 
C:\Lilypond-version

e.g.
C:\lilypond-2-22-1

Windows has special security rules for the Program files (86) directory. 
Which teoretically would be satisfied by running as Administrator, but I 
had problems so I installed in the root instead...


// Anders
PS! I looks like there is a space before bin in the path...


On 2021-11-21 18:52, Leonid Hrabovsky wrote:

Ok, I will check. My Windows version is 8. The errors are:

"Error opening file for writing:

C:\Program Files (x86)\LilyPond\usr\ bin\libexpat-1.dll

Click Abort to stop the installation,
Retry to try again, or
Ignore to skip this file."

"Error opening file for writing:

C:\Program Files (x86)\LilyPond\usr\ bin\libffi-6.dll

Click Abort to stop the installation,
Retry to try again, or
Ignore to skip this file."

/*Lеонід - Leonid*/


On Sun, Nov 21, 2021 at 12:37 PM Jean Abou Samra  
wrote:


Le 21/11/2021 à 18:33, Leonid Hrabovsky a écrit :
> Hi colleagues, - who of you, if anybody, uses Windows version
2.22.1 ?
> There are two .dll missing and install fails so far.


I run Ubuntu and cannot test anything either. Could you paste
the precise error message though? That could give a clue.
Also, what is your version of Windows?

Best,
Jean



Re: Version 2.22.1 problem

2021-11-21 Thread Leonid Hrabovsky
Unfortunately, Run as an administrator option doesn't help to install - the
.dlls are missing


*Леонід - Leonid*


On Sun, Nov 21, 2021 at 3:21 PM Leonid Hrabovsky 
wrote:

> Thanks Brian, I will immediately try this.
>
>
> *Леонід - Leonid*
>
>
> On Sun, Nov 21, 2021 at 1:21 PM Brian Barker 
> wrote:
>
>> At 12:33 21/11/2021 -0500, Leonid Hrabovsky wrote:
>> >... Windows version 2.22.1 ? There are two .dll missing and install
>> >fails so far.
>>
>> At 12:52 21/11/2021 -0500, Leonid Hrabovsky wrote:
>> >My Windows version is 8.
>>
>> (Out of support for five years or more.)
>>
>> >The errors are:
>> >
>> >"Error opening file for writing:
>> >C:\Program Files (x86)\LilyPond\usr\ bin\libexpat-1.dll
>> >Click Abort to stop the installation,
>> >Retry to try again, or
>> >Ignore to skip this file."
>> >
>> >"Error opening file for writing:
>> >C:\Program Files (x86)\LilyPond\usr\ bin\libffi-6.dll
>> >Click Abort to stop the installation,
>> >Retry to try again, or
>> >Ignore to skip this file."
>>
>> There is nothing here about the files being missing - only
>> insufficient permission to write to them. Did you install with
>> administrator permission? Right-click the installation file and
>> choose "Run as administrator". That's how you install programs under
>> Windows.
>>
>> Brian Barker
>>
>>
>>


Re: Check if a font is currently installed

2021-11-21 Thread Valentin Petzel
Hello Paolo,

After looking into this it seems like this is intended behaviour for font-
config. Basically this does not perform an exact match, but calculates some 
distance and returns the font with best distance. Maybe it would be somehow 
possible to get that distance and decide upon it?

Cheers,
Valentin

Am Sonntag, 21. November 2021, 21:06:15 CET schrieb Paolo Prete:
> Thank you Valentin, a fix for this would be very useful.
> Best,
> Paolo
> 
> On Sun, Nov 21, 2021 at 8:52 PM Valentin Petzel  wrote:
> > Hello Paolo,
> > 
> > Theoretically it should be enough to check if
> > #(ly:font-config-get-font-file
> > font-name) is false, but at least on my system this returns just some
> > arbitrary but fixed font file if the font is not found. It should
> > definitely
> > not behave this way, gotta look into this.
> > 
> > Cheers,
> > Valentin

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


Re: Version 2.22.1 problem

2021-11-21 Thread Leonid Hrabovsky
Thanks Brian, I will immediately try this.


*Леонід - Leonid*


On Sun, Nov 21, 2021 at 1:21 PM Brian Barker 
wrote:

> At 12:33 21/11/2021 -0500, Leonid Hrabovsky wrote:
> >... Windows version 2.22.1 ? There are two .dll missing and install
> >fails so far.
>
> At 12:52 21/11/2021 -0500, Leonid Hrabovsky wrote:
> >My Windows version is 8.
>
> (Out of support for five years or more.)
>
> >The errors are:
> >
> >"Error opening file for writing:
> >C:\Program Files (x86)\LilyPond\usr\ bin\libexpat-1.dll
> >Click Abort to stop the installation,
> >Retry to try again, or
> >Ignore to skip this file."
> >
> >"Error opening file for writing:
> >C:\Program Files (x86)\LilyPond\usr\ bin\libffi-6.dll
> >Click Abort to stop the installation,
> >Retry to try again, or
> >Ignore to skip this file."
>
> There is nothing here about the files being missing - only
> insufficient permission to write to them. Did you install with
> administrator permission? Right-click the installation file and
> choose "Run as administrator". That's how you install programs under
> Windows.
>
> Brian Barker
>
>
>


Re: Check if a font is currently installed

2021-11-21 Thread Paolo Prete
Thank you Valentin, a fix for this would be very useful.
Best,
Paolo

On Sun, Nov 21, 2021 at 8:52 PM Valentin Petzel  wrote:

> Hello Paolo,
>
> Theoretically it should be enough to check if
> #(ly:font-config-get-font-file
> font-name) is false, but at least on my system this returns just some
> arbitrary but fixed font file if the font is not found. It should
> definitely
> not behave this way, gotta look into this.
>
> Cheers,
> Valentin
>
>


Re: Check if a font is currently installed

2021-11-21 Thread Valentin Petzel
Hello Paolo,

Theoretically it should be enough to check if #(ly:font-config-get-font-file 
font-name) is false, but at least on my system this returns just some 
arbitrary but fixed font file if the font is not found. It should definitely 
not behave this way, gotta look into this.

Cheers,
Valentin

Am Sonntag, 21. November 2021, 19:12:33 CET schrieb Paolo Prete:
> Sorry, it doesn't help.
> It just shows a long list of the available fonts.
> Not what I was searching for...
> Best,
> P
> 
> On Sun, Nov 21, 2021 at 6:37 PM David Wright 
> 
> wrote:
> > On Sun 21 Nov 2021 at 17:29:37 (+0100), Paolo Prete wrote:
> > > it would be useful to have a functions that checks if a font with a
> > > specific font-name is currently installed, so to have the produced score
> > > without visual errors that are not always easy to detect.
> > 
> > Would the list produced by this snippet help? I can't help you
> > parse the output as I'm not a scheme programmer.
> > 
> > > I searched a bit in the list of the scheme helper functions, and could
> > 
> > find
> > 
> > > only:
> > > 
> > > ly:font-config-get-font-file font-name
> > > 
> > > However, in case the file is not found, it defaults to some font that (I
> > > suppose) is OS dependent, then I don't know  how to check if the
> > > searched
> > > font is really installed. Any idea about this?
> > 
> > Cheers,
> > David.

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


Re: Check if a font is currently installed

2021-11-21 Thread Paolo Prete
What I mean is that a font-name attribute can be in the form:

"Bitstream Vera Sans, sans-serif, Oblique Bold"

If you want to check that the font-name is accepted, you have to inspect
the output of the list and then see if it can be a valid combination of
font + style attributes
(see:
http://lilypond.org/doc/v2.21/Documentation/notation/fonts#single-entry-fonts
)

This is not what I was searching for. I would like to automatize this
check, so to prevent LilyPond to compile the score (or raise a warning) if
the font is not found, with a function like:

\checkFont "Bitstream Vera Sans, sans-serif, Oblique Bold"

 (ly:font-config-get-font-file font-name) appears the only scheme function
candidate for this, but unfortunately it defaults to some system font when
the wanted font-name does not correspond to any file.

Best,
P



On Sun, Nov 21, 2021 at 7:38 PM David Wright 
wrote:

> On Sun 21 Nov 2021 at 19:12:33 (+0100), Paolo Prete wrote:
> > On Sun, Nov 21, 2021 at 6:37 PM David Wright wrote:
> > > On Sun 21 Nov 2021 at 17:29:37 (+0100), Paolo Prete wrote:
> > > >
> > > > it would be useful to have a functions that checks if a font with a
> > > > specific font-name is currently installed, so to have the produced
> score
> > > > without visual errors that are not always easy to detect.
> > >
> > > Would the list produced by this snippet help? I can't help you
> > > parse the output as I'm not a scheme programmer.
> > >
> > > > I searched a bit in the list of the scheme helper functions, and
> could
> > > find only:
> > > >
> > > > ly:font-config-get-font-file font-name
> > > >
> > > > However, in case the file is not found, it defaults to some font
> that (I
> > > > suppose) is OS dependent, then I don't know  how to check if the
> searched
> > > > font is really installed. Any idea about this?
> > >
> > Sorry, it doesn't help.
> > It just shows a long list of the available fonts.
> > Not what I was searching for...
>
> Does that mean that your 'specific font-name' would not appear in
> that long list of available fonts, or that if it appeared, that still
> wouldn't be a sufficient indication that what you wanted from that
> font was actually available, ie some attribute might not be present.
>
> Cheers,
> David.
>


Re: Check if a font is currently installed

2021-11-21 Thread David Wright
On Sun 21 Nov 2021 at 19:12:33 (+0100), Paolo Prete wrote:
> On Sun, Nov 21, 2021 at 6:37 PM David Wright wrote:
> > On Sun 21 Nov 2021 at 17:29:37 (+0100), Paolo Prete wrote:
> > >
> > > it would be useful to have a functions that checks if a font with a
> > > specific font-name is currently installed, so to have the produced score
> > > without visual errors that are not always easy to detect.
> >
> > Would the list produced by this snippet help? I can't help you
> > parse the output as I'm not a scheme programmer.
> >
> > > I searched a bit in the list of the scheme helper functions, and could
> > find only:
> > >
> > > ly:font-config-get-font-file font-name
> > >
> > > However, in case the file is not found, it defaults to some font that (I
> > > suppose) is OS dependent, then I don't know  how to check if the searched
> > > font is really installed. Any idea about this?
> >
> Sorry, it doesn't help.
> It just shows a long list of the available fonts.
> Not what I was searching for...

Does that mean that your 'specific font-name' would not appear in
that long list of available fonts, or that if it appeared, that still
wouldn't be a sufficient indication that what you wanted from that
font was actually available, ie some attribute might not be present.

Cheers,
David.



Re: Version 2.22.1 problem

2021-11-21 Thread Brian Barker

At 12:33 21/11/2021 -0500, Leonid Hrabovsky wrote:
... Windows version 2.22.1 ? There are two .dll missing and install 
fails so far.


At 12:52 21/11/2021 -0500, Leonid Hrabovsky wrote:

My Windows version is 8.


(Out of support for five years or more.)


The errors are:

"Error opening file for writing:
C:\Program Files (x86)\LilyPond\usr\ bin\libexpat-1.dll
Click Abort to stop the installation,
Retry to try again, or
Ignore to skip this file."

"Error opening file for writing:
C:\Program Files (x86)\LilyPond\usr\ bin\libffi-6.dll
Click Abort to stop the installation,
Retry to try again, or
Ignore to skip this file."


There is nothing here about the files being missing - only 
insufficient permission to write to them. Did you install with 
administrator permission? Right-click the installation file and 
choose "Run as administrator". That's how you install programs under Windows.


Brian Barker  





Re: Version 2.22.1 problem

2021-11-21 Thread Leonid Hrabovsky
Unfortunately disabling Avast didn't help this time - these two .dlls are
missing and install stops...


*Леонід - Leonid*


On Sun, Nov 21, 2021 at 12:56 PM Leonid Hrabovsky 
wrote:

> Thank you, Anders, for that suggestion! I could guess it myself, - in the
> past, it happened several times that just my anti-virus Avast prevented
> some .dlls from downloading! Going to disable Avast for these minutes
> needed...
>
> Best,
>
>
> *Леонід - Leonid*
>
>
> On Sun, Nov 21, 2021 at 12:50 PM Anders Eriksson 
> wrote:
>
>> I also have 2.22.1 installed and working
>>
>> I would look at the ant-virus software and if it blocks the dll's
>>
>> // Anders
>>
>> On 2021-11-21 18:46, Hans Aikema wrote:
>>
>> I just installed it in my window (32 bit, Windows 10) without any issue.
>> So must be something specific to your environment that makes it break.
>>
>> There’s no DLL missing in the installer, at least not for my install.
>>
>>
>> On 21 Nov 2021, at 18:33, Leonid Hrabovsky  wrote:
>>
>> Hi colleagues, - who of you, if anybody, uses Windows version 2.22.1 ?
>> There are two .dll missing and install fails so far.
>>
>>
>> *Леонід - Leonid *
>>
>>
>> On Sun, Nov 21, 2021 at 12:10 PM Thomas Morley 
>> wrote:
>>
>>> Am So., 21. Nov. 2021 um 17:15 Uhr schrieb Leonid Hrabovsky
>>> :
>>> >
>>> > Thomas and colleagues,
>>> > my attempt to download new version for Windows failed - two .dll files
>>> missing (nrs. 1 & 6) and the install cannot continue. Your advices?
>>> >
>>> > Леонід - Leonid
>>>
>>> No clue, I'm on Linux
>>>
>>> Cheers,
>>>   Harm
>>>
>>
>>
>>


Re: Check if a font is currently installed

2021-11-21 Thread Paolo Prete
Sorry, it doesn't help.
It just shows a long list of the available fonts.
Not what I was searching for...
Best,
P

On Sun, Nov 21, 2021 at 6:37 PM David Wright 
wrote:

> On Sun 21 Nov 2021 at 17:29:37 (+0100), Paolo Prete wrote:
> >
> > it would be useful to have a functions that checks if a font with a
> > specific font-name is currently installed, so to have the produced score
> > without visual errors that are not always easy to detect.
>
> Would the list produced by this snippet help? I can't help you
> parse the output as I'm not a scheme programmer.
>
> > I searched a bit in the list of the scheme helper functions, and could
> find
> > only:
> >
> > ly:font-config-get-font-file font-name
> >
> > However, in case the file is not found, it defaults to some font that (I
> > suppose) is OS dependent, then I don't know  how to check if the searched
> > font is really installed. Any idea about this?
>
> Cheers,
> David.
>


Re: Version 2.22.1 problem

2021-11-21 Thread Leonid Hrabovsky
Thank you, Anders, for that suggestion! I could guess it myself, - in the
past, it happened several times that just my anti-virus Avast prevented
some .dlls from downloading! Going to disable Avast for these minutes
needed...

Best,


*Леонід - Leonid*


On Sun, Nov 21, 2021 at 12:50 PM Anders Eriksson 
wrote:

> I also have 2.22.1 installed and working
>
> I would look at the ant-virus software and if it blocks the dll's
>
> // Anders
>
> On 2021-11-21 18:46, Hans Aikema wrote:
>
> I just installed it in my window (32 bit, Windows 10) without any issue.
> So must be something specific to your environment that makes it break.
>
> There’s no DLL missing in the installer, at least not for my install.
>
>
> On 21 Nov 2021, at 18:33, Leonid Hrabovsky  wrote:
>
> Hi colleagues, - who of you, if anybody, uses Windows version 2.22.1 ?
> There are two .dll missing and install fails so far.
>
>
> *Леонід - Leonid *
>
>
> On Sun, Nov 21, 2021 at 12:10 PM Thomas Morley 
> wrote:
>
>> Am So., 21. Nov. 2021 um 17:15 Uhr schrieb Leonid Hrabovsky
>> :
>> >
>> > Thomas and colleagues,
>> > my attempt to download new version for Windows failed - two .dll files
>> missing (nrs. 1 & 6) and the install cannot continue. Your advices?
>> >
>> > Леонід - Leonid
>>
>> No clue, I'm on Linux
>>
>> Cheers,
>>   Harm
>>
>
>
>


Re: Version 2.22.1 problem

2021-11-21 Thread Leonid Hrabovsky
Ok, I will check. My Windows version is 8. The errors are:

"Error opening file for writing:

C:\Program Files (x86)\LilyPond\usr\ bin\libexpat-1.dll

Click Abort to stop the installation,
Retry to try again, or
Ignore to skip this file."

"Error opening file for writing:

C:\Program Files (x86)\LilyPond\usr\ bin\libffi-6.dll

Click Abort to stop the installation,
Retry to try again, or
Ignore to skip this file."

*Lеонід - Leonid*


On Sun, Nov 21, 2021 at 12:37 PM Jean Abou Samra  wrote:

> Le 21/11/2021 à 18:33, Leonid Hrabovsky a écrit :
> > Hi colleagues, - who of you, if anybody, uses Windows version 2.22.1 ?
> > There are two .dll missing and install fails so far.
>
>
> I run Ubuntu and cannot test anything either. Could you paste
> the precise error message though? That could give a clue.
> Also, what is your version of Windows?
>
> Best,
> Jean
>


Re: Version 2.22.1 problem

2021-11-21 Thread Anders Eriksson

I also have 2.22.1 installed and working

I would look at the ant-virus software and if it blocks the dll's

// Anders

On 2021-11-21 18:46, Hans Aikema wrote:
I just installed it in my window (32 bit, Windows 10) without any 
issue. So must be something specific to your environment that makes it 
break.


There’s no DLL missing in the installer, at least not for my install.



On 21 Nov 2021, at 18:33, Leonid Hrabovsky  wrote:

Hi colleagues, - who of you, if anybody, uses Windows version 2.22.1 
? There are two .dll missing and install fails so far.


/*Леонід - Leonid
*/



On Sun, Nov 21, 2021 at 12:10 PM Thomas Morley 
 wrote:


Am So., 21. Nov. 2021 um 17:15 Uhr schrieb Leonid Hrabovsky
:
>
> Thomas and colleagues,
> my attempt to download new version for Windows failed - two
.dll files missing (nrs. 1 & 6) and the install cannot continue.
Your advices?
>
> Леонід - Leonid

No clue, I'm on Linux

Cheers,
  Harm





Re: Version 2.22.1 problem

2021-11-21 Thread Hans Aikema
I just installed it in my window (32 bit, Windows 10) without any issue. So 
must be something specific to your environment that makes it break.

There’s no DLL missing in the installer, at least not for my install.


> On 21 Nov 2021, at 18:33, Leonid Hrabovsky  wrote:
> 
> Hi colleagues, - who of you, if anybody, uses Windows version 2.22.1 ? There 
> are two .dll missing and install fails so far. 
> Леонід - Leonid
> 
> 
> 
> On Sun, Nov 21, 2021 at 12:10 PM Thomas Morley  > wrote:
> Am So., 21. Nov. 2021 um 17:15 Uhr schrieb Leonid Hrabovsky
> mailto:lhrabov...@gmail.com>>:
> >
> > Thomas and colleagues,
> > my attempt to download new version for Windows failed - two .dll files 
> > missing (nrs. 1 & 6) and the install cannot continue. Your advices?
> >
> > Леонід - Leonid
> 
> No clue, I'm on Linux
> 
> Cheers,
>   Harm



Re: Version 2.22.1 problem

2021-11-21 Thread Leonid Hrabovsky
Hi colleagues, - who of you, if anybody, uses Windows version 2.22.1 ?
There are two .dll missing and install fails so far.


*Леонід - Leonid*


On Sun, Nov 21, 2021 at 12:10 PM Thomas Morley 
wrote:

> Am So., 21. Nov. 2021 um 17:15 Uhr schrieb Leonid Hrabovsky
> :
> >
> > Thomas and colleagues,
> > my attempt to download new version for Windows failed - two .dll files
> missing (nrs. 1 & 6) and the install cannot continue. Your advices?
> >
> > Леонід - Leonid
>
> No clue, I'm on Linux
>
> Cheers,
>   Harm
>


Re: Version 2.22.1 problem

2021-11-21 Thread Jean Abou Samra

Le 21/11/2021 à 18:33, Leonid Hrabovsky a écrit :
Hi colleagues, - who of you, if anybody, uses Windows version 2.22.1 ? 
There are two .dll missing and install fails so far.



I run Ubuntu and cannot test anything either. Could you paste
the precise error message though? That could give a clue.
Also, what is your version of Windows?

Best,
Jean



Re: Check if a font is currently installed

2021-11-21 Thread David Wright
On Sun 21 Nov 2021 at 17:29:37 (+0100), Paolo Prete wrote:
> 
> it would be useful to have a functions that checks if a font with a
> specific font-name is currently installed, so to have the produced score
> without visual errors that are not always easy to detect.

Would the list produced by this snippet help? I can't help you
parse the output as I'm not a scheme programmer.

> I searched a bit in the list of the scheme helper functions, and could find
> only:
> 
> ly:font-config-get-font-file font-name
> 
> However, in case the file is not found, it defaults to some font that (I
> suppose) is OS dependent, then I don't know  how to check if the searched
> font is really installed. Any idea about this?

Cheers,
David.
#(ly:font-config-display-fonts)


Re: Version 2.22.1 problem

2021-11-21 Thread Thomas Morley
Am So., 21. Nov. 2021 um 17:15 Uhr schrieb Leonid Hrabovsky
:
>
> Thomas and colleagues,
> my attempt to download new version for Windows failed - two .dll files 
> missing (nrs. 1 & 6) and the install cannot continue. Your advices?
>
> Леонід - Leonid

No clue, I'm on Linux

Cheers,
  Harm



Re: "abbreviations" as found in a Rubanks Intermediate Method book

2021-11-21 Thread Kenneth Wolcott
Thank you all for additional information.  I thought I was missing
something very simple.

On Sun, Nov 21, 2021 at 2:17 AM David Kastrup  wrote:
>
> Kenneth Wolcott  writes:
>
> > Hi Carl;
> >
> >   When I try this tremolo with the colons, it displays fine, but midi
> > sounds as if there is no abbreviation. Of course, I see that the colon
> > syntax is not supported for midi with Lilypond.
> >
> >   So I try the same with the \repeat tremolo syntax, it displays fine,
> > but the midi sounds as if there is no abbreviation.  It does say that
> > midi should be supported by the \repeat tremolo syntax, but I'm not
> > experiencing that.
> >
> >   So, what am I doing wrong? (Mac, Apple Silicon, homebrew Lilypond).
>
> The default MIDI does not implement tremolo.  \repeat tremolo can be
> expanded using \unfoldRepeats and colon notation can be expanded using
> the \articulate music function from articulate.ly .
>
> Long tremolo passages like drum rolls can gain structure from employing
> the very recent Beat_performer , changing a homogenuous machine gun
> pattern into a structured machine gun pattern.  Which considerably
> improves the value as practice material though it does not really make
> it performance quality.
>
> In short: you are doing nothing wrong, LilyPond's default behavior is
> insufficient but there are a few aids available for getting something
> better out.
>
> --
> David Kastrup



Check if a font is currently installed

2021-11-21 Thread Paolo Prete
Hello,

it would be useful to have a functions that checks if a font with a
specific font-name is currently installed, so to have the produced score
without visual errors that are not always easy to detect.
I searched a bit in the list of the scheme helper functions, and could find
only:

ly:font-config-get-font-file font-name

However, in case the file is not found, it defaults to some font that (I
suppose) is OS dependent, then I don't know  how to check if the searched
font is really installed. Any idea about this?

Thanks very much!
P


Version 2.22.1 problem

2021-11-21 Thread Leonid Hrabovsky
Thomas and colleagues,
my attempt to download new version for Windows failed - two .dll files
missing (nrs. 1 & 6) and the install cannot continue. Your advices?


*Леонід - Leonid*


Re: Fwd: Help

2021-11-21 Thread Leonid Hrabovsky
Thank you! Sorry for omitting the option of answer to Mailing List - bit I
was sure that it is going by default... will look at it.


*Леонід - Leonid*


On Sun, Nov 21, 2021 at 10:52 AM Jean Abou Samra  wrote:

> Le 21/11/2021 à 15:50, Leonid Hrabovsky a écrit :
> > Jean, there is the log of my attempt to do your code -
> > # -*-compilation-*-
> > Processing `C:/Users/LH/Documents/Scores/LilyPond Scores/Hrabovsky
> > Lines Test-1.ly'
> > Parsing...
> > error: program too old: 2.20.0 (file requires: 2.22.1)
> > Finding the ideal number of pages...
> > Fitting music on 1 page...
> > Drawing systems...
> > Layout output to `./tmp-lilypond-Sr3odJ'...
> > Converting to `/Users/LH/Documents/Scores/LilyPond Scores/Hrabovsky
> > Lines Test-1.pdf'...
> > Deleting `./tmp-lilypond-Sr3odJ'...
> > fatal error: failed files: "C:\\Users\\LH\\Documents\\Scores\\LilyPond
> > Scores\\Hrabovsky Lines Test-1.ly"
> >
> > Do I have to upgrade the version to 2.22.1 only - or there are
> > necessary additional corrections for success?
>
>
> Hello Leonid,
>
> As requested by Harm, please keep the address of the
> mailing list in copy. This is so that other people can
> see the replies, add their own comments, and benefit
> from already proposed solutions in the future. So,
> in your mail client, click "Reply to all", not "Reply".
>
> If you can upgrade to version 2.22, that would be best.
> In version 2.20, you would have to use a different
> syntax for \override in markups, like this:
>
> \version "2.20.0"
>
> #(define-markup-command (draw-horizontal-arches layout props len) (number?)
>  #:properties ((thickness 0.1)
>(arch-length 5)
>(arch-height 1.5)
>(angularity 0.2)
>path-markup)
>  (interpret-markup
>   layout
>   props
>   (make-path-markup
>thickness
>(let loop ((x-pos 0.0)
>   (path-acc '()))
>  (if (> x-pos len)
>  (reverse! path-acc)
>  (loop (+ x-pos arch-length)
>(cons
>  `(rcurveto ,(* 1/2 angularity arch-length)
> ,(- arch-height)
> ,(- arch-length (* 1/2 angularity
> arch-length))
> ,(- arch-height)
> ,arch-length
> 0)
>  path-acc)))
>
> \markup \draw-horizontal-arches #20
>
> \markup
>\override #'(thickness . 0.2)
>\override #'(arch-length . 10)
>\override #'(arch-height . 3)
>\override #'(angularity . 0.8)
> \draw-horizontal-arches #20
>
>
> Best regards,
> Jean
>


Re: Fwd: Help

2021-11-21 Thread Jean Abou Samra

Le 21/11/2021 à 15:50, Leonid Hrabovsky a écrit :

Jean, there is the log of my attempt to do your code -
# -*-compilation-*-
Processing `C:/Users/LH/Documents/Scores/LilyPond Scores/Hrabovsky 
Lines Test-1.ly'

Parsing...
error: program too old: 2.20.0 (file requires: 2.22.1)
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `./tmp-lilypond-Sr3odJ'...
Converting to `/Users/LH/Documents/Scores/LilyPond Scores/Hrabovsky 
Lines Test-1.pdf'...

Deleting `./tmp-lilypond-Sr3odJ'...
fatal error: failed files: "C:\\Users\\LH\\Documents\\Scores\\LilyPond 
Scores\\Hrabovsky Lines Test-1.ly"


Do I have to upgrade the version to 2.22.1 only - or there are 
necessary additional corrections for success?



Hello Leonid,

As requested by Harm, please keep the address of the
mailing list in copy. This is so that other people can
see the replies, add their own comments, and benefit
from already proposed solutions in the future. So,
in your mail client, click "Reply to all", not "Reply".

If you can upgrade to version 2.22, that would be best.
In version 2.20, you would have to use a different
syntax for \override in markups, like this:

\version "2.20.0"

#(define-markup-command (draw-horizontal-arches layout props len) (number?)
    #:properties ((thickness 0.1)
  (arch-length 5)
  (arch-height 1.5)
  (angularity 0.2)
  path-markup)
    (interpret-markup
 layout
 props
 (make-path-markup
  thickness
  (let loop ((x-pos 0.0)
 (path-acc '()))
    (if (> x-pos len)
    (reverse! path-acc)
    (loop (+ x-pos arch-length)
  (cons
    `(rcurveto ,(* 1/2 angularity arch-length)
   ,(- arch-height)
   ,(- arch-length (* 1/2 angularity 
arch-length))

   ,(- arch-height)
   ,arch-length
   0)
    path-acc)))

\markup \draw-horizontal-arches #20

\markup
  \override #'(thickness . 0.2)
  \override #'(arch-length . 10)
  \override #'(arch-height . 3)
  \override #'(angularity . 0.8)
\draw-horizontal-arches #20


Best regards,
Jean



Re: Create custom arpeggio-like engraver

2021-11-21 Thread Dimitris Marinakis
Hi Lukas,

Sorry for the confusion. I'll try to explain it better. I avoid overriding
the default engravers because I utilise many of them at the same time
attached to the same note or context. I cannot afford to modify the default
arpeggios because I try to implement things with a bit more flexibility.
e.g. I may need a standard arpeggio but also need the customised one
(simultaneously). For horizontal spanners this isn't a big issue since
David Kastrup created a code that adds as many as needed. But for vertical
spanners there aren't many options.

To give a bit more context on why I need a vertical spanner that uses the
note positions for its extent. One way of notating accidentals for clusters
is to use stretched out accidentals that span the whole cluster. Instead of
using lots of manual scale tweaks I'm trying to optimise my process by
having Lilypond do the hard work. Now I'll need to experiment with mapping
the stencil to the spanner extent which I've done for other kinds of
spanners.

This spanner will be used for other things as well so it's good to have
options.

I wish we could arbitrarily make spanners that inherit the properties of
the default ones but can co-exist with them. Now we have to define the
whole alternative engraver from scratch.

Best,
Dimitris

On Sun, Nov 21, 2021 at 4:40 PM Lukas-Fabian Moser  wrote:

> Hi Dimitris,
>
> Am 17.11.21 um 20:50 schrieb Dimitris Marinakis:
> > I need a generic engraver that works similar to the default arpeggio
> > one but I don't want to override the arpeggio engraver or any other
> > default ones in case I need to have multiple events simultaneously.
>
> I'm not sure I understand your rationale.
>
> Even if you need multiple events simultaneously, you can (instead of
> overriding) _tweak_ the default arpeggio. This can even be done
> conveniently by prefixing your \override with \single.
>
> Or do you want to connect _the same notes_ both by a standard arpeggio
> and your modified layout object?
>
> Lukas
>


Re: Help

2021-11-21 Thread Thomas Morley
Again, please keep the list cc'ed.
I don't like private mails for LilyPond-support.

For your pupose, as far as I understand it, I'd go for a different coding:
Basically, combine two circles to build the new NoteHead.
You surely want to adjust 'stem-attachment as well:

{
  \override NoteHead.stem-attachment =
#(lambda (grob)
   (cons (ly:grob-property (ly:grob-object grob 'stem) 'direction) 0))

  \override NoteHead.stencil =
#(lambda (grob)
  (ly:stencil-add
(make-circle-stencil 0.5 0.1 #f)
(make-circle-stencil 0.125 0.1 #t)))

  b'1 b'2 b'4 b'8 b'
}

Alas, b2 and b4 are now undistinguishable. How do you want to handle this?

Cheers,
  Harm

Am So., 21. Nov. 2021 um 15:51 Uhr schrieb Leonid Hrabovsky
:
>
> Great, Thomas, I am very grateful - now I have the proper notehead for the 
> score of my large old composition that remained in manuscript 50 years. But 
> it is a bit too big - is there any way to reduce it to the distance between 
> two staff lines just to fit between them?
>
> Best wishes,
>
> Леонід - Leonid
>
>
>
> On Sun, Nov 21, 2021 at 5:27 AM Thomas Morley  
> wrote:
>>
>> Am So., 21. Nov. 2021 um 01:58 Uhr schrieb Leonid Hrabovsky
>> :
>> >
>> > Hi Thomas, here is my attempt to make a new notehead out of the grob 
>> > neomensural94 -
>> >
>> > \version "2.20.0"
>> > \language "english"
>> >
>> >\score {
>> >  \new Staff {
>> >
>> > MyNoteHeads = \override NoteHead.stencil = \musiglyph 
>> > "timesig.neomensural94"
>> >
>> > \relative { a'4 g f e | fs gs a2 }
>> >
>> > myNoteHeads = \override NoteHead.stencil = \timesig.neomensural94
>> >
>> > % or maybe more correct code - - -
>> >
>> > \version "2.20.0"
>> > \language "english"
>> >
>> >\score {
>> >  \new Staff {
>> >
>> > MyNoteHeads = \override NoteHead.stencil = \musiglyph 
>> > "timesig.neomensural94"
>> >
>> > \relative { a'4 g f e | fs gs a2 }
>> >
>> > }
>> > }
>> >
>> > What was wrong in that code?
>> >
>> > Леонід - Leonid
>>
>> Please always cc the list.
>>
>> Well, what's wrong?
>>
>> You need to do such definitions outside of the music at toplevel
>> niveau and call it _in_ music, i.e.
>>   myDef = ...
>>   { \myDef ... }
>>
>> If you want some text (i.e. \markup) replacing a stencil, do
>>   \override NoteHead.stencil = #ly:text-interface::print
>>   \override NoteHead.text = \markup ...
>> As explained here:
>> http://lilypond.org/doc/v2.22/Documentation/notation/modifying-stencils
>>
>> \musicglyph was misspelled.
>>
>> This works:
>>
>> MyNoteHeads = {
>>   \override NoteHead.stencil = #ly:text-interface::print
>>   \override NoteHead.text = \markup \musicglyph "timesig.neomensural94"
>> }
>>
>> \new Staff \relative { \MyNoteHeads a'4 g f e | fis gis a2 }
>>
>>
>> NB The above explanations are simplified, disregarding many other
>> possibilities and cases.
>>
>>
>> Cheers,
>>   Harm



Re: Create custom arpeggio-like engraver

2021-11-21 Thread Lukas-Fabian Moser

Hi Dimitris,

Am 17.11.21 um 20:50 schrieb Dimitris Marinakis:
I need a generic engraver that works similar to the default arpeggio 
one but I don't want to override the arpeggio engraver or any other 
default ones in case I need to have multiple events simultaneously.


I'm not sure I understand your rationale.

Even if you need multiple events simultaneously, you can (instead of 
overriding) _tweak_ the default arpeggio. This can even be done 
conveniently by prefixing your \override with \single.


Or do you want to connect _the same notes_ both by a standard arpeggio 
and your modified layout object?


Lukas



Re: Fwd: Help

2021-11-21 Thread Leonid Hrabovsky
Thanks! Mille merci, Jean, I will try it after implementing the corrections
from Thomas Morley letter.
Will keep in touch with you.

Best,


*Леонід - Leonid*


On Sun, Nov 21, 2021 at 5:59 AM Jean Abou Samra  wrote:

> Hi Leonid,
>
> Regarding your last request:
>
> Le 20/11/2021 à 03:17, Leonid Hrabovsky a écrit :
> >
> > 3) I see (=guess) that tweaking with numerical data of the
> > /squiggleLine/ (in order to enlarge it strictly proportionally when
> > preserving its angles and/or curvatures) will create the two types of
> > horizontal lines I need. But I also need the third line that shall
> > look like a tight chain of repeated organ pedal symbols (the arches).
> > So is there a way of building such a line? Maybe by building a small
> > semicircle and then multiplying it as a variable?
>
> Do you mean something like this?
>
> \version "2.22.1"
>
> #(define-markup-command (draw-horizontal-arches layout props len) (number?)
> #:properties ((thickness 0.1)
>   (arch-length 5)
>   (arch-height 1.5)
>   (angularity 0.2)
>   path-markup)
> (interpret-markup
>  layout
>  props
>  (make-path-markup
>   thickness
>   (let loop ((x-pos 0.0)
>  (path-acc '()))
> (if (> x-pos len)
> (reverse! path-acc)
> (loop (+ x-pos arch-length)
>   (cons
> `(rcurveto ,(* 1/2 angularity arch-length)
>,(- arch-height)
>,(- arch-length (* 1/2 angularity
> arch-length))
>,(- arch-height)
>,arch-length
>0)
> path-acc)))
>
> \markup \draw-horizontal-arches #20
>
> \markup \override #'((thickness . 0.2)
>   (arch-length . 10)
>   (arch-height . 3)
>   (angularity . 0.8))
> \draw-horizontal-arches #20
>
> Best regards,
> Jean
>


Re: Create custom arpeggio-like engraver

2021-11-21 Thread Jean Abou Samra

Le 21/11/2021 à 14:48, Dimitris Marinakis a écrit :
I noticed the interesting squiggle-line-markup. I hope we eventually 
see more advanced options for spanners in the future. e.g. patterns of 
dots and dashes or segmented lines that can have angles between the 
segments. Really excited with the more active development of Lilypond 
this past year.


I've been working on similar stuff lately. I can make no promises though.

As an educative note, glissandi are considered items in the internal 
logic (not spanners). You can see this as 
http://lilypond.org/doc/v2.23/Documentation/internals/arpeggio. In 
LilyPond, the spanner terminology refers to an object that spans several 
columns horizontally.


Best,
Jean



Re: Create custom arpeggio-like engraver

2021-11-21 Thread Dimitris Marinakis
Wow thanks Jean!
This is really helpful. I'll study the code. A lot of useful stuff in it.

I noticed the interesting squiggle-line-markup. I hope we eventually see
more advanced options for spanners in the future. e.g. patterns of dots and
dashes or segmented lines that can have angles between the segments. Really
excited with the more active development of Lilypond this past year.

Best,
Dimitris

On Sun, Nov 21, 2021 at 1:37 PM Jean Abou Samra  wrote:

>
>
> Le 17/11/2021 à 20:50, Dimitris Marinakis a écrit :
> > I need a generic engraver that works similar to the default arpeggio
> > one but I don't want to override the arpeggio engraver or any other
> > default ones in case I need to have multiple events simultaneously.
> >
> > I saw a similar thread with a custom arpeggio stencil that had both up
> > and down arrows but I need to keep this engraver its own thing in this
> > case.
> >
> > I thought about searching inside the lilypond internal files to see
> > how the default arpeggio spanner works but if someone else can help me
> > through this I'd really appreciate it.
> >
> > Essentially, I'm interested in the ability of the arpeggio spanner to
> > calculate its length based on the distance of the outer notes. I will
> > replace the line stencil with something that will scale up/stretch
> > depending on the vertical length of that spanner.
> >
> > Sorry if my terminology is wrong (engraver, spanner etc.)
>
>
> How about this?
>
> \version "2.22.1"
>
> #(define-event-class 'custom-arpeggio-event 'music-event)
>
> #(define (define-event! type properties)
> (set-object-property! type
>   'music-description
>   (cdr (assq 'description properties)))
> (set! properties (assoc-set! properties 'name type))
> (set! properties (assq-remove! properties 'description))
> (hashq-set! music-name-to-property-table type properties)
> (set! music-descriptions
>   (sort (cons (cons type properties)
>   music-descriptions)
> alist
> #(define-event!
>'CustomArpeggioEvent
>'((types . (custom-arpeggio-event post-event event))
>  (description . "")))
>
> #(set-object-property! 'CustomArpeggio 'is-grob? #t)
> #(set-object-property! 'CustomArpeggio 'translation-type?
> ly:grob-properties?)
>
> \layout {
>\context {
>  \Global
>  \grobdescriptions #(acons 'CustomArpeggio
>(assq-ref all-grob-descriptions 'Arpeggio)
>all-grob-descriptions)
>}
> }
>
> #(ly:register-translator
>(lambda (context)
>  (let ((arpeggio-event #f)
>(arpeggio #f))
>(make-engraver
>  (listeners
>((custom-arpeggio-event engraver event)
>   (set! arpeggio-event event)))
>  ((process-music engraver)
> (if arpeggio-event
> (set! arpeggio
>   (ly:engraver-make-grob engraver 'CustomArpeggio
> arpeggio-event
>  (acknowledgers
>((rhythmic-head-interface engraver grob source-engraver)
>   (if arpeggio
>   (ly:pointer-group-interface::add-grob arpeggio
> 'side-support-elements grob)))
>((stem-interface engraver grob source-engraver)
>   (if arpeggio
>   (begin
> (ly:grob-set-parent! arpeggio Y grob)
> (ly:pointer-group-interface::add-grob arpeggio
> 'stems grob
>((note-column-interface engraver grob source-engraver)
>   (if arpeggio
>   (ly:pointer-group-interface::add-grob grob
> 'conditional-elements arpeggio)))
>((arpeggio-interface engraver grob source-engraver)
>   ; NB ==
>   ; Place custom arpeggios on the left of normal ones.
>   ; If this is not what you want, flip 'arpeggio' and
>   ; 'grob' below.
>   ; =
>   (ly:pointer-group-interface::add-grob arpeggio
> 'side-support-elements grob)))
>  ((stop-translation-timestep engraver)
> (set! arpeggio-event #f)
> (set! arpeggio #f)
>'Custom_arpeggio_engraver
>'())
>
> \layout {
>\context {
>  \Voice
>  \consists Custom_arpeggio_engraver
>}
> }
>
> customArpeggio = #(make-music 'CustomArpeggioEvent)
>
> {
>\customArpeggio
>\override CustomArpeggio.color = red
>\arpeggio\customArpeggio
> }
>
>
> The engraver is adapted from the default Arpeggio_engraver,
> of which the C++ code can be found at
>
> https://gitlab.com/lilypond/lilypond/-/blob/master/lily/arpeggio-engraver.cc
> For information on Scheme engravers, see
> https://extending-lilypond.readthedocs.io/en/latest/translation.html
>
> To get the vertical extent of the CustomArpeggio in
> a stencil callback, read the 'positions 

Re: Chromatic clashes

2021-11-21 Thread Thomas Morley
Am So., 14. Nov. 2021 um 18:07 Uhr schrieb Dimitris Marinakis
:
>
> First let's look at a few sources that show the expected behaviour. I have 
> attached an example from Gould pg.71 and the output from Dorico and last the 
> output from your code.

The Gould-excerpt is cut off, thus I can't view the entire text...

> I think when the stem is down the stem attachment is wrong in many cases.  
> I've attached a tiny example but I think this holds true for most scenarios. 
> Unless I'm missing something obvious in your code, which if true, I apologise.

Well, I'm not aware of any rules how the stem attachment _should_ be
for those note-heads.
While coding it I looked at
https://imslp.org/wiki/Wild_Men's_Dance%2C_SO_54_(Ornstein%2C_Leo)
There you can see all sorts of stem attachments. Thus I didn't follow
any rule as long as the Stem was connected with the NoteHead.

That said...
I implemented a possibility to manually tweak stem's attachment, using
`details.stem-x-y' with a number-pair for additional x-y-offset, to be
applied to the relevant NoteHead as a \tweak or \override (see
example).

Furthermore,
you use \displaceHeads - this is not part of the coding and errors ofcourse.
Don't use Accidental.extra-offset, rather do
Accidental.details.single-x-offset
or
\override Staff.AccidentalPlacement.positioning-done = ##t
with the need to care for placing the Accidentals yourself with
\override/\tweak Accidental.X-offset ... yourself.
Both is demonstrated in the examples.

Newest code is attached.

Alas, I found a glitch with it (and the former codings):
{
  \distributeNoteHeads #3 #'(0 3)
  8[ ]
}
The Beam is not adjusted - I always run into this trap, g.
Not sure when I'll find the time to cure it

Cheers,
  Harm


distributed-note-heads-04.pdf
Description: Adobe PDF document
\version "2.23.3"


%% Distribute Stem's NoteHeads and draw a new Stem connecting them all


#(define (distribute-stem-note-heads note-head-shifts)
  (lambda (grob)
  "Takes the note-heads from a @code{Stem} grob and applies offsets in
X-direction taken from @var{note-head-shifts}.  If accidentals are present they
are moved along with their corresponding note-head.
Preserves user-generated overrides/tweaks for @code{X-offset} of NoteColumn.
Accidentals may be moved further by applying @code{details.single-x-offset}-
  "
(let* ((nhds-array (ly:grob-object grob 'note-heads #f))
   (nhds-list
 (if nhds-array
 (ly:grob-array->list nhds-array)
 '()))
   ;; NoteColumn
   (nc (ly:grob-parent grob X))
   (nc-X-off (ly:grob-property nc 'X-offset 0))
   ;; AccidentalPlacement of the NoteColumn
   (acc-col (ly:note-column-accidentals nc))
   ;; Accidentals of each NoteHead
   (accidental-grobs
 (map
   (lambda (nhd) (ly:grob-object nhd 'accidental-grob))
   nhds-list)))
  ;; Move note-heads in X-direction, looking at 'note-head-shifts'
  (for-each
(lambda (nhd nhd-shift)
  (ly:grob-translate-axis! nhd
  nhd-shift
  X))
nhds-list
note-head-shifts)
  ;; If Accidentals present, move along with their NoteHeads
  (if (ly:grob? acc-col)
  (for-each
(lambda (nhd-shift acc)
  ;; AccidentalColumn may be present, although not every
  ;; NoteHead is altered, thus the need to check for Accidental
  ;; as well
  (if (ly:grob? acc)
  (let* ((acc-col-right-padding
   (ly:grob-property acc-col 'right-padding))
 (details (ly:grob-property acc 'details))
 ;; Read and later apply acc's X-offset to offer the
 ;; user a possibility to fine-tune appearance.
 ;; Directly using (ly:grob-property acc 'X-offset)
 ;; disturbs in this stage, thus we read 'X-offset from
 ;; (ly:grob-properties acc).
 (acc-X-off
   (assoc-get 'single-x-offset details 0))
 (alteration
   (ly:pitch-alteration
 (ly:event-property (event-cause acc) 'pitch

(ly:grob-translate-axis!
  acc
  (- (+ nhd-shift nc-X-off acc-X-off)
 ;; 1.1 is a little more then the width of crotchet
 ;; other values don't look as good
 ;; TODO make it a property of Stem?
 (case alteration
   ((0) 0.8)
   ((-1/2) 0.8)
   ((1/2) 1.1)
   

Re: Exclude staves from keep-alive-together

2021-11-21 Thread Jean Abou Samra

Le 20/11/2021 à 11:54, David Stephen Grant a écrit :

Hi all,

Can individual staves in eg. a StaffGroup with \consists 
"Keep_alive_together_engraver" be excluded from keep-alive-together?


I'm aware of VerticalAxisGroup.remove-layer which possibly does what I 
need it to, but this morning I can't wrap my head around it in the 
attached example.


- Empty staves for player 1, 2a and 3a should only be removed when the 
whole group is empty (system 3).

But:
- 2b should also be removed on the second system
- 3b should also be removed on both the first and second system.

Thanks!



The rules are somewhat complex. I believe what
you want here is

\layout {
  \context {
    \Staff
    \override VerticalAxisGroup.remove-layer = 0
  }
}

to set a default of 0, and

  \override VerticalAxisGroup.remove-layer = 1

in staves 2b and 3b. Full example:

\version "2.23.4"

\paper {
  indent = 1 \in
  short-indent = 1 \in
}

\layout {
  \context {
    \Staff
    \RemoveAllEmptyStaves
  }
}

music = \repeat unfold 4 { c'1 }
rests = \repeat unfold 4 { R1 }

\layout {
  \context {
    \Staff
    \override VerticalAxisGroup.remove-layer = 0
  }
}

\score {
  <<
    \new Staff \with {
  instrumentName = "0"
  shortInstrumentName = "0"
    } {
  \music \break
  \music \break
  \music
    }
    \new StaffGroup \with {
  \consists "Keep_alive_together_engraver"
    } {
  <<
    \new Staff \with {
  instrumentName = "1"
  shortInstrumentName = "1"
    } {
  \rests
  \rests
    }

    \new StaffGroup \with {
  systemStartDelimiter = #'SystemStartBrace
    } {
  <<
    \new Staff \with {
  instrumentName = "2a"
  shortInstrumentName = "2a"
    }
    {
  \music
  \music
    }
    \new Staff \with {
  instrumentName = "2b"
  shortInstrumentName = "2b"
  \override VerticalAxisGroup.remove-layer = 1
    }
    {
  \music
  \rests
    }
  >>
    }

    \new StaffGroup \with {
  systemStartDelimiter = #'SystemStartBrace
    } {
  <<
    \new Staff \with {
  instrumentName = "3a"
  shortInstrumentName = "3a"
    }
    {
  \rests
  \rests
    }
    \new Staff \with {
  instrumentName = "3b"
  shortInstrumentName = "3b"
  \override VerticalAxisGroup.remove-layer = 1
    }
    {
  \rests
  \rests
    }
  >>
    }
  >>
    }
  >>
}

Best,
Jean



Re: Create custom arpeggio-like engraver

2021-11-21 Thread Jean Abou Samra




Le 17/11/2021 à 20:50, Dimitris Marinakis a écrit :
I need a generic engraver that works similar to the default arpeggio 
one but I don't want to override the arpeggio engraver or any other 
default ones in case I need to have multiple events simultaneously.


I saw a similar thread with a custom arpeggio stencil that had both up 
and down arrows but I need to keep this engraver its own thing in this 
case.


I thought about searching inside the lilypond internal files to see 
how the default arpeggio spanner works but if someone else can help me 
through this I'd really appreciate it.


Essentially, I'm interested in the ability of the arpeggio spanner to 
calculate its length based on the distance of the outer notes. I will 
replace the line stencil with something that will scale up/stretch 
depending on the vertical length of that spanner.


Sorry if my terminology is wrong (engraver, spanner etc.)



How about this?

\version "2.22.1"

#(define-event-class 'custom-arpeggio-event 'music-event)

#(define (define-event! type properties)
   (set-object-property! type
 'music-description
 (cdr (assq 'description properties)))
   (set! properties (assoc-set! properties 'name type))
   (set! properties (assq-remove! properties 'description))
   (hashq-set! music-name-to-property-table type properties)
   (set! music-descriptions
 (sort (cons (cons type properties)
 music-descriptions)
   alist#(set-object-property! 'CustomArpeggio 'translation-type? 
ly:grob-properties?)


\layout {
  \context {
    \Global
    \grobdescriptions #(acons 'CustomArpeggio
  (assq-ref all-grob-descriptions 'Arpeggio)
  all-grob-descriptions)
  }
}

#(ly:register-translator
  (lambda (context)
    (let ((arpeggio-event #f)
  (arpeggio #f))
  (make-engraver
    (listeners
  ((custom-arpeggio-event engraver event)
 (set! arpeggio-event event)))
    ((process-music engraver)
   (if arpeggio-event
   (set! arpeggio
 (ly:engraver-make-grob engraver 'CustomArpeggio 
arpeggio-event

    (acknowledgers
  ((rhythmic-head-interface engraver grob source-engraver)
 (if arpeggio
 (ly:pointer-group-interface::add-grob arpeggio 
'side-support-elements grob)))

  ((stem-interface engraver grob source-engraver)
 (if arpeggio
 (begin
   (ly:grob-set-parent! arpeggio Y grob)
   (ly:pointer-group-interface::add-grob arpeggio 
'stems grob

  ((note-column-interface engraver grob source-engraver)
 (if arpeggio
 (ly:pointer-group-interface::add-grob grob 
'conditional-elements arpeggio)))

  ((arpeggio-interface engraver grob source-engraver)
 ; NB ==
 ; Place custom arpeggios on the left of normal ones.
 ; If this is not what you want, flip 'arpeggio' and
 ; 'grob' below.
 ; =
 (ly:pointer-group-interface::add-grob arpeggio 
'side-support-elements grob)))

    ((stop-translation-timestep engraver)
   (set! arpeggio-event #f)
   (set! arpeggio #f)
  'Custom_arpeggio_engraver
  '())

\layout {
  \context {
    \Voice
    \consists Custom_arpeggio_engraver
  }
}

customArpeggio = #(make-music 'CustomArpeggioEvent)

{
  \customArpeggio
  \override CustomArpeggio.color = red
  \arpeggio\customArpeggio
}


The engraver is adapted from the default Arpeggio_engraver,
of which the C++ code can be found at
https://gitlab.com/lilypond/lilypond/-/blob/master/lily/arpeggio-engraver.cc
For information on Scheme engravers, see
https://extending-lilypond.readthedocs.io/en/latest/translation.html

To get the vertical extent of the CustomArpeggio in
a stencil callback, read the 'positions property. For
example:

\score {
  \layout {
    #(layout-set-staff-size 30)
  }
  {
    \override CustomArpeggio.stencil =
  #(lambda (grob)
 (let ((positions (interval-scale (ly:grob-property grob 
'positions)

(ly:staff-symbol-staff-space grob
   (ly:stencil-translate-axis
    (grob-interpret-markup
 grob
 (make-draw-squiggle-line-markup
  0.5
  (cons 0 (interval-length positions))
  #t))
    (car positions)
    Y)))
    \arpeggio\customArpeggio
  }
}

Best,
Jean



Re: Fwd: Help

2021-11-21 Thread Jean Abou Samra

Hi Leonid,

Regarding your last request:

Le 20/11/2021 à 03:17, Leonid Hrabovsky a écrit :


3) I see (=guess) that tweaking with numerical data of the 
/squiggleLine/ (in order to enlarge it strictly proportionally when 
preserving its angles and/or curvatures) will create the two types of 
horizontal lines I need. But I also need the third line that shall 
look like a tight chain of repeated organ pedal symbols (the arches). 
So is there a way of building such a line? Maybe by building a small 
semicircle and then multiplying it as a variable?


Do you mean something like this?

\version "2.22.1"

#(define-markup-command (draw-horizontal-arches layout props len) (number?)
   #:properties ((thickness 0.1)
 (arch-length 5)
 (arch-height 1.5)
 (angularity 0.2)
 path-markup)
   (interpret-markup
    layout
    props
    (make-path-markup
 thickness
 (let loop ((x-pos 0.0)
    (path-acc '()))
   (if (> x-pos len)
   (reverse! path-acc)
   (loop (+ x-pos arch-length)
 (cons
   `(rcurveto ,(* 1/2 angularity arch-length)
  ,(- arch-height)
  ,(- arch-length (* 1/2 angularity 
arch-length))

  ,(- arch-height)
  ,arch-length
  0)
   path-acc)))

\markup \draw-horizontal-arches #20

\markup \override #'((thickness . 0.2)
 (arch-length . 10)
 (arch-height . 3)
 (angularity . 0.8))
\draw-horizontal-arches #20

Best regards,
Jean



Re: Help

2021-11-21 Thread Thomas Morley
Am Sa., 20. Nov. 2021 um 19:55 Uhr schrieb Leonid Hrabovsky
:
>
> Thomas,
> And might DurationLine continue not only individual notes, but framed groups 
> of notes, too? I just need the zigzag line you introduced, but increased in 
> vertical size to, say triple size - is it possible to get by tweaking the 
> numbers in paired coordinates, like in SquiggleLine ? I am going to forward 
> you my letter with attached PDF with ideas on my 3 imagined additional 
> DurationLines.
>
> Best,
>
> Леонід - Leonid

Please always cc the list.

DurationLine is not the right tool for this purpose, it's for single
notes, notes in a chord or even the whole chord, but not for framed
groups of notes.
Did you try the frame-engraver?
If you have difficulties to get it work or want to tweak the
appearance, the list may be able to help.

Cheers,
  Harm



Re: Help

2021-11-21 Thread Thomas Morley
Am So., 21. Nov. 2021 um 01:58 Uhr schrieb Leonid Hrabovsky
:
>
> Hi Thomas, here is my attempt to make a new notehead out of the grob 
> neomensural94 -
>
> \version "2.20.0"
> \language "english"
>
>\score {
>  \new Staff {
>
> MyNoteHeads = \override NoteHead.stencil = \musiglyph 
> "timesig.neomensural94"
>
> \relative { a'4 g f e | fs gs a2 }
>
> myNoteHeads = \override NoteHead.stencil = \timesig.neomensural94
>
> % or maybe more correct code - - -
>
> \version "2.20.0"
> \language "english"
>
>\score {
>  \new Staff {
>
> MyNoteHeads = \override NoteHead.stencil = \musiglyph 
> "timesig.neomensural94"
>
> \relative { a'4 g f e | fs gs a2 }
>
> }
> }
>
> What was wrong in that code?
>
> Леонід - Leonid

Please always cc the list.

Well, what's wrong?

You need to do such definitions outside of the music at toplevel
niveau and call it _in_ music, i.e.
  myDef = ...
  { \myDef ... }

If you want some text (i.e. \markup) replacing a stencil, do
  \override NoteHead.stencil = #ly:text-interface::print
  \override NoteHead.text = \markup ...
As explained here:
http://lilypond.org/doc/v2.22/Documentation/notation/modifying-stencils

\musicglyph was misspelled.

This works:

MyNoteHeads = {
  \override NoteHead.stencil = #ly:text-interface::print
  \override NoteHead.text = \markup \musicglyph "timesig.neomensural94"
}

\new Staff \relative { \MyNoteHeads a'4 g f e | fis gis a2 }


NB The above explanations are simplified, disregarding many other
possibilities and cases.


Cheers,
  Harm



Re: "abbreviations" as found in a Rubanks Intermediate Method book

2021-11-21 Thread David Kastrup
Kenneth Wolcott  writes:

> Hi Carl;
>
>   When I try this tremolo with the colons, it displays fine, but midi
> sounds as if there is no abbreviation. Of course, I see that the colon
> syntax is not supported for midi with Lilypond.
>
>   So I try the same with the \repeat tremolo syntax, it displays fine,
> but the midi sounds as if there is no abbreviation.  It does say that
> midi should be supported by the \repeat tremolo syntax, but I'm not
> experiencing that.
>
>   So, what am I doing wrong? (Mac, Apple Silicon, homebrew Lilypond).

The default MIDI does not implement tremolo.  \repeat tremolo can be
expanded using \unfoldRepeats and colon notation can be expanded using
the \articulate music function from articulate.ly .

Long tremolo passages like drum rolls can gain structure from employing
the very recent Beat_performer , changing a homogenuous machine gun
pattern into a structured machine gun pattern.  Which considerably
improves the value as practice material though it does not really make
it performance quality.

In short: you are doing nothing wrong, LilyPond's default behavior is
insufficient but there are a few aids available for getting something
better out.

-- 
David Kastrup



Re: "abbreviations" as found in a Rubanks Intermediate Method book

2021-11-21 Thread Thomas Morley
Am So., 21. Nov. 2021 um 07:21 Uhr schrieb Kenneth Wolcott
:
>
> Hi Carl;
>
>   When I try this tremolo with the colons, it displays fine, but midi
> sounds as if there is no abbreviation. Of course, I see that the colon
> syntax is not supported for midi with Lilypond.
>
>   So I try the same with the \repeat tremolo syntax, it displays fine,
> but the midi sounds as if there is no abbreviation.  It does say that
> midi should be supported by the \repeat tremolo syntax, but I'm not
> experiencing that.
>
>   So, what am I doing wrong? (Mac, Apple Silicon, homebrew Lilypond).
>
> Thanks,
> Ken
>
> GNU LilyPond 2.22.1
> Processing `abbreviations.ly'
> Parsing...
> Interpreting music...
> Preprocessing graphical objects...
> Interpreting music...
> MIDI output to `abbreviations.midi'...
> Finding the ideal number of pages...
> Fitting music on 1 page...
> Drawing systems...
> Converting to `abbreviations.pdf'...
> Success: compilation successfully completed
>
> On Fri, Nov 19, 2021 at 12:27 PM Kenneth Wolcott
>  wrote:
> >
> > AWESOME!  I completely missed it.  Thanks.
> >
> > On Fri, Nov 19, 2021 at 11:53 AM Carl Sorensen  wrote:
> > >
> > >
> > >
> > > On 11/19/21, 12:39 PM, "lilypond-user on behalf of Kenneth Wolcott" 
> > >  > > kennethwolc...@gmail.com> wrote:
> > >
> > > Hi;
> > >
> > >   See attached screenshot.
> > >
> > >   "abbreviations" as found in a Rubanks Intermediate Method book.
> > >
> > >   Does Lilypond support this musical shortcut?
> > >
> > >
> > > See 
> > > https://lilypond.org/doc/v2.22/Documentation/notation/short-repeats#tremolo-repeats
> > >  , under putting tremolo marks on a single note.
> > >
> > > HTH,
> > >
> > > Carl
> > >
> > >

You need to unfold the tremolo-repeats:

\score {
  \unfoldRepeats tremolo
  \new Staff {
\set Staff.midiInstrument = "tuba"
\tuba
  }
  \midi {}
}

If you want to unfold all repeats use \unfoldRepeats without specifications

Cheers,
  Harm