Re: Getting point and click going with gvim on Alma Linux

2022-09-06 Thread Andrew Bernard
An update with a solution re gvim with point and click. This would also 
apply to other Linux distros apart from Alma Linux I think.


It turns out the missing comma for the gvim remote command has been 
submitted as a bug report. But the gobbledygook internal message that 
gvim prints and requires you to acknowledge by pressing enter - totally 
unnecessary to see or do - can be fixed by using a different command to 
execute the remote gvim call.


Hence, in libexec/lilypond-invoke-editor the gvim commands line needs to 
be changed to use a call to cursor() and not use the norm command. This 
fixes the problem, and makes gvim nice to use again in this context.


#   "gvim": [("gvim", "--remote", "+:%(line)s:norm%(column)s", "%(file)s")],

=>

 "gvim": [("gvim", "--remote", "+call cursor(%(line)s,%(column)s)", 
"%(file)s")],


So we go from this situation in the first image attachment to the 
correct one in the second attachment, and no 'press ENTER...'.


It took three days full time to figure this out, including having to 
read the source code for vim!


I'll submit a patch for this fix.

Since gvim supports a lilypond syntax file, this is a good solution for 
Lilypond as an alternative to Frescobaldi. I did look into this a few 
years ago when I 'outgrew' Frescobaldi with some really long and complex 
scores and Frescobaldi's response time blew out to unusable levels. I 
think this is still an issue in Frescobaldi. It may not affect all 
users, but gvim can handle files of any length and provides a solution 
to this problem.


I have not read anything much about gvim point and click on Linux on the 
list. Or maybe people put up with the junk message and keypress and 
don't complain about it. How many people use this setup? Maybe one or two!


[Amusingly I am an emacs user but last time I used that there were still 
bad defects in the lilypond code that I am not experienced enough to 
solve, and I think these have still not been attended to, although I may 
be wrong. Hence my interest in gvim for Lilypond.]


Andrew


On 5/09/2022 9:46 am, Andrew Bernard wrote:
In response to the recent thread on alternatives to Frescobaldi on 
Alma Linux I have prepared this set of instructions. I have tested 
this and there are two points in addition to the notes below.


One, I am unable to get rid of the last line of the extensive status 
message gvim shows at the bottom when invoked with a remote call. This 
is puzzling - I am working on it.


Second, in 2.23.12 at least, there is an error, strangely only for 
gvim, in libexec/lilypond-invoke editor. Line 130 is missing a comma, 
and must be updated to:


    "gvim": [("gvim", "--remote", "+:%(line)s:norm%(column)s", 
"%(file)s")],


I have submitted a bug report request about this.


chord name does not transpose as score using language italino

2022-09-06 Thread ming tsang
The following code produces a png file that did not print the correct chord
name. .

\version "2.23.11"
\language "italiano"
global = {
  \key do \major
  \numericTimeSignature
  \time 4/4
}

chordNames = \chordmode {
  \global
  % Chords follow here.
  la1 dod1:m fad1:m re2 dob8:m re4.:m
%  a1 cs1:m fs1:m d2 cs8:m b4.:m
}

melody = \fixed do'' {
  \global
  % Music follows here.
  mi8 do8 mi8 do8 mi8 do8 mi8 do8
  mi8 si, mi si, mi si, mi si,
%do re mi fa sol la si
  mi8 la, mi la, mi la, mi la,
  fa8 8 8 mi8 r8 re4.
}

verse = \lyricmode {
  % Lyrics follow here.

}

\score {
  <<
\new ChordNames \chordNames
\new Staff { \melody }
\addlyrics { \verse }
  >>
  \layout { }
  \midi {
\tempo 4=158
  }
}
the output png screen print:
[image: image.png]
I am expecting to seeA C#m F#m D C#m Bm
Any help is appreciated.
ming (lyndon) tsang


Moving fingering, spacing between staves

2022-09-06 Thread Knute Snortum
In order to avoid the AB problem, what I'm trying to do is move some
fingering down in the system, but the problem I run into is I get too
much space between staves.

Here is a MWE:

%%%
\version "2.23.12"

moveFingerB = {
  \override Fingering.X-offset = -0.5
  \override Fingering.Y-extent = #'(2 . 3)
  % \override Fingering.Y-offset = -1
}
revertFinger = {
  \revert Fingering.X-offset
  \revert Fingering.Y-extent
  % \revert Fingering.Y-offset
}

rightHand = \relative {
  \oneVoice
  c''4 c c c |
}

leftHand = \relative {
  \clef bass
  \voiceThree
  \moveFingerB a8-3-1 \revertFinger f-2 a4 a a |
}

dynamics = {
  s1-\markup \large \italic "leggiero" |
}

\score {
  \new PianoStaff <<
\new Staff \rightHand
\new Dynamics \dynamics
\new Staff \leftHand
  >>
}
%%%

I've attached a screenshot of what that looks like.  The problem is
there is too much space between the fingering and the markup, and this
may be because I'm not moving the fingering in the correct way.  The
X-offset works fine, but I couldn't get negative numbers to work with
Y-offset, so I tried Y-extent.  Unfortunately, I don't exactly
understand what the pair of numbers means.  It has something to do
with size, but it appears to act chaotically sometimes.  The manual
only says, "Extent (size) in the Y direction, measured in staff-space
units, relative to object’s reference point" but this doesn't tell me
what the two numbers stand for.

I'm hoping someone can explain the "extent" properties to me and help
me move the fingering without the extra space between staves.

--
Knute Snortum


Re: Lilypond-book problem

2022-09-06 Thread Knute Snortum
On Tue, Sep 6, 2022 at 8:09 AM David Wright  wrote:
>
> On Tue 06 Sep 2022 at 11:19:28 (+0200), Rip _Mus wrote:
> > Il giorno lun 5 set 2022 alle ore 19:06 Knute Snortum ha scritto:
> > > On Sun, Sep 4, 2022 at 10:26 PM Rip _Mus wrote:
> > > >> On Sun, Sep 4, 2022 at 9:06 AM Rip _Mus wrote:
>
> > > >> > I have installed the version 2.22.1, wich I used for a lot of big
> > > project.
> > > >> > A lot of times I tried to open terminal and run "lilypond-book" but
> > > without success. I already add the folder "...\usr\bin" to the
> > > environmental variabile path, in fact the command "lilypond" runs.
> > > >> > Someone could help me?
>
> > > > thanks for the reply!  You're right, I could have added a few more
> > > details.
> > > > The operating system is Windows 10. For using Lilypond on command line,
> > > I followed the instructions on the site.
> > > > I added the folder "C:Program Files (x86)\LilyPond\usr\bin" to the
> > > environmental variable “Path”.
> > > >  I think I followed them well, as the "ilypond" command works.  The
> > > other commands "lilypond-book" and "convert-ly" instead give me the
> > > following message:
> > > >
> > > > 'lilypond-book' is not recognized as an internal or external command
> > > >
> > > > What I notice is that in the folder in question there are lilypond-book
> > > and convert-ly scripts, but they are without extension (for example * .py)
> > > >
> > > > What do you think about?
>
> > > Well, I had the same experience as you.  One solution is to type:
> > >
> > > python3 "C:Program Files (x86)\LilyPond\usr\bin\lilypond-book"
> > >
> > > You could put that in a batch file somewhere in your PATH.  There may
> > > be other solutions too.
>
> > Ok!
> > I tried and it works very well!
> > Another solution is to add the extension ".ly" to the file name and then
> > the command runs.
>
> More likely you added .py ?

Just adding ".py" to lilypond-book didn't work for me.  At the command
line I got a message that "lilypond-book" was not an executable.  From
the Windows file folder a command screen popped up for a split second,
then vanished.

But here's another way to do this: create a file called
lilypond-book.bat somewhere in your PATH, then paste this into it:

@python3 "C:\Program Files (x86)\LilyPond-2.22.2\usr\bin\lilypond-book" %*

You should be able to type "lilypond.book" anywhere you cd to.

--
Knute Snortum



Re: Lilypond-book problem

2022-09-06 Thread David Wright
On Tue 06 Sep 2022 at 11:19:28 (+0200), Rip _Mus wrote:
> Il giorno lun 5 set 2022 alle ore 19:06 Knute Snortum ha scritto:
> > On Sun, Sep 4, 2022 at 10:26 PM Rip _Mus wrote:
> > >> On Sun, Sep 4, 2022 at 9:06 AM Rip _Mus wrote:

> > >> > I have installed the version 2.22.1, wich I used for a lot of big
> > project.
> > >> > A lot of times I tried to open terminal and run "lilypond-book" but
> > without success. I already add the folder "...\usr\bin" to the
> > environmental variabile path, in fact the command "lilypond" runs.
> > >> > Someone could help me?

> > > thanks for the reply!  You're right, I could have added a few more
> > details.
> > > The operating system is Windows 10. For using Lilypond on command line,
> > I followed the instructions on the site.
> > > I added the folder "C:Program Files (x86)\LilyPond\usr\bin" to the
> > environmental variable “Path”.
> > >  I think I followed them well, as the "ilypond" command works.  The
> > other commands "lilypond-book" and "convert-ly" instead give me the
> > following message:
> > >
> > > 'lilypond-book' is not recognized as an internal or external command
> > >
> > > What I notice is that in the folder in question there are lilypond-book
> > and convert-ly scripts, but they are without extension (for example * .py)
> > >
> > > What do you think about?

> > Well, I had the same experience as you.  One solution is to type:
> >
> > python3 "C:Program Files (x86)\LilyPond\usr\bin\lilypond-book"
> >
> > You could put that in a batch file somewhere in your PATH.  There may
> > be other solutions too.

> Ok!
> I tried and it works very well!
> Another solution is to add the extension ".ly" to the file name and then
> the command runs.

More likely you added .py ?

> I don't understand why it is not the way described in Lilypond manuals.
> Anyway, thank you so much for your help!

The archetypal system for Lilypond is un*x/linux, so the documentation
reflects that. Where Windows differs, that's often pointed out. See,
for example, Usage §2.2 Invoking convert-ly.

Unfortunately, the principal reference for Windows on the Command Line
doesn't mention this difference or give an example (lilypond itself is
a real EXE file, whereas all the support programs are Python scripts):

https://lilypond.org/windows.html

web.pdf page number 44, physical page 46.

Perhaps the reason is that the documentation writer(s) had set their
environment variable PATHEXT to include .py (or should it be .PY ?)
long ago, and have forgotten about it:

https://www.nextofwindows.com/what-is-pathext-environment-variable-in-windows

But sometimes that appears not to be the answer either:

https://superuser.com/questions/1619580/pathext-environment-variable-not-working

--

In researching this, I noticed that, on the web, the target of
https://lilypond.org/doc/v2.23/Documentation/web-big-page.html#windows
appears to be Nicolas Sceaux's use of LP, whereas the 2.23.12 version
on my system points to the correct place in the page, corresponding to:

https://lilypond.org/windows.html

Disclaimer: I don't use Windows, so all is hypothetical.

Cheers,
David.



Re: Lilypond-book problem

2022-09-06 Thread Knute Snortum
On Tue, Sep 6, 2022 at 2:19 AM Rip _Mus  wrote:
>
> Ok!
> I tried and it works very well!
> Another solution is to add the extension ".ly" to the file name and then the 
> command runs.

Huh.  I'm surprised that works.  I guess LilyPond is smart enough to
execute Python code.

> I don't understand why it is not the way described in Lilypond manuals.

Well, you can report it as a bug at https://lilypond.org/bug-reports.html

Or you can even change it by contributing!
https://lilypond.org/doc/v2.23/Documentation/contributor/documentation-work

--
Knute Snortum



Re: OOoLilyPond: support for Cairo backend

2022-09-06 Thread Martin Tarenskeen

Thanks for the update!

I tried OOoLilyPond v1.1.6 beta on Fedora 36 with Libre Office and the 
new Cairo backend seems to work nicely with it. Note for other Fedora 
users: The lilypond-2.23.12 that is currently packaged in the Fedora 
repository has been compiled /without/ the cairo backend and will not 
be capable to use this new functionality. It was easy to compile my own 
RPM package version using the Fedora specfile. I just needed to add 
--enable-cairo-backend to the configure options. Now I can enjoy SVG 
support with the Cairo backend in OOoLilyPond.


MT




Op maandag 5 september 2022 om 11:48:21 +0200 schreef K. Blum 
:

To all OOoLilyPond users:

There is a new (experimental) release that supports using the new 
Cairo

backend (as of Ly 2.23.12):


This allows to get svg images without restrictions (like having to use
dedicated "svg" templates or additional conversion software):


Please feel free to test the new OLy version and report back any
problems you encounter.

Cheers,
Klaus





Re: Lilypond-book problem

2022-09-06 Thread Rip _Mus
Ok!
I tried and it works very well!
Another solution is to add the extension ".ly" to the file name and then
the command runs.
I don't understand why it is not the way described in Lilypond manuals.
Anyway, thank you so much for your help!

Il giorno lun 5 set 2022 alle ore 19:06 Knute Snortum 
ha scritto:

> Well, I had the same experience as you.  One solution is to type:
>
> python3 "C:Program Files (x86)\LilyPond\usr\bin\lilypond-book"
>
> You could put that in a batch file somewhere in your PATH.  There may
> be other solutions too.
>
> --
> Knute Snortum
>
>
> On Sun, Sep 4, 2022 at 10:26 PM Rip _Mus 
> wrote:
> >
> > Good morning,
> > thanks for the reply!  You're right, I could have added a few more
> details.
> > The operating system is Windows 10. For using Lilypond on command line,
> I followed the instructions on the site.
> > I added the folder "C:Program Files (x86)\LilyPond\usr\bin" to the
> environmental variable “Path”.
> >  I think I followed them well, as the "ilypond" command works.  The
> other commands "lilypond-book" and "convert-ly" instead give me the
> following message:
> >
> > 'lilypond-book' is not recognized as an internal or external command
> >
> > What I notice is that in the folder in question there are lilypond-book
> and convert-ly scripts, but they are without extension (for example * .py)
> >
> > What do you think about?
> >
> >
> > Il lun 5 set 2022, 02:13 Knute Snortum  ha scritto:
> >>
> >> On Sun, Sep 4, 2022 at 9:06 AM Rip _Mus 
> wrote:
> >> >
> >> > Good morning,
> >> > I have installed the version 2.22.1, wich I used for a lot of big
> project.
> >> > A lot of times I tried to open terminal and run "lilypond-book" but
> without success. I already add the folder "...\usr\bin" to the
> environmental variabile path, in fact the command "lilypond" runs.
> >> > Someone could help me?
> >>
> >> It would be helpful to know exactly what is going wrong.  Do you get
> >> error messages?  Post them.  Not doing what you think it should?  Tell
> >> us what it's doing and what you think it should be doing.  Also, tell
> >> us the OS, is it linux?
> >>
> >> --
> >> Knute Snortum
>