problem with hacklily

2020-11-01 Thread Stefan Thomas
Dear community,
I wanted to save a file in hacklily (https://www.hacklily.org/).
Unfortunately I can't do this, I always get

> TypeError: e.sent map is not a function.
>
I should mention that I use the firefox browser.
Has someone an idea what could be wrong?
Thanks,
Stefan


Re: Lilypond and Python

2020-11-01 Thread Stefan Thomas
Dear Frederico,
it worked!
I've installed abjad successfully.
Thanks,
Stefan

Am So., 1. Nov. 2020 um 22:55 Uhr schrieb Federico Bruni :

> Il giorno dom 1 nov 2020 alle 17:07, Stefan Thomas
>  ha scritto:
> > many thanks to Your fast reply. But unfortunately it didn't work. It
> > seems to be a python problem:
> > pip install setuptools
> > Collecting setuptools
> >
> > Using cached
> >
> https://files.pythonhosted.org/packages/e1/b7/182161210a13158cd3ccc41ee19aadef54496b74f2817cc147006
> > ec932b4/setuptools-44.1.1-py2.py3-none-any.whl
> > Installing collected packages: setuptools
> > Exception:
> > Traceback (most recent call last):
> >  File
> > "/home/stefan/.local/lib/python2.7/site-packages/pip/basecommand.py",
> > line 215, in main
> >status = self.run(options, args)
> >  File
> >
> "/home/stefan/.local/lib/python2.7/site-packages/pip/commands/install.py",
> > line 342, in run
> >prefix=options.prefix_path,
> >  File
> > "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_set.py",
> > line 784, in install
> >**kwargs
> >  File
> >
> "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py",
> > line 851, in install
> >self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
> >  File
> >
> "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py",
> > line 1064, in move_wheel_files
> >isolated=self.isolated,
> >  File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py",
> > line 345, in move_wheel_files
> >clobber(source, lib_dir, True)
> >  File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py",
> > line 323, in clobber
> >shutil.copyfile(srcfile, destfile)
> >  File "/usr/lib/python2.7/shutil.py", line 97, in copyfile
> >with open(dst, 'wb') as fdst:
> > IOError: [Errno 13] Permission denied:
> > '/usr/local/lib/python2.7/dist-packages/easy_install.py'
> >
>
> You are using pip2 (python2) installed in ~/.local, but you're trying
> to install a py3 wheel.
> pip2 install seems to try to install under /usr/local by default¹, but
> it won't work unless you use sudo.
>
>
> I would try:
>
> pip3 install --user setuptools
>
>
> ¹ pip3 is smarter and doesn't need the --user switch if called as
> regular user, see below:
>
> $ pip -V
> pip 20.2.2 from /usr/lib/python3.9/site-packages/pip (python 3.9)
> $ pip install setuptools
> Defaulting to user installation because normal site-packages is not
> writeable
> Requirement already satisfied: setuptools in
> /usr/lib/python3.9/site-packages (49.1.3)
>
>
>
>
>


Re: The Guide to getting Point and Click going with Gvim under Ubuntu 18

2020-11-01 Thread David Wright
On Sun 01 Nov 2020 at 15:12:56 (+1100), Andrew Bernard wrote:
> [A slightly older screed. Stil works for Ubunto 20. Using Atom is
> matter of simple substitution.]
> 
> The Guide to getting Point and Click going with Gvim under Ubuntu 18

Yes, this one's the longer one, so I'll comment on this.

> Setting the EDITOR variable
> ---
> 
> Lilypond uses the environment variable EDITOR to select which editor
> to use to
> display point and click links. For gvim, simply use the value 'gvim':
> 
> export EDITOR=gvim
> 
> Setting LYEDITOR is not required.

I'm not sure why EDITOR is preferred to LYEDITOR. As far as
point-and-click is concerned, they have the same effect¹. But
exporting EDITOR has the consequence that it overrides all
other places where EDITOR is used.

The intention behind having the three variables LYEDITOR/XEDITOR/
EDITOR is that LYEDITOR can specify one editor for LilyPond's
point-and-click, XEDITOR can specify another (say, graphical one)
for any time that X is running, and EDITOR can specify a text-based
backstop for when X is not running.

> Check that this works. Install the gnome-open program:
> 
> $ sudo apt install libgnome2-bin
> 
> Then:
> 
> $ gnome-open textedit:///etc/issue:1:0:0
> 
> If all is correct lilypond-invoke-editor will run and display the file.

I think Federico Bruni pointed out that libgnome2-bin/gnome-open is
rather historical, in favour of xdg-open (usually in xdg-utils).
I guess that might be something worth changing in the Usage manual.

> Next, edit '/etc/apparmor.d/usr.bin.evince' and uncomment the line:
> 
>   # Site-specific additions and overrides. See local/README for details.
>   include 

This is the step you were going to edit out of your crib,
the reason being

> […] The local files provide for extending and adding
> information to the base apparmor files without interfering with them, and
> making system upgrades easier.

and /etc/apparmor.d/usr.bin.evince is such a base file.

But I think your earlier comment on the trailing comma would be
worth adding to the Usage manual.

> Run gvim in server mode by doing - exactly nothing! Simply running gvim will
> start the process in a new window. From the terminal this suffixes:
> 
> $ gvim
> 
> By default gvim will respond to remote requests such as from
> lilypond-invoke-editor. There is no need to use the --servername
> option as the
> name defaults to GVIM (and you can see this in the title bar). By default
> lilypond sends point and click requests to the gvim server named GVIM.

Interestingly, on Debian² you don't even have to bother to start gvim
at all *unless* you want to edit with vim, in which case

$ vim --servername gvim

will start a text server version wherever desired. Otherwise,
(graphical) gvim will start automatically. (I'm assuming that
vim/gvim are both installed, as would be usual.)

¹ from 
lilypond-2.21.0-1.linux-64/lilypond/usr/share/lilypond/current/scm/editor.scm

(define (get-editor)
  (or (getenv "LYEDITOR")
  (getenv "XEDITOR")
  (getenv "EDITOR")

  ;; FIXME: how are default/preferred editors specified on
  ;; different platforms?
  (case PLATFORM
((windows) "lilypad")
(else
 "emacs"

² What about other distributions?

Cheers,
David.



Re: The Guide to getting Point and Click going with Gvim under Ubuntu 18

2020-11-01 Thread David Wright
On Sun 01 Nov 2020 at 14:25:07 (+0100), Martín Rincón Botero wrote:
> Thank you very much, Andrew, for this guide! It works! My pdf viewer is
> Foxit Reader so after installing the gnome-open program and checking it
> works, I didn't have to follow any other steps. I wish this guide can be
> merged with the current guide in the Usage Manual. Just one small
> suggestion to make this guide even more idiot-proof (at least for the steps
> I did) would be to make this step a bit more verbose: "Create the file
> 'lilypond-invoke-editor.desktop' *f. ex. in your home folder*". The next
> command assumes that you created the file via terminal and you moved to
> that location with the terminal. In the case that you created that file
> using GEdit (like I did) and followed the instructions in the Usage Manual
> (where it mentions /tmp as folder), the next command won't really work
> unless you're already there in the terminal (where I wasn't, since a
> terminal opens by default with the home directory). This might be obvious
> for people who do everything via terminal, but not for people who prefer
> using graphical applications like GEdit.

I see the problem, but I think that solution is unwise as it leaves
a redundant file in the user's home directory, which they may fear
removing. Better would be to improve the Usage manual in a way such as:

--✄--
  and then execute the commands

xdg-desktop-menu install /tmp/lilypond-invoke-editor.desktop
xdg-mime default lilypond-invoke-editor.desktop x-scheme-handler/textedit

  where /tmp is the directory that was chosen for the file.
--✄--

At present, the Usage manual switches from /tmp/ to ./ without
explanation. The idea of using /tmp for the scratch file is of course
that it's automatically emptied when you reboot.

> Is it maybe possible to create a
> script that automates all this? Perhaps the Gvim and Evince parts can be
> left out of it, but I have the feeling that what I just had to do can be
> made into a script. I already can do some scripting in Python, but such a
> script would need the user to have Python installed. So a Bash script from
> someone acquainted with Bash would be very welcome.

This script then has to be maintained, and it also makes it less obvious
how to adjust the process for any differences between systems. I think
the process is mysterious enough without hiding it any more.

> Atom works very well even with large files, however there's a small lag
> with point & click (even with small files). Since Frescobaldi doesn't have
> this Point & Click problem even with large files, I assume this small lag
> has more to do with the fact that there are two applications involved (Atom
> and Foxit) rather than one (Frescobaldi). Am I right? This Point & Click
> penalty is something that I'm willing to trade for the moment: it's less
> than Frescobaldi hanging while trying to move the cursor, let alone for
> trying to edit a large file. I hope this performance issue can be fixed in
> Frescobaldi eventually (although Atom has other advantages like Column
> Selection...).

So what sort of lag are you talking about? And is it different on the
first click (ie when the source file has to be opened)? You must be
running on reasonable hardware, so a noticeable lag does not seem
at all reasonable. A data point for you:

Debian 10/buster with Xpdf and emacs running on a 2000-vintage
Pentium III at 650MHz in 512MB memory took less than a second to
open the source at the first click, and thereafter serviced each
click in 0.5 secs, just so long as the new target position is in
the displayed window. (Obviously this machine takes at least a
second or two to scroll any distance in the editor, and at least
a second just to turn a page in a simple image-free PDF file.)

Cheers,
David.



Re: Installing Lilypond 2.21.80

2020-11-01 Thread Ralph Palmer
On Sun, Nov 1, 2020 at 8:30 PM Aaron Hill  wrote:

> On 2020-11-01 5:26 pm, Ralph Palmer wrote:
> > On Sun, Nov 1, 2020 at 7:31 PM Aaron Hill 
> > wrote:
> >
> >> On 2020-11-01 3:58 pm, Aaron Hill wrote:
> >> > On 2020-11-01 3:41 pm, Ralph Palmer wrote:
> >> >> Hi -
> >> >>
> >> >> I would like to install LilyPond 2.21.80, but I don't know how. I
> have
> >> >> successfully installed earlier versions, but I don't remember how,
> and
> >> >> I
> >> >> can't find instructions.
> >> >
> >> > The installation instructions can be found here [1] where you would
> >> > obtain the stable release.  (Perhaps a helpful link could be added on
> >> > the development/unstable pages.)
> >> >
> >> > [1]: http://lilypond.org/unix.html
> >>
> >> Never mind.  There *is* a link to the stable download page in the big
> >> friendly box above the download links.
> >>
> >>
> >> -- Aaron Hill
> >>
> >>
> > Thanks, Aaron, but I specifically asked about 2.21.80 because of Phil
> > Holmes' request for users to use the "stable release candidate", or
> > 2.21.80. I'm currently running 2.20.0. I could not find adequate
> > instructions for installing the unstable version.
>
> That's the point.  It's all the same.  There's no unique instructions
> for stable vs. unstable.  Follow the stable instructions, but download
> the unstable .sh script.
>
>
> -- Aaron Hill
>

Thanks, Aaron. I'll do it. I wish it had been clear that the instructions
were not just for the stable version.

Ralph


-- 
Ralph Palmer
Brattleboro, VT
USA
(he, him, his)
palmer.r.vio...@gmail.com


Re: Installing Lilypond 2.21.80

2020-11-01 Thread Aaron Hill

On 2020-11-01 5:26 pm, Ralph Palmer wrote:
On Sun, Nov 1, 2020 at 7:31 PM Aaron Hill  
wrote:



On 2020-11-01 3:58 pm, Aaron Hill wrote:
> On 2020-11-01 3:41 pm, Ralph Palmer wrote:
>> Hi -
>>
>> I would like to install LilyPond 2.21.80, but I don't know how. I have
>> successfully installed earlier versions, but I don't remember how, and
>> I
>> can't find instructions.
>
> The installation instructions can be found here [1] where you would
> obtain the stable release.  (Perhaps a helpful link could be added on
> the development/unstable pages.)
>
> [1]: http://lilypond.org/unix.html

Never mind.  There *is* a link to the stable download page in the big
friendly box above the download links.


-- Aaron Hill



Thanks, Aaron, but I specifically asked about 2.21.80 because of Phil
Holmes' request for users to use the "stable release candidate", or
2.21.80. I'm currently running 2.20.0. I could not find adequate
instructions for installing the unstable version.


That's the point.  It's all the same.  There's no unique instructions 
for stable vs. unstable.  Follow the stable instructions, but download 
the unstable .sh script.



-- Aaron Hill



Re: Installing Lilypond 2.21.80

2020-11-01 Thread Ralph Palmer
On Sun, Nov 1, 2020 at 7:31 PM Aaron Hill  wrote:

> On 2020-11-01 3:58 pm, Aaron Hill wrote:
> > On 2020-11-01 3:41 pm, Ralph Palmer wrote:
> >> Hi -
> >>
> >> I would like to install LilyPond 2.21.80, but I don't know how. I have
> >> successfully installed earlier versions, but I don't remember how, and
> >> I
> >> can't find instructions.
> >
> > The installation instructions can be found here [1] where you would
> > obtain the stable release.  (Perhaps a helpful link could be added on
> > the development/unstable pages.)
> >
> > [1]: http://lilypond.org/unix.html
>
> Never mind.  There *is* a link to the stable download page in the big
> friendly box above the download links.
>
>
> -- Aaron Hill
>
>
Thanks, Aaron, but I specifically asked about 2.21.80 because of Phil
Holmes' request for users to use the "stable release candidate", or
2.21.80. I'm currently running 2.20.0. I could not find adequate
instructions for installing the unstable version.

All the best,

Ralph


-- 
Ralph Palmer
Brattleboro, VT
USA
(he, him, his)
palmer.r.vio...@gmail.com


Re: Installing Lilypond 2.21.80

2020-11-01 Thread Aaron Hill

On 2020-11-01 3:58 pm, Aaron Hill wrote:

On 2020-11-01 3:41 pm, Ralph Palmer wrote:

Hi -

I would like to install LilyPond 2.21.80, but I don't know how. I have
successfully installed earlier versions, but I don't remember how, and 
I

can't find instructions.

I'm running Ubuntu 20.4.01 under Linux (duh - but I don't know how to 
find

the Linux version).

I'm slightly familiar with working with the Terminal, but not fluent.

I downloaded  and tried running 
,

but I'm not sure what the destination should be. I'm not even positive
that's the file I should be working with. Not ?

Can anyone point me to installation instructions in the Notation 
Reference,

or give me some specifics?


The installation instructions can be found here [1] where you would
obtain the stable release.  (Perhaps a helpful link could be added on
the development/unstable pages.)

[1]: http://lilypond.org/unix.html


Never mind.  There *is* a link to the stable download page in the big 
friendly box above the download links.



-- Aaron Hill



Re: Installing Lilypond 2.21.80

2020-11-01 Thread Aaron Hill

On 2020-11-01 3:41 pm, Ralph Palmer wrote:

Hi -

I would like to install LilyPond 2.21.80, but I don't know how. I have
successfully installed earlier versions, but I don't remember how, and 
I

can't find instructions.

I'm running Ubuntu 20.4.01 under Linux (duh - but I don't know how to 
find

the Linux version).

I'm slightly familiar with working with the Terminal, but not fluent.

I downloaded  and tried running 
,

but I'm not sure what the destination should be. I'm not even positive
that's the file I should be working with. Not ?

Can anyone point me to installation instructions in the Notation 
Reference,

or give me some specifics?


The installation instructions can be found here [1] where you would 
obtain the stable release.  (Perhaps a helpful link could be added on 
the development/unstable pages.)


[1]: http://lilypond.org/unix.html


-- Aaron Hill



Installing Lilypond 2.21.80

2020-11-01 Thread Ralph Palmer
Hi -

I would like to install LilyPond 2.21.80, but I don't know how. I have
successfully installed earlier versions, but I don't remember how, and I
can't find instructions.

I'm running Ubuntu 20.4.01 under Linux (duh - but I don't know how to find
the Linux version).

I'm slightly familiar with working with the Terminal, but not fluent.

I downloaded  and tried running ,
but I'm not sure what the destination should be. I'm not even positive
that's the file I should be working with. Not ?

Can anyone point me to installation instructions in the Notation Reference,
or give me some specifics?

I appreciate your time and attention.

Be well,

Ralph

-- 
Ralph Palmer
Brattleboro, VT
USA
(he, him, his)
palmer.r.vio...@gmail.com


Re: \unfoldRepeats

2020-11-01 Thread Aaron Hill

On 2020-11-01 2:25 pm, David Rogers wrote:

Aaron Hill  writes:


On 2020-10-29 2:35 pm, David Kastrup wrote:

David Nalesnik  writes:


Hi Andrew,
On Wed, Oct 28, 2020 at 5:03 PM Andrew Bernard 
 wrote:

Hi David,
But it would be great in the future to have more and better MIDI
support. I no longer regard it as a small feature on the side, but
something I really need. For now, I will stick to outputting my New
Complexity School scores - which Dorico has trouble with! :-)


I think an important step in the process would be to make the MIDI
backend somehow accessible from Scheme.  Then the power users would 
be

all over it.

Indeed.  And a unifying concept covering both grobs and MIDI objects
(mobs?) might even pave a way to iterative generation of time-based
MusicXML (xobs?) or Braille (bobs?) or other renditions of the 
musical

content.


Mobs... 🤔

Could we get LilyPond to output a Minecraft world populated with 
appropriate redstone and noteblocks?


Somehow I’m now imagining a Lilypond Toys Output Module that builds
(literally!) a representation of my score out of Lego, Meccano,
Tinkertoys, Slinky, popsicle sticks, pipe cleaners, etc, choosing the
materials by some kind of algorithm. And any elements of a score that
involve extra Scheme code or tweaks, it will build from papier-mâché.
Consider it an alternative definition of “object-oriented”. :)


And now I am thinking of Pipe Dream from Animusic or that marble music 
machine by Wintergaten.



-- Aaron Hill



Re: Sprechgesang

2020-11-01 Thread Massimiliano Viel
Thank you,
I was in fact interested in the notation of Pierrot Lunaire’ “Den Wein", which 
Schoenberg abandoned later to adopt the “Humperdinck” one.
Thank you for the material, I’ll try to study it and understand how it works.

Best

Massimiliano



> On 1 Nov 2020, at 21:43, Thomas Morley  wrote:
> 
> Hi,
> 
> I found
> https://www.mu-sig.de/Theorie/Notation/grafik/Notation8/28-1.gif
> in the net and tried to code it in LilyPond.
> 
> Code and image attached.
> I'm aware there are some edges where the current output could be
> tweaked to match the .gif even more.
> Though, I limited myself to demonstrate the current coding, it's
> varios settings and configuration possibilities.
> 
> Cheers,
>  Harm
> 




Re: \unfoldRepeats

2020-11-01 Thread David Rogers

Aaron Hill  writes:


On 2020-10-29 2:35 pm, David Kastrup wrote:

David Nalesnik  writes:


Hi Andrew,
On Wed, Oct 28, 2020 at 5:03 PM Andrew Bernard 
 wrote:

Hi David,
But it would be great in the future to have more and better 
MIDI
support. I no longer regard it as a small feature on the 
side, but
something I really need. For now, I will stick to outputting 
my New

Complexity School scores - which Dorico has trouble with! :-)

I think an important step in the process would be to make the 
MIDI
backend somehow accessible from Scheme.  Then the power users 
would be

all over it.
Indeed.  And a unifying concept covering both grobs and MIDI 
objects
(mobs?) might even pave a way to iterative generation of 
time-based
MusicXML (xobs?) or Braille (bobs?) or other renditions of the 
musical

content.


Mobs... 🤔

Could we get LilyPond to output a Minecraft world populated with 
appropriate redstone and noteblocks?


Somehow I’m now imagining a Lilypond Toys Output Module that 
builds (literally!) a representation of my score out of Lego, 
Meccano, Tinkertoys, Slinky, popsicle sticks, pipe cleaners, etc, 
choosing the materials by some kind of algorithm. And any elements 
of a score that involve extra Scheme code or tweaks, it will build 
from papier-mâché. Consider it an alternative definition of 
“object-oriented”. :)


--
David Rogers



RE: Markup in scheme

2020-11-01 Thread John Schlomann
Thank you, Martin and Harm. You gave me the understanding I needed.

John

> -Original Message-
> From: Thomas Morley [mailto:thomasmorle...@gmail.com]
> Sent: Saturday, October 31, 2020 1:47 PM
> To: John Schlomann
> Cc: lilypond-user
> Subject: Re: Markup in scheme
> 
> Am Sa., 31. Okt. 2020 um 16:30 Uhr schrieb John Schlomann
> :
> >
> > In the following snippet, the first markup works fine. The second gives no
> errors, but outputs nothing.
> >
> >
> >
> > Why does the scheme version not work?
> >
> >
> >
> > \version "2.20.0"
> >
> > \markup{"First markup"}
> >
> > #(markup #:line (#:simple "Second markup"))
> >
> >
> >
> > Thanks,
> >
> > John
> >
> >
> 
> To have LilyPond do something with #(markup ...) you need to explain
> to LilyPond _what_ to do with it".
> 
> Martin's example embeds it in a music expression. -> Initiate a TextScript-
> grob
> 
> You can store and call it like:
> foo = #(markup #:line (#:simple "Second markup"))
> \foo
> It is called at top level. -> Create top level text
> 
> Directly and on top level you could do:
> $(markup #:line (#:simple "Second markup"))
> Directly evaluate the expression (here at top level). -> Create top level text
> 
> HTH,
>   Harm




Re: Point & Click with Atom

2020-11-01 Thread Federico Bruni
Il giorno dom 1 nov 2020 alle 11:36, Martín Rincón Botero 
 ha scritto:

@Federico: I hope, you don’t take my criticism personally!
I see Andrew has written upon what you wrote. That’s great! I’ll 
have to check how I installed Atom. If it’s in Ubuntu’s software 
center, I probably installed it from there (so it’s a snap, I 
suppose). Does it make any difference in the steps? And yes, Lilypond 
2.20.


Of course I didn't take it personally :-)
I did not write that page, I just made a small edit.

I don't use Ubuntu and never used snap.
But I see that if /snap/bin is in the PATH variable, it will work.






Re: Lilypond and Python

2020-11-01 Thread Federico Bruni
Il giorno dom 1 nov 2020 alle 17:07, Stefan Thomas 
 ha scritto:
many thanks to Your fast reply. But unfortunately it didn't work. It 
seems to be a python problem:

pip install setuptools
Collecting setuptools

Using cached 
https://files.pythonhosted.org/packages/e1/b7/182161210a13158cd3ccc41ee19aadef54496b74f2817cc147006

ec932b4/setuptools-44.1.1-py2.py3-none-any.whl
Installing collected packages: setuptools
Exception:
Traceback (most recent call last):
 File 
"/home/stefan/.local/lib/python2.7/site-packages/pip/basecommand.py", 
line 215, in main

   status = self.run(options, args)
 File 
"/home/stefan/.local/lib/python2.7/site-packages/pip/commands/install.py", 
line 342, in run

   prefix=options.prefix_path,
 File 
"/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_set.py", 
line 784, in install

   **kwargs
 File 
"/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py", 
line 851, in install

   self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
 File 
"/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py", 
line 1064, in move_wheel_files

   isolated=self.isolated,
 File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py", 
line 345, in move_wheel_files

   clobber(source, lib_dir, True)
 File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py", 
line 323, in clobber

   shutil.copyfile(srcfile, destfile)
 File "/usr/lib/python2.7/shutil.py", line 97, in copyfile
   with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: 
'/usr/local/lib/python2.7/dist-packages/easy_install.py'




You are using pip2 (python2) installed in ~/.local, but you're trying 
to install a py3 wheel.
pip2 install seems to try to install under /usr/local by default¹, but 
it won't work unless you use sudo.



I would try:

pip3 install --user setuptools


¹ pip3 is smarter and doesn't need the --user switch if called as 
regular user, see below:


$ pip -V
pip 20.2.2 from /usr/lib/python3.9/site-packages/pip (python 3.9)
$ pip install setuptools
Defaulting to user installation because normal site-packages is not 
writeable
Requirement already satisfied: setuptools in 
/usr/lib/python3.9/site-packages (49.1.3)








Re: LSR 1119 Force clef change in alternatives

2020-11-01 Thread Thomas Morley
Am Fr., 30. Okt. 2020 um 23:45 Uhr schrieb Aaron Hill
:
>
> On 2020-10-30 2:19 pm, Thomas Morley wrote:
> > To the author (Pierre?) of
> > lsr.di.unimi.it/LSR/Item?u=1&id=1119
> >
> > Many thanks for your snippet, though, please add a description to it.
> > ;)
>
> Would this work better to avoid the hidden note showing up in MIDI?
>
> 
>\grace s4
>\once \override Staff.Clef.extra-spacing-width = #'(-1 . 0)
>\clef bass
> 
>
> Seeing as the grace note affects spacing, I added a suitable spacing
> modifier.
>
>
>
> -- Aaron Hill
>

Hi Aaron,

thanks for your suggestion, hopefully the author of said snippet will read it.
Usually I try to contact the author to discuss such things with him or her.
Only if not available I will step in myself.

Best,
  Harm



Re: Lilypond and Python

2020-11-01 Thread Stefan Thomas
Dear Dave,
many thanks to Your fast reply. But unfortunately it didn't work. It seems
to be a python problem:
pip install setuptools
Collecting setuptools

Using cached
https://files.pythonhosted.org/packages/e1/b7/182161210a13158cd3ccc41ee19aadef54496b74f2817cc147006
ec932b4/setuptools-44.1.1-py2.py3-none-any.whl
Installing collected packages: setuptools
Exception:
Traceback (most recent call last):


 File "/home/stefan/.local/lib/python2.7/site-packages/pip/basecommand.py",
line 215, in main
   status = self.run(options, args)


 File
"/home/stefan/.local/lib/python2.7/site-packages/pip/commands/install.py",
line 342, in run
   prefix=options.prefix_path,


 File "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_set.py",
line 784, in install
   **kwargs


 File
"/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py",
line 851, in install
   self.move_wheel_files(self.source_dir, root=root, prefix=prefix)

 File
"/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py",
line 1064, in move_wheel_files
   isolated=self.isolated,


 File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py", line
345, in move_wheel_files
   clobber(source, lib_dir, True)


 File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py", line
323, in clobber
   shutil.copyfile(srcfile, destfile)

 File "/usr/lib/python2.7/shutil.py", line 97, in copyfile

   with open(dst, 'wb') as fdst:


IOError: [Errno 13] Permission denied:
'/usr/local/lib/python2.7/dist-packages/easy_install.py'
You are using pip version 9.0.3, however version 20.2.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Am So., 1. Nov. 2020 um 16:51 Uhr schrieb Dave Seidel :

> Hi Stefan,
>
> Ah, sorry, I missed that! Going back and looking at your original post, it
> looks like pip failed to install abjab because it needs the setuptools
> package. Try
>
> pip install setuptools
>
> and if that succeeds then once again try
>
> pip install abjab
>
> More than that I can't really say, as I am not an Abjab user (at least not
> yet) and have not installed it myself.
>
> Best,
> Dave
>
> On Sun, Nov 1, 2020 at 10:22 AM Stefan Thomas 
> wrote:
>
>> Dear Dave,
>> unfortunately I have no idea how I can install abjad. I wasn't able to do
>> it with pip, can I do it in another way?
>>
>> Am So., 1. Nov. 2020 um 15:50 Uhr schrieb Dave Seidel <
>> dave.sei...@gmail.com>:
>>
>>> Hi Stefan,
>>>
>>> I suppose that the root user does not have pip in its path. I advise not
>>> worrying about it -- the older version of pip is fully functional and
>>> should not affect your ability to install and run what you need.
>>>
>>> - Dave
>>>
>>> On Sun, Nov 1, 2020 at 9:38 AM Stefan Thomas <
>>> kontrapunktste...@gmail.com> wrote:
>>>
 Dear Dave,
 thanks for Your soon reply.
 When I type

> sudo pip install --upgrade pip
>
 I get

> sudo: pip: command not found
>
 I don't know how to update pip.
 Do You have a hint?
 All the best,
 Stefan



 Am So., 1. Nov. 2020 um 14:15 Uhr schrieb Dave Seidel <
 dave.sei...@gmail.com>:

> Try upgrading pip with sudo (i.e., "sudo pip install --upgrade pip"),
> though it is not really necessary to run abjab or anything else, which
> seems to have installed properly.
>
> - Dave
>
> On Sun, Nov 1, 2020 at 8:01 AM Stefan Thomas <
> kontrapunktste...@gmail.com> wrote:
>
>> Dear community,
>> I tried to install abjad with
>> pip install abjad
>> And I got:
>>
>>> Collecting abjad
>>>  Using cached
>>> https://files.pythonhosted.org/packages/f7/2f/23b14c7ff2ca1a5728e81fc1b5960374ec444efad43b197dca009
>>> 53d90cc/Abjad-3.1.tar.gz
>>> Could not import setuptools which is required to install from a
>>> source distribution.
>>> Please install setuptools.
>>>
>>>
>>> You are using pip version 9.0.3, however version 20.2.4 is available.
>>> You should consider upgrading via the 'pip install --upgrade pip'
>>> command.
>>>
>> And after
>>
>>> pip install --upgrade pip
>>>
>> I've got
>>
>>> Collecting pip
>>>  Using cached
>>> https://files.pythonhosted.org/packages/cb/28/91f26bd088ce8e22169032100d4260614fc3da435025ff389ef1d
>>> 396a433/pip-20.2.4-py2.py3-none-any.whl
>>> Installing collected packages: pip
>>>  Found existing installation: pip 9.0.3
>>>Uninstalling pip-9.0.3:
>>>  Successfully uninstalled pip-9.0.3
>>>  Rolling back uninstall of pip
>>> Exception:
>>> Traceback (most recent call last):
>>>
>>>
>>>  File
>>> "/home/stefan/.local/lib/python2.7/site-packages/pip/basecommand.py", 
>>> line
>>> 215, in main
>>>status = self.run(options, args)
>>>
>>>
>>>  File
>>> "/home/stefan/.local/lib/python2.7/site-packages/pip/commands/install.py",
>>>

Re: Lilypond and Python

2020-11-01 Thread Martín Rincón Botero
Hi Stefan,

it seems the updating process failed before having installed a newer version of 
pip (it says “command not found”). I would stick to learning how to install 
stuff using pip (with which you can install many modules for Python, not only 
abjad). If you’re using Ubuntu, reinstalling pip is a matter of:

sudo apt update
sudo apt install python3-pip

www.martinrinconbotero.com
On 1. Nov 2020, 16:24 +0100, Stefan Thomas , wrote:
> Dear Dave,
> unfortunately I have no idea how I can install abjad. I wasn't able to do it 
> with pip, can I do it in another way?
>
> > Am So., 1. Nov. 2020 um 15:50 Uhr schrieb Dave Seidel 
> > :
> > > Hi Stefan,
> > >
> > > I suppose that the root user does not have pip in its path. I advise not 
> > > worrying about it -- the older version of pip is fully functional and 
> > > should not affect your ability to install and run what you need.
> > >
> > > - Dave
> > >
> > > > On Sun, Nov 1, 2020 at 9:38 AM Stefan Thomas 
> > > >  wrote:
> > > > > Dear Dave,
> > > > > thanks for Your soon reply.
> > > > > When I type
> > > > > > sudo pip install --upgrade pip
> > > > > I get
> > > > > > sudo: pip: command not found
> > > > > I don't know how to update pip.
> > > > > Do You have a hint?
> > > > > All the best,
> > > > > Stefan
> > > > >
> > > > >
> > > > >
> > > > > > Am So., 1. Nov. 2020 um 14:15 Uhr schrieb Dave Seidel 
> > > > > > :
> > > > > > > Try upgrading pip with sudo (i.e., "sudo pip install --upgrade 
> > > > > > > pip"), though it is not really necessary to run abjab or anything 
> > > > > > > else, which seems to have installed properly.
> > > > > > >
> > > > > > > - Dave
> > > > > > >
> > > > > > > > On Sun, Nov 1, 2020 at 8:01 AM Stefan Thomas 
> > > > > > > >  wrote:
> > > > > > > > > Dear community,
> > > > > > > > > I tried to install abjad with
> > > > > > > > > pip install abjad
> > > > > > > > > And I got:
> > > > > > > > > > Collecting abjad
> > > > > > > > > >  Using cached 
> > > > > > > > > > https://files.pythonhosted.org/packages/f7/2f/23b14c7ff2ca1a5728e81fc1b5960374ec444efad43b197dca009
> > > > > > > > > > 53d90cc/Abjad-3.1.tar.gz
> > > > > > > > > > Could not import setuptools which is required to install 
> > > > > > > > > > from a source distribution.
> > > > > > > > > > Please install setuptools.
> > > > > > > > > > You are using pip version 9.0.3, however version 20.2.4 is 
> > > > > > > > > > available.
> > > > > > > > > > You should consider upgrading via the 'pip install 
> > > > > > > > > > --upgrade pip' command.
> > > > > > > > > And after
> > > > > > > > > > pip install --upgrade pip
> > > > > > > > > I've got
> > > > > > > > > > Collecting pip
> > > > > > > > > >  Using cached 
> > > > > > > > > > https://files.pythonhosted.org/packages/cb/28/91f26bd088ce8e22169032100d4260614fc3da435025ff389ef1d
> > > > > > > > > > 396a433/pip-20.2.4-py2.py3-none-any.whl
> > > > > > > > > > Installing collected packages: pip
> > > > > > > > > >  Found existing installation: pip 9.0.3
> > > > > > > > > >    Uninstalling pip-9.0.3:
> > > > > > > > > >  Successfully uninstalled pip-9.0.3
> > > > > > > > > >  Rolling back uninstall of pip
> > > > > > > > > > Exception:
> > > > > > > > > > Traceback (most recent call last):
> > > > > > > > > >  File 
> > > > > > > > > > "/home/stefan/.local/lib/python2.7/site-packages/pip/basecommand.py",
> > > > > > > > > >  line 215, in main
> > > > > > > > > >    status = self.run(options, args)
> > > > > > > > > >  File 
> > > > > > > > > > "/home/stefan/.local/lib/python2.7/site-packages/pip/commands/install.py",
> > > > > > > > > >  line 342, in run
> > > > > > > > > >    prefix=options.prefix_path,
> > > > > > > > > >  File 
> > > > > > > > > > "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_set.py",
> > > > > > > > > >  line 784, in install
> > > > > > > > > >    **kwargs
> > > > > > > > > >  File 
> > > > > > > > > > "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py",
> > > > > > > > > >  line 851, in install
> > > > > > > > > >    self.move_wheel_files(self.source_dir, root=root, 
> > > > > > > > > > prefix=prefix)
> > > > > > > > > >  File 
> > > > > > > > > > "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py",
> > > > > > > > > >  line 1064, in move_wheel_files
> > > > > > > > > >    isolated=self.isolated,
> > > > > > > > > >  File 
> > > > > > > > > > "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py",
> > > > > > > > > >  line 345, in move_wheel_files
> > > > > > > > > >    clobber(source, lib_dir, True)
> > > > > > > > > >  File 
> > > > > > > > > > "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py",
> > > > > > > > > >  line 316, in clobber
> > > > > > > > > >    ensure_dir(destdir)
> > > > > > > > > >  File 
> > > > > > > > > > "/home/stefan/.local/lib/python2.7/site-packages/pip/utils/__init__.py",
> > > > > > > > > >  line 83, in ensure_dir
> > > > > > > > > >    os.makedirs(path)
> > > > > > > > > >  File "/usr/lib/p

Re: how to give more horizontal space to the voice follower

2020-11-01 Thread Werner LEMBERG
>> Why doesn't the `VoiceFollower` grob obey the `minimum-length`
>> property (inspite of supporting the `spanner-interface`)?  What am I
>> missing?
>
> add
> \override VoiceFollower.springs-and-rods = #ly:spanner::set-spacing-rods
> ;)

Thanks!


Werner



Re: how to give more horizontal space to the voice follower

2020-11-01 Thread Thomas Morley
Am So., 1. Nov. 2020 um 16:53 Uhr schrieb Werner LEMBERG :
>
>
> Dear LilyPond community,
>
>
> please consider this MWE:
>
>   <<
> \new Staff = "R" {
>   \showStaffSwitch
>   s2. c'''4 | \change Staff = "L" a4
>   \override VoiceFollower.minimum-length = #20
>   s2 a4 | \change Staff = "R" c'''4
> }
> \new Staff = "L" {
>   s1 | s1 | s4
> }
>   >>
>
> Why doesn't the `VoiceFollower` grob obey the `minimum-length`
> property (inspite of supporting the `spanner-interface`)?  What am I
> missing?
>
>
> Werner

Hi Werner,

add
\override VoiceFollower.springs-and-rods = #ly:spanner::set-spacing-rods
;)

Cheers,
  Harm



Re: \bracketize?

2020-11-01 Thread Lukas-Fabian Moser

Hi Jun,

Am 01.11.20 um 14:07 schrieb 田村淳:

Hello,

I’m looking for a “bracket” version of “\parenthesize” function to 
enclose an articulation or ornamentation mark within a pair of square 
brackets. I’d like to use parenthesis and brackets to indicate two 
different types of editorial additions. I achieved the same for 
dynamics marks by slightly modifying the LSR code “Creating "real" 
parenthesized dynamics”

http://lsr.di.unimi.it/LSR/Item?id=382
http://lsr.di.unimi.it/LSR/Snippet?id=382
Is there an easy way to create “\bracketize” function?

Thanks in advance and best regards.


It's not ideal since the X-extent is hardcoded, but as a starting point:

\version "2.20"

bracketify =
  \tweak ParenthesesItem.stencil #ly:text-interface::print
  \tweak ParenthesesItem.font-size -3.7
  \tweak ParenthesesItem.text \markup \general-align #Y #CENTER {
    \hspace #0.6  \center-align \line { [ \hspace #1 ] } }
  \parenthesize \etc

\relative {
  c'4 \bracketify d \parenthesize e f
  e\bracketify --
}

Lukas




how to give more horizontal space to the voice follower

2020-11-01 Thread Werner LEMBERG

Dear LilyPond community,


please consider this MWE:

  <<
\new Staff = "R" {
  \showStaffSwitch
  s2. c'''4 | \change Staff = "L" a4
  \override VoiceFollower.minimum-length = #20
  s2 a4 | \change Staff = "R" c'''4
}
\new Staff = "L" {
  s1 | s1 | s4
}
  >>

Why doesn't the `VoiceFollower` grob obey the `minimum-length`
property (inspite of supporting the `spanner-interface`)?  What am I
missing?


Werner


Re: Lilypond and Python

2020-11-01 Thread Stefan Thomas
Dear Dave,
unfortunately I have no idea how I can install abjad. I wasn't able to do
it with pip, can I do it in another way?

Am So., 1. Nov. 2020 um 15:50 Uhr schrieb Dave Seidel :

> Hi Stefan,
>
> I suppose that the root user does not have pip in its path. I advise not
> worrying about it -- the older version of pip is fully functional and
> should not affect your ability to install and run what you need.
>
> - Dave
>
> On Sun, Nov 1, 2020 at 9:38 AM Stefan Thomas 
> wrote:
>
>> Dear Dave,
>> thanks for Your soon reply.
>> When I type
>>
>>> sudo pip install --upgrade pip
>>>
>> I get
>>
>>> sudo: pip: command not found
>>>
>> I don't know how to update pip.
>> Do You have a hint?
>> All the best,
>> Stefan
>>
>>
>>
>> Am So., 1. Nov. 2020 um 14:15 Uhr schrieb Dave Seidel <
>> dave.sei...@gmail.com>:
>>
>>> Try upgrading pip with sudo (i.e., "sudo pip install --upgrade pip"),
>>> though it is not really necessary to run abjab or anything else, which
>>> seems to have installed properly.
>>>
>>> - Dave
>>>
>>> On Sun, Nov 1, 2020 at 8:01 AM Stefan Thomas <
>>> kontrapunktste...@gmail.com> wrote:
>>>
 Dear community,
 I tried to install abjad with
 pip install abjad
 And I got:

> Collecting abjad
>  Using cached
> https://files.pythonhosted.org/packages/f7/2f/23b14c7ff2ca1a5728e81fc1b5960374ec444efad43b197dca009
> 53d90cc/Abjad-3.1.tar.gz
> Could not import setuptools which is required to install from a source
> distribution.
> Please install setuptools.
>
>
> You are using pip version 9.0.3, however version 20.2.4 is available.
> You should consider upgrading via the 'pip install --upgrade pip'
> command.
>
 And after

> pip install --upgrade pip
>
 I've got

> Collecting pip
>  Using cached
> https://files.pythonhosted.org/packages/cb/28/91f26bd088ce8e22169032100d4260614fc3da435025ff389ef1d
> 396a433/pip-20.2.4-py2.py3-none-any.whl
> Installing collected packages: pip
>  Found existing installation: pip 9.0.3
>Uninstalling pip-9.0.3:
>  Successfully uninstalled pip-9.0.3
>  Rolling back uninstall of pip
> Exception:
> Traceback (most recent call last):
>
>
>  File
> "/home/stefan/.local/lib/python2.7/site-packages/pip/basecommand.py", line
> 215, in main
>status = self.run(options, args)
>
>
>  File
> "/home/stefan/.local/lib/python2.7/site-packages/pip/commands/install.py",
> line 342, in run
>prefix=options.prefix_path,
>
>
>  File
> "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_set.py", line
> 784, in install
>**kwargs
>
>
>  File
> "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py",
> line 851, in install
>self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
>
>  File
> "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py",
> line 1064, in move_wheel_files
>isolated=self.isolated,
>
>
>  File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py",
> line 345, in move_wheel_files
>clobber(source, lib_dir, True)
>
>
>  File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py",
> line 316, in clobber
>ensure_dir(destdir)
>
>
>  File
> "/home/stefan/.local/lib/python2.7/site-packages/pip/utils/__init__.py",
> line 83, in ensure_dir
>os.makedirs(path)
>
>
>  File "/usr/lib/python2.7/os.py", line 157, in makedirs
>
>mkdir(name, mode)
>
>
> OSError: [Errno 13] Permission denied:
> '/usr/local/lib/python2.7/dist-packages/pip-20.2.4.dist-info'
>
> You are using pip version 9.0.3, however version 20.2.4 is available.
> You should consider upgrading via the 'pip install --upgrade pip'
> command.
>
 What can I do know?
 Thanks for Your help,
 Stefan

 Hey Megan,
>
> I use a different approach, but have you checked Abjad already?
> https://abjad.github.io/index.html
>
> Cheers
> Martín.
>
> www.martinrinconbotero.com
> On 31. Oct 2020, 18:51 +0100, Megan Aldrich ,
> wrote:
> > Hello,
> >
> > Is there a package that would allow me to output in a lilypond
> format from python? I found something through google searches and it’s
> poorly documented and hard to use. Is there something that you recommend
> using?
> >
> > Meg
> > --
> > Megan Aldrich
> >
> > Connecticut College
>




Re: Sprechgesang

2020-11-01 Thread Massimiliano Viel
Hi,
yes the code was pretty old, about 2007.

So it is good to have updated this topic in the forum.
Thank you to you and everybody!

unofortunately I use Lilypond only once in a while, so I don’t use it enough to 
develop a deep knowledge as I would like.
first one who writes a book/tutorial on Lilypond… kudos!

 best to everybody

massimiliano


> On 1 Nov 2020, at 10:08, Lukas-Fabian Moser  wrote:
> 
> Hi Massimiliano,
> 
> the code you provided is _very_ old. I modified it a bit in order to work 
> with both possible stem directions and respect rests. Also, there was a 
> hard-coded offset for the cross that can more succinctly be replaced by a 
> \center-align.
> 
> I also lenghened the stems a bit. Note that this does not work together with 
> beams - I suspect it's got to do with unpure-pure-containers, which I don't 
> understand :-).
> 
> Best
> Lukas
> \version "2.21.6"
> 
> sp =
> {
>   \override Stem.stencil =
>   #(lambda (grob)
>  (let ((dir (ly:grob-property grob 'direction))
>(length (ly:grob-property grob 'length))
>(actual-stem (ly:stem::print grob)))
>(if (ly:stencil? actual-stem) ; do not add anything if we don't have a 
> stem (e.g. rests)
>(ly:stencil-combine-at-edge actual-stem
>1
>dir
>(ly:text-interface::print grob)
>(+ (* length -0.5) 0.75)) ; 0.75 is 
> the distance from cross to start of notehead
>empty-stencil)))
>   \override Voice.Stem.text = \markup \center-align \teeny \musicglyph 
> #"noteheads.s2cross"
>   \override Voice.Stem.length = #(lambda (grob) (+ 0.5 (ly:stem::calc-length 
> grob)))
> }
> 
> \relative {
>   \sp c'4 d e8[ f g a] b4 r c4 d e
>   \undo \sp e d c b a
>   \once \sp g f e
> }
> Am 31.10.20 um 23:03 schrieb Massimiliano Viel:
>> And another possibly outrageous question… when I invoke \sp, it works from 
>> the first following note on to the last note, rests included (!).
>> How do I stop it?
> I showed both \undo\sp and \once\sp in my example.
> 
> Enjoy LilyPond - it's amazing what you can achieve with it!
> 
> Lukas
> 



Lilypond stable release candidate now available

2020-11-01 Thread Phil Holmes

We are pleased to announce that Lilypond 2.21.80 has now been released and is 
available to download and install.  This is the first release candidate for the 
next stable version: 2.22.0, so we would be grateful if as many users as 
possible could install and test it.

Thanks in advance.

--
Phil Holmes




Re: Lilypond and Python

2020-11-01 Thread Stefan Thomas
Dear Dave,
thanks for Your soon reply.
When I type

> sudo pip install --upgrade pip
>
I get

> sudo: pip: command not found
>
I don't know how to update pip.
Do You have a hint?
All the best,
Stefan



Am So., 1. Nov. 2020 um 14:15 Uhr schrieb Dave Seidel :

> Try upgrading pip with sudo (i.e., "sudo pip install --upgrade pip"),
> though it is not really necessary to run abjab or anything else, which
> seems to have installed properly.
>
> - Dave
>
> On Sun, Nov 1, 2020 at 8:01 AM Stefan Thomas 
> wrote:
>
>> Dear community,
>> I tried to install abjad with
>> pip install abjad
>> And I got:
>>
>>> Collecting abjad
>>>  Using cached
>>> https://files.pythonhosted.org/packages/f7/2f/23b14c7ff2ca1a5728e81fc1b5960374ec444efad43b197dca009
>>> 53d90cc/Abjad-3.1.tar.gz
>>> Could not import setuptools which is required to install from a source
>>> distribution.
>>> Please install setuptools.
>>>
>>>
>>> You are using pip version 9.0.3, however version 20.2.4 is available.
>>> You should consider upgrading via the 'pip install --upgrade pip'
>>> command.
>>>
>> And after
>>
>>> pip install --upgrade pip
>>>
>> I've got
>>
>>> Collecting pip
>>>  Using cached
>>> https://files.pythonhosted.org/packages/cb/28/91f26bd088ce8e22169032100d4260614fc3da435025ff389ef1d
>>> 396a433/pip-20.2.4-py2.py3-none-any.whl
>>> Installing collected packages: pip
>>>  Found existing installation: pip 9.0.3
>>>Uninstalling pip-9.0.3:
>>>  Successfully uninstalled pip-9.0.3
>>>  Rolling back uninstall of pip
>>> Exception:
>>> Traceback (most recent call last):
>>>
>>>
>>>  File
>>> "/home/stefan/.local/lib/python2.7/site-packages/pip/basecommand.py", line
>>> 215, in main
>>>status = self.run(options, args)
>>>
>>>
>>>  File
>>> "/home/stefan/.local/lib/python2.7/site-packages/pip/commands/install.py",
>>> line 342, in run
>>>prefix=options.prefix_path,
>>>
>>>
>>>  File
>>> "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_set.py", line
>>> 784, in install
>>>**kwargs
>>>
>>>
>>>  File
>>> "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py",
>>> line 851, in install
>>>self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
>>>
>>>  File
>>> "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py",
>>> line 1064, in move_wheel_files
>>>isolated=self.isolated,
>>>
>>>
>>>  File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py",
>>> line 345, in move_wheel_files
>>>clobber(source, lib_dir, True)
>>>
>>>
>>>  File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py",
>>> line 316, in clobber
>>>ensure_dir(destdir)
>>>
>>>
>>>  File
>>> "/home/stefan/.local/lib/python2.7/site-packages/pip/utils/__init__.py",
>>> line 83, in ensure_dir
>>>os.makedirs(path)
>>>
>>>
>>>  File "/usr/lib/python2.7/os.py", line 157, in makedirs
>>>
>>>mkdir(name, mode)
>>>
>>>
>>> OSError: [Errno 13] Permission denied:
>>> '/usr/local/lib/python2.7/dist-packages/pip-20.2.4.dist-info'
>>>
>>> You are using pip version 9.0.3, however version 20.2.4 is available.
>>> You should consider upgrading via the 'pip install --upgrade pip'
>>> command.
>>>
>> What can I do know?
>> Thanks for Your help,
>> Stefan
>>
>> Hey Megan,
>>>
>>> I use a different approach, but have you checked Abjad already?
>>> https://abjad.github.io/index.html
>>>
>>> Cheers
>>> Martín.
>>>
>>> www.martinrinconbotero.com
>>> On 31. Oct 2020, 18:51 +0100, Megan Aldrich ,
>>> wrote:
>>> > Hello,
>>> >
>>> > Is there a package that would allow me to output in a lilypond format
>>> from python? I found something through google searches and it’s poorly
>>> documented and hard to use. Is there something that you recommend using?
>>> >
>>> > Meg
>>> > --
>>> > Megan Aldrich
>>> >
>>> > Connecticut College
>>>
>>
>>


Re: Lilypond and Python

2020-11-01 Thread Martín Rincón Botero
Hi Stefan. I remember having to make my version of Python 3 (3.6 I think) the 
system default (yours is 2.7) for abjad to work. I also remember having to 
install some things as root for it to work (you have a “Permission Denied” 
somewhere...). I read somewhere it’s not recommendable to use root with pip, 
but it worked with no discernible side effects.

Cheers,
Martín.

www.martinrinconbotero.com
On 1. Nov 2020, 14:01 +0100, Stefan Thomas , wrote:
> Dear community,
> I tried to install abjad with
> pip install abjad
> And I got:
> > Collecting abjad
> >  Using cached 
> > https://files.pythonhosted.org/packages/f7/2f/23b14c7ff2ca1a5728e81fc1b5960374ec444efad43b197dca009
> > 53d90cc/Abjad-3.1.tar.gz
> > Could not import setuptools which is required to install from a source 
> > distribution.
> > Please install setuptools.
> > You are using pip version 9.0.3, however version 20.2.4 is available.
> > You should consider upgrading via the 'pip install --upgrade pip' command.
> And after
> > pip install --upgrade pip
> I've got
> > Collecting pip
> >  Using cached 
> > https://files.pythonhosted.org/packages/cb/28/91f26bd088ce8e22169032100d4260614fc3da435025ff389ef1d
> > 396a433/pip-20.2.4-py2.py3-none-any.whl
> > Installing collected packages: pip
> >  Found existing installation: pip 9.0.3
> >    Uninstalling pip-9.0.3:
> >  Successfully uninstalled pip-9.0.3
> >  Rolling back uninstall of pip
> > Exception:
> > Traceback (most recent call last):
> >  File "/home/stefan/.local/lib/python2.7/site-packages/pip/basecommand.py", 
> > line 215, in main
> >    status = self.run(options, args)
> >  File 
> > "/home/stefan/.local/lib/python2.7/site-packages/pip/commands/install.py", 
> > line 342, in run
> >    prefix=options.prefix_path,
> >  File "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_set.py", 
> > line 784, in install
> >    **kwargs
> >  File 
> > "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py", 
> > line 851, in install
> >    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
> >  File 
> > "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py", 
> > line 1064, in move_wheel_files
> >    isolated=self.isolated,
> >  File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py", line 
> > 345, in move_wheel_files
> >    clobber(source, lib_dir, True)
> >  File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py", line 
> > 316, in clobber
> >    ensure_dir(destdir)
> >  File 
> > "/home/stefan/.local/lib/python2.7/site-packages/pip/utils/__init__.py", 
> > line 83, in ensure_dir
> >    os.makedirs(path)
> >  File "/usr/lib/python2.7/os.py", line 157, in makedirs
> >    mkdir(name, mode)
> > OSError: [Errno 13] Permission denied: 
> > '/usr/local/lib/python2.7/dist-packages/pip-20.2.4.dist-info'
> > You are using pip version 9.0.3, however version 20.2.4 is available.
> > You should consider upgrading via the 'pip install --upgrade pip' command.
> What can I do know?
> Thanks for Your help,
> Stefan
>
> > Hey Megan,
> >
> > I use a different approach, but have you checked Abjad already? 
> > https://abjad.github.io/index.html
> >
> > Cheers
> > Martín.
> >
> > www.martinrinconbotero.com
> > On 31. Oct 2020, 18:51 +0100, Megan Aldrich , wrote:
> > > Hello,
> > >
> > > Is there a package that would allow me to output in a lilypond format 
> > > from python? I found something through google searches and it’s poorly 
> > > documented and hard to use. Is there something that you recommend using?
> > >
> > > Meg
> > > --
> > > Megan Aldrich
> > >
> > > Connecticut College
>


Re: The Guide to getting Point and Click going with Gvim under Ubuntu 18

2020-11-01 Thread Martín Rincón Botero
Thank you very much, Andrew, for this guide! It works! My pdf viewer is
Foxit Reader so after installing the gnome-open program and checking it
works, I didn't have to follow any other steps. I wish this guide can be
merged with the current guide in the Usage Manual. Just one small
suggestion to make this guide even more idiot-proof (at least for the steps
I did) would be to make this step a bit more verbose: "Create the file
'lilypond-invoke-editor.desktop' *f. ex. in your home folder*". The next
command assumes that you created the file via terminal and you moved to
that location with the terminal. In the case that you created that file
using GEdit (like I did) and followed the instructions in the Usage Manual
(where it mentions /tmp as folder), the next command won't really work
unless you're already there in the terminal (where I wasn't, since a
terminal opens by default with the home directory). This might be obvious
for people who do everything via terminal, but not for people who prefer
using graphical applications like GEdit. Is it maybe possible to create a
script that automates all this? Perhaps the Gvim and Evince parts can be
left out of it, but I have the feeling that what I just had to do can be
made into a script. I already can do some scripting in Python, but such a
script would need the user to have Python installed. So a Bash script from
someone acquainted with Bash would be very welcome.

Atom works very well even with large files, however there's a small lag
with point & click (even with small files). Since Frescobaldi doesn't have
this Point & Click problem even with large files, I assume this small lag
has more to do with the fact that there are two applications involved (Atom
and Foxit) rather than one (Frescobaldi). Am I right? This Point & Click
penalty is something that I'm willing to trade for the moment: it's less
than Frescobaldi hanging while trying to move the cursor, let alone for
trying to edit a large file. I hope this performance issue can be fixed in
Frescobaldi eventually (although Atom has other advantages like Column
Selection...).

Cheers,
Martín.

Am So., 1. Nov. 2020 um 05:13 Uhr schrieb Andrew Bernard <
andrew.bern...@gmail.com>:

> [A slightly older screed. Stil works for Ubunto 20. Using Atom is matter
> of simple substitution.]
>
>
>
> The Guide to getting Point and Click going with Gvim under Ubuntu 18
>
> --
>
> The NR leaves out some important information about how to configure a
> Ubuntu
> system to use Gvim for point and click from Lilypond PDF files. Where
> the NR is
> substantially correct, that information is copied here.
>
>
> Requirements
> 
>
> Ubuntu 18.10
> Document Viewer (evince)
> gvim version 8.0 (vim-gtk3 package)
> [assumes bash shell]
>
>
> Setting the EDITOR variable
> ---
>
> Lilypond uses the environment variable EDITOR to select which editor to
> use to
> display point and click links. For gvim, simply use the value 'gvim':
>
> export EDITOR=gvim
>
> Setting LYEDITOR is not required.
>
> You can start evince from a terminal command to view a PDF. But if you
> want to
> click on a PDF in GNOME Nautilus to view it then just exporting this
> variable
> from the various bash startup files is inadequate. Gnome is started by
> Xsession
> in X11 before terminals and shells. Therefore it is unable to see
> environment
> variables set in .bashrc (or .bash_profile, etc). To resolve this matter,
> recall that Xsession uses the startup file $HOME/.xsessionrc. For
> environment
> variables that are to be shared between GNOME applications and terminal
> shells,
> do the following. Create a file for variable declarations, of arbitrary
> name.
> Add the EDITOR setting to that file:
>
>   $ echo 'export EDITOR=gvim' > ~/.my_env_vars
>
> Then edit ~/.xsessionrc to contain:
>
> if [ -f ~/.my_env_vars ]; then
>  . ~/.my_env_vars
> fi
>
> Now also add these same lines to ~/.bashrc. Some like to use
> .bash_profile or
> other mechanisms, but the principle is the same. Manage any shared
> variables
> that Nautilus and a bash shell both need in this third file. To make
> this take
> effect, logout and login again so that a new Xsession is started.
>
>
> Installing Gvim
> ---
>
> Gvim is in the following package, not a package called gvim.
>
> # apt install vim-gtk3
>
>
> Configuring the GNOME 3 Desktop
> ---
>
> Create the file 'lilypond-invoke-editor.desktop':
>
> [Desktop Entry]
> Version=1.0
> Name=lilypond-invoke-editor
> GenericName=Textedit URI handler
> Comment=URI handler for textedit:
> Exec=lilypond-invoke-editor %u
> Terminal=false
> Type=Application
> MimeType=x-scheme-handler/textedit;
> Categories=Editor
> NoDisplay=true
>
> Run:
>
> $ xdg-desktop-menu install ./lilypond-invoke-editor.desktop
> $ xdg-mime default lilypond-invoke-editor.desktop x-scheme-handler/textedit
>
> 

Re: The Guide to getting Point and Click going with Gvim under Ubuntu 18

2020-11-01 Thread Ralph Palmer
On Sun, Nov 1, 2020 at 12:13 AM Andrew Bernard 
wrote:

> [A slightly older screed. Stil works for Ubunto 20. Using Atom is matter
> of simple substitution.]
>
>
>
> The Guide to getting Point and Click going with Gvim under Ubuntu 18
>
> --
>
> The NR leaves out some important information about how to configure a
> Ubuntu
> system to use Gvim for point and click from Lilypond PDF files. Where
> the NR is
> substantially correct, that information is copied here.
>

Thanks, Andrew, for both of these sets of instructions. Helpful and very
generous.

Be well,

Ralph


-- 
Ralph Palmer
Brattleboro, VT
USA
(he, him, his)
palmer.r.vio...@gmail.com


\bracketize?

2020-11-01 Thread 田村淳
Hello,

I’m looking for a “bracket” version of “\parenthesize” function to enclose an 
articulation or ornamentation mark within a pair of square brackets. I’d like 
to use parenthesis and brackets to indicate two different types of editorial 
additions. I achieved the same for dynamics marks by slightly modifying the LSR 
code “Creating "real" parenthesized dynamics”
http://lsr.di.unimi.it/LSR/Item?id=382 
http://lsr.di.unimi.it/LSR/Snippet?id=382 

Is there an easy way to create “\bracketize” function?

Thanks in advance and best regards.

Jun Tamura (he/him/his)



Re: Lilypond and Python

2020-11-01 Thread Stefan Thomas
Dear community,
I tried to install abjad with
pip install abjad
And I got:

> Collecting abjad
>  Using cached
> https://files.pythonhosted.org/packages/f7/2f/23b14c7ff2ca1a5728e81fc1b5960374ec444efad43b197dca009
> 53d90cc/Abjad-3.1.tar.gz
> Could not import setuptools which is required to install from a source
> distribution.
> Please install setuptools.
>
>
> You are using pip version 9.0.3, however version 20.2.4 is available.
> You should consider upgrading via the 'pip install --upgrade pip'
> command.
>
And after

> pip install --upgrade pip
>
I've got

> Collecting pip
>  Using cached
> https://files.pythonhosted.org/packages/cb/28/91f26bd088ce8e22169032100d4260614fc3da435025ff389ef1d
> 396a433/pip-20.2.4-py2.py3-none-any.whl
> Installing collected packages: pip
>  Found existing installation: pip 9.0.3
>Uninstalling pip-9.0.3:
>  Successfully uninstalled pip-9.0.3
>  Rolling back uninstall of pip
> Exception:
> Traceback (most recent call last):
>
>
>  File
> "/home/stefan/.local/lib/python2.7/site-packages/pip/basecommand.py", line
> 215, in main
>status = self.run(options, args)
>
>
>  File
> "/home/stefan/.local/lib/python2.7/site-packages/pip/commands/install.py",
> line 342, in run
>prefix=options.prefix_path,
>
>
>  File
> "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_set.py", line
> 784, in install
>**kwargs
>
>
>  File
> "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py",
> line 851, in install
>self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
>
>  File
> "/home/stefan/.local/lib/python2.7/site-packages/pip/req/req_install.py",
> line 1064, in move_wheel_files
>isolated=self.isolated,
>
>
>  File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py", line
> 345, in move_wheel_files
>clobber(source, lib_dir, True)
>
>
>  File "/home/stefan/.local/lib/python2.7/site-packages/pip/wheel.py", line
> 316, in clobber
>ensure_dir(destdir)
>
>
>  File
> "/home/stefan/.local/lib/python2.7/site-packages/pip/utils/__init__.py",
> line 83, in ensure_dir
>os.makedirs(path)
>
>
>  File "/usr/lib/python2.7/os.py", line 157, in makedirs
>
>mkdir(name, mode)
>
>
> OSError: [Errno 13] Permission denied:
> '/usr/local/lib/python2.7/dist-packages/pip-20.2.4.dist-info'
>
> You are using pip version 9.0.3, however version 20.2.4 is available.
> You should consider upgrading via the 'pip install --upgrade pip' command.
>
What can I do know?
Thanks for Your help,
Stefan

Hey Megan,
>
> I use a different approach, but have you checked Abjad already?
> https://abjad.github.io/index.html
>
> Cheers
> Martín.
>
> www.martinrinconbotero.com
> On 31. Oct 2020, 18:51 +0100, Megan Aldrich ,
> wrote:
> > Hello,
> >
> > Is there a package that would allow me to output in a lilypond format
> from python? I found something through google searches and it’s poorly
> documented and hard to use. Is there something that you recommend using?
> >
> > Meg
> > --
> > Megan Aldrich
> >
> > Connecticut College
>


Re: Point & Click with Atom

2020-11-01 Thread Martín Rincón Botero
Thank you all for your helpful answers!

@Federico: I hope, you don’t take my criticism personally! I see Andrew has 
written upon what you wrote. That’s great! I’ll have to check how I installed 
Atom. If it’s in Ubuntu’s software center, I probably installed it from there 
(so it’s a snap, I suppose). Does it make any difference in the steps? And yes, 
Lilypond 2.20.

@Andrew: I’ll try your Ubuntu guide later. Thank you! I’m using Ubuntu 18.04., 
so your instructions should work.

Best regards,
Martín.

www.martinrinconbotero.com
On 1. Nov 2020, 11:03 +0100, Wols Lists , wrote:
> On 01/11/20 02:13, David Wright wrote:
> > If one
> > deals only with graphical applications, there is almost no scope
> > for a shell to make an appearance at all, so it seems strange, to
> > some, to involve the shell at login time.
>
> AIUI, the problem is made worse by the fact that - if you log in at the
> gui - the shell doesn't get invoked AT ALL until it's needed to run the
> command, at which point it's too late.
>
> Catch 22 - the shell gets run after the command is called, but the
> command needs the shell running first so the command-line knows where to
> find the command!
>
> Cheers,
> Wol
>


Re: Point & Click with Atom

2020-11-01 Thread Wols Lists
On 01/11/20 02:13, David Wright wrote:
> If one
> deals only with graphical applications, there is almost no scope
> for a shell to make an appearance at all, so it seems strange, to
> some, to involve the shell at login time.

AIUI, the problem is made worse by the fact that - if you log in at the
gui - the shell doesn't get invoked AT ALL until it's needed to run the
command, at which point it's too late.

Catch 22 - the shell gets run after the command is called, but the
command needs the shell running first so the command-line knows where to
find the command!

Cheers,
Wol



Re: Point & Click with Atom

2020-11-01 Thread David Kastrup
Werner LEMBERG  writes:

>> ¹ I'm not sure of the distinction between Character and Column in the
>>   textedit string. Perhaps it's used by spreadsheets or something.
>
> There exist 'wide characters', for example CJKV ideographs, which use
> two columns per character on the terminal.

I am not sure "character" and "column" is an accurate description.  From
what I seem to remember (but I'd have to look it up), the numbers are a
byte offset and a UTF-8 character position.  The former may be 0-based.
I don't think the latter takes anything like wide characters or tabs or
combining characters into account.

-- 
David Kastrup



Re: Sprechgesang

2020-11-01 Thread Lukas-Fabian Moser

Hi Massimiliano,

the code you provided is _very_ old. I modified it a bit in order to 
work with both possible stem directions and respect rests. Also, there 
was a hard-coded offset for the cross that can more succinctly be 
replaced by a \center-align.


I also lenghened the stems a bit. Note that this does not work together 
with beams - I suspect it's got to do with unpure-pure-containers, which 
I don't understand :-).


Best
Lukas

\version "2.21.6"

sp =
{
  \override Stem.stencil =
  #(lambda (grob)
 (let ((dir (ly:grob-property grob 'direction))
   (length (ly:grob-property grob 'length))
   (actual-stem (ly:stem::print grob)))
   (if (ly:stencil? actual-stem) ; do not add anything if we don't 
have a stem (e.g. rests)

   (ly:stencil-combine-at-edge actual-stem
   1
   dir
   (ly:text-interface::print grob)
   (+ (* length -0.5) 0.75)) ; 0.75 
is the distance from cross to start of notehead

   empty-stencil)))
  \override Voice.Stem.text = \markup \center-align \teeny \musicglyph 
#"noteheads.s2cross"
  \override Voice.Stem.length = #(lambda (grob) (+ 0.5 
(ly:stem::calc-length grob)))

}

\relative {
  \sp c'4 d e8[ f g a] b4 r c4 d e
  \undo \sp e d c b a
  \once \sp g f e
}

Am 31.10.20 um 23:03 schrieb Massimiliano Viel:
And another possibly outrageous question… when I invoke /\sp/, it 
works from the first following note on to the last note, rests 
included (!).

How do I stop it?


I showed both \undo\sp and \once\sp in my example.

Enjoy LilyPond - it's amazing what you can achieve with it!

Lukas



Re: Point & Click with Atom

2020-11-01 Thread Werner LEMBERG
> ¹ I'm not sure of the distinction between Character and Column in the
>   textedit string. Perhaps it's used by spreadsheets or something.

There exist 'wide characters', for example CJKV ideographs, which use
two columns per character on the terminal.


Werner