Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
#######
#
# E-scripts on lilypond
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
# An introduction to eev can be found here:
#
#   (find-eev-quick-intro)
#   http://angg.twu.net/eev-intros/find-eev-quick-intro.html
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/music.e>
#           or at <http://angg.twu.net/e/music.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######





# «.mailing-list»	(to "mailing-list")
# «.irc-channel»	(to "irc-channel")
#   «.2022dec18-irc»	(to "2022dec18-irc")
#   «.2022dec18-email»	(to "2022dec18-email")
# «.lilypond»		(to "lilypond")
# «.lilypond-src»	(to "lilypond-src")
# «.lilypond-writing»	(to "lilypond-writing")
# «.lilypond-etch»	(to "lilypond-etch")
# «.lilypond-deb-src»	(to "lilypond-deb-src")
# «.scarlatti»		(to "scarlatti")
# «.repl»		(to "repl")
# «.compact-output»	(to "compact-output")
# «.lilypond-2.18.2»	(to "lilypond-2.18.2")
# «.autochange»		(to "autochange")
# «.inventions»		(to "inventions")
# «.frescobaldi»	(to "frescobaldi")
# «.ben-lemons-videos»	(to "ben-lemons-videos")
# «.page-breaks»	(to "page-breaks")
# «.lilypond-2020»	(to "lilypond-2020")
# «.lilypond-2021»	(to "lilypond-2021")
# «.lilypond-2022»	(to "lilypond-2022")
# «.drumbook»		(to "drumbook")
# «.paper-size»		(to "paper-size")

See: (find-es "musescore")





#####
#
# mailing-list
# 2022dec18
#
#####

# «mailing-list»  (to ".mailing-list")
# (find-node "(lilypond-contributor)Help us")
# https://lists.gnu.org/mailman/listinfo/lilypond-devel
# https://lists.gnu.org/archive/html/lilypond-devel/




#####
#
# irc-channel
# 2022dec18
#
#####

# «irc-channel»  (to ".irc-channel")
# (defun l2 () (interactive) (find-libera-2a "#lilypond"))
# (defun l3 () (interactive) (find-libera-3a "#lilypond"))




#####
#
# 2022dec18-irc
# 2022dec18
#
#####

# «2022dec18-irc»  (to ".2022dec18-irc")
# (find-fline "~/LOGS/2022dec18.lilypond")

<edrx> hi all! I am very basic user of lilypond - I've only done a
       few things of this level with it...
       http://angg.twu.net/LILYPOND/a_new_ground.ly.html
<edrx> ...but I made this some time ago -
       http://angg.twu.net/eev-tikz.html - and I think that it can
       be adapted to Lilypond in many ways
<edrx> the obvious way would be to use the basic features of tikz1
       to generate lilypond code in a way that would let me change
       parts of the code from a repl. that's easy - I would just
       have to implement a variant of
       http://angg.twu.net/LUA/tikz1.lua.html#Dang
<edrx> that would use other delimiters instead of <<>>s...
<edrx> but the thing that would really help me to learn more
       lilypond would be something like the hack in the last
       exercise of the video - that starts here:
<edrx> https://www.youtube.com/watch?v=d7nIzpXcV6c#t=1h27m34s
<edrx> in that exercise I show how to run a Lua REPL from LuaLaTeX,
       and how to use it to inspect definitions.
<edrx> I know that it is possible to run a Scheme REPL from inside
       Lilypond, and it should be possible to use it to inspect
       what Lilypond has stored of the .ly file that it has read so
       far...
<edrx> ...but afaicr the examples related to that in the manual are
       written for users much more advanced than me.
<edrx> anyone willing to spend a few minutes helping me to write a
       small example?
<edrx> see also: http://angg.twu.net/eepitch.html
<edrx> that's a page on what I use to control repls
<edrx> I am also going to send an e-mail about all this to
       lilypond-devel, but usually doing these things by IRC is
       much faster





#####
#
# 2022dec18-email
# 2022dec18
#
#####

# «2022dec18-email»  (to ".2022dec18-email")
# https://lists.gnu.org/archive/html/lilypond-devel/2022-12/msg00117.html Edrx
# https://lists.gnu.org/archive/html/lilypond-devel/2022-12/msg00175.html Jean

Hi all,

I am a very basic user of lilypond - I never did anything more
advanced than simple piano pieces with lyrics - but a few weeks ago I
found a way to use REPLs to learn Tikz, and I recorded a video about
that, that is here...

  http://angg.twu.net/eev-tikz.html

Its two main ideas can be adapted to Lilypond, and I am going to ask
for some help with the second.

The first, and main, idea of the video is to use a very simple macro
language in which "<<expr>>"s in strings are replaced by the result of
evaluating expr in Lua in a certain way. This is trivial to adapt, I
just need to change the "<<>>"s by other delimiters.

The second idea, that is explained in an exercise at the end of the
video - starting here:

  https://www.youtube.com/watch?v=d7nIzpXcV6c#t=1h27m34s

is a way to a) make lualatex run a Lua REPL that is much better than
debug.debug(), and b) use that REPL to inspect definitions from the
calling lualatex with token.get_meaning, with a wicked trick to
inspect the values of pgfkeys.

Anyway, let me go back to Lilypond...

I know that I can get a Scheme REPL from Lilypond by running this,

  (top-repl)

but I've never been able to use it for anything useful. I _guess_ that
competent Scheme users should be able to use that to ask Lilypond what
it knows about what it has already processed of the current .ly
file...

Can anyone give me some examples of how to use the REPL to inspect
some interesting variables and data structures? I am hoping to get
something like a 5-line demo that I can use as a starting point...

  Thanks in advance!
    Eduardo Ochs
    http://angg.twu.net/eepitch.html









#####
#
# lilypond (sarge)
# 2004oct27 / 2013may30
#
#####

# «lilypond»  (to ".lilypond")
# (find-angg ".emacs" "lilypond")
# (find-zsh "installeddebs | sort | grep lilypond")
# (find-zsh "availabledebs | sort | grep lilypond")

# (find-status   "lilypond")
# (find-vldifile "lilypond.list")
# (find-udfile   "lilypond/")
# (find-status   "lilypond-doc")
# (find-vldifile "lilypond-doc.list")
# (find-udfile   "lilypond-doc/")

# (find-fline "/usr/share/info/" "lilypond")
# (find-node "(lilypond-changes)")
# (find-node "(lilypond-contributor)")
# (find-node "(lilypond-essay)")
# (find-node "(lilypond-extending)")
# (find-node "(lilypond-internals)")
# (find-node "(lilypond-learning)")
# (find-node "(lilypond-notation)")
# (find-node "(lilypond-snippets)")
# (find-node "(lilypond-usage)")
# (find-node "(lilypond-web)")

# (find-status   "lilypond")
# (find-vldifile "lilypond.list")
# (find-udfile   "lilypond/")
# (find-status   "lilypond-doc")
# (find-vldifile "lilypond-doc.list")
# (find-udfile   "lilypond-doc/")
# (find-fline "/usr/share/doc/lilypond/html/input/mutopia/E.Satie/")

# (find-angg ".emacs" "lilypond")








# (code-c-d "lilyshare" "/usr/share/lilypond/2.1.0/" "lilypond")
# (code-c-d "lily"      "/usr/share/doc/lilypond/examples/input/" "lilypond")
# (code-ps "lily" "/usr/share/doc/lilypond/html/Documentation/user/out-www/lilypond.ps.gz")
# (find-lilysharefile "")
# (find-lilysharefile "scm/")
# (find-lilyfile "")
# (find-lilynode "Top")
# (find-lilynode "Unified index")
# (find-lilypage 1)

% (find-node "(lilypond)Pitches")
% (find-node "(lilypond)Durations")






#*
# rm -Rv /tmp/ly/
mkdir  /tmp/ly/
cd     /tmp/ly/
# (find-fline "~/LILYPOND/")
# (find-node "(lilypond)Key signature")
cat > ee.ly <<'%%%'
      \repeat volta 2 { 
        % First line
        r4  bes16 ees' f' bes'  ges'4. bes8 | ees'4. d'16 ees' bes'8 aes' r4 |
        r4  ees'16 ges' bes' des''  d''4.   ees'8 | \break
        % Second line
        a'8 fis'16 d'  gis'4  aes'8 f'16 des'  g'4 |
        r4  bes'16 ces' ees' ges'  f'4.  des'8 |
        bes'4 \times 2/3 {ees'8 d' des'} c'8  a'4  ees'16 f' | \break
      }
%%%


cat > tmp.ly <<'%%%'
\header { piece = "tmp" }
\score { 
  \notes {
    {
      % \clef bass	% original; (find-node "(lilypond)Clef")
      \clef alto	% transposition to viola
      \transpose c a
      \key ges \major \time 4/4
      \include "ee.ly"
    }
  }
  \paper {  }
  \midi  { \tempo 4=72 }
}
%%%

lilypond -P tmp.ly


#*
# (eev-bounded)
mkdir /tmp/ly/
cd    /tmp/ly/
cat > tmp.ly <<'%%%'
\header { piece = "tmp" }
\score { 
  \notes {
    { 
      \clef alto     % (find-node "(lilypond)Clef")
      % \transpose c c,,
      \key ges \major \time 4/4
      \include "ee.ly"
    }
  }
  \paper {  }
  \midi  { \tempo 4=72 }
}
%%%

#*
% (eeb-lily)
      \repeat volta 2 { 
        % First line
        r4  bes16 ees' f' bes'  ges'4. bes8 | ees'4. d'16 ees' bes'8 aes' r4 |
        r4  ees'16 ges' bes' des''  d''4.   ees'8 | \break
        % Second line
        % a'8 fis'16 d'  gis'4  aes'8 f'16 des'  g'4 |
        % r4  bes'16 ces' ees' ges'  f'4.  des'8 |
        % bes'4 \times 2/3 {ees'8 d' des'} c'8  a'4  ees'16 f' | \break
      }
#*



(defun eelily (s &optional e)
  ;; (eev "cd /tmp/ly/ && lilypond tmp.ly && regv tmp.ps &")
  (eev "cd /tmp/ly/ && lilypond -m tmp.ly && timidity tmp.midi")
  (ee-write s e "" "" "/tmp/ly/ee.ly"))

(eeb-define 'eeb-lily  'eelily  'ee-delimiter-percent nil t t)
(eeb-define 'eeb-lily  'eelily  'ee-delimiter-hash nil t t)



# (find-man "lilypond")

# (find-node "(lilypond)Unified index")
# (find-node "(lilypond)Running LilyPond")
# (find-node "(lilypond)Combining notes into chords")
# (find-node "(lilypond)Octave entry")
# (find-node "(lilypond)Beaming")




% (find-node "(lilypond)The first real tune")
% (find-node "(lilypond)Notes")
% (find-node "(lilypond)Pitches")
% (find-node "(lilypond)Durations")
% (find-node "(lilypond)Slurs" "using parentheses:")
% (find-node "(lilypond)A piano excerpt" "`<'")
% (find-node "(lilypond)Beaming" "Manual beams" "`['")
% (find-node "(lilypond)Articulations" "^")
% (find-node "(lilypond)Text scripts")

% (find-node "(lilypond)Bar check" "`|'")
% (find-node "(lilypond)Bar lines" ":|")
% (find-node "(lilypond)Line break" "\\break")







#####
#
# lilypond (slink)
# 2000mar10
#
#####

# «ps_to_png»  (to ".ps_to_png")

apti lilypond
# (find-vldifile "lilypond.list")
# (find-fline "/usr/doc/lilypond/")

pdsc /big/slinks2/dists/slink/main/source/tex/lilypond_1.0.19.uu3-1.dsc
# (find-lilyfile "")
# (find-lilyfile "INSTALL.txt")
# (find-lilyfile "NEWS")
# (find-lilyfile "NEWS-0.0")

# On converting .ps's to .png's:

# (find-lilyfile "buildscripts/ps-to-pngs.sh")
# (find-lilyfile "buildscripts/ps-to-gifs.sh")
# (find-lilyfile "buildscripts/ps-to-gifs.sh" "gs -sDEVICE")

cat ~/LATEX/tmp.ps \
  | gs -sDEVICE=ppmraw -sA4 -sOutputFile="/tmp/p%d.ppm" -r150 \
      -dNOPAUSE - -c quit ~/LATEX/tmp.ps
ls -lAF /tmp
for i in /tmp/*.ppm; do
    OUTPUT=$(dirname $i)/$(basename $i .ppm).png
    cat $i | pnmsca




#####
#
# Scarlatti
# 2011apr26
#
#####

# «scarlatti»  (to ".scarlatti")
# http://icking-music-archive.org/scores/scarlatti/sonatas.zip
# http://vigna.dsi.unimi.it/music.php
# http://vigna.dsi.unimi.it/music/K25.ly
# http://vigna.dsi.unimi.it/music/K427.ly
# http://vigna.dsi.unimi.it/music/K460.ly
# http://vigna.dsi.unimi.it/music/K517.ly
# http://vigna.dsi.unimi.it/music/K519.ly
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rv /tmp/scar/
mkdir  /tmp/scar/
cd     /tmp/scar/
cp -v $S/http/vigna.dsi.unimi.it/music/*.ly .
lilypond K25.ly

# (find-fline    "/tmp/scar/")
# (find-pdf-page "/tmp/scar/K25.pdf")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rv /tmp/sank/
mkdir  /tmp/sank/
cd     /tmp/sank/
unzip -d /tmp/sank/ \
  $S/http/icking-music-archive.org/scores/scarlatti/sonatas.zip
ps2pdf k025.ps k025.pdf
# (find-fline    "/tmp/sank/")
# (find-pdf-page "/tmp/sank/k025.pdf")


* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
dmissing -i satie




#####
#
# A Lilypond REPL
# 2011dec10
#
#####

# «repl»  (to ".repl")
# http://lilypond.org/doc/v2.14/Documentation/contributor/debugging-scheme-code
# (find-es "scheme" "guile-1.8")
# (find-guilenode "Processes" "primitive-exit")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/
cat > repl.ly <<'%%%'
#(module-define! (resolve-module '(guile-user))
                 'lilypond-module (current-module))
#(top-repl)
%%%
lilypond repl.ly
  (+ 1 2)
  (primitive-exit)


* (eepitch-lilyrepl)
* (eepitch-kill)
* (eepitch-lilyrepl)
(+ 1 2)
fret-diagram-verbose-markup
(set-current-module lilypond-module)
fret-diagram-verbose-markup




#####
#
# Compact output
# 2013may30
#
#####

# «compact-output» (to ".compact-output")
# http://angg.twu.net/scans/goldberg_variations_aria.pdf
# (find-fline "~/LOGS/2013may30.lilypond")

<edrx> hi - I won't have the time for testing the hints now, but my
       plan is to save the log of the chat and try everything later
       (on one of the few things I've typesetted with Lilypond - a
       piece by Purcell)... so, question:
<edrx> how do I make the output of Lilypond as compact as this?
<edrx> http://angg.twu.net/scans/goldberg_variations_aria.pdf

# (info "(lilypond-notation)Horizontal spacing")





#####
#
# Erik Sandberg's thesis
# 2011dec10
#
#####

;; http://lilypond.org/doc/v2.14/Documentation/contributor/overview-of-lilypond-architecture
;; http://lilypond.org/web/images/thesis-erik-sandberg.pdf
(code-pdf-page  "lilysep" "$S/http/lilypond.org/web/images/thesis-erik-sandberg.pdf")
(code-pdf-text  "lilysep" "$S/http/lilypond.org/web/images/thesis-erik-sandberg.pdf")
;; (find-lilyseppage       5  "Contents")
;; (find-lilyseppage (+ 2 11) "2 Introduction")
;; (find-lilyseppage (+ 2 17) "3 Problem statement")
;; (find-lilyseppage (+ 2 21) "4 Data structures")
;; (find-lilyseppage (+ 2 31) "5 Some commands in the LY language")
;; (find-lilyseppage (+ 2 39) "6 Implementation of music streams")
;; (find-lilyseppage (+ 2 47) "7 Implementation notes")
;; (find-lilyseppage (+ 2 51) "8 Conclusions")
;; (find-lilyseppage (+ 2 53) "9 Suggestions for future work")
;; (find-lilyseppage (+ 2 55) "10 Acknowledgments")
;; (find-lilyseppage (+ 2 57) "A General music terminology")
;; (find-lilyseppage (+ 2 61) "B A subset of LilyPond's language")
;; (find-lilyseppage (+ 2 65) "C Music streams for the impatient")
;; (find-lilyseppage (+ 2 69) "D Demonstration")
;; (find-lilyseppage (+ 2 79) "E Benchmarks")
;; (find-lilyseppage (+ 2 83) "F Documentation of LilyPond's program architecture")
;; (find-lilyseptext "")




#####
#
# lilypond 2.18.2 on Wheezy
# 2014nov21
#
#####

# «lilypond-2.18.2» (to ".lilypond-2.18.2")
# (find-angg ".emacs" "lilypond-2.18")
# http://lilypond.org/
# http://lilypond.org/download.html
# http://lilypond.org/unix.html
# http://download.linuxaudio.org/lilypond/binaries/linux-x86/lilypond-2.18.2-1.linux-x86.sh
# http://lilypond.org/learning.html
# http://lilypond.org/doc/v2.18/Documentation/learning.pdf
# http://lilypond.org/snippets.html
# http://lilypond.org/doc/v2.18/Documentation/snippets.pdf
# http://lilypond.org/doc/v2.18/Documentation/notation/
# http://lilypond.org/doc/v2.18/Documentation/notation/musical-notation
# http://lilypond.org/doc/v2.18/Documentation/notation.pdf

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/
LILYSH=$S/http/download.linuxaudio.org/lilypond/binaries/linux-x86/lilypond-2.18.2-1.linux-x86.sh
cp -v $LILYSH .
chmod 755 lilypond-2.18.2-1.linux-x86.sh
./lilypond-2.18.2-1.linux-x86.sh --help
./lilypond-2.18.2-1.linux-x86.sh --prefix /tmp/lily/ |& tee olp 
# (find-sh "cd /tmp/lily/ && find * | sort")
/tmp/lily/bin/uninstall-lilypond

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# http://download.linuxaudio.org/lilypond/binaries/linux-x86/lilypond-2.18.2-1.linux-x86.sh
LILYSH=$S/http/download.linuxaudio.org/lilypond/binaries/linux-x86/lilypond-2.18.2-1.linux-x86.sh
cd /tmp/
sh $LILYSH --help
sh $LILYSH
# (find-sh "cd ~/lilypond/ && find * | sort")
# (find-lilysh "find * | sort")

cd /tmp/
cat > test.ly <<'%%%'
\version "2.18.2"
{
  c' e' g' e'
}
%%%
lilypond test.ly

# (find-pdf-page "/tmp/test.pdf")


# (find-lilyfile "usr/share/emacs/site-lisp/")
# (find-fline "~/lilypond/usr/share/lilypond/current/ly/")
# (find-fline "~/bin/uninstall-lilypond")
# (find-fline "/tmp/lily/")
# (find-sh "cd /tmp/lily/ && find * | sort")




#####
#
# autochange
# 2014nov22
#
#####

# «autochange» (to ".autochange")
# (find-fline "~/LOGS/2014nov21.lilypond")

<edrx> hi, this is a very newbie-ish question
<edrx> I just installed 2.18.2 on Debian using the installer on
       lilypond.org
<edrx> and downloaded some of the manuals, too. the question is: I
       would like to typeset some scores for piano where at some
       points the left-hand part is written on the upper staff
<edrx> what are the keywords that I should look for in the manuals
       to see how to do that?
<thrig> "Changing staff automatically" in notation docs
<edrx> I found "Cross staff stems" here:
       http://lilypond.org/doc/v2.18/Documentation/snippets/staff-notation
<edrx> and "autochange"
<edrx> thanks!





#####
#
# Bach's inventions
# 2014dec31
#
#####

# «inventions» (to ".inventions")
# http://www.mutopiaproject.org/cgibin/make-table.cgi?collection=bachis&preview=1
# http://www.mutopiaproject.org/ftp/BachJS/BWV772/bach-invention-01/bach-invention-01.ly
# http://www.mutopiaproject.org/ftp/BachJS/BWV772/bach-invention-01/bach-invention-01-a4.pdf
# http://www.mutopiaproject.org/ftp/BachJS/BWV774/bach-invention-03/bach-invention-03.ly
# http://www.mutopiaproject.org/ftp/BachJS/BWV774/bach-invention-03/bach-invention-03-a4.pdf
# http://www.mutopiaproject.org/ftp/BachJS/BWV775/bach-invention-04/bach-invention-04.ly
# http://www.mutopiaproject.org/ftp/BachJS/BWV775/bach-invention-04/bach-invention-04-a4.pdf

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cp -v $S/http/www.mutopiaproject.org/ftp/BachJS/BWV772/bach-invention-01/bach-invention-01.ly ~/LILYPOND/
cp -v $S/http/www.mutopiaproject.org/ftp/BachJS/BWV774/bach-invention-03/bach-invention-03.ly ~/LILYPOND/
cp -v $S/http/www.mutopiaproject.org/ftp/BachJS/BWV775/bach-invention-04/bach-invention-04.ly ~/LILYPOND/
cd ~/LILYPOND/
cp -v bach-invention-01.ly invention-01.ly
cp -v bach-invention-03.ly invention-03.ly
cp -v bach-invention-04.ly invention-04.ly

# (find-angg "LILYPOND/")
# (find-angg "LILYPOND/invention-01.ly")
# (find-angg "LILYPOND/invention-02.ly")
# (find-angg "LILYPOND/invention-03.ly")





#####
#
# Frescobaldi
# 2015jan24
#
#####

# «frescobaldi» (to ".frescobaldi")
# http://frescobaldi.org/
# http://frescobaldi.org/download
# http://frescobaldi.org/uguide
# http://frescobaldi.org/links#distros
# https://github.com/wbsoft/frescobaldi/releases
# https://github.com/wbsoft/frescobaldi/releases/download/v2.17.2/frescobaldi-2.17.2.tar.gz

# (find-zsh "availabledebs | sort | grep py")
# python-qt4
# python-poppler-qt4
# python-pygame

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rv ~/usrc/frescobaldi-2.17.2/
tar -C ~/usrc/ -xvzf \
  /home/edrx/snarf/https/github.com/wbsoft/frescobaldi/releases/download/v2.17.2/frescobaldi-2.17.2.tar.gz
cd     ~/usrc/frescobaldi-2.17.2/

sudo python setup.py install  |& tee opsi

# (code-c-d "frescobaldi" "~/usrc/frescobaldi-2.17.2/")
# (find-frescobaldifile "")
# (find-frescobaldifile "INSTALL")

* (eepitch-shell2)
sudo apt-get install    frescobaldi




#####
#
# Ben Lemon's video tutorials
# 2015jan24
#
#####

# «ben-lemons-videos» (to ".ben-lemons-videos")
# http://benlemon.me/blog/music/lilypond/operation-lilypond
# https://www.youtube.com/watch?v=tclwyZr08bE&list=PLHi8BvxILUV7hsUjn_Az5filU1TsNzq2R&index=1
# http://www.youtube.com/watch?v=tclwyZr08bE LilyPond Tutorial 1 - Introduction & First Score
# http://www.youtube.com/watch?v=4zIk7pA-k8o LilyPond Tutorial 2 - Community & Mailing List
# http://www.youtube.com/watch?v=RK4Db1Hby_k LilyPond Tutorial 3 - Introduction to Frescobaldi
# http://www.youtube.com/watch?v=87mt_nicr74 LilyPond Tutorial 4 - Fundamentals and Basic Input
# http://www.youtube.com/watch?v=M_m4YdYUSkM LilyPond Tutorial 5 - Bar Checks, Beams, & Header
# http://www.youtube.com/watch?v=7uyDjfdVc20 LilyPond Tutorial 6 - Articulations, Dynamics, etc.
# http://www.youtube.com/watch?v=grtEMMCDz5M LilyPond Tutorial 7 - Chords & Attached Text
# http://www.youtube.com/watch?v=DRKGw6RWLJI LilyPond Tutorial 8 - New Score Setup (Frescobaldi)
# http://www.youtube.com/watch?v=_q1KqM29YDQ LilyPond Tutorial 9 - SVG Export & Score Manipulation
# http://www.youtube.com/watch?v=mmfXHVrkG3g LilyPond Tutorial 10 - Variables & Tuplets
# http://www.youtube.com/watch?v=1ILRboieK1I LilyPond Tutorial 11 - Voices
# http://www.youtube.com/watch?v=I3cN7hX4pBo LilyPond Tutorial 12 - Adding Lyrics
# http://www.youtube.com/watch?v=0V4t8kbZ0Ew LilyPond Tutorial 13 - Working with Relative Mode
# http://www.youtube.com/watch?v=jIgxiKhLWu8 LilyPond Tutorial 14 - Creating Staves & Instrument Names
# http://www.youtube.com/watch?v=P8cPY8r01i8 LilyPond Tutorial 15 - Frescobaldi: More Features (pt. 1)
# http://www.youtube.com/watch?v=jzXrKwOw_7Q LilyPond Tutorial 16 - Frescobaldi: More Features (pt. 2)
# http://www.youtube.com/watch?v=xIpi0zZRm9c LilyPond Tutorial 17 - Basic Percussion Notation
# http://www.youtube.com/watch?v=RkiSsD8RG-s LilyPond Tutorial 18 - Harmonics / Snap Pizzicato
# http://www.youtube.com/watch?v=KsxiUFsx0d0 LilyPond Tutorial 19 - Page Formatting
# http://www.youtube.com/watch?v=UI2R4TaQqRQ LilyPond Tutorial 20 - Changelog & What's New?
# http://www.youtube.com/watch?v=p8kpLKPov6E LilyPond Tutorial 21 - The Global Block
# http://www.youtube.com/watch?v=IOTQw5g2x7g LilyPond Tutorial 22 - 2.18 Update & Frescobaldi 2.0.13
# http://www.youtube.com/watch?v=Vmfc-EixJ-8 LilyPond Tutorial 23 - The \score Block: Part I
# http://www.youtube.com/watch?v=eXVsgGbKwN8 LilyPond Tutorial 24 - The \include Command (\score pt. 2)
# http://www.youtube.com/watch?v=EtbWzd72iqA LilyPond Tutorial 25 - Final Lesson & PianoStaff




#####
#
# Page breaks
# 2015jan24
#
#####

# «page-breaks» (to ".page-breaks")
# http://lilypondblog.org/2015/01/partially-compiling-a-lilypond-score/




#####
#
# lilypond-2.20.0
# 2020jun23
#
#####

# «lilypond-2020»  (to ".lilypond-2020")
# http://lilypond.org/
# http://lilypond.org/download.html
# https://lilypond.org/download/sources/v2.20/lilypond-2.20.0.tar.gz

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rv ~/usrc/lilypond-2.20.0/
tar -C ~/usrc/ -xvzf \
  $S/https/lilypond.org/download/sources/v2.20/lilypond-2.20.0.tar.gz
cd     ~/usrc/lilypond-2.20.0/

# (code-c-d "lilypond" "~/usrc/lilypond-2.20.0/")
# (find-lilypondfile "")
# (find-lilypondfile "README.txt")
# (find-lilypondfile "INSTALL.txt")

# https://lilypond.org/download/binaries/linux-64/lilypond-2.20.0-1.linux-64.sh
cd $S/https/lilypond.org/download/binaries/linux-64/
sh lilypond-2.20.0-1.linux-64.sh

# (find-fline "~/lilypond/")
# (find-fline "~/bin/lilypond")
cd ~/bin/
laf *ly*
w lilypond





#####
#
# lilypond-2021
# 2021dec29
#
#####

# «lilypond-2021»  (to ".lilypond-2021")
# https://lilypond.org/
# https://lilypond.org/download/binaries/linux-64/lilypond-2.22.1-1.linux-64.sh
# https://lilypond.org/download/sources/v2.22/lilypond-2.22.1.tar.gz
# https://lilypond.org/doc/v2.22/Documentation/internals.pdf

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd $S/https/lilypond.org/download/binaries/linux-64/
sh lilypond-2.22.1-1.linux-64.sh

rm -Rv ~/usrc/lilypond-2.22.1/
tar -C ~/usrc/ -xvzf \
  $S/https/lilypond.org/download/sources/v2.22/lilypond-2.22.1.tar.gz
cd     ~/usrc/lilypond-2.22.1/

./autogen.sh --noconfigure     |& tee oag
mkdir -p build/
cd      build/
../configure --help
../configure                   |& tee oc
make                           |& tee om
sudo make install              |& tee omi

# (find-angg ".emacs" "lilypond")
# (find-node "(lilypond-extending)Scheme sandbox")

# (code-c-d "lilypond" "~/usrc/lilypond-2.22.1/")
# (find-lilypondfile "")
# (find-lilypondsh "find * | sort")
# (find-lilypondfile "INSTALL.txt")
# (find-lilypondfile "INSTALL.txt" "Debian GNU/Linux")
# (find-lilypondfile "Documentation/")
# (find-lilypondfile "Documentation/en/")
# (find-lilypondfile "Documentation/en/extending/programming-interface.itely")
# (find-lilypondfile "Documentation/en/extending/programming-interface.itely" "LilyPond code blocks")
# (find-lilypondgrep "grep -R -n omment Documentation/en/*")


apti tidy extractpdfmark dblatex
# apti guile-devel fontforge texi2html
apti fontforge texi2html
apti guile-2.2-dev
# apti guile-3.0-dev

# (find-fline "~/lilypond/")
# (find-fline "~/bin/uninstall-lilypond")
# (find-fline "~/bin/lilypond")
# (find-fline "~/LILYPOND/a_new_ground.ly")

(code-c-d "lilypond" "~/lilypond/")
;; (find-lilypondfile "")
;; (find-lilypondsh "find * | sort")





#####
#
# lilypond-2022
# 2022oct01
#
#####

# «lilypond-2022»  (to ".lilypond-2022")
# (find-angg ".emacs" "lilypond-info")
# https://lilypond.org/download/binaries/linux-64/lilypond-2.22.2-1.linux-64.sh
# https://lilypond.org/download/sources/v2.22/lilypond-2.22.2.tar.gz
# https://lilypond.org/doc/v2.22/Documentation/internals.pdf
# (find-fline "$S/https/lilypond.org/download/binaries/linux-64/" "lilypond-2.22.2-1.linux-64.sh")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)

# (find-sh "du -c ~/lilypond/")
# (find-sh "du -c /usr/local/lilypond/")

rm -Rfv ~/lilypond/
sudo rm -Rfv /usr/local/lilypond/
cd $S/https/lilypond.org/download/binaries/linux-64/
       sh lilypond-2.22.2-1.linux-64.sh --help
  sudo sh lilypond-2.22.2-1.linux-64.sh --batch --prefix /usr/local --doc | tee oinstall
# sudo sh lilypond-2.22.2-1.linux-64.sh --batch --prefix /usr/local       | tee oinstall
# sudo sh lilypond-2.22.2-1.linux-64.sh --doc   --prefix /usr/local

cd $S/https/lilypond.org/download/binaries/linux-64/
laf
tar -tvjf lilypond-2.22.2-1.documentation.tar.bz2
# (find-sh "tar -tjf $S/https/lilypond.org/download/binaries/linux-64/lilypond-2.22.2-1.documentation.tar.bz2")

# (find-fline "/usr/local/lilypond/usr/share/doc/lilypond/html/Documentation/")
# (code-c-d "lilydoc" "/usr/local/lilypond/usr/share/doc/lilypond/html/Documentation/")
# (code-pdf-page "lilysnip" "/usr/local/lilypond/usr/share/doc/lilypond/html/Documentation/snippets.pdf")
# (code-pdf-text "lilysnip" "/usr/local/lilypond/usr/share/doc/lilypond/html/Documentation/snippets.pdf")
# (find-lilydocfile "")
# (find-lilysnippage)
# (find-lilysniptext)

# (find-fline "$S/https/lilypond.org/download/binaries/linux-64/oinstall")
# (find-fline "/usr/local/lilypond/")
# (find-fline "/usr/local/lilypond/usr/")
# (find-fline "/usr/local/bin/lilypond")
# (find-fline "/usr/local/bin/lilypond-wrapper.python3")
# (find-fline "/usr/local/bin/lilypond-wrapper.guile")
# (find-fline "/usr/local/bin/uninstall-lilypond")
# (find-fline "/usr/local/lilypond/usr/share/doc/")
# (find-fline "/usr/local/lilypond/usr/share/doc/lilypond/html/")
# (find-fline "/usr/local/lilypond/usr/share/info/")

w lilypond
lilypond --help
lilypond --version

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rv ~/bigsrc/lilypond-2.22.2/
tar -C ~/bigsrc/ -xvzf \
  $S/https/lilypond.org/download/sources/v2.22/lilypond-2.22.2.tar.gz
cd     ~/bigsrc/lilypond-2.22.2/

# (code-c-d "lilysrc" "~/bigsrc/lilypond-2.22.2/")
;; (find-lilysrcfile "")

# (find-es "texinfo" "Info-directory-list")





# (find-zsh "installeddebs | sort | grep lilypond")
# (find-zsh "availabledebs | sort | grep lilypond")

apti lilypond lilypond-doc-pdf

# (find-status   "lilypond")
# (find-vldifile "lilypond.list")
# (find-udfile   "lilypond/")
# (find-status   "lilypond-doc-pdf")
# (find-vldifile "lilypond-doc-pdf.list")
# (find-udfile   "lilypond-doc-pdf/")

(progn
(code-c-d      "lilydoc"   "/usr/share/doc/lilypond/html/Documentation/")
(code-pdf-page "lilyessay" "/usr/share/doc/lilypond/html/Documentation/essay.pdf")
(code-pdf-text "lilyessay" "/usr/share/doc/lilypond/html/Documentation/essay.pdf")
(code-pdf-page "lilylearn" "/usr/share/doc/lilypond/html/Documentation/learning.pdf")
(code-pdf-text "lilylearn" "/usr/share/doc/lilypond/html/Documentation/learning.pdf" 5)
(code-pdf-page "lilynotat" "/usr/share/doc/lilypond/html/Documentation/notation.pdf")
(code-pdf-text "lilynotat" "/usr/share/doc/lilypond/html/Documentation/notation.pdf")
)
;; (find-lilydocfile "")
;; (find-lilyessaypage)
;; (find-lilyessaytext)
;; (find-lilylearnpage)
;; (find-lilylearntext)
;; (find-lilynotatpage)
;; (find-lilynotattext)

# (find-lilynotatpage 458 "3.1.5 File structure")
# (find-lilynotattext 458 "3.1.5 File structure")
# (find-lilynotatpage 459 "multi-line comment")
# (find-lilynotattext 459 "multi-line comment")
# (find-lilynotattext 459 "multi-line comment" "%{ ... %}")




#####
#
# drumbook
# 2020dec07
#
#####

# «drumbook»  (to ".drumbook")
# https://gitlab.com/drumbook/elementary.git
# https://gitlab.com/drumbook/elementary
# https://leanpub.com/drumbook-el
# https://jagrg.gitlab.io/
# https://jagrg.gitlab.io/blog.html
# (find-git-links "https://gitlab.com/drumbook/elementary" "drumelementary")
# (find-git-links "https://gitlab.com/drumbook/accents" "drumaccents")
# (find-drumelementaryfile "definitions.ly")
# (find-drumelementaryfile "helper.org")
# (find-drumelementaryfile "")
# (find-drumelementarygrep "grep --color -niH --null -e tangle *")

# https://gitlab.com/drumbook/accents
# https://gitlab.com/drumbook/accents/-/raw/master/helper.org
# (find-drumaccentsfile "helper.org")
# (find-drumaccentsfile "")

# (find-fline "~/usrc/accents/etude-02.ly")
# (find-fline "~/usrc/accents/")

cd ~/usrc/accents/
export PATH=$HOME/bin/:$PATH
lilypond etude-02.ly

https://gitlab.com/drumbook/accents/-/raw/master/helper.org

# error: program too old: 2.18.2 (file requires: 2.20.0)

cp -v ~/usrc/elementary/definitions.ly ~/usrc/accents/

# (find-fline "~/usrc/elementary/definitions.ly")




#####
#
# paper-size
# 2022oct03
#
#####

# «paper-size»  (to ".paper-size")
# (find-lilynotnode "")
# (find-lilynotnode "Predefined paper sizes")
# (find-lilynotnode "LilyPond index" "\\paper")
# (find-lilysnipnode "")
# (find-lilysnipnode "Paper and layout")

https://www.google.com/search?q=how+do+i+change+the+page+size+in+lilypond&oq=how+do+i+change+the+page+size+in+lilypond&aqs=chrome..69i57.5574j0j7&sourceid=chrome&ie=UTF-8
https://lilypond.org/doc/v2.21/Documentation/notation/predefined-paper-sizes
https://lilypond.org/doc/v2.22/Documentation/notation/the-paper-block
https://lilypond.org/doc/v2.21/Documentation/snippets/paper-and-layout








(org-babel-do-load-languages
 'org-babel-load-languages
 '((emacs-lisp . t)
   (python . t)
   (lilypond . t)))

(setq org-babel-python-command "python3")

(setq org-confirm-babel-evaluate nil)





<edrx> two quick questions about typestting piano fingerings...
<edrx> I am a beginner, and I have written down - with a pencil -
       detailed fingerings for a piece - but at some places I have
       two different choices of fingerings - what would you
       recommend for writing down the fingerings separately from
       the notes? there must be ways (using scheme) to add
       fingerings a posteriori...
<thrig> haven't figured out how to do that yet
<edrx> hm, ok
<edrx> I just found this:
       http://lsr.dsi.unimi.it/LSR/Search?q=fingering
<edrx> (which sort of has pointers about my second question, which
       would be about "substitution fingerings" =))

<edgarvincent> Has anyone managed to open Lilypond's textedit://
               links from PDF-tools?
<Viking667> sigh. Gave up on one version of modded minecraft (kept
            hanging), now trying another.
<edgarvincent> I have this in my config, but I'm not sure I'm doing
               this properly: https://paste.debian.net/1181092/
<edgarvincent> (Feels a bit weird to have an Emacs package call
               Bash, which then invokes a Guile script, which
               itself invokes emacsclient, but... well ^^)
<edgarvincent> In case anyone is interested in opening links from
               Lilypond PDF's in PDF-tools with emacsclient, this
               seems to works reasonably well:
               https://paste.debian.net/1181114/
<edgarvincent> > From PDF's opened in pdf-tools?
<edgarvincent> Actually, there's a better version there:
               https://git.jamzattack.xyz/emacs.d/











;; Garbage (very old):

;; (find-fline "/etc/emacs/site-start.d/50lilypond.el")
;; (find-fline "/usr/share/emacs/site-lisp/lilypond-mode.el" "lilypond-indent")
;; The library lilypond-indent.el does not exist, so we fake it.
;; (find-angg "LILYPOND/lilypond-indent.el")
;; (find-es "music" "lilypond-src")
;; (add-to-list 'load-path "~/LILYPOND/")

;; (add-to-list 'Info-additional-directory-list "/usr/share/info/lilypond/")
;; (find-node "(lilypond)Top")

# (find-available "rumor")
# (find-available "frescobaldi")

http://lilypondblog.org/2015/01/partially-compiling-a-lilypond-score/ *
http://lilypondblog.org/2014/12/catching-up-with-the-mutopia-project/
http://lilypondblog.org/2014/10/annotating-scores/
http://lilypondblog.org/2014/10/segmented-workflows/
http://lilypondblog.org/2014/09/lilyponds-look-and-feel/
http://benlemon.me/blog/music/lilypond/operation-lilypond

http://lilypondblog.org/category/people/

https://joshdnichols.files.wordpress.com/2014/12/theticklishguide.pdf

https://github.com/alda-lang/alda

https://francopasut.netlify.app/post/emacs_write_lilypond/
http://lilypond.org/easier-editing.html
https://news.ycombinator.com/item?id=39465258 LilyPond: Music notation for everyone (lilypond.org)




#  Local Variables:
#  coding:               utf-8-unix
#  End: