Re: Still struggling to understand Lilypond 2.23.10 segno repeats
HI Jean; As always, thank you very much for this help. I saw the documentation that you pointed out already, but I just couldn't seem to grasp how to apply it to my situation. Sometimes I think the documentation is too "MWE" :-) I will study this and try to understand it to the point where I can apply it to the other pieces that I have which these kinds of repeats without having spoon-feeding assistance. Thanks, Ken On Sat, Jul 23, 2022 at 2:03 PM Jean Abou Samra wrote: > > > > Le 23/07/2022 à 03:48, Kenneth Wolcott a écrit : > > Can_You_Feel_the_Love_Tonight.pdf > > <https://drive.google.com/file/d/17JcvzHc9RVLfJk_54oNRl0QqXO7QpT-U/view?usp=drive_web> > > Hi; > > > > I have a piece of music ("Can You Feel the Love Tonight") which I am > > trying to engrave using Lilypond 2.23.10. > > > > I have (mostly) succeeded in engraving this with Lilypond 2.22.2, > > but the many directives regarding the Coda and DS look awful. > > > > So, I tried using the \repeat segno feature, which almost looks > > correct, but I have problems understanding how to glue in the Coda > > part (is that like a volta?). > > > > Could someone clue me in on the Lilypond syntax that I am missing so > > that the pdf looks right and the midi sounds right? > > Kenneth, > > There is an example with an al coda repeat here: > > https://lilypond.org/doc/v2.23/Documentation/notation/long-repeats.html#segno-repeat-structure > > The syntax is > > \repeat segno 2 { > >\alternative { > \volta 1 { > > } > \volta 2 \volta #'() { >\section >\sectionLabel Coda > } >} > > } > > Attached is your file amended to use this syntax. > > Best, > Jean >
Re: Still struggling to understand Lilypond 2.23.10 segno repeats
Le 23/07/2022 à 03:48, Kenneth Wolcott a écrit : Can_You_Feel_the_Love_Tonight.pdf <https://drive.google.com/file/d/17JcvzHc9RVLfJk_54oNRl0QqXO7QpT-U/view?usp=drive_web> Hi; I have a piece of music ("Can You Feel the Love Tonight") which I am trying to engrave using Lilypond 2.23.10. I have (mostly) succeeded in engraving this with Lilypond 2.22.2, but the many directives regarding the Coda and DS look awful. So, I tried using the \repeat segno feature, which almost looks correct, but I have problems understanding how to glue in the Coda part (is that like a volta?). Could someone clue me in on the Lilypond syntax that I am missing so that the pdf looks right and the midi sounds right? Kenneth, There is an example with an al coda repeat here: https://lilypond.org/doc/v2.23/Documentation/notation/long-repeats.html#segno-repeat-structure The syntax is \repeat segno 2 { \alternative { \volta 1 { } \volta 2 \volta #'() { \section \sectionLabel Coda } } } Attached is your file amended to use this syntax. Best, Jean \version "2.23.10" % Can You Feel the Love Tonight % (from the Lion King) global = { \language "english" \numericTimeSignature \time 4/4 \key c \major \tempo "Moderately" } \header { title = "Can You Feel the Love Tonight" subtitle = "(from the \"Lion King\")" composer = "Elton John" } ds_al_coda = ^\markup { \fontsize #3 "D.S. al Coda" } rit_e_dim = _\markup { \italic "rit. e dim." } to_coda = ^\markup { \fontsize #3 "To Coda" } % coda = -\tweak outside-staff-priority #605 \mark \markup { \fontsize #3 "CODA" } coda = \mark \markup { \fontsize #2 "CODA" } rh = { \global \clef treble e''2^3\mp d''4 g'' | % m1 f''2 f''8^5 e'' c'' g' | % m2 a'2 g'8 c'' g'4^2 | % m3 %\break d'4^1 e' f' g'^1 | % m4 \repeat segno 2 { % \mark \markup { \musicglyph "scripts.segno" } a'8 b' c'' d'' c'' g'4. | % m5 a'8 b' c'' d'' c''2 | % m6 %\break a'8 b' c'' d''16 d'' c''8 g' e''4^4 | % m7 f''8 e'' d'' e'' d''2| % m8 %\break a'8 b' c'' d'' c'' g'4. | % m9 a'8 b' c'' d'' c''2 | % m10 %\break a'8 b' c'' g'16 g' g''8 e'' c'' a' | % m11 f''8 e'' d'' e'' d''4. g'8 | % m12 %\break \repeat volta 2 { g''4. e''8 e''4. g''8 | % m13 e''4 c''8 a' ~ a'2 | % m14 r4 g'8 c'' f''4 e''| % m15 %\break d''1 | % m16 r4 a'8 b' c''4 g'8 g' | % m17 g''4 e'' c''8 c'' a'4 | % m18 } %\break \alternative { { f''4 e'' d'' e'' | % m19 d''2. r8 g' | % m20 } { f''4 e'' d'' c''8 c'' ~ | % m21 } } %\break c''2. r4 | % m22 \alternative { \volta 1 { e''2^3 d''4 g'' | % m23 f''2 f''8 e'' c'' g' | % m24 %\break a'2 g'8 c'' g'4^2 | % m25 d'4 e' f' g' | % m26 } \volta 2 \volta #'() { \section \sectionLabel Coda } } } % \mark \markup { \musicglyph "scripts.coda" } r4 a'8 b' c''4 g'8 g' | % m27 %\break g''4 e'' c''8\rit_e_dim c'' a' a' | % m28 f''4 e'' d'' c''8 c'' ~ | % m29 c''4 a'8 f' e''2\fermata| % m30 \fine } lh = { \global \clef bass c'2_1 b | % m1 a2 g | % m2 f4 c' e2 | % m3 %\break b1| % m4 \repeat segno 2 { f2 e | % m5 f2 e | % m6 %\break f2 e| % m7 f2 g_2 | % m8 %\break f2 e | % m9 f2 e | % m10 %\break f2 a | % m11 bf2 b8 a g f | % m12 %\break \repeat volta 2 { e2 g | % m13 a2 f | % m14 c'2 f4 fs | % m15 %\break g4 a b g_2 | % m16 f2 e| % m17 c'2 a | % m18 } %\break \alternative { { f2. fs4 | % m19 g4 b a g8 f | % m20 } { d4 e f g | % m21 } } %\break f8 a g f e4 g | % m22 \alternative { \volta 1 { c'2 b | % m23 a2 g | % m24 %\break f4 c' e2 | % m25 b4 c' d e | % m26 } \volta 2 \volta #'() { \section \sectionLabel Coda } } } f2 e | % m27 %\break a4 g f2 | % m28 d4 e g g| % m29 c1\fermata | % m30 \fine } \score { \new PianoStaff \with { instrumentName = "Piano" } << \new Staff \rh \new Staff \lh >> \layout {} } \score { \unfoldRepeats { << \new Staff { \set Staff.midiInstrument = "acoustic grand" \rh } \new Staff { \set Staff.midiInstrument = "acoustic grand" \lh } >> } % \midi { % \tempo 4=112 % } }
Re: Installing Lilypond 2.23.10
Le 20/07/2022 à 17:52, David Sumbler a écrit : This worked perfectly, although I don't fully understand it. At first I assumed that your 'LilyPond-lilypond-command' was a typo for 'LilyPond-command-lilypond', but that wasn't recognized as a command whereas your version was. I now see that your version is a Lilypond-mode command, and my version is a Lilypond-mode Lisp function. No wonder I couldn't figure it out for myself. To be precise, LilyPond-command-lilypond is the (Lisp) function that runs LilyPond on the file. You can run it with M-x LilyPond-command-lilypond (like any Lisp function), and by default it is bound to C-c C-l. LilyPond-lilypond-command is a variable, the name of the command to be used by LilyPond-command-lilypond. It is declared as a "Custom variable", so you can modify it using the Custom interface. Anyway, thanks for all your help. It looks as if I now have Lilypond up and running again. You're welcome. Best, Jean
Re: Installing Lilypond 2.23.10
On Wed, 2022-07-20 at 16:52 +0100, David Sumbler wrote: > On Tue, 2022-07-19 at 23:56 +0200, Jean Abou Samra wrote: > > Le 19/07/2022 à 18:26, David Sumbler a écrit : > > > My usual work pattern is to edit .ly files etc. in emacs, and > > > then to > > > use the Lilypond-mode command C-c C-l or C-c C-f to produce a PDF > > > or > > > Postscript file. Unfortunately I found that this now just > > > produces an > > > error message, such as: > > > > > > lilypond /home/david/Cloud/LilyPond/test.ly > > > /bin/bash: line 1: lilypond: command not found > > > > > > Compilation exited abnormally with code 127 at Tue Jul 19 > > > 16:07:42 > > > > > > I eventually realized that having the alias included in .bashrc > > > was > > > not working because this is only for interactive shells. But I > > > have > > > tried putting it in .bash_profile, logging out and then logging > > > in > > > again, and this doesn't work either. > > > > > > An alias only has effect in the shell, not on the system > > in general. You'd need to set up actual scripts in a place > > where they will be found. One way to do so is to add > > symlinks in a directory that is on your PATH, like ~/bin. > > > > ln -s /path/to/lilypond-2.23.10/bin/* ~/bin > > > > Though, in my opinion, the best way is to actually point > > your editor to the executable, see below. > > > > > > > > > If somebody can suggest how I get emacs-mode Lilypond-command- > > > lilypond > > > and Lilypond-command-formatps to work, it will be very much > > > appreciated, as always. > > > > > > Try this: > > > > Edit any .ly file in Emacs > > > > M-x customize-variable > > > > In minibuffer, enter 'LilyPond-lilypond-command' > > > > A customization screen appears, click on the arrow on the > > left to expand the variable. On the right, write the full > > path to LilyPond: > > > > /.../lilypond-2.23.10/bin/lilypond > > > > Now C-x C-s to save, and q to quit Custom. > > > > After that, try C-c C-l on the .ly file. It should > > be compiled with the lilypond executable you specified. > > This worked perfectly, although I don't fully understand it. At > first I assumed that your 'LilyPond-lilypond-command' was a typo for > 'LilyPond-command-lilypond', but that wasn't recognized as a command > whereas your version was. I now see that your version is a Lilypond- > mode command, and my version is a Lilypond-mode Lisp function. No > wonder I couldn't figure it out for myself. > > Anyway, thanks for all your help. It looks as if I now have Lilypond > up and running again. > > David > > >
Re: Installing Lilypond 2.23.10
Le 19/07/2022 à 18:26, David Sumbler a écrit : I should think that most users only use one version at a time, unless they have the understanding to help in testing development versions, in which case they would probably know that they can have several versions. There are also those who write lots of scores in one stable version and then would prefer not to upgrade them all to the next stable version even if they use the new version for new scores. I think you are overcomplicating things by trying to mimic the previous installation process with the new binaries. Changing /usr/local/ is normally done by package managers and dedicated tools, not by hand. If you don't know what you're doing there, don't touch it. (This kind of advice applies to any command using sudo, actually.) I merely moved the new installation to the place where it would have been put by the script, had there been one. I have successfully administered my own Linux boxes for the last 20 years or so without any major mishaps... Instead, follow these simple steps. (I agree that _finding_ them is not simple, but again it will eventually be in the learning manual, with screenshots. That change has landed and will appear in the next release.) 1. Download the archive. 2. Unpack it. 3. Move the lilypond-2.23.10 directory inside it in your home folder. 4. In your .emacs, change the path in (expand-file-name ...) to "~/lilypond-2.23.10/share/emacs/site-lisp". And that's all. Thanks for those clear instructions. And having set up an alias, as suggested by David W., I found that typing 'lilypond' in a bash terminal produces the expected result. However, this is not something I often do. My usual work pattern is to edit .ly files etc. in emacs, and then to use the Lilypond-mode command C-c C-l or C-c C-f to produce a PDF or Postscript file. Unfortunately I found that this now just produces an error message, such as: lilypond /home/david/Cloud/LilyPond/test.ly /bin/bash: line 1: lilypond: command not found Compilation exited abnormally with code 127 at Tue Jul 19 16:07:42 I eventually realized that having the alias included in .bashrc was not working because this is only for interactive shells. But I have tried putting it in .bash_profile, logging out and then logging in again, and this doesn't work either. An alias only has effect in the shell, not on the system in general. You'd need to set up actual scripts in a place where they will be found. One way to do so is to add symlinks in a directory that is on your PATH, like ~/bin. ln -s /path/to/lilypond-2.23.10/bin/* ~/bin Though, in my opinion, the best way is to actually point your editor to the executable, see below. If somebody can suggest how I get emacs-mode Lilypond-command-lilypond and Lilypond-command-formatps to work, it will be very much appreciated, as always. Try this: Edit any .ly file in Emacs M-x customize-variable In minibuffer, enter 'LilyPond-lilypond-command' A customization screen appears, click on the arrow on the left to expand the variable. On the right, write the full path to LilyPond: /.../lilypond-2.23.10/bin/lilypond Now C-x C-s to save, and q to quit Custom. After that, try C-c C-l on the .ly file. It should be compiled with the lilypond executable you specified. Best, Jean
Re: Installing Lilypond 2.23.10
On Mon, 2022-07-18 at 11:15 +0200, Jean Abou Samra wrote: > Le 17/07/2022 à 17:03, David Sumbler a écrit : > > > > Is it the intention that the next "stable" version of Lilypond will > > be > > packaged in this new way? Will the shell script be done away with > > there too? > > > > Even if not, what are the perceived advantages of this change for > > the > > development versions, at least? > > Yes, all new versions of LilyPond will use this packaging. Getting > rid of the .sh script was not the only change; it was actually a > wholesale switch to a new compilation system, which is now 100× > simpler and more reliable, and now creates static binaries. Before, > a .sh installer was required, because once installed the binaries > couldn't be moved around. Now that they can, it is just unnecessary. > > Not having a .sh installer has other advantages, too. It avoids > conflicts with distro packages. It makes the installation process > exactly the same across all OSes. It prevents people from shooting > themselves in the foot by not realizing that several versions of > LilyPond can be installed in parallel. I should think that most users only use one version at a time, unless they have the understanding to help in testing development versions, in which case they would probably know that they can have several versions. > I think you are overcomplicating things by trying to mimic > the previous installation process with the new binaries. > Changing /usr/local/ is normally done by package managers > and dedicated tools, not by hand. If you don't know what > you're doing there, don't touch it. (This kind of advice applies > to any command using sudo, actually.) I merely moved the new installation to the place where it would have been put by the script, had there been one. I have successfully administered my own Linux boxes for the last 20 years or so without any major mishaps... > Instead, follow these simple steps. (I agree that _finding_ them > is not simple, but again it will eventually be in the learning > manual, with screenshots. That change has landed and will appear > in the next release.) > > 1. Download the archive. > 2. Unpack it. > 3. Move the lilypond-2.23.10 directory inside it in your > home folder. > 4. In your .emacs, change the path in (expand-file-name ...) > to "~/lilypond-2.23.10/share/emacs/site-lisp". > > And that's all. Thanks for those clear instructions. And having set up an alias, as suggested by David W., I found that typing 'lilypond' in a bash terminal produces the expected result. However, this is not something I often do. My usual work pattern is to edit .ly files etc. in emacs, and then to use the Lilypond-mode command C-c C-l or C-c C-f to produce a PDF or Postscript file. Unfortunately I found that this now just produces an error message, such as: lilypond /home/david/Cloud/LilyPond/test.ly /bin/bash: line 1: lilypond: command not found Compilation exited abnormally with code 127 at Tue Jul 19 16:07:42 I eventually realized that having the alias included in .bashrc was not working because this is only for interactive shells. But I have tried putting it in .bash_profile, logging out and then logging in again, and this doesn't work either. If somebody can suggest how I get emacs-mode Lilypond-command-lilypond and Lilypond-command-formatps to work, it will be very much appreciated, as always. David
Re: Installing Lilypond 2.23.10
Am Mo., 18. Juli 2022 um 11:16 Uhr schrieb Jean Abou Samra : > > Le 17/07/2022 à 17:03, David Sumbler a écrit : > > At the moment I am testing it on a short file - in fact, your > > "grow-in-up-direction" example from the Extending Lilypond document. > > Compiling it is taking over 80 seconds each time; after the first > > time, I would expect a file like this to take only 3 or 4 seconds. > > This is very unsatisfactory. > > > I can't explain this without further info -- was the directory where > you installed LilyPond clean before? > > See below though. > > > > No, I have never used a distro version of Lilypond. Until this time, > > I have always used a script downloaded from the Lilypond website. I > > install Lilypond globally (although I am the only user of this > > computer), and the script chooses to put things where they now are. I > > always thought /usr/local/lilypond/usr/share/lilypond/ was an odd > > place to put it, but that wasn't my choice. > > > > When I moved 2.23.10 from my home folder, I intentionally put it in > > the same place as previous versions have been on my previous Ubuntu > > installations, hoping this would increase the chances of it actually > > working. On this current OS version, I have not actually had any > > previous versions of Lilypond, which is why I needed to install it > > again now. > > > > In my .emacs file I have: > > > > ;;for Lilypond mode > > (setq load-path (append (list (expand-file-name > > "/usr/local/lilypond/usr/share/emacs/site-lisp")) load-path)) > > (autoload 'LilyPond-mode "lilypond-mode" "LilyPond Editing Mode" t) > > (add-to-list 'auto-mode-alist '("\\.ly$" . LilyPond-mode)) > > (add-to-list 'auto-mode-alist '("\\.ily$" . LilyPond-mode)) > > > > So yes, clearly Lilypond mode is working now because I have installed > > Lilypond where the .sh script would have put it. I can also see that > > I can easily work round this by editing my .emacs file, if I decide to > > put Lilypond somewhere else (e.g. my home folder). > > > > Is it the intention that the next "stable" version of Lilypond will be > > packaged in this new way? Will the shell script be done away with > > there too? > > > > Even if not, what are the perceived advantages of this change for the > > development versions, at least? > > > Yes, all new versions of LilyPond will use this packaging. Getting > rid of the .sh script was not the only change; it was actually a > wholesale switch to a new compilation system, which is now 100× > simpler and more reliable, and now creates static binaries. Before, > a .sh installer was required, because once installed the binaries > couldn't be moved around. Now that they can, it is just unnecessary. > > Not having a .sh installer has other advantages, too. It avoids > conflicts with distro packages. It makes the installation process > exactly the same across all OSes. It prevents people from shooting > themselves in the foot by not realizing that several versions of > LilyPond can be installed in parallel. > > I think you are overcomplicating things by trying to mimic > the previous installation process with the new binaries. > Changing /usr/local/ is normally done by package managers > and dedicated tools, not by hand. If you don't know what > you're doing there, don't touch it. (This kind of advice applies > to any command using sudo, actually.) > > Instead, follow these simple steps. (I agree that _finding_ them > is not simple, but again it will eventually be in the learning > manual, with screenshots. That change has landed and will appear > in the next release.) > > 1. Download the archive. > 2. Unpack it. > 3. Move the lilypond-2.23.10 directory inside it in your > home folder. > 4. In your .emacs, change the path in (expand-file-name ...) > to "~/lilypond-2.23.10/share/emacs/site-lisp". > > And that's all. I take the liberty to add my 2 cts. It's a great advantage having dropped GUB (which produced the installers) it was a maintaining nightmare. Though, I miss the installer, too. The installer put several scripts in my bin-folder pointing to entries of /lilypond/bin (I'm on Linux, lilypond 2.23.9 for now): abc2ly convert-ly etf2ly lilypond lilymidi lilypond-book lilypond-invoke-editor lilysong midi2ly musicxml2ly They worked out of the box. With current archive I need to care myself, i.e. invoking above with correct pathes or creating scripts myself. >From a users point of view, it's more work. So, I understand both sides Cheers, Harm
Re: Installing Lilypond 2.23.10
Le 17/07/2022 à 17:03, David Sumbler a écrit : At the moment I am testing it on a short file - in fact, your "grow-in-up-direction" example from the Extending Lilypond document. Compiling it is taking over 80 seconds each time; after the first time, I would expect a file like this to take only 3 or 4 seconds. This is very unsatisfactory. I can't explain this without further info -- was the directory where you installed LilyPond clean before? See below though. No, I have never used a distro version of Lilypond. Until this time, I have always used a script downloaded from the Lilypond website. I install Lilypond globally (although I am the only user of this computer), and the script chooses to put things where they now are. I always thought /usr/local/lilypond/usr/share/lilypond/ was an odd place to put it, but that wasn't my choice. When I moved 2.23.10 from my home folder, I intentionally put it in the same place as previous versions have been on my previous Ubuntu installations, hoping this would increase the chances of it actually working. On this current OS version, I have not actually had any previous versions of Lilypond, which is why I needed to install it again now. In my .emacs file I have: ;;for Lilypond mode (setq load-path (append (list (expand-file-name "/usr/local/lilypond/usr/share/emacs/site-lisp")) load-path)) (autoload 'LilyPond-mode "lilypond-mode" "LilyPond Editing Mode" t) (add-to-list 'auto-mode-alist '("\\.ly$" . LilyPond-mode)) (add-to-list 'auto-mode-alist '("\\.ily$" . LilyPond-mode)) So yes, clearly Lilypond mode is working now because I have installed Lilypond where the .sh script would have put it. I can also see that I can easily work round this by editing my .emacs file, if I decide to put Lilypond somewhere else (e.g. my home folder). Is it the intention that the next "stable" version of Lilypond will be packaged in this new way? Will the shell script be done away with there too? Even if not, what are the perceived advantages of this change for the development versions, at least? Yes, all new versions of LilyPond will use this packaging. Getting rid of the .sh script was not the only change; it was actually a wholesale switch to a new compilation system, which is now 100× simpler and more reliable, and now creates static binaries. Before, a .sh installer was required, because once installed the binaries couldn't be moved around. Now that they can, it is just unnecessary. Not having a .sh installer has other advantages, too. It avoids conflicts with distro packages. It makes the installation process exactly the same across all OSes. It prevents people from shooting themselves in the foot by not realizing that several versions of LilyPond can be installed in parallel. I think you are overcomplicating things by trying to mimic the previous installation process with the new binaries. Changing /usr/local/ is normally done by package managers and dedicated tools, not by hand. If you don't know what you're doing there, don't touch it. (This kind of advice applies to any command using sudo, actually.) Instead, follow these simple steps. (I agree that _finding_ them is not simple, but again it will eventually be in the learning manual, with screenshots. That change has landed and will appear in the next release.) 1. Download the archive. 2. Unpack it. 3. Move the lilypond-2.23.10 directory inside it in your home folder. 4. In your .emacs, change the path in (expand-file-name ...) to "~/lilypond-2.23.10/share/emacs/site-lisp". And that's all. Best, Jean
Re: Installing Lilypond 2.23.10
On Fri, 2022-07-15 at 02:56 +0200, Jean Abou Samra wrote: > > > A more serious problem (for me) is that Emacs could no longer find > > Lilypond mode. So I moved the new Lilypond to > > /usr/local/lilypond/usr/. Emacs can now uses Lilypond mode, but > > can't > > compile a file - it produces reams of messages (after much > > processing > > time), mostly of the > > > > ;;; note: source file > > /usr/local/lilypond/usr/share/lilypond/2.23.10/scm/lily/display- > > lily.scm > > ;;; newer than compiled > > /usr/local/lilypond/usr/lib/lilypond/2.23.10/ccache/lily/display- > > lily.go > > > > kind, and then exits with > > > > ERROR: In procedure apply-smob/1: > > Wrong number of arguments to # > > > > Compilation exited abnormally with code 1 at Thu Jul 14 17:21:52 > > > > I have spent some hours experimenting, but so far I haven't managed > > to > > get things working. On Fri, 2022-07-15 at 02:57 +0200, Jean Abou Samra wrote: > Le 15/07/2022 à 02:56, Jean Abou Samra a écrit : > > > > Hm. Does this help? > > > > > > sudo find /usr/local/lilypond/usr/lib/lilypond/2.23.10/ -name > > > "*.go" > > > -exec touch {} \; > > > > Wait, rather try > > sudo find /usr/local/lilypond/ -name "*.go" -exec touch {} \; Yes, this worked - thank you. I am used to a new installation of Lilypond taking some considerable time to compile the first time - presumably because it needs to do some general compilation and housekeeping to get itself organized. Subsequently it then takes a relatively short time, depending on the complexity of the Lilypond source it is compiling. At the moment I am testing it on a short file - in fact, your "grow-in- up-direction" example from the Extending Lilypond document. Compiling it is taking over 80 seconds each time; after the first time, I would expect a file like this to take only 3 or 4 seconds. This is very unsatisfactory. On Thu, 2022-07-14 at 23:13 -0500, David Wright wrote: > > Those paths look odd. /usr/local should only contain the directories > bin etc games include lib man sbin share src > and /usr/local/bin/ is typically placed at the start of your $PATH > for you by your distribution. I don't know where > /usr/local/lilypond/usr/ > came from, but the rest of the path, share/lilypond/2.23.10/…, does > look like something unpacked from the .tar.gz file. > If your response is that it used to work, then I would wonder > whether you used to have a distribution-supplied version of > lilypond installed, and emacs was relying on that. In other > words, it was relying on lilypond*.el files in locations like > /etc/emacs/site-start.d/ and /usr/share/emacs/site-lisp/ > (or similar names), instead of those from any of the downloaded > versions you've installed/unpacked in the past. No, I have never used a distro version of Lilypond. Until this time, I have always used a script downloaded from the Lilypond website. I install Lilypond globally (although I am the only user of this computer), and the script chooses to put things where they now are. I always thought /usr/local/lilypond/usr/share/lilypond/ was an odd place to put it, but that wasn't my choice. When I moved 2.23.10 from my home folder, I intentionally put it in the same place as previous versions have been on my previous Ubuntu installations, hoping this would increase the chances of it actually working. On this current OS version, I have not actually had any previous versions of Lilypond, which is why I needed to install it again now. In my .emacs file I have: ;;for Lilypond mode (setq load-path (append (list (expand-file-name "/usr/local/lilypond/usr/share/emacs/site-lisp")) load-path)) (autoload 'LilyPond-mode "lilypond-mode" "LilyPond Editing Mode" t) (add-to-list 'auto-mode-alist '("\\.ly$" . LilyPond-mode)) (add-to-list 'auto-mode-alist '("\\.ily$" . LilyPond-mode)) So yes, clearly Lilypond mode is working now because I have installed Lilypond where the .sh script would have put it. I can also see that I can easily work round this by editing my .emacs file, if I decide to put Lilypond somewhere else (e.g. my home folder). Is it the intention that the next "stable" version of Lilypond will be packaged in this new way? Will the shell script be done away with there too? Even if not, what are the perceived advantages of this change for the development versions, at least? David
Re: Installing Lilypond 2.23.10
On Thu 14 Jul 2022 at 17:33:01 (+0100), David Sumbler wrote: > On Wed, 2022-07-13 at 23:00 +0200, Jean Abou Samra wrote: > > Le 13/07/2022 à 20:26, David Sumbler a écrit : > > > Thank you for that. Yes, I should have noticed that the contents > > > of > > > the tar file were not source code. As it is, though, I'm not > > > entirely > > > sure what to do with it - I guess that I put it all in a folder > > > somewhere and then make a link to bin/lilypond. > > > > > > You just extract it somewhere and it becomes usable as > > > > /.../lilypond-2.23.10/bin/lilypond file.ly > > > > If you want to invoke it as "lilypond file.ly" without typing > > the full path, you have to add the /.../lilypond-2.23.10/bin > > directory to your PATH. One way to do so is to add this line > > to your shell startup file (probably ~/.bashrc): > > > > export PATH=/.../lilypond-2.23.10/bin:$PATH Alternatively, you could just set up an alias, like: $ alias lilypond='/…/lilypond-2.23.10/bin/lilypond' in ~/.bashrc (or use whatever command name you wish). > I don't use Frescobaldi; I normally edit Lilypond files in Emacs. > > I moved the 2.23.10 folder to my home folder. I tried making soft and > hard links in my $HOME/bin folder to > $HOME/lilypond-2.23.10/bin/lilypond, but for some reason I couldn't > get it to run, even though $HOME/bin is the first item in my PATH. I > haven't yet fathomed out why this was, but I worked around it by adding > a direct reference to the folder as you suggested. > > A more serious problem (for me) is that Emacs could no longer find > Lilypond mode. So I moved the new Lilypond to > /usr/local/lilypond/usr/. Emacs can now uses Lilypond mode, but can't > compile a file - it produces reams of messages (after much processing > time), mostly of the > > ;;; note: source file > /usr/local/lilypond/usr/share/lilypond/2.23.10/scm/lily/display- > lily.scm > ;;; newer than compiled > /usr/local/lilypond/usr/lib/lilypond/2.23.10/ccache/lily/display- > lily.go Those paths look odd. /usr/local should only contain the directories bin etc games include lib man sbin share src and /usr/local/bin/ is typically placed at the start of your $PATH for you by your distribution. I don't know where /usr/local/lilypond/usr/ came from, but the rest of the path, share/lilypond/2.23.10/…, does look like something unpacked from the .tar.gz file. > kind, and then exits with > > ERROR: In procedure apply-smob/1: > Wrong number of arguments to # > > Compilation exited abnormally with code 1 at Thu Jul 14 17:21:52 > > I have spent some hours experimenting, but so far I haven't managed to > get things working. You haven't diagnosed why the dates have become screwed up, so I would assume that your tree of files is now damaged. Rather than mess with touch, I would remove the whole tree, clean up all the various links you made, and then unpack the .tar.gz file again, as suggested above. Unpacking it in ~/lilypond-2.23.10/ would be fine, and an alias will save some typing. As for lilypond-mode in emacs, I would imagine that you haven't yet carried out the instructions in §4.2 Text editor support in the Usage manual, so emacs can't find the mode. If your response is that it used to work, then I would wonder whether you used to have a distribution-supplied version of lilypond installed, and emacs was relying on that. In other words, it was relying on lilypond*.el files in locations like /etc/emacs/site-start.d/ and /usr/share/emacs/site-lisp/ (or similar names), instead of those from any of the downloaded versions you've installed/unpacked in the past. Cheers, David.
Re: Installing Lilypond 2.23.10
Le 15/07/2022 à 02:56, Jean Abou Samra a écrit : Hm. Does this help? sudo find /usr/local/lilypond/usr/lib/lilypond/2.23.10/ -name "*.go" -exec touch {} \; Wait, rather try sudo find /usr/local/lilypond/ -name "*.go" -exec touch {} \;
Re: Installing Lilypond 2.23.10
Le 14/07/2022 à 18:33, David Sumbler a écrit : On Wed, 2022-07-13 at 23:00 +0200, Jean Abou Samra wrote: Le 13/07/2022 à 20:26, David Sumbler a écrit : Thank you for that. Yes, I should have noticed that the contents of the tar file were not source code. As it is, though, I'm not entirely sure what to do with it - I guess that I put it all in a folder somewhere and then make a link to bin/lilypond. You just extract it somewhere and it becomes usable as /.../lilypond-2.23.10/bin/lilypond file.ly If you want to invoke it as "lilypond file.ly" without typing the full path, you have to add the /.../lilypond-2.23.10/bin directory to your PATH. One way to do so is to add this line to your shell startup file (probably ~/.bashrc): export PATH=/.../lilypond-2.23.10/bin:$PATH That said, if you're using Frescobaldi, this is not needed. Go to Edit > Preferences > LilyPond Preferences and add the new version, providing /.../lilypond-2.23.10/bin/lilypond as the executable. I don't use Frescobaldi; I normally edit Lilypond files in Emacs. I moved the 2.23.10 folder to my home folder. I tried making soft and hard links in my $HOME/bin folder to $HOME/lilypond-2.23.10/bin/lilypond, but for some reason I couldn't get it to run, even though $HOME/bin is the first item in my PATH. I haven't yet fathomed out why this was, but I worked around it by adding a direct reference to the folder as you suggested. A more serious problem (for me) is that Emacs could no longer find Lilypond mode. So I moved the new Lilypond to /usr/local/lilypond/usr/. Emacs can now uses Lilypond mode, but can't compile a file - it produces reams of messages (after much processing time), mostly of the ;;; note: source file /usr/local/lilypond/usr/share/lilypond/2.23.10/scm/lily/display-lily.scm ;;; newer than compiled /usr/local/lilypond/usr/lib/lilypond/2.23.10/ccache/lily/display-lily.go kind, and then exits with ERROR: In procedure apply-smob/1: Wrong number of arguments to # Compilation exited abnormally with code 1 at Thu Jul 14 17:21:52 I have spent some hours experimenting, but so far I haven't managed to get things working. Hm. Does this help? sudo find /usr/local/lilypond/usr/lib/lilypond/2.23.10/ -name "*.go" -exec touch {} \;
Re: Installing Lilypond 2.23.10
On Thu, Jul 14, 2022 at 9:51 AM David Sumbler wrote: > I moved the 2.23.10 folder to my home folder. I tried making soft and hard > links in my $HOME/bin folder to > $HOME/lilypond-2.23.10/bin/lilypond, but for some reason I couldn't get it > to run, even though $HOME/bin is the first item in my PATH. I haven't yet > fathomed out why this was, but I worked around it by adding a direct > reference to the folder as you suggested. Here is my CLI LilyPond script: ### Start script #!/bin/bash LY_HOME="${LY_HOME:-/path/to/your/lilypond-2.22.2/bin}" $LY_HOME/lilypond $@ ### End script I put this script in my local bin directory. It uses the LY_HOME variable (not official or anything). If you set it before you run the script, it will use your set LY_HOME. Otherwise, it will default to /path/to/your/lilypond-2.22.2/bin. HTH -- Knute Snortum
Re: Installing Lilypond 2.23.10
On Wed, 2022-07-13 at 23:00 +0200, Jean Abou Samra wrote: > Le 13/07/2022 à 20:26, David Sumbler a écrit : > > Thank you for that. Yes, I should have noticed that the contents > > of > > the tar file were not source code. As it is, though, I'm not > > entirely > > sure what to do with it - I guess that I put it all in a folder > > somewhere and then make a link to bin/lilypond. > > > You just extract it somewhere and it becomes usable as > > /.../lilypond-2.23.10/bin/lilypond file.ly > > If you want to invoke it as "lilypond file.ly" without typing > the full path, you have to add the /.../lilypond-2.23.10/bin > directory to your PATH. One way to do so is to add this line > to your shell startup file (probably ~/.bashrc): > > export PATH=/.../lilypond-2.23.10/bin:$PATH > > That said, if you're using Frescobaldi, this is not needed. > Go to Edit > Preferences > LilyPond Preferences and add the > new version, providing /.../lilypond-2.23.10/bin/lilypond as > the executable. I don't use Frescobaldi; I normally edit Lilypond files in Emacs. I moved the 2.23.10 folder to my home folder. I tried making soft and hard links in my $HOME/bin folder to $HOME/lilypond-2.23.10/bin/lilypond, but for some reason I couldn't get it to run, even though $HOME/bin is the first item in my PATH. I haven't yet fathomed out why this was, but I worked around it by adding a direct reference to the folder as you suggested. A more serious problem (for me) is that Emacs could no longer find Lilypond mode. So I moved the new Lilypond to /usr/local/lilypond/usr/. Emacs can now uses Lilypond mode, but can't compile a file - it produces reams of messages (after much processing time), mostly of the ;;; note: source file /usr/local/lilypond/usr/share/lilypond/2.23.10/scm/lily/display- lily.scm ;;; newer than compiled /usr/local/lilypond/usr/lib/lilypond/2.23.10/ccache/lily/display- lily.go kind, and then exits with ERROR: In procedure apply-smob/1: Wrong number of arguments to # Compilation exited abnormally with code 1 at Thu Jul 14 17:21:52 I have spent some hours experimenting, but so far I haven't managed to get things working. David
Re: Installing Lilypond 2.23.10
On Wed, 2022-07-13 at 23:00 +0200, Jean Abou Samra wrote: > Hello, > > Please keep the list in CC so that everyone can chime > in and benefit from the answers. Sorry for my oversight. I would normally have done a group reply, but it's so long since I used a mailing list like this that I just forgot. It won't happen again (I hope)! Thanks for all the other information you have now sent. I'll perhaps install 2.23.10 tomorrow. David
Re: Installing Lilypond 2.23.10
Hello, Please keep the list in CC so that everyone can chime in and benefit from the answers. Le 13/07/2022 à 20:26, David Sumbler a écrit : Thank you for that. Yes, I should have noticed that the contents of the tar file were not source code. As it is, though, I'm not entirely sure what to do with it - I guess that I put it all in a folder somewhere and then make a link to bin/lilypond. You just extract it somewhere and it becomes usable as /.../lilypond-2.23.10/bin/lilypond file.ly If you want to invoke it as "lilypond file.ly" without typing the full path, you have to add the /.../lilypond-2.23.10/bin directory to your PATH. One way to do so is to add this line to your shell startup file (probably ~/.bashrc): export PATH=/.../lilypond-2.23.10/bin:$PATH That said, if you're using Frescobaldi, this is not needed. Go to Edit > Preferences > LilyPond Preferences and add the new version, providing /.../lilypond-2.23.10/bin/lilypond as the executable. Then I have to download the docs. They're at the very bottom of this page: https://lilypond.org/development.html (the link "Doc tarball for LilyPond 2.23.10"). SInce I only want Lilypond at the moment to try out things from your wonderful "Extending Lilypond" document, I decided to install version 2.23.6. This still has the nice simple installation script, which I used to install Lilypond and grab all the docs as well - even my existing bookmark for the docs in Firefox just works! I'd recommend 2.23.10 -- if you ask questions on the list, most people will be using either the latest stable version or the latest unstable version, so that using either of these two versions eases the process of checking that a code snippet will work with your version. Incidentally, my system has Guile 3.0 installed, and I see that Lilypond comes with 2.2. I don't have 1.8 anywhere on the system, but when I type 'lilypond' it reports: GNU LilyPond 2.23.6 (running Guile 1.8) I assume that this is just a trivial correction that is needed in the code somewhere. No, it really means your LilyPond is running Guile 1.8. 2.23.6 was a very special release, as it is the one where we started the final Guile 2.2 transition. This release was "dual": the binaries that you could download from lilypond.org use Guile 1.8, but those from https://gitlab.com/lilypond/lilypond/-/releases use Guile 2.2. This release allowed us to test there were no major problems with Guile 2.2 remaining, so in the following release, 2.23.7, support for Guile 1.8 has been dropped, only Guile 2.2 binaries have been provided, they were on GitLab, and the links on lilypond.org just redirected to GitLab. Best, Jean
Re: Installing Lilypond 2.23.10
Le 13/07/2022 à 19:04, David Sumbler a écrit : The last version of Lilypond I installed was 2.23.5. For that I have a shell script entitled lilypond-2.23.5-1.linux-64.sh , and similar scripts for previous development and stable versions. Having updated my OS to Ubuntu 22.04 I want to install the latest version. But now when I click on the link I get the tar.bz2 file direct, and not a shell script which would download and process it for me. I assume I have to use 'make' etc. to compile things, but I am not very familiar with such matters. No; you didn't download a source archive but binaries. They are already compiled. There is no installation shell script because _no installation_ is required. I notice that the link for the stable version 2.22.2 still downloads a shell script. Is this a change of policy to discourage us less geeky users from using the development version, or am I just missing something? I admit I haven't used Lilypond at all for some months. The installation instructions in the learning manual are currently being updated. The procedure could hardly be simpler: unpack the archives, and the binaries are already ready to run! Regards, Jean
Installing Lilypond 2.23.10
The last version of Lilypond I installed was 2.23.5. For that I have a shell script entitled lilypond-2.23.5-1.linux-64.sh , and similar scripts for previous development and stable versions. Having updated my OS to Ubuntu 22.04 I want to install the latest version. But now when I click on the link I get the tar.bz2 file direct, and not a shell script which would download and process it for me. I assume I have to use 'make' etc. to compile things, but I am not very familiar with such matters. I notice that the link for the stable version 2.22.2 still downloads a shell script. Is this a change of policy to discourage us less geeky users from using the development version, or am I just missing something? I admit I haven't used Lilypond at all for some months. David
Re: Error with -dbackend=null (Lilypond 2.23.10)
On Sun 10 Jul 2022 at 23:08:19 (+0200), David Kastrup wrote: > Paolo Prete writes: > >> On Sunday, July 10, 2022, David Kastrup wrote: > >>> Jean Abou Samra writes: > >>> > Le 10/07/2022 à 17:38, Paolo Prete a écrit : > >>> >> I just used -dno-print-pages as an alternative, and it works. > >>> >> Will it be removed too in the future? > >>> > > >>> > I can't speak for future developers of LilyPond. On > >>> > the other hand, unlike -dbackend=null, -dno-print-pages > >>> > is documented with an explanation of its use case (not > >>> > outputting the "main" PDF when using -dcrop or -dpreview), > >>> > so it certainly won't be removed as a mere cleanup. > >>> > >>> Cough cough. > >>> > >>> git show release/2.21.0-1:Documentation/usage/running.itely > >>> > >>> [...] > >>> > >>> @item null > >>> Do not output a printed score. This has the same effect as > >>> @code{-dno-print-pages}. > >>> > > > > ? > > I was just showing that -dbackend=null had been documented in the > "Running Lilypond" guide. Indeed. And the stable Usage (2.22.1-1) mentions five backends: ps, eps, null, scm and svg, whereas the preview section mentions six, not including null: pdf, png, ps, eps, svg and scm. Unstable's (2.23.10) backends are reduced to ps and svg, but the preview section remains unchanged in Usage. Cheers, David.
Re: Error with -dbackend=null (Lilypond 2.23.10)
Paolo Prete writes: >> On Sunday, July 10, 2022, David Kastrup wrote: >> >>> Jean Abou Samra writes: >>> >>> > Le 10/07/2022 à 17:38, Paolo Prete a écrit : >>> >> I just used -dno-print-pages as an alternative, and it works. >>> >> Will it be removed too in the future? >>> > >>> > >>> > I can't speak for future developers of LilyPond. On >>> > the other hand, unlike -dbackend=null, -dno-print-pages >>> > is documented with an explanation of its use case (not >>> > outputting the "main" PDF when using -dcrop or -dpreview), >>> > so it certainly won't be removed as a mere cleanup. >>> >>> Cough cough. >>> >>> git show release/2.21.0-1:Documentation/usage/running.itely >>> >>> [...] >>> >>> @item null >>> Do not output a printed score. This has the same effect as >>> @code{-dno-print-pages}. >>> >> >> -- >> David Kastrup >> > > ? I was just showing that -dbackend=null had been documented in the "Running Lilypond" guide. -- David Kastrup
Re: Error with -dbackend=null (Lilypond 2.23.10)
? On Sunday, July 10, 2022, David Kastrup wrote: > Jean Abou Samra writes: > > > Le 10/07/2022 à 17:38, Paolo Prete a écrit : > >> I just used -dno-print-pages as an alternative, and it works. > >> Will it be removed too in the future? > > > > > > I can't speak for future developers of LilyPond. On > > the other hand, unlike -dbackend=null, -dno-print-pages > > is documented with an explanation of its use case (not > > outputting the "main" PDF when using -dcrop or -dpreview), > > so it certainly won't be removed as a mere cleanup. > > Cough cough. > > git show release/2.21.0-1:Documentation/usage/running.itely > > [...] > > @item null > Do not output a printed score. This has the same effect as > @code{-dno-print-pages}. > > > -- > David Kastrup >
Re: Error with -dbackend=null (Lilypond 2.23.10)
Jean Abou Samra writes: > Le 10/07/2022 à 17:38, Paolo Prete a écrit : >> I just used -dno-print-pages as an alternative, and it works. >> Will it be removed too in the future? > > > I can't speak for future developers of LilyPond. On > the other hand, unlike -dbackend=null, -dno-print-pages > is documented with an explanation of its use case (not > outputting the "main" PDF when using -dcrop or -dpreview), > so it certainly won't be removed as a mere cleanup. Cough cough. git show release/2.21.0-1:Documentation/usage/running.itely [...] @item null Do not output a printed score. This has the same effect as @code{-dno-print-pages}. -- David Kastrup
Re: Error with -dbackend=null (Lilypond 2.23.10)
Le 10/07/2022 à 17:38, Paolo Prete a écrit : I just used -dno-print-pages as an alternative, and it works. Will it be removed too in the future? I can't speak for future developers of LilyPond. On the other hand, unlike -dbackend=null, -dno-print-pages is documented with an explanation of its use case (not outputting the "main" PDF when using -dcrop or -dpreview), so it certainly won't be removed as a mere cleanup. Jean
Re: Error with -dbackend=null (Lilypond 2.23.10)
I just used -dno-print-pages as an alternative, and it works. Will it be removed too in the future? thanks On Sun, Jul 10, 2022 at 5:30 PM Jean Abou Samra wrote: > Hello, > > Please keep the list posted. > > Le 10/07/2022 à 14:19, Paolo Prete a écrit : > > It Is very useful when I have to quickly correct syntax errors on a > > code that doesn't compile: given that It doesn't produce output, It > > shortens the time required for compiling. Is there an alternative that > > I can use? > > > Have you tried -dwarning-as-error? That makes LilyPond stop on the first > error or warning encountered. > > Jean >
Re: Error with -dbackend=null (Lilypond 2.23.10)
Hello, Please keep the list posted. Le 10/07/2022 à 14:19, Paolo Prete a écrit : It Is very useful when I have to quickly correct syntax errors on a code that doesn't compile: given that It doesn't produce output, It shortens the time required for compiling. Is there an alternative that I can use? Have you tried -dwarning-as-error? That makes LilyPond stop on the first error or warning encountered. Jean
Re: Error with -dbackend=null (Lilypond 2.23.10)
It Is very useful when I have to quickly correct syntax errors on a code that doesn't compile: given that It doesn't produce output, It shortens the time required for compiling. Is there an alternative that I can use? Thanks, Best P On Sunday, July 10, 2022, Jean Abou Samra wrote: > > > Le 10 juil. 2022 à 12:43, Paolo Prete a écrit : > > > Hello, > > lilypond -dbackend=null foo.ly produces the following error: > > GNU LilyPond 2.23.10 (running Guile 2.2) > Processing `foo.ly' > Parsing... > foo.ly:1: warning: no \version statement found, please add > \version "2.23.10" > for future compatibility > Interpreting music... > Preprocessing graphical objects... > Finding the ideal number of pages... > Fitting music on 1 page... > Drawing systems...ERROR: In procedure ly:book-process: > In procedure module-lookup: Unbound variable: output-stencils > > > ...any feedback for this? Thanks > > > > > The ‘null’ backend was originally a quick hack for benchmarking. It was no > longer useful and has been removed. What was your use case for it? > > Best, > Jean > >
Re: Error with -dbackend=null (Lilypond 2.23.10)
> Le 10 juil. 2022 à 12:43, Paolo Prete a écrit : > > > Hello, > > lilypond -dbackend=null foo.ly produces the following error: > > GNU LilyPond 2.23.10 (running Guile 2.2) > Processing `foo.ly' > Parsing... > foo.ly:1: warning: no \version statement found, please add > \version "2.23.10" > for future compatibility > Interpreting music... > Preprocessing graphical objects... > Finding the ideal number of pages... > Fitting music on 1 page... > Drawing systems...ERROR: In procedure ly:book-process: > In procedure module-lookup: Unbound variable: output-stencils > > > ...any feedback for this? Thanks The ‘null’ backend was originally a quick hack for benchmarking. It was no longer useful and has been removed. What was your use case for it? Best, Jean
Error with -dbackend=null (Lilypond 2.23.10)
Hello, lilypond -dbackend=null foo.ly produces the following error: GNU LilyPond 2.23.10 (running Guile 2.2) Processing `foo.ly' Parsing... foo.ly:1: warning: no \version statement found, please add \version "2.23.10" for future compatibility Interpreting music... Preprocessing graphical objects... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems...ERROR: In procedure ly:book-process: In procedure module-lookup: Unbound variable: output-stencils ...any feedback for this? Thanks P
LilyPond 2.23.10
We are happy to announce the release of LilyPond 2.23.10. This is termed a development release, but these are usually reliable. However, if you require stability, we recommend using version 2.22.2, the current stable release. As a reminder, the official binaries can be downloaded from GitLab: https://gitlab.com/lilypond/lilypond/-/releases/v2.23.10 We provide packages for macOS ("darwin"), Linux, and Windows ("mingw") that only need to be extracted (no installation as in older versions). signature.asc Description: This is a digitally signed message part