]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge http://git.sv.gnu.org/r/lilypond
authorNicolas Sceaux <nicolas.sceaux@free.fr>
Sun, 10 Jun 2007 13:48:28 +0000 (15:48 +0200)
committerNicolas Sceaux <nicolas.sceaux@free.fr>
Sun, 10 Jun 2007 13:48:28 +0000 (15:48 +0200)
100 files changed:
.gitignore
Documentation/user/basic-notation.itely
GNUmakefile.in
VERSION
buildscripts/makelsr.py
buildscripts/mf-to-table.py
buildscripts/output-distance.py
flower/file-name.cc
flower/include/file-name.hh
flower/include/std-vector.hh
flower/std-string.cc
flower/test-file-name.cc
input/lsr/ancient/gregorian-scripts.ly [new file with mode: 0644]
input/lsr/chords/volta-brackets-over-chord-names.ly [new file with mode: 0644]
input/lsr/connecting/automatic-beam-subdivisions.ly [new file with mode: 0644]
input/lsr/connecting/how-to-improve-automatic-beam-groups-when-frequently-using--time.ly [new file with mode: 0644]
input/lsr/contemporary/time-signatures-on-top-of-the-score-using-a-separate-staff.ly [new file with mode: 0644]
input/lsr/education/making-some-staff-lines-thicker-than-the-others.ly [new file with mode: 0644]
input/lsr/education/putting-parentheses-around-a-note.ly [new file with mode: 0644]
input/lsr/education/white-text-on-black-background.ly [new file with mode: 0644]
input/lsr/guitar/faking-a-hammer-in-tablatures.ly [new file with mode: 0644]
input/lsr/other/all-headers.ly [new file with mode: 0644]
input/lsr/other/engravers-one-by-one.ly [new file with mode: 0644]
input/lsr/other/making-an-object-invisibile-with-the-transparent-property.ly [new file with mode: 0644]
input/lsr/other/outputting-the-version-number.ly [new file with mode: 0644]
input/lsr/other/removing-time-signature-and-bar-lines.ly [new file with mode: 0644]
input/lsr/other/using-the--tweak-command-to-tweak-individual-grobs.ly
input/lsr/pitch/combining-two-parts-on-the-same-staff.ly [new file with mode: 0644]
input/lsr/pitch/makam.ly
input/lsr/pitch/preventing-stem-extension.ly [new file with mode: 0644]
input/lsr/pitch/rest-styles.ly [new file with mode: 0644]
input/lsr/scheme/generating-random-notes.ly [new file with mode: 0644]
input/lsr/scheme/transpose-pitches-with-minimum-accidentals.ly [new file with mode: 0644]
input/lsr/spacing/alignment-order.ly
input/lsr/spacing/drawing-skyline-outline.ly
input/lsr/spacing/setting-the-extent-of-objects.ly [new file with mode: 0644]
input/lsr/staff/aligning-instrument-names.ly [new file with mode: 0644]
input/lsr/staff/changing-the-staff-size.ly [new file with mode: 0644]
input/lsr/staff/staff-containers.ly [new file with mode: 0644]
input/lsr/text/creating-text-spanners.ly [new file with mode: 0644]
input/lsr/text/how-to-bottom-align-texts-with-different-vertical-extents.ly [new file with mode: 0644]
input/lsr/text/rotating-a-text-object.ly [new file with mode: 0644]
input/lsr/vocal/aligning-lyrics.ly [new file with mode: 0644]
input/lsr/vocal/vertical-brace-spanning-several-lyrics-lines.ly [new file with mode: 0644]
input/regression/ambitus-pitch-ordering.ly [new file with mode: 0644]
input/regression/dot-column-rest-collision.ly [new file with mode: 0644]
input/regression/laissez-vibrer-tie-beam.ly [new file with mode: 0644]
input/test/engraver-contexts.ly [deleted file]
input/test/engraver-one-by-one.ly [deleted file]
input/test/gregorian-scripts.ly [deleted file]
input/test/hymn.ly [deleted file]
input/test/instrument-name-align.ly [deleted file]
input/test/lilypond-testpage.ly [deleted file]
input/test/music-creation.ly [deleted file]
input/test/no-bar-lines.ly [deleted file]
input/test/partial-blank.ly [deleted file]
input/test/preset-extent.ly [deleted file]
input/test/rests.ly [deleted file]
input/test/staff-container.ly [deleted file]
input/test/staff-size.ly [deleted file]
input/test/stem-extend.ly [deleted file]
input/test/tablature-hammer.ly [deleted file]
input/test/text-spanner.ly [deleted file]
input/test/time-signature-staff.ly [deleted file]
input/test/version-output.ly [deleted file]
input/test/vertical-extent.ly [deleted file]
input/test/volta-chord-names.ly [deleted file]
lily/beam-quanting.cc
lily/beam.cc
lily/general-scheme.cc
lily/include/note-column.hh
lily/include/pitch-interval.hh
lily/include/tie-formatting-problem.hh
lily/lily-guile.cc
lily/pitch-interval.cc
lily/pitch.cc
lily/program-option-scheme.cc
lily/relocate.cc
lily/rest-collision.cc
lily/tab-note-heads-engraver.cc
lily/tie-formatting-problem.cc
mf/GNUmakefile
python/convertrules.py
scm/backend-library.scm
scm/clip-region.scm
scm/coverage.scm
scm/define-markup-commands.scm
scm/framework-eps.scm
scm/framework-null.scm
scm/framework-ps.scm
scm/framework-scm.scm
scm/framework-svg.scm
scm/framework-tex.scm
scm/framework-texstr.scm
scm/fret-diagrams.scm
scm/lily.scm
scm/output-svg.scm
scm/output-tex.scm
scm/ps-to-png.scm
scm/stencil.scm

index 0c7c899e609494a67f7d2c0813be58c6f0b0780a..20420023d0abe0573950e78d120bba713b0d8c0c 100644 (file)
@@ -55,6 +55,7 @@ gcstat*.scm
 lily-[0-9a-f][0-9a-f][0-9a-f]*
 out-scons
 out-cov
+out-test
 tags
 test-output-distance
 config-*.hh
index 4e31cc3f76be0fc789322ad4a475a025c326e887..e17f3e480f4a9b3f17fc47eade0c293194d5349e 100644 (file)
@@ -3201,18 +3201,13 @@ c1
 \alternative { {d2 d} {f f,} }
 @end lilypond
 
-In the following example, the first ending is not a complete
-bar (it only had 3 beats).  The beginning of the second ending
-contains the 4th beat from the first ending.  This @q{extra} beat
-in the second ending is due to the first time ending,
-and has nothing to do with the @code{\partial} at the
-beginning of the example.
+Repeats with upbeats may be created.
 
 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
 \new Staff {
-  \partial 4
-  \repeat volta 4 { e | c2 d2 | e2 f2 | }
-  \alternative { { g4 g g } { a | a a a a | b2. } }
+  \partial 4 e |
+  \repeat volta 4 { c2 d2 | e2 f2 | }
+  \alternative { { g4 g g e } { a a a a | b2. } }
 }
 @end lilypond
 
index f70b2d44dc4bf253669d43c289fc2b2224826412..f821cc57d73a4fc8b5264ceacb03a4a16f3eb8c9 100644 (file)
@@ -161,8 +161,7 @@ $(tree-share-prefix)/lilypond-force link-tree: GNUmakefile $(outdir)/VERSION
        cd $(tree-share-prefix)/tex && \
                ln -s $(top-src-dir)/tex source && \
                ln -s ../../../../../tex/$(outconfbase) tex-out && \
-               ln -s ../../../../../mf/$(outconfbase) mf-out
-
+               true
        cd $(tree-share-prefix)/fonts && \
                ln -s $(top-src-dir)/mf source && \
                true
@@ -229,7 +228,7 @@ test:
        fi > input/regression/out-test/tree.gittxt
        $(MAKE) -C input/regression/ out=$(OUT_TEST) LILYPOND_BOOK_LILYPOND_FLAGS="-dbackend=eps --formats=ps $(LILYPOND_JOBS) -dseparate-log-files -dinclude-eps-fonts -dgs-load-fonts --header=texidoc -I $(top-src-dir)/input/manual -ddump-profile -dcheck-internal-types -ddump-signatures -danti-alias-factor=1" LILYPOND_BOOK_VERBOSE= out-$(OUT_TEST)/collated-files.html
        @find input ly -name '*.ly' -print |grep -v 'out.*/' | xargs grep '\\version' -L | grep -v "standard input" |sed 's/^/**** Missing version: /g' 
-
+       rsync -L -a --exclude 'out-*' --exclude 'out' --exclude mf --exclude source --exclude mf $(outdir)/share input/regression/out-test/
 
 test-baseline: 
        @if  test -d .git ; then \
diff --git a/VERSION b/VERSION
index 83517146261a6fba070e42d5054fa4ad0c1f97d7..552b2a6eeda5237447a81051d8eb2b2ce207144f 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,6 +1,6 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=11
-PATCH_LEVEL=25
+PATCH_LEVEL=26
 MY_PATCH_LEVEL=
 
index 2206e61eeb38f00084f4d87cdcf45fe38c57b620..6b72bbebee64fa69e4b4fc7079e483bbd70d2e45 100755 (executable)
@@ -4,7 +4,7 @@ import os
 import os.path
 import shutil
 
-dirs = ['ancient','chords','connecting','contemporary','expressive','education','guitar','parts','pitches','repeats','scheme','spacing','staff','text','vocal','other']
+dirs = ['ancient','chords','connecting','contemporary','expressive','education','guitar','parts','pitch','repeats','scheme','spacing','staff','text','vocal','other']
 notsafe=[]
 
 try:
index c9cc27acdec6920f5ed6fa2c1530dcfc73898ad6..24b0971d7a94987f46959379883dbe6dbdb17c3b 100644 (file)
@@ -1,6 +1,6 @@
 #!@PYTHON@
 
-# mf-to-table.py -- convert spacing info in MF logs . and .tex
+# mf-to-table.py -- convert spacing info in MF logs . 
 #
 # source file of the GNU LilyPond music typesetter
 #
@@ -107,17 +107,6 @@ def parse_logfile (fn):
 
 
 
-def write_tex_defs (file, global_info, charmetrics):
-    nm = font_family
-    for m in charmetrics:
-        
-        texname = re.sub ('[_.]', 'X',  m['name'])
-        def digit_to_letter (match):
-            return chr (ord (match.group(1)) - ord ('0') + ord ('A'))
-        texname = re.sub ('([0-9])', digit_to_letter, texname)
-        file.write (r'''\gdef\%s%s{\char%d}%%%s''' % \
-              (nm, texname, m['code'],'\n'))
-    file.write ('\\endinput\n')
 
 
 def write_character_lisp_table (file, global_info, charmetrics):
@@ -192,7 +181,6 @@ Options:
  -l, --ly=FILE          name output table
  -o, --outdir=DIR       prefix for dependency info
  -p, --package=DIR      specify package
- -t, --tex=FILE         name output tex chardefs
 
  """)
     sys.exit (0)
@@ -203,12 +191,11 @@ Options:
         'a:d:ho:p:t:',
         ['enc=',  'outdir=', 'dep=', 'lisp=',
          'global-lisp=',
-         'tex=', 'debug', 'help', 'package='])
+         'debug', 'help', 'package='])
 
 global_lisp_nm = ''
 char_lisp_nm = ''
 enc_nm = ''
-texfile_nm = ''
 depfile_nm = ''
 lyfile_nm = ''
 outdir_prefix = '.'
@@ -220,8 +207,6 @@ for opt in options:
         depfile_nm = a
     elif o == '--outdir' or o == '-o':
         outdir_prefix = a
-    elif o == '--tex' or o == '-t':
-        texfile_nm = a
     elif o == '--lisp': 
         char_lisp_nm = a
     elif o == '--global-lisp': 
@@ -236,12 +221,11 @@ for opt in options:
         print o
         raise getopt.error
 
-base = re.sub ('.tex$', '', texfile_nm)
+base = os.path.splitext (lyfile_nm)[0]
 
 for filenm in files:
     (g, m, deps) = parse_logfile (filenm)
 
-    write_tex_defs (open (texfile_nm, 'w'), g, m)
     enc_name = 'FetaEncoding'
     if re.search ('parmesan', filenm):
         enc_name = 'ParmesanEncoding'
@@ -257,4 +241,4 @@ for filenm in files:
         write_deps (open (depfile_nm, 'wb'), deps,
               [base + '.log', base + '.dvi', base + '.pfa',
                depfile_nm,
-               base + '.pfb', texfile_nm])
+               base + '.pfb'])
index c60e965baf91c6ea88f957382e1d9136e0164e6c..d52f99879cada1f7b33dccc2b11fc8dfecd103a6 100644 (file)
@@ -577,8 +577,6 @@ class SignatureFileLink (FileLink):
             
         return d + orphan_distance
 
-
-
     def add_file_compare (self, f1, f2):
         system_index = [] 
 
@@ -609,12 +607,17 @@ class SignatureFileLink (FileLink):
             for f in glob.glob (pat):
                 infile = f
                 outfile = (dest_dir + '/' + f).replace ('.eps', '.png')
-
+                data_option = ''
+                if options.local_data_dir:
+                    data_option = ('-slilypond-datadir=%s/share/lilypond/current '
+                                   % os.path.split(infile)[0])
+                
                 mkdir (os.path.split (outfile)[0])
                 cmd = ('gs -sDEVICE=png16m -dGraphicsAlphaBits=4 -dTextAlphaBits=4 '
+                       ' %(data_option)s '
                        ' -r101 '
                        ' -sOutputFile=%(outfile)s -dNOSAFER -dEPSCrop -q -dNOPAUSE '
-                       ' %(infile)s  -c quit '  % locals ())
+                       ' %(infile)s  -c quit ') % locals ()
 
                 files_created[oldnew].append (outfile)
                 system (cmd)
@@ -1221,6 +1224,13 @@ def main ():
                   action="store_true",
                   help="Create PNGs from EPSes")
 
+
+    p.add_option ('--local-datadir',
+                  dest="local_data_dir",
+                  default=False,
+                  action="store_true",
+                  help='whether to use the share/lilypond/ directory in the test directory')
+
     p.add_option ('-o', '--output-dir',
                   dest="output_dir",
                   default=None,
index e5736e06b0834ed6c26e15e01f32d25d91682067..0f0bb61270beee42468ec305e31fb0b4106e06fa 100644 (file)
@@ -177,3 +177,26 @@ File_name::is_absolute () const
   return (dir_.length () && dir_[0] == DIRSEP) || root_.length ();
 }
 
+
+
+File_name
+File_name::canonicalized () const
+{
+  File_name c = *this;
+
+  replace_all (c.dir_, string ("//"), string ("/"));
+
+  vector<string> components =  string_split (c.dir_, '/');
+  vector<string> new_components;
+
+  for (vsize i = 0; i < components.size (); i++)
+    {
+      if (components[i] == "..")
+       new_components.pop_back ();
+      else
+       new_components.push_back (components[i]);
+    }
+
+  c.dir_ = string_join (new_components,  "/");
+  return c;  
+}
index e8ea1ea3c2d67667c535f5ad51b87d07ad9b72df..bd699e0b3151cdf12a207fb39cf6d8795d5a03be 100644 (file)
@@ -27,7 +27,7 @@ public:
 
   bool is_absolute () const;
   string to_string () const;
-
+  File_name canonicalized () const;
   string dir_part () const;
   string file_part () const;
 };
index 4c3dcc0e0e8f61ae506d8672cf81073b0799759b..5c2c09c9d0c908fc7880584774bb11cbda8c2823 100644 (file)
@@ -258,6 +258,7 @@ junk_pointers (vector<T> &v)
 #endif /* HAVE_BOOST_LAMBDA */
 
 vector<string> string_split (string str, char c);
+string string_join (vector<string> const &strs, string infix);
 
 #define iterof(i,s) typeof((s).begin()) i((s).begin())
 
index b78b0196616aa1adde6f46b9ab64df379b523ed5..1221609c6c0ce4bc2e76a140d4fcbb1ed35f3d11 100644 (file)
@@ -67,6 +67,9 @@ to_string (char const *format, ...)
   return str;
 }
 
+/*
+  TODO: this O(n^2) in #occurences of find, due to repeated copying.
+ */
 string &
 replace_all (string &str, string find, string replace)
 {
@@ -113,8 +116,7 @@ string_split (string str, char c)
     {
       string s = str.substr (0, i);
       a.push_back (s);
-      while (str[++i] == c)
-       ;
+      i ++;
       str = str.substr (i);
       i = str.find (c);
     }
@@ -122,3 +124,17 @@ string_split (string str, char c)
     a.push_back (str);
   return a;
 }
+
+string
+string_join (vector<string> const &strs, string infix)
+{
+  string result;
+  for (vsize i = 0; i < strs.size (); i ++)
+    {
+      if (i)
+       result += infix;
+      result += strs[i];
+    }
+
+  return result;
+}
index edae635e822e618d37a18f5fe92433109180091a..9bd06f121cf7201a1a7feea1874f5d0308ba2f5f 100644 (file)
@@ -34,3 +34,10 @@ TEST_STRING (File_name, Mingw_slashify_4, "\\tmp\\x.ly")
   string s = slashify (to_string ());
   EQUAL ("/tmp/x.ly", s);
 }
+
+TEST_STRING (File_name, Canonicalize, "foo//bar/..//bla//z.ly")
+{
+  string s = canonicalized ().to_string ();
+  EQUAL ("foo/bla/z.ly", s);
+}
+
diff --git a/input/lsr/ancient/gregorian-scripts.ly b/input/lsr/ancient/gregorian-scripts.ly
new file mode 100644 (file)
index 0000000..667aa64
--- /dev/null
@@ -0,0 +1,29 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+Here is demonstrated a preliminary support of Gregorian Scripts:
+
+ictus, circulus, semicirculus, accentus, episem.
+" }
+
+\include "gregorian-init.ly"
+
+\score {
+  \context VaticanaVoice {
+    \override Script #'padding = #-0.5
+     {
+      a\ictus
+      a\circulus
+      a\semicirculus
+      a\accentus
+      \[ a \episemInitium \pes b \flexa a \episemFinis \]
+    }
+  }
+  \layout {
+    line-width = 70.0
+    width = 60.0
+    indent = 0.0
+    ragged-right = ##t
+  }
+}
diff --git a/input/lsr/chords/volta-brackets-over-chord-names.ly b/input/lsr/chords/volta-brackets-over-chord-names.ly
new file mode 100644 (file)
index 0000000..ee84586
--- /dev/null
@@ -0,0 +1,22 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+Volta brackets can be placed over chord names. Just set the
+voltaOnThisStaff property to \"true\" for the ChordNames context and to
+\"false\" for the topmost ordinary Staff context.
+" }
+
+\score { <<
+  \new ChordNames \with {
+    voltaOnThisStaff = ##t
+  } \chordmode {
+    c1 c
+  }
+  \new Staff \with {
+    voltaOnThisStaff = ##f
+  }
+  {
+    \repeat volta 2 { c'1 } \alternative { c' }
+  }
+>> }
diff --git a/input/lsr/connecting/automatic-beam-subdivisions.ly b/input/lsr/connecting/automatic-beam-subdivisions.ly
new file mode 100644 (file)
index 0000000..95e8c64
--- /dev/null
@@ -0,0 +1,18 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+Lilypond can subdivide beams automatically. Set the property
+subdivideBeams, and beams are subdivided at beat positions (as
+specified in beat length)
+" }
+
+\relative{ b'32^"default"[ a g f c' b a g f e d' c b a g f ]
+              \set subdivideBeams = ##t
+              b32^"subdivision enabled"[ a g f c' b a g f e d' c b a g f ] 
+              \set Score.beatLength = #(ly:make-moment 1 8)
+              b32^"beatLength 1 8"[ a g f c' b a g f e d' c b a g f ]
+              \set Score.beatLength = #(ly:make-moment 1 16)
+              b32^"beatLength 1 16"[ a g f c' b a g f e d' c b a g f ]
+    }
+
diff --git a/input/lsr/connecting/how-to-improve-automatic-beam-groups-when-frequently-using--time.ly b/input/lsr/connecting/how-to-improve-automatic-beam-groups-when-frequently-using--time.ly
new file mode 100644 (file)
index 0000000..220a8a7
--- /dev/null
@@ -0,0 +1,36 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+Groups of beamed notes can be made by setting the subdivideBeams
+property. However, if you have \"\time\"-statements inside your score,
+you'll need to set the beatLength again after each \time-statement
+(that has a denominator that is not 8).
+
+This happens because the \"\time\"-statements reset the
+beatLength-value to the denominator of the time signature.     So, if
+you have many meter-changes, you can use the following function named
+\"\timenb #X #Y\" instead of \"\time X/Y\".
+" }
+
+% timenb sets TIMEesignature and measure length, but Not Beatlength
+timenb = #(define-music-function (parser location x y ) (integer? integer?) #{
+         \set Staff.timeSignatureFraction = #(cons $x $y)
+         \set Score.measureLength = #(ly:make-moment $x $y)
+#})
+
+\new Staff {
+  \relative c''
+  {
+    \set Score.beatLength = #(ly:make-moment 1 8)
+    \set subdivideBeams = ##t
+
+    \timenb #3 #8 c16.[ c32 c16. c32 c16. c32] |
+    \timenb #5 #8 d8[ d] d16.[ d32  d16. d32 d8] |
+    \timenb #3 #4 e8[ e16. e32] e16.[ e32 e16. e32] e16.[ f32 f8] |
+    \timenb #2 #4
+    g16.[ g32 g16. g32] g16.[ g32 g16. g32] |
+    
+  }
+}
+
diff --git a/input/lsr/contemporary/time-signatures-on-top-of-the-score-using-a-separate-staff.ly b/input/lsr/contemporary/time-signatures-on-top-of-the-score-using-a-separate-staff.ly
new file mode 100644 (file)
index 0000000..03e7e92
--- /dev/null
@@ -0,0 +1,40 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+in XXth century music, where time signatures tend to change a lot, it
+is sometimes recommended to put the time signatures on top of the score
+(or above each StaffGroup in case of an orchestral score). This can be
+achieved by creating a dummy staff which only contains the
+Time-signature-engraver). In this specific example, I've used a
+separate identifier to define every time signature change, which allows
+me to not bother entering them again when typing the actual music
+(careful though: it makes getting lost easier!).
+" }
+
+\layout{
+  \context { 
+    \type "Engraver_group"
+    \consists "Time_signature_engraver"
+    \consists "Axis_group_engraver"
+    \name "TimeSig"
+    \override TimeSignature #'extra-offset = #'(-2.2 . 0.0 )
+    \override TimeSignature #'font-size = #3
+  }
+  \context {
+    \Score \accepts TimeSig
+  }
+
+  \context { \Staff
+    \override TimeSignature #'transparent = ##t
+  }
+}
+
+timeSignatures = { \time 2/4 s2 \time 3/4 s2. \time 4/4 s1 }
+\score {
+
+<<     \new TimeSig \timeSignatures
+       \new Staff \relative { c'2  c2.  c1 }
+       \new Staff { a2 a2. a1}
+ >>
+}
diff --git a/input/lsr/education/making-some-staff-lines-thicker-than-the-others.ly b/input/lsr/education/making-some-staff-lines-thicker-than-the-others.ly
new file mode 100644 (file)
index 0000000..0f253f0
--- /dev/null
@@ -0,0 +1,17 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+For pedagogical purposes, you may want to make one staff line thicker
+(e.g. the middle line, to emphasize the line of the G clef). This can
+be achieved by adding extra lines very close to the line you want to
+make thicker, using the #'line-positions property in the StaffSymbol
+context.
+" }
+
+\score {
+     \new Staff{
+     \override Staff.StaffSymbol #'line-positions =#'(-4 -2 -0.2 0 0.2 2 4 )
+         d'4 e' f' g'
+     }
+}
diff --git a/input/lsr/education/putting-parentheses-around-a-note.ly b/input/lsr/education/putting-parentheses-around-a-note.ly
new file mode 100644 (file)
index 0000000..cdc3348
--- /dev/null
@@ -0,0 +1,14 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+As children do not always have hands large enough, say, to plays
+octavas when studying piano, or anything else, it can be useful to add
+parentheses around a low note for example. In this snippet, the
+\"parenthesized\" note is made a bit smaller using the \tweak command
+on the #'font-size property.
+" }
+
+{ \clef bass
+< f \parenthesize \tweak #'font-size #-1 f, >2
+}
diff --git a/input/lsr/education/white-text-on-black-background.ly b/input/lsr/education/white-text-on-black-background.ly
new file mode 100644 (file)
index 0000000..af22af8
--- /dev/null
@@ -0,0 +1,11 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+If you want to print some white text on black background, here's the
+trick:
+" }
+
+{
+       g1^\markup { \combine \filled-box #'(-.3 . 6.8) #'(-.3 . 1.8) #0 \with-color #white White}
+}
diff --git a/input/lsr/guitar/faking-a-hammer-in-tablatures.ly b/input/lsr/guitar/faking-a-hammer-in-tablatures.ly
new file mode 100644 (file)
index 0000000..70afad6
--- /dev/null
@@ -0,0 +1,19 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+A hammer in tablature can be faked with slurs.  
+" }
+
+\score{
+\context TabStaff
+  <<
+       \relative c''{
+               c(d)
+               d(d)
+               d(c)
+  }
+  >>
+}
+
+%%some weird letters are displayed in the Staff; can't reproduce it at home... --vv
diff --git a/input/lsr/other/all-headers.ly b/input/lsr/other/all-headers.ly
new file mode 100644 (file)
index 0000000..abfeee4
--- /dev/null
@@ -0,0 +1,48 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+A demonstration of all headers.
+" }
+
+\header {
+copyright = "copyright"
+title = "title"
+subtitle = "subtitle"
+composer = "composer"
+arranger = "arranger"
+instrument = "instrument"
+metre = "metre"
+opus = "opus"
+piece = "piece"
+poet = "poet"
+texidoc = "All header fields with special meanings."
+  copyright = "public domain"
+  enteredby = "jcn"
+  source = "urtext"
+
+}
+
+
+\score {
+  \relative c'' { c1 c1 c1 c1 }
+}
+
+\score {
+        \relative c'' { c1 c1 c1 c1 }
+       
+       \header {
+
+       title = "localtitle"
+       subtitle = "localsubtitle"
+       composer = "localcomposer"
+       arranger = "localarranger"
+       instrument = "localinstrument"
+       metre = "localmetre"
+       opus = "localopus"
+       piece = "localpiece"
+       poet = "localpoet"
+       copyright = "localcopyright"
+       }
+}
+
diff --git a/input/lsr/other/engravers-one-by-one.ly b/input/lsr/other/engravers-one-by-one.ly
new file mode 100644 (file)
index 0000000..c950efe
--- /dev/null
@@ -0,0 +1,278 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+The notation problem, creating a certain symbol, is handled by plugins.
+Each plugin is called an Engraver. In this example, engravers are
+switched on one by one, in the following order:
+
+- note heads
+
+
+- staff symbol,
+
+
+- clef,
+
+
+- stem,
+
+
+- beams, slurs, accents,
+
+
+- accidentals, bar lines, time signature, and key signature.
+
+
+
+Engravers are grouped. For example, note heads, slurs, beams etc. form
+a Voice context. Engravers for key, accidental, bar, etc. form a Staff
+context.
+
+
+You may only see the first example in this document; please download
+this snippet and run it from your own computer. 
+" }
+
+%% sample music
+topVoice =  \relative c' {
+  \key d\major
+  es8([ g] a[ fis])
+  b4
+  b16[-. b-. b-. cis-.]
+  d4->
+}
+
+botVoice =  \relative c' {
+  \key d\major
+  c8[( f] b[ a)]
+  es4
+  es16[-. es-. es-. fis-.]
+  b4->
+}
+
+hoom =  \relative c {
+  \key d \major
+  \clef bass
+  g8-. r
+  r4 
+  fis8-.
+  r8
+  r4
+  b'4->
+}
+
+pah =  \relative c' {
+  r8 b-.
+  r4
+  r8 g8-.
+  r16 g-. r8
+  \clef treble
+  fis'4->
+}
+
+%
+% setup for Request->Element conversion. Guru-only
+%
+
+MyStaff =\context {
+  \type "Engraver_group"
+  \name Staff
+
+  \description "Handles clefs, bar lines, keys, accidentals.  It can contain
+@code{Voice} contexts."
+
+  
+  \consists "Output_property_engraver" 
+  
+  \consists "Font_size_engraver"
+
+  \consists "Volta_engraver"
+  \consists "Separating_line_group_engraver"   
+  \consists "Dot_column_engraver"
+
+  \consists "Ottava_spanner_engraver"
+  \consists "Rest_collision_engraver"
+  \consists "Piano_pedal_engraver"
+  \consists "Piano_pedal_align_engraver"
+  \consists "Instrument_name_engraver"
+  \consists "Grob_pq_engraver"
+  \consists "Forbid_line_break_engraver"
+  \consists "Axis_group_engraver"
+
+  \consists "Pitch_squash_engraver"
+
+  \override VerticalAxisGroup #'minimum-Y-extent = #'(-6 . 6)
+  extraVerticalExtent = ##f
+  verticalExtent = ##f 
+  localKeySignature = #'()
+
+                               % explicitly set instrument, so we don't get 
+                               % weird effects when doing instrument names for
+                               % piano staves
+
+  instrumentName = #'()
+  shortInstrumentName = #'()
+  
+  \accepts "Voice"
+}
+
+
+MyVoice = \context {
+  \type "Engraver_group"
+  \name Voice
+
+  \description "
+    Corresponds to a voice on a staff.  This context handles the
+    conversion of dynamic signs, stems, beams, super- and subscripts,
+    slurs, ties, and rests.
+
+    You have to instantiate this explicitly if you want to have
+    multiple voices on the same staff."
+
+  localKeySignature = #'()
+  \consists "Font_size_engraver"
+  
+                               % must come before all
+  \consists "Output_property_engraver" 
+  \consists "Arpeggio_engraver"
+  \consists "Multi_measure_rest_engraver"
+  \consists "Text_spanner_engraver"
+  \consists "Grob_pq_engraver"
+  \consists "Note_head_line_engraver"
+  \consists "Glissando_engraver"
+  \consists "Ligature_bracket_engraver"
+  \consists "Breathing_sign_engraver"
+                               % \consists "Rest_engraver"
+  \consists "Grace_beam_engraver"
+  \consists "New_fingering_engraver"
+  \consists "Chord_tremolo_engraver"
+  \consists "Percent_repeat_engraver"
+  \consists "Slash_repeat_engraver"
+
+%{
+  Must come before text_engraver, but after note_column engraver.
+
+%}
+  \consists "Text_engraver"
+  \consists "Dynamic_engraver"
+  \consists "Fingering_engraver"
+
+  \consists "Script_column_engraver"
+  \consists "Rhythmic_column_engraver"
+  \consists "Cluster_spanner_engraver"
+  \consists "Tie_engraver"
+  \consists "Tie_engraver"
+  \consists "Tuplet_engraver"
+  \consists "Note_heads_engraver"
+  \consists "Rest_engraver"
+
+  \consists "Skip_event_swallow_translator"
+}
+
+
+\score {
+  \topVoice
+  \layout {
+    \context { \MyStaff }
+    \context { \MyVoice }
+  }
+}
+
+
+MyStaff = \context {
+    \MyStaff
+    \consists "Staff_symbol_engraver"
+}
+
+\score {
+  \topVoice
+  \layout {
+      \context { \MyStaff }
+      \context { \MyVoice }
+            }
+}
+
+MyStaff = \context {
+    \MyStaff
+    \consists "Clef_engraver"
+    \remove "Pitch_squash_engraver"
+}
+
+\score {
+  \topVoice
+  \layout {
+    \context { \MyStaff }
+    \context { \MyVoice }
+  }
+}
+
+MyVoice = \context {
+  \MyVoice
+  \consists "Stem_engraver"
+}
+
+\score {
+  \topVoice
+  \layout {
+    \context { \MyStaff }
+    \context { \MyVoice }
+  }
+}
+
+MyVoice = \context {
+  \MyVoice
+  \consists "Beam_engraver"
+}
+
+\score {
+  \topVoice
+  \layout {
+    \context { \MyStaff }
+    \context { \MyVoice }
+  }
+}
+
+MyVoice= \context {
+  \MyVoice
+  \consists "Phrasing_slur_engraver"
+  \consists "Slur_engraver"
+  \consists "Script_engraver"
+}
+
+
+\score {
+  \topVoice
+  \layout {
+    \context { \MyStaff }
+    \context { \MyVoice }
+  }
+}
+
+MyStaff = \context {
+  \MyStaff
+  \consists "Bar_engraver"
+  \consists "Time_signature_engraver"
+}
+
+\score {
+  \topVoice
+  \layout {
+    \context { \MyStaff }
+    \context { \MyVoice }
+  }
+}
+
+MyStaff = \context {
+  \MyStaff
+  \consists "Accidental_engraver"    
+  \consists "Key_engraver"
+}
+\score {
+  \topVoice
+  \layout {
+    \context { \MyStaff }
+    \context { \MyVoice }
+  }
+}
+
diff --git a/input/lsr/other/making-an-object-invisibile-with-the-transparent-property.ly b/input/lsr/other/making-an-object-invisibile-with-the-transparent-property.ly
new file mode 100644 (file)
index 0000000..e38331e
--- /dev/null
@@ -0,0 +1,24 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+Setting the @code{transparent} property will cause an object to be
+printed in `invisible ink': the object is not printed, but all its
+other behavior is retained.  The object still takes up space, it takes
+part in collisions, and slurs, and ties and beams can be attached to it.
+
+
+The snippet demonstrates how to connect different voices using ties. 
+Normally, ties only connect two notes in the same voice.  By
+introducing a tie in a different voice, and blanking the first up-stem
+in that voice, the tie appears to cross voices. 
+" }
+
+\relative c'' {
+<< {
+  \once \override Stem #'transparent = ##t
+  b8~ b8\noBeam
+} \\ {
+  b[ g8]
+} >>
+}
diff --git a/input/lsr/other/outputting-the-version-number.ly b/input/lsr/other/outputting-the-version-number.ly
new file mode 100644 (file)
index 0000000..4d4ec62
--- /dev/null
@@ -0,0 +1,20 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+By putting the output of
+    @code{lilypond-version} into a lyric, it is possible to print the 
+    version number of LilyPond in a score, or in a document generated
+    with @code{lilypond-book}.  Another possibility is to append the 
+    version number to the doc-string, in this manner:  
+" }
+
+\score { \context Lyrics  {
+    \override Score.RehearsalMark  #'self-alignment-X = #LEFT
+    \mark #(ly:export (string-append "Processed with LilyPond version " (lilypond-version)))
+    s2
+  }
+}
+
+
+
diff --git a/input/lsr/other/removing-time-signature-and-bar-lines.ly b/input/lsr/other/removing-time-signature-and-bar-lines.ly
new file mode 100644 (file)
index 0000000..9d73b40
--- /dev/null
@@ -0,0 +1,27 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+Engravers can be removed one by one. Here, the time signature and bar
+lines  have been removed.
+
+
+" }
+
+\score {
+   \relative c'' {
+    a b c d
+    d c b a
+  }
+  \layout {
+    raggedright = ##t
+    \context {
+      \Staff
+      whichBar = #""
+      \remove "Time_signature_engraver"
+    }
+  }
+}
+
+
+
index 5d1a06f4cda18353399ac17b4b4eb3637e8a6cfb..35a7a84ce28e3b315825faa9a5bd953464875371 100644 (file)
@@ -2,8 +2,8 @@
 \version "2.11.23"
 
 \header { texidoc = "
-With the \tweak command, you can tune every grob directly. Here are
-some examples of available tweaks.
+With the @code{\tweak} command, you can tune every grob directly. Here
+are some examples of available tweaks.
 " }
 
 \paper {
diff --git a/input/lsr/pitch/combining-two-parts-on-the-same-staff.ly b/input/lsr/pitch/combining-two-parts-on-the-same-staff.ly
new file mode 100644 (file)
index 0000000..3569f3f
--- /dev/null
@@ -0,0 +1,74 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+The part combiner tool ( \partcombine command ) allows you to combine
+different parts on a same Staff. You can choose whether you want or
+don't want to add texts such as \"solo\" or \"a2\", by defining the
+printPartCombineTexts property.
+
+For vocal scores (hymns), there is no need to add solo/a2 texts, so
+they should be switched off. However, you'd better not use it if there
+are any solos, as they won't be indicated. In such cases, you may
+simply wan't to use standard LilyPond polyphony.
+
+This snippet presents the three ways two parts can be printed on a same
+staff : standard polyphony, \partcombine whitout texts, and
+\partcombine with texts.
+
+
+" }
+
+musicUp = {     \time 4/4
+                       \relative c'' {
+                               a4 c4.(g8) a4 |
+                               g4 e' g,( a8 b) | 
+                               c b a2.
+                       }
+}
+
+musicDown = {
+                       \relative c'' {
+                               g4 e4.(d8) c4 |
+                               r2 g'4( f8 e) |
+                               d2 a
+                       }
+}
+\score{
+       \new Staff {
+               \set Staff.instrumentName = "Standard polyphony  "
+               << \musicUp  \\ \musicDown >>
+       }
+       \layout{ 
+       indent = 6.0\cm 
+       }
+}
+
+\score{
+       \context Staff {
+                       \set Staff.instrumentName = "PartCombine without texts  "
+                       \partcombine \musicUp \musicDown
+       }
+       \layout{
+               indent = 6.0\cm
+               \context {
+                       \Voice
+                       printPartCombineTexts = ##f
+               }
+       }
+}
+
+\score{
+       \context Staff {
+                       \set Staff.instrumentName = "PartCombine with texts  "
+                       \partcombine \musicUp \musicDown
+       }
+       \layout{
+               indent = 6.0\cm
+               \context {
+                       \Voice
+                       printPartCombineTexts = ##t
+               }
+       }
+}
+
index 549df765c8a3c4b924648b5edcfc79b0c0f46ff8..f5d2d6548f6f1ec602285cc6b33832cdb82f2243 100644 (file)
@@ -1,3 +1,4 @@
+%%  Do not edit this file; it is auto-generated from LSR!
 \header {
 
   texidoc = "Makam is Turkish type of melody that uses 1/9 tone
@@ -6,7 +7,7 @@
 }
 
 
-\version "2.11.6"
+\version "2.11.23"
 
 %{
 
diff --git a/input/lsr/pitch/preventing-stem-extension.ly b/input/lsr/pitch/preventing-stem-extension.ly
new file mode 100644 (file)
index 0000000..731a76e
--- /dev/null
@@ -0,0 +1,30 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+Extending stems to the center line may be prevented using
+@code{no-stem-extend}.
+
+
+" }
+
+\score { 
+  \context Voice \relative c {
+       \context Staff <<
+               \new Voice { 
+                       f2 f8 g a b 
+                       \override Stem  #'no-stem-extend = ##t
+                       f2 f8 g a b
+               }
+               \new Voice { 
+                       c''2 c8 b a g
+                       \override Stem  #'no-stem-extend = ##t
+                       c2 c8 b a g
+               }
+       >>
+       
+  }
+
+}
+
+
diff --git a/input/lsr/pitch/rest-styles.ly b/input/lsr/pitch/rest-styles.ly
new file mode 100644 (file)
index 0000000..c14c927
--- /dev/null
@@ -0,0 +1,39 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+Rests may be used in various styles.
+
+
+
+" }
+
+\layout {
+    indent = 0.0
+    raggedright = ##t
+}
+
+\context Staff \relative c {
+    \set Score.timing = ##f
+    \override Staff.Rest  #'style = #'mensural
+    r\maxima^\markup \typewriter { mensural }
+    r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
+    \bar "" 
+
+    \override Staff.Rest  #'style = #'neomensural
+    r\maxima^\markup \typewriter { neomensural }
+    r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
+    \bar "" 
+
+    \override Staff.Rest  #'style = #'classical
+    r\maxima^\markup \typewriter { classical }
+    r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
+    \bar ""
+    
+    \override Staff.Rest  #'style = #'default
+    r\maxima^\markup \typewriter { default }
+    r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
+    
+}
+
+
diff --git a/input/lsr/scheme/generating-random-notes.ly b/input/lsr/scheme/generating-random-notes.ly
new file mode 100644 (file)
index 0000000..b51fc6c
--- /dev/null
@@ -0,0 +1,25 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+This Scheme-based snippet allows you to generate 256 random notes based
+on the current time (or any randomish number you might wish to specify
+instead, so you can obtain the same random notes each time): i.e. to
+get different random notes patterns, just change this number.
+" }
+
+\score {
+{ #(let ((random-state (seed->random-state (current-time))))
+    (ly:export
+     (make-music 'SequentialMusic 'elements
+      (map (lambda x
+           (let ((idx (random 12 random-state)))
+            (make-music 'EventChord
+             'elements (list (make-music 'NoteEvent
+                              'duration (ly:make-duration 2 0 1 1)
+                              'pitch (ly:make-pitch (quotient idx 7)
+                                      (remainder idx 7)
+                                      0))))))
+       (make-list 256)))))
+   }
+}
diff --git a/input/lsr/scheme/transpose-pitches-with-minimum-accidentals.ly b/input/lsr/scheme/transpose-pitches-with-minimum-accidentals.ly
new file mode 100644 (file)
index 0000000..155f125
--- /dev/null
@@ -0,0 +1,74 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+There is a way to enforce enharmonic modifications for notes in order
+to have the minimum number of accidentals. In that case, ``Double 
+accidentals should be removed, as well as E-sharp (-> F), bC (-> B), bF
+(-> E), B-sharp (-> C).'', as proposed by a request for a new feature.
+In this manner, the most natural enharmonic notes are chosen in this
+example.
+" }
+
+#(define  (naturalise-pitch p)
+  (let* ((o (ly:pitch-octave p))
+         (a (ly:pitch-alteration p))
+         (n (ly:pitch-notename p)))
+
+    (cond
+     ((and (> a 1) (or (eq? n 6) (eq? n 2)))
+      (set! a (- a 2))
+      (set! n (+ n 1)))
+     ((and (< a -1) (or (eq? n 0) (eq? n 3)))
+      (set! a (+ a 2))
+      (set! n (- n 1))))
+
+    (cond
+     ((> a 2) (set! a (- a 4)) (set! n (+ n 1)))
+     ((< a -2) (set! a (+ a 4)) (set! n (- n 1))))
+
+    (if (< n 0) (begin (set!  o (- o 1)) (set! n (+ n 7))))
+    (if (> n 6) (begin (set!  o (+ o 1)) (set! n (- n 7))))
+
+    (ly:make-pitch o n a)))
+
+#(define (naturalise music)
+  (let* ((es (ly:music-property music 'elements))
+         (e (ly:music-property music 'element))
+         (p (ly:music-property music 'pitch)))
+
+    (if (pair? es)
+        (ly:music-set-property!
+         music 'elements
+         (map (lambda (x) (naturalise x)) es)))
+
+    (if (ly:music? e)
+        (ly:music-set-property!
+         music 'element
+         (naturalise e)))
+
+    (if (ly:pitch? p)
+        (begin
+          (set! p (naturalise-pitch p))
+          (ly:music-set-property! music 'pitch p)))
+
+    music))
+
+music =  \relative c' { c4 d  e f g a b  c }
+
+naturaliseMusic =
+#(define-music-function (parser location m)
+                                       (ly:music?)
+                       (naturalise m))
+
+\score {
+   \context Staff {
+    \transpose c ais \music
+    \naturaliseMusic \transpose c ais \music
+    \transpose c deses \music
+    \naturaliseMusic \transpose c deses \music
+  }
+  \layout { ragged-right = ##t}
+}
+
+
index 1f50d31cb9f9e8c3522aa4c6ebbf36f61665e15d..54ba9e15b30382bbaa793529fd39444ccd48e20e 100644 (file)
@@ -8,10 +8,6 @@ elements (e.g. lyrics) positioning, but also for musical contents such
 as ossias.
 " }
 
-% ****************************************************************
-% ly snippet:
-% ****************************************************************
-
 \paper {
   ragged-right = ##t
 }
@@ -35,10 +31,3 @@ as ossias.
       }
     >> }
 >>
-
-
-
-% ****************************************************************
-% end ly snippet
-% ****************************************************************
-
index a9bfdf5d3175b96cbb1209e5c02330859c1ac5c4..c6754ed27b263ebebcd459364ec239e9aae0beec 100644 (file)
@@ -2,12 +2,11 @@
 \version "2.11.23"
 
 \header { texidoc = "
-By setting the Scheme property 'debug-skylines, you can make a nice
-funky artwork out of you score :-)
-
-More seriously, drawing your skyline can be helpful to debug spacing
-and collision issues. (Still, it does make your score pretty; so just
-try it, no matter how you really need to...)
+By setting the Scheme property 'debug-skylines, you can turn your score
+into a nice funky artwork :-) More seriously, drawing this skyline can
+be helpful to debug spacing and collision issues. (Still, it does make
+your score pretty; so just try it, no matter how much you really need
+to...)
 " }
 
 #(ly:set-option 'debug-skylines #t)
diff --git a/input/lsr/spacing/setting-the-extent-of-objects.ly b/input/lsr/spacing/setting-the-extent-of-objects.ly
new file mode 100644 (file)
index 0000000..7c5d3bc
--- /dev/null
@@ -0,0 +1,24 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+The object may be extended to larger sized by overriding their
+properties. The lyrics in this example have an extent of
+@code{(-10,10)}, which is why  they are spaced so widely.
+
+
+
+" }
+
+\score {
+    \context Lyrics \lyricmode {
+       foo --
+       
+       \override LyricText  #'X-extent = #'(-10.0 . 10.0)
+ bar baz
+       }
+    \layout { raggedright = ##t}
+}
+    
+
+
diff --git a/input/lsr/staff/aligning-instrument-names.ly b/input/lsr/staff/aligning-instrument-names.ly
new file mode 100644 (file)
index 0000000..fad0e45
--- /dev/null
@@ -0,0 +1,21 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+Instrument names can be displayed using a \markup command; in this case
+the name is placed inside a padded box, which can help vertical
+alignment.
+" }
+
+\new StaffGroup \relative
+<<
+  \new Staff {
+    \set Staff.instrumentName = \markup { \hcenter-in #10 "blabla" }
+    c1 c1
+  } 
+  \new Staff {
+    \set Staff.instrumentName = \markup { \hcenter-in #10 "blo" }
+    c1 c1
+  } 
+  
+>>
diff --git a/input/lsr/staff/changing-the-staff-size.ly b/input/lsr/staff/changing-the-staff-size.ly
new file mode 100644 (file)
index 0000000..4b4c32c
--- /dev/null
@@ -0,0 +1,21 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+In order to change staff sizes, both @code{staff-space} and
+@code{fontSize} must be scaled. 
+" }
+
+\relative c' <<
+%    \new Staff \relative c'' { \dynamicDown c4 \ff c c c }
+    \new Staff \with {
+       fontSize = #-3
+       \override StaffSymbol #'staff-space = #(magstep -3)
+    } {
+       \clef bass
+       c8 c c c  c c c c
+    }
+>>
+
+
+
diff --git a/input/lsr/staff/staff-containers.ly b/input/lsr/staff/staff-containers.ly
new file mode 100644 (file)
index 0000000..d97f091
--- /dev/null
@@ -0,0 +1,63 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+In this preliminary test of a modern score, the staff lines are washed
+out temporarily. This is done by making a tuned @code{StaffContainer},
+which @code{\skip}s some notes without printing lines either and
+creates a @code{\new Staff} then in order to create the lines again.
+(Be careful if you use this; it has been done by splitting the grouping
+@code{Axis_group_engraver} and creating functionality into  separate
+contexts, but the clefs and time signatures may not do what you would
+expect.)
+
+    
+
+" }
+
+\score  {
+     \relative c'' <<
+       \new StaffContainer {
+
+           %% need << >>, otherwise we descend to the voice inside SA  
+           << \new Staff { c4 c4 } >>
+           \skip 4  % s4 would create staff.
+           
+           << \new Staff { b4 b4 } >> 
+       }
+       \new StaffContainer {
+           \skip 4
+           << \context Staff { e d f \bar ":|" } >>
+           \skip 4
+       }
+    >>
+
+    \layout {
+       \context {
+           \Score
+           \accepts StaffContainer
+           \denies Staff
+       }
+       \context {
+           \type Engraver_group
+           \consists Clef_engraver
+           \consists Time_signature_engraver
+           \consists Separating_line_group_engraver
+           \consists "Axis_group_engraver"
+           \accepts "Staff"
+           
+           \name StaffContainer
+       }
+       \context {
+           \Staff
+           \remove Axis_group_engraver
+           \remove Separating_line_group_engraver
+           \remove Clef_engraver
+           \remove Time_signature_engraver
+       }
+       raggedright=##t
+    }
+}
+
+
+
diff --git a/input/lsr/text/creating-text-spanners.ly b/input/lsr/text/creating-text-spanners.ly
new file mode 100644 (file)
index 0000000..1298be6
--- /dev/null
@@ -0,0 +1,42 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+The \startTextSpan and \stopTextSpan commands give you the ability to
+create text spanners as easily as pedals indications or octavations.
+Override some properties of the TextSpanner object to modify its
+output.
+" }
+
+\relative c''{
+    \override TextSpanner  #'edge-text = #'("bla" . "blu")
+    a \startTextSpan
+    b c 
+    a \stopTextSpan
+
+    \override TextSpanner  #'dash-period = #2
+    \override TextSpanner  #'dash-fraction = #0.0
+    a \startTextSpan
+    b c 
+    a \stopTextSpan
+
+    \revert TextSpanner #'style
+    \override TextSpanner  #'style = #'dashed-line \override TextSpanner #'bound-details #'left #'text = \markup { \draw-line #'(0 . 1) }
+ \override TextSpanner #'bound-details #'right #'text = \markup { \draw-line #'(0 . -2) }
+
+    a \startTextSpan
+    b c 
+    a \stopTextSpan
+
+
+    \set Staff.middleCPosition = #-13
+
+    \override TextSpanner  #'dash-period = #10
+    \override TextSpanner  #'dash-fraction = #.5
+    \override TextSpanner  #'thickness = #10
+    a \startTextSpan
+    b c 
+    a \stopTextSpan
+    \set Staff.middleCPosition = #-6   
+}
+
diff --git a/input/lsr/text/how-to-bottom-align-texts-with-different-vertical-extents.ly b/input/lsr/text/how-to-bottom-align-texts-with-different-vertical-extents.ly
new file mode 100644 (file)
index 0000000..541a591
--- /dev/null
@@ -0,0 +1,22 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+Some letters imply smaller vertical extents than the others; if you
+have, below your staff, two markups with different vertical extents
+(e.g. one text with letters \"t,h,l and/or UPPER CASE\" and one text
+with \"a, c, e, n or m\"), LilyPond will align them to the top by
+default, thus making it look a bit messy. Therefore, you need to add
+invisible ascender letters using the \transparent command to make it
+right.
+" }
+
+\new Staff {
+  \override TextScript #'staff-padding = #4
+  \override TextScript #'self-alignment-X = #center
+  \time 2/4
+  c'4_\markup { \transparent "A" "WRONG" \transparent "A" }
+  c'4_\markup { "case" }
+  c'4_\markup { \transparent "A" "RIGHT" \transparent "A" }
+  c'4_\markup { \transparent "A" "case" \transparent "A" }
+}
diff --git a/input/lsr/text/rotating-a-text-object.ly b/input/lsr/text/rotating-a-text-object.ly
new file mode 100644 (file)
index 0000000..567d41a
--- /dev/null
@@ -0,0 +1,17 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+LilyPond gives you the ability to rotate any object you want,
+particularly markups as showed here. Alternatively, you can use the
+\column function to display your text vertically without rotating the
+letters.
+" }
+
+\score {
+   \relative c' {
+       c4^\markup {\rotate #45.0 {"hello"}}
+       c4^\markup {\rotate #90.0 {"hello"}}
+       c4^\markup {\column {"h" "e" "l" "l" "o"}}
+   }
+ }
diff --git a/input/lsr/vocal/aligning-lyrics.ly b/input/lsr/vocal/aligning-lyrics.ly
new file mode 100644 (file)
index 0000000..ab75df3
--- /dev/null
@@ -0,0 +1,15 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+You can specify different horizontal alignment for your lyrics, by
+overriding the #'self-alignment-X property of the LyricText object. #-1
+is left, #0 is center and #1 is right; however, you can use #LEFT,
+#CENTER and #RIGHT as well.
+" }
+
+\relative c'' {
+c1 c c}
+\addlyrics {\once \override LyricText #'self-alignment-X = #LEFT "This is left-aligned" 
+\once \override LyricText #'self-alignment-X = #CENTER "This is centered" 
+\once \override LyricText #'self-alignment-X = #1 "this is right-aligned"  }
diff --git a/input/lsr/vocal/vertical-brace-spanning-several-lyrics-lines.ly b/input/lsr/vocal/vertical-brace-spanning-several-lyrics-lines.ly
new file mode 100644 (file)
index 0000000..db0baa6
--- /dev/null
@@ -0,0 +1,37 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.11.23"
+
+\header { texidoc = "
+This example shows a trick to insert a vertical brace when going from
+several stanzas into a common ending in the lyrics. (An alternative is
+of course to just skip the brace, especially if you add a line break
+instead).
+" }
+
+% Replace brace150 by whatever between brace0 and brace575 that is of a
+% suitable size.
+leftbrace = \markup {\override #'(font-encoding . fetaBraces) \lookup #"brace200" }
+
+% In some versions earlier than 20.10.20, the argument to \rotate was
+% erroneously treated as radians instead of degrees, i.e. #3.14 was
+% needed instead of #180
+rightbrace = \markup {\rotate #180 \leftbrace }
+
+
+lyricsbeforebrace = \lyricmode {Here is some ly -- rics }
+
+lyricsfrombrace = \lyricmode { \markup{\rightbrace Here} comes some more }
+
+
+melody = \relative c'{ c d e f g f e d c e d f g }
+
+
+\score{
+<<
+ \new Voice = m \melody
+ \new Lyrics \lyricsto m \lyricsbeforebrace
+ \new Lyrics \lyricsto m { \lyricsbeforebrace \lyricsfrombrace }
+ \new Lyrics \lyricsto m \lyricsbeforebrace
+>>
+}
+
diff --git a/input/regression/ambitus-pitch-ordering.ly b/input/regression/ambitus-pitch-ordering.ly
new file mode 100644 (file)
index 0000000..d56c533
--- /dev/null
@@ -0,0 +1,13 @@
+\header {
+  texidoc = "Ambituses use actual pitch not lexicographic ordering."
+  }
+
+\version "2.10.25"
+
+\paper {
+  ragged-right=##t
+}
+
+\new Voice \with { \consists "Ambitus_engraver" } {
+  \clef F c eis fes
+}
diff --git a/input/regression/dot-column-rest-collision.ly b/input/regression/dot-column-rest-collision.ly
new file mode 100644 (file)
index 0000000..f706d4e
--- /dev/null
@@ -0,0 +1,10 @@
+\header {
+  texidoc = "Dot columns do not trigger beam slanting too early."
+}
+
+\version "2.11.26"
+\paper{ ragged-right=##t }
+<<
+  { e''8 e''8 g'' g''} \\
+  { e8 r4. }
+>>
diff --git a/input/regression/laissez-vibrer-tie-beam.ly b/input/regression/laissez-vibrer-tie-beam.ly
new file mode 100644 (file)
index 0000000..b9ad29a
--- /dev/null
@@ -0,0 +1,17 @@
+\header {
+
+  texidoc = "@code{\laissezVibrer} ties on beamed notes don't trigger
+premature beam slope calculation. "
+
+}
+
+\version "2.11.26"
+
+\paper{
+  ragged-right=##t
+}
+
+{
+  c'8 e' g' c''\laissezVibrer r2 |
+  c'8 e' g' c'' r2
+}
diff --git a/input/test/engraver-contexts.ly b/input/test/engraver-contexts.ly
deleted file mode 100644 (file)
index c65e0ab..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-\version "2.10.0"
-\header {
-    
-texidoc ="In polyphonic notation, many voices can share a staff: In
-this situation, the accidentals and staff are shared, but the stems,
-slurs, beams, etc. are private to each voice. Hence, engravers should
-be grouped. The engravers for note head, stems, slurs, etc. go into a
-group called ``Voice context'', while the engravers for key,
-accidental, bar, etc. go into a group called ``Staff context''. In the
-case of polyphony, a single Staff context contains more than one Voice
-context. Similarly, more Staff contexts can be put into a single Score
-context. "
-
-}
-
-\include "engraver-example.ily"
-
-\score {
-\context Staff << \topVoice \\ \botVoice >>
-}
-
-
-\score {
-<< \new Staff << \topVoice \\ \botVoice >>
-\new Staff << \pah \\ \hoom >>
-  >>
-}
-
-
-
diff --git a/input/test/engraver-one-by-one.ly b/input/test/engraver-one-by-one.ly
deleted file mode 100644 (file)
index 1fdb502..0000000
+++ /dev/null
@@ -1,233 +0,0 @@
-
-\version "2.10.0"
-\header {
-  
-  texidoc = "The notation problem, creating a certain symbol,
-    is handled by plugins. Each plugin is called Engraver. In this example,
-engravers are switched on one by one, in the following order:
-
-@itemize
-@item note heads,
-@item staff symbol,
-@item clef,
-@item stem,
-@item beams, slurs, accents,
-@item accidentals, bar lines, time signature, and key signature.
-@end itemize
-
-Engravers are grouped. For example, note heads, slurs, beams etc. form
-a Voice context. Engravers for key, accidental, bar, etc. form a
-Staff context.
-
-"
-
-}
-\layout { ragged-right = ##t }
-
-\include "engraver-example.ily"
-
-
-%
-% setup for Request->Element conversion. Guru-only
-%
-
-MyStaff =\context {
-  \type "Engraver_group"
-  \name Staff
-
-  \description "Handles clefs, bar lines, keys, accidentals.  It can contain
-@code{Voice} contexts."
-
-  
-  \consists "Output_property_engraver" 
-  
-  \consists "Font_size_engraver"
-
-  \consists "Volta_engraver"
-  \consists "Separating_line_group_engraver"   
-  \consists "Dot_column_engraver"
-
-  \consists "Ottava_spanner_engraver"
-  \consists "Rest_collision_engraver"
-  \consists "Piano_pedal_engraver"
-  \consists "Piano_pedal_align_engraver"
-  \consists "Instrument_name_engraver"
-  \consists "Grob_pq_engraver"
-  \consists "Forbid_line_break_engraver"
-  \consists "Axis_group_engraver"
-
-  \consists "Pitch_squash_engraver"
-
-  \override VerticalAxisGroup #'minimum-Y-extent = #'(-6 . 6)
-  extraVerticalExtent = ##f
-  verticalExtent = ##f 
-  localKeySignature = #'()
-
-                               % explicitly set instrument, so we don't get 
-                               % weird effects when doing instrument names for
-                               % piano staves
-
-  instrumentName = #'()
-  shortInstrumentName = #'()
-  
-  \accepts "Voice"
-}
-
-
-MyVoice = \context {
-  \type "Engraver_group"
-  \name Voice
-
-  \description "
-    Corresponds to a voice on a staff.  This context handles the
-    conversion of dynamic signs, stems, beams, super- and subscripts,
-    slurs, ties, and rests.
-
-    You have to instantiate this explicitly if you want to have
-    multiple voices on the same staff."
-
-  localKeySignature = #'()
-  \consists "Font_size_engraver"
-  
-                               % must come before all
-  \consists "Output_property_engraver" 
-  \consists "Arpeggio_engraver"
-  \consists "Multi_measure_rest_engraver"
-  \consists "Text_spanner_engraver"
-  \consists "Grob_pq_engraver"
-  \consists "Note_head_line_engraver"
-  \consists "Glissando_engraver"
-  \consists "Ligature_bracket_engraver"
-  \consists "Breathing_sign_engraver"
-                               % \consists "Rest_engraver"
-  \consists "Grace_beam_engraver"
-  \consists "New_fingering_engraver"
-  \consists "Chord_tremolo_engraver"
-  \consists "Percent_repeat_engraver"
-  \consists "Slash_repeat_engraver"
-
-%{
-  Must come before text_engraver, but after note_column engraver.
-
-%}
-  \consists "Text_engraver"
-  \consists "Dynamic_engraver"
-  \consists "Fingering_engraver"
-
-  \consists "Script_column_engraver"
-  \consists "Rhythmic_column_engraver"
-  \consists "Cluster_spanner_engraver"
-  \consists "Tie_engraver"
-  \consists "Tie_engraver"
-  \consists "Tuplet_engraver"
-  \consists "Note_heads_engraver"
-  \consists "Rest_engraver"
-
-  \consists "Skip_event_swallow_translator"
-}
-
-
-\score {
-  \topVoice
-  \layout {
-    \context { \MyStaff }
-    \context { \MyVoice }
-  }
-}
-
-
-MyStaff = \context {
-    \MyStaff
-    \consists "Staff_symbol_engraver"
-}
-
-\score {
-  \topVoice
-  \layout {
-      \context { \MyStaff }
-      \context { \MyVoice }
-            }
-}
-
-MyStaff = \context {
-    \MyStaff
-    \consists "Clef_engraver"
-    \remove "Pitch_squash_engraver"
-}
-
-\score {
-  \topVoice
-  \layout {
-    \context { \MyStaff }
-    \context { \MyVoice }
-  }
-}
-
-MyVoice = \context {
-  \MyVoice
-  \consists "Stem_engraver"
-}
-
-\score {
-  \topVoice
-  \layout {
-    \context { \MyStaff }
-    \context { \MyVoice }
-  }
-}
-
-MyVoice = \context {
-  \MyVoice
-  \consists "Beam_engraver"
-}
-
-\score {
-  \topVoice
-  \layout {
-    \context { \MyStaff }
-    \context { \MyVoice }
-  }
-}
-
-MyVoice= \context {
-  \MyVoice
-  \consists "Phrasing_slur_engraver"
-  \consists "Slur_engraver"
-  \consists "Script_engraver"
-}
-
-
-\score {
-  \topVoice
-  \layout {
-    \context { \MyStaff }
-    \context { \MyVoice }
-  }
-}
-
-MyStaff = \context {
-  \MyStaff
-  \consists "Bar_engraver"
-  \consists "Time_signature_engraver"
-}
-
-\score {
-  \topVoice
-  \layout {
-    \context { \MyStaff }
-    \context { \MyVoice }
-  }
-}
-
-MyStaff = \context {
-  \MyStaff
-  \consists "Accidental_engraver"    
-  \consists "Key_engraver"
-}
-\score {
-  \topVoice
-  \layout {
-    \context { \MyStaff }
-    \context { \MyVoice }
-  }
-}
diff --git a/input/test/gregorian-scripts.ly b/input/test/gregorian-scripts.ly
deleted file mode 100644 (file)
index a14e143..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-\version "2.10.0"
-\header {
-    texidoc  = "@cindex Gregorian Scripts
-
-Here is demonstrated a preliminary support of Gregorian Scripts:
-
-ictus, circulus, semicirculus, accentus, episem.
-
-"}
-
-%{
-
-FIXME: horizontal spacing (ragged right mode).
-
-FIXME: padding/minimum-distance is fragile.
-
-FIXME: episem stops one notehead too early.
-
-%}
-
-\include "gregorian-init.ly"
-
-\paper {
-    line-thickness = \staff-space / 5.0
-}
-
-\score {
-  \context VaticanaVoice {
-    \override Script #'padding = #-0.5
-     {
-      a\ictus
-      a\circulus
-      a\semicirculus
-      a\accentus
-      \[ a \episemInitium \pes b \flexa a \episemFinis \]
-    }
-  }
-  \layout {
-    line-width = 70.0
-    width = 60.0
-    indent = 0.0
-    ragged-right = ##t
-  }
-}
diff --git a/input/test/hymn.ly b/input/test/hymn.ly
deleted file mode 100644 (file)
index a16739b..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-
-\version "2.10.0"
-
-\header { texidoc = "
-
-You can combine two parts on the same staff using the part
-combiner. For vocal scores (hymns), there is no need to add solo/a2
-texts, so they should be switched off.
-
-" }
-
-\score{
-       \context Staff <<
-               \time 4/4
-               \partcombine 
-                       \relative c'' {
-                               a4 c4.(g8) a4 |
-                               g4 e' g(f) | 
-                               b, a c2
-                       }
-                       \relative c'' {
-                               g4 e4.(d8) c4 |
-                               g'4 c, e(f) |
-                               d2 a
-                       }
-       >>
-       \layout{
-               line-width=140.\mm
-               \context {
-                       \Voice
-                       printPartCombineTexts = ##f
-               }
-       }
-}
-
-
diff --git a/input/test/instrument-name-align.ly b/input/test/instrument-name-align.ly
deleted file mode 100644 (file)
index ccbbeba..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-
-\header {
-
-
-  texidoc = "instrument names may be aligned manually by putting the
-names in padded boxes with @code{\markup}."
-
-
-}
-
-\version "2.10.0"
-
-\paper {
-  line-width = 15\cm
-}
-
-
-\new StaffGroup \relative
-<<
-  \new Staff {
-    \set Staff.instrumentName = \markup { \hcenter-in #10 "blabla" }
-    c1 c1
-  } 
-  \new Staff {
-    \set Staff.instrumentName = \markup { \hcenter-in #10 "blo" }
-    c1 c1
-  } 
-  
->>
diff --git a/input/test/lilypond-testpage.ly b/input/test/lilypond-testpage.ly
deleted file mode 100644 (file)
index 0476737..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-
-\version "2.10.0"
-% MERGE with title.ly -gp
-
-%{
-  Test lilypond features.
-%}
-
-\header {
-copyright = "copyright"
-title = "title"
-subtitle = "subtitle"
-composer = "composer"
-arranger = "arranger"
-instrument = "instrument"
-metre = "metre"
-opus = "opus"
-piece = "piece"
-poet = "poet"
-texidoc = "All header fields with special meanings."
-  copyright = "public domain"
-  enteredby = "jcn"
-  source = "urtext"
-
-}
-
-
-\score {
-  \relative c'' { c1 c1 c1 c1 }
-}
-
-\score {
-        \relative c'' { c1 c1 c1 c1 }
-       
-       \header {
-
-       title = "localtitle"
-       subtitle = "localsubtitle"
-       composer = "localcomposer"
-       arranger = "localarranger"
-       instrument = "localinstrument"
-       metre = "localmetre"
-       opus = "localopus"
-       piece = "localpiece"
-       poet = "localpoet"
-       copyright = "localcopyright"
-       }
-}
-
diff --git a/input/test/music-creation.ly b/input/test/music-creation.ly
deleted file mode 100644 (file)
index c0740aa..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-\version "2.10.0"
-
-% possible rename to scheme- something.  -gp
-\header { texidoc = "@cindex Scheme Music Creation
-You can engrave music using just Scheme expressions. Although those 
-expressions reflect the inner mechanism of LilyPond, they are rather 
-clumsy to use, so avoid them, if possible. "
-}
-
-#(define (make-note-req p d)
-   (make-music 'NoteEvent
-    'duration d
-    'pitch p))
-
-#(define (make-note elts)
-   (make-music 'EventChord
-    'elements elts))
-
-#(define (seq-music-list elts)
-   (make-music 'SequentialMusic
-    'elements elts))
-
-fooMusic = #(seq-music-list
-             (list (make-note (list (make-note-req (ly:make-pitch 1 0 0) (ly:make-duration 2 0))))
-                   (make-note (list (make-note-req (ly:make-pitch 1 1 0) (ly:make-duration 2 0))))))
-     
-\score { \fooMusic 
-\layout { ragged-right = ##t }
-}
-
diff --git a/input/test/no-bar-lines.ly b/input/test/no-bar-lines.ly
deleted file mode 100644 (file)
index f114743..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-
-\version "2.10.0"
-% possible rename to bar-lines-foo.  -gp
-
-\header{ texidoc = "@cindex Bar Lines Remove
-Engravers can be removed one by one. Here, the time signature and bar lines 
-have been removed.
-"
-}
-
-\score {
-   \relative c'' {
-    a b c d
-    d c b a
-  }
-  \layout {
-    ragged-right = ##t
-    \context {
-      \Staff
-      whichBar = #""
-      \remove "Time_signature_engraver"
-    }
-  }
-}
-
-
diff --git a/input/test/partial-blank.ly b/input/test/partial-blank.ly
deleted file mode 100644 (file)
index fcf05bb..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-
-\version "2.10.0"
-% check with invisible-notes or blank-notes.  possible rename. -gp
-\header{ texidoc = "@cindex Partial Blank
-When entering partially typeset music (i.e. for students to be 
-completed by hand), you may need the spacing that correspond to the 
-timing of notes: all measures have same length, etc.  It can be
-implemented by adding an invisible staff with a lot of fast notes. "
-}
-
-quickmeasure =  {
-    \repeat unfold 16 c''16
-}
-
-mel =  \relative c' {c16 d16 e8 a4 g2 e8 d c2. g'1 e4 d c2}
-
-\score {
-\context PianoStaff  <<
-  \new Staff <<
-    \clef G
-    \new Voice {\mel}
-    \new Voice {
-       \override NoteHead  #'transparent = ##t
-       \override Stem  #'transparent = ##t
-       \override Beam  #'transparent = ##t
-        \repeat unfold 4 \quickmeasure
-    }
-  >>
-  \new Staff  {\clef F s1*4}
->>
-\layout {}
-}
-
diff --git a/input/test/preset-extent.ly b/input/test/preset-extent.ly
deleted file mode 100644 (file)
index 797e7f6..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-\version "2.10.0"
-\header { texidoc = "
-
-@cindex Preset Extent
-
-The object may be extended to larger sized by overriding their properties.
-The lyrics in this example have an extent of @code{(-10,10)}, which is why 
-they are spaced so widely.
-
-"
-
-}
-
-\score {
-    \context Lyrics \lyricmode {
-       foo --
-       
-       \override LyricText  #'X-extent = #'(-10.0 . 10.0)
- bar baz
-       }
-    \layout { ragged-right = ##t}
-}
-    
-
diff --git a/input/test/rests.ly b/input/test/rests.ly
deleted file mode 100644 (file)
index 852c0ea..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-
-\version "2.10.0"
-\header {
-    texidoc = "@cindex Rests
-
-Rests may be used in various styles.
-
-"
-}
-
-\layout {
-    indent = 0.0
-    ragged-right = ##t
-}
-
-\context Staff \relative c {
-    \set Score.timing = ##f
-    \override Staff.Rest  #'style = #'mensural
-    r\maxima^\markup \typewriter { mensural }
-    r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
-    \bar "" 
-
-    \override Staff.Rest  #'style = #'neomensural
-    r\maxima^\markup \typewriter { neomensural }
-    r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
-    \bar "" 
-
-    \override Staff.Rest  #'style = #'classical
-    r\maxima^\markup \typewriter { classical }
-    r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
-    \bar ""
-    
-    \override Staff.Rest  #'style = #'default
-    r\maxima^\markup \typewriter { default }
-    r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
-    
-}
-
diff --git a/input/test/staff-container.ly b/input/test/staff-container.ly
deleted file mode 100644 (file)
index 81791cf..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-\version "2.10.0"
-
-\header {
-
-    texidoc = "
-
-In this preliminary test of a modern score, the staff lines are washed
-out temporarily. This is done by making a tuned @code{StaffContainer},
-which @code{\skip}s some notes without printing lines either and
-creates a @code{\\new Staff} then in order to create the lines again.
-(Be careful if you use this; it has been done by splitting the
-grouping @code{Axis_group_engraver} and creating functionality into 
-separate contexts, but the clefs and time signatures may not do
-what you would expect.)
-
-    "
-
-      }
-
-
-
-\score  {
-     \relative c'' <<
-       \new StaffContainer {
-
-           %% need << >>, otherwise we descend to the voice inside SA  
-           << \new Staff { c4 c4 } >>
-           \skip 4  % s4 would create staff.
-           
-           << \new Staff { b4 b4 } >> 
-       }
-       \new StaffContainer {
-           \skip 4
-           << \context Staff { e d f \bar ":|" } >>
-           \skip 4
-       }
-    >>
-
-    \layout {
-       \context {
-           \Score
-           \accepts StaffContainer
-           \denies Staff
-       }
-       \context {
-           \type Engraver_group
-           \consists Clef_engraver
-           \consists Time_signature_engraver
-           \consists Separating_line_group_engraver
-           \consists "Axis_group_engraver"
-           \accepts "Staff"
-           
-           \name StaffContainer
-       }
-       \context {
-           \Staff
-           \remove Axis_group_engraver
-           \remove Separating_line_group_engraver
-           \remove Clef_engraver
-           \remove Time_signature_engraver
-       }
-       ragged-right=##t
-    }
-}
-
-
diff --git a/input/test/staff-size.ly b/input/test/staff-size.ly
deleted file mode 100644 (file)
index 6abe3d1..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-\version "2.10.0"
-
-\header { texidoc = "@cindex Staff Size
-
-In order to change staff sizes, both @code{staff-space} and @code{fontSize}
-must be scaled."
-
-}
-
-\layout { ragged-right = ##t}
-
-\relative c' <<
-%    \new Staff \relative c'' { \dynamicDown c4 \ff c c c }
-    \new Staff \with {
-       fontSize = #-3
-       \override StaffSymbol #'staff-space = #(magstep -3)
-    } {
-       \clef bass
-       c8 c c c  c c c c
-    }
->>
-
-
diff --git a/input/test/stem-extend.ly b/input/test/stem-extend.ly
deleted file mode 100644 (file)
index ab3864b..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-\version "2.10.0"
-
-\header { texidoc = "@cindex Stem Extend
-Extending stems to the center line may be prevented using @code{no-stem-extend}.
-"
-}
-
-\score { 
-  \context Voice \relative c {
-       \context Staff <<
-               \new Voice { 
-                       f2 f8 g a b 
-                       \override Stem  #'no-stem-extend = ##t
-                       f2 f8 g a b
-               }
-               \new Voice { 
-                       c''2 c8 b a g
-                       \override Stem  #'no-stem-extend = ##t
-                       c2 c8 b a g
-               }
-       >>
-       
-  }
-  \layout { ragged-right = ##t}  
-}
-
diff --git a/input/test/tablature-hammer.ly b/input/test/tablature-hammer.ly
deleted file mode 100644 (file)
index f70949c..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-
-\version "2.10.0"
-\header {texidoc = "@cindex Tablature hammer
-A hammer in tablature can be faked with slurs. "
-} 
-
-\score{
-  %BROKEN \context TabStaff
-  <<
-       \relative c''{
-               c(d)
-               d(d)
-               d(c)
-  }
-  >>
-       \layout{ ragged-right = ##t}
-}
-
diff --git a/input/test/text-spanner.ly b/input/test/text-spanner.ly
deleted file mode 100644 (file)
index 2a9c6a4..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-
-\version "2.10.0"
-
-\header { texidoc = "@cindex text spanner
-Text spanners can be used in the similar manner than markings for pedals
-or octavation.
-"
-      }
-\layout{ ragged-right = ##t}
-
-\relative c''{
-    \override TextSpanner  #'edge-text = #'("bla" . "blu")
-    a \startTextSpan
-    b c 
-    a \stopTextSpan
-
-    \override TextSpanner  #'dash-period = #2
-    \override TextSpanner  #'dash-fraction = #0.0
-    a \startTextSpan
-    b c 
-    a \stopTextSpan
-
-    \revert TextSpanner #'style
-    \override TextSpanner  #'style = #'dashed-line
-    \override TextSpanner  #'edge-height = #'(1 . -2)
-    a \startTextSpan
-    b c 
-    a \stopTextSpan
-
-
-    \set Staff.middleCPosition = #-13
-
-    \override TextSpanner  #'dash-period = #10
-    \override TextSpanner  #'dash-fraction = #.5
-    \override TextSpanner  #'thickness = #10
-    a \startTextSpan
-    b c 
-    a \stopTextSpan
-    \set Staff.middleCPosition = #-6   
-}
-
diff --git a/input/test/time-signature-staff.ly b/input/test/time-signature-staff.ly
deleted file mode 100644 (file)
index 3e557fe..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-%% todo: move into advanced notation section of the manual.
-
-\header {
-
-  texidoc = "Time signatures may be put on a separate staff.  This is
-  used contemporary pieces with many time signature changes.  "
-
-}
-\version "2.10.0"
-\layout {
-  ragged-right =  ##T
-}
-
-\layout{
-  \context { 
-    \type "Engraver_group"
-    \consists "Time_signature_engraver"
-    \consists "Axis_group_engraver"
-    \name "TimeSig"
-    \override TimeSignature #'font-size = #4
-  }
-  \context {
-    \Score \accepts TimeSig
-  }
-
-  \context { \Staff
-    \override TimeSignature #'transparent = ##t
-  }
-}
-
-
-\relative
-<< \new Staff { \time 2/4 c2 \time 3/4 c2. \time 4/4 c1 }
-   \new TimeSig {
-     \skip 4 * 9
-   }
-   \new Staff { r4 r r
-               r4 r r
-               r4 r r }
-
- >>
diff --git a/input/test/version-output.ly b/input/test/version-output.ly
deleted file mode 100644 (file)
index 012ff14..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-\version "2.10.0"
-
-\header {
-
-
-    texidoc = #(string-append "By putting the output of
-    @code{lilypond-version} into a lyric, it is possible to print the 
-    version number of LilyPond in a score, or in a document generated
-    with @code{lilypond-book}.  Another possibility is to append the 
-    version number to the doc-string, in this manner: "
-
-  (lilypond-version)
-  )
-    
-}
-
-\score { \context Lyrics  {
-    \override Score.RehearsalMark  #'self-alignment-X = #LEFT
-    \mark #(ly:export (string-append "Processed with LilyPond version " (lilypond-version)))
-    s2
-  }
-}
-
-
diff --git a/input/test/vertical-extent.ly b/input/test/vertical-extent.ly
deleted file mode 100644 (file)
index b46f3ac..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-\version "2.10.0"
-% TODO: huh?  what's this file about?  -gp
-% This file shows that Staff grobs can get very deep or high; there is a lot
-% of room between the staves. 
-
-\header { texidoc = "
-Vertical extents may increased by setting @code{\override VerticalAxisGroup #'minimum-Y-extent}, 
-@code{extra-Y-extent}, and @code{Y-extent}. In this example,
-@code{Y-extent} is increased.
-" }
-
-\score {
-    <<
-    \new Staff {
-      \override Staff.VerticalAxisGroup #'Y-extent = #'(-15.0 . 0.0)
-      \clef alto
-      a1^"15-deep staff"
-    }
-    \new Staff {
-      \clef alto
-      b1
-    }
-    \new Staff {
-      \clef alto
-      c1
-    }
-    \new Staff {
-      \clef alto
-      \override Staff.VerticalAxisGroup #'Y-extent = #'(-0.0 . 10.0)
-      d1^"10-high staff"
-    }
-  >>
-  \layout{
-      ragged-right = ##t
-  }
-}
-
diff --git a/input/test/volta-chord-names.ly b/input/test/volta-chord-names.ly
deleted file mode 100644 (file)
index 8f6ebd7..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-\header {
-    texidoc = "Volta brackets can be placed over chord names. Just set
-the @code{voltaOnThisStaff} property to true for the @code{ChordNames} context and to false for the topmost ordinary @code{Staff} context."
-}
-
-\version "2.10.0"
-\score { <<
-  \new ChordNames \with {
-    voltaOnThisStaff = ##t
-  } \chordmode {
-    c1 c
-  }
-  \new Staff \with {
-    voltaOnThisStaff = ##f
-  }
-  {
-    \repeat volta 2 { c'1 } \alternative { c' }
-  }
->> }
index 7ef972ec27cdc721660ae36827673d31cb334e8b..a40621e61ba84d471841ed7b2ec6cb78427bebc3 100644 (file)
@@ -189,12 +189,7 @@ Beam::quanting (SCM smob, SCM posns)
 
       stem_xposns.push_back (s->relative_coordinate (common[X_AXIS], X_AXIS));
     }
-  bool xstaff = false;
-  if (lvs && fvs)
-    {
-      Grob *commony = fvs->common_refpoint (lvs, Y_AXIS);
-      xstaff = Align_interface::has_interface (commony);
-    }
+  bool xstaff = Align_interface::has_interface (common[Y_AXIS]);
 
   Direction ldir = Direction (stem_infos[0].dir_);
   Direction rdir = Direction (stem_infos.back ().dir_);
@@ -384,8 +379,7 @@ Beam::score_stem_lengths (vector<Grob*> const &stems,
   Direction d = DOWN;
   do
     score[d] /= max (count[d], 1);
-  while (flip (&d) != DOWN)
-    ;
+  while (flip (&d) != DOWN);
 
   return score[LEFT] + score[RIGHT];
 }
index f2f0c645f35fe12ba30d4d290c0794e105ce2d7a..183a936440ff12fe7038025671431264a7ae7ae3 100644 (file)
@@ -427,7 +427,8 @@ Beam::get_beam_segments (Grob *me_grob, Grob **common)
                      && me->get_bound (event_dir)->break_status_dir ())
                    {
                      current.horizontal_[event_dir]
-                       = (robust_relative_extent (me->get_bound (event_dir), commonx, X_AXIS)[RIGHT]
+                       = (robust_relative_extent (me->get_bound (event_dir),
+                                                  commonx, X_AXIS)[RIGHT]
                           + event_dir * break_overshoot[event_dir]);
                    }
                  else
@@ -441,7 +442,8 @@ Beam::get_beam_segments (Grob *me_grob, Grob **common)
                      if (inside_stem)
                        {
                          Grob *neighbor_stem = stems[segs[j].stem_index_ + event_dir];
-                         Real neighbor_stem_x = neighbor_stem->relative_coordinate (commonx, X_AXIS);
+                         Real neighbor_stem_x
+                           = neighbor_stem->relative_coordinate (commonx, X_AXIS);
 
                          notehead_width = min (notehead_width,
                                                fabs (neighbor_stem_x - segs[j].stem_x_)/2);
@@ -468,7 +470,9 @@ Beam::get_beam_segments (Grob *me_grob, Grob **common)
                            current.horizontal_[event_dir]
                              = event_dir * min  (event_dir * current.horizontal_[event_dir],
                                                  - gap_length/2
-                                                 + event_dir * heads[k]->extent (commonx, X_AXIS)[-event_dir]);
+                                                 + event_dir
+                                                   * heads[k]->extent (commonx,
+                                                                       X_AXIS)[-event_dir]);
                        }
                    }
                }
index f00d1938ab56746bc948f2cdc6ddb2f1172f55e5..48ee4503b12f90d4478e60e65606f80ee390d21f 100644 (file)
@@ -475,14 +475,14 @@ LY_DEFINE (ly_format, "ly:format",
          int precision = 8;
          
          if (spec == '$')
-           precision = '2';
+           precision = 2;
          else if (isdigit (spec))
            {
              precision = spec - '0';
              spec = format.at (tilde ++);
            }
                   
-         if (spec == 'a' || spec == 'f')
+         if (spec == 'a' || spec == 'A' || spec == 'f' || spec == '$')
            results.push_back (format_single_argument (arg, precision));
          else if (spec == 'l')
            {
index 429b83af3ef29968ac0b6650c96eccf5a35e1e55..8646f120fed818d568d7aa54b061602b326c09cf 100644 (file)
@@ -26,7 +26,6 @@ public:
   static Grob *accidentals (Grob *me);
   static Grob *arpeggio (Grob *me);
   static Slice head_positions_interval (Grob *me);
-  static Direction static_dir (Grob *);
   static void translate_rests (Grob *me, int dy);
   static Grob *first_head (Grob *me);
   static Grob *get_rest (Grob *me);
index ab8b51eddea35ec20853c5b4c2df9a89144eee67..947e418ea0f10bfeccc7b83dcab614706f642284 100644 (file)
@@ -20,4 +20,13 @@ public:
   bool is_empty () const;
 };
 
+class Pitch_lexicographic_interval : public Drul_array<Pitch>
+{
+public:
+  Pitch_lexicographic_interval ();
+  Pitch_lexicographic_interval (Pitch, Pitch);
+  void add_point (Pitch);
+  bool is_empty () const;
+};
+
 #endif /* PITCH_INTERVAL_HH */
index 50f1746b86ba374abb138d9e1a2372051fb16fff..cb7d8c6e1632b51c3bc61db0af335c5d38b4f558 100644 (file)
@@ -42,6 +42,7 @@ class Tie_formatting_problem
   set<int> dot_positions_;
   Interval dot_x_;
   vector<Tie_specification> specifications_;
+  bool use_horizontal_spacing_;
   
   Tie_configuration_map possibilities_;
 
index e5cdbc77f2732aef18d0e38794ccbf950e9aa710..9da6823f194e89e91ab15a13c4ab751ed3b4d03e 100644 (file)
@@ -663,6 +663,7 @@ parse_symbol_list (char const *symbols)
   string s = symbols;
   replace_all (s, '\n', ' ');
   replace_all (s, '\t', ' ');
+  replace_all (s, "  ", " ");
   return ly_string_array_to_scm (string_split (s, ' '));
 }
 
index 064c6343275974e0fafbd790e1fc30f9a36d8b0a..f871e7e185b000df6cb1dfd8f6010a3e2c1fbfaa 100644 (file)
@@ -30,6 +30,34 @@ Pitch_interval::is_empty () const
 
 void
 Pitch_interval::add_point (Pitch p)
+{
+  if (at (LEFT).tone_pitch () > p.tone_pitch ())
+    at (LEFT) = p;
+  if (at (RIGHT).tone_pitch () < p.tone_pitch ())
+    at (RIGHT) = p;
+}
+
+
+Pitch_lexicographic_interval::Pitch_lexicographic_interval (Pitch p1, Pitch p2)
+{
+  at (LEFT) = p1;
+  at (RIGHT) = p2;
+}
+
+Pitch_lexicographic_interval::Pitch_lexicographic_interval ()
+{
+  at (LEFT) = Pitch (100, 0, 0);
+  at (RIGHT) = Pitch (-100, 0, 0);
+}
+
+bool
+Pitch_lexicographic_interval::is_empty () const
+{
+  return at (LEFT) > at (RIGHT);
+}
+
+void
+Pitch_lexicographic_interval::add_point (Pitch p)
 {
   if (at (LEFT) > p)
     at (LEFT) = p;
index fa68b2d1bab2a4041653d2148648b4bc5dd00658..bc8a9e45a6cd9b8467ecc3af1344deed84da3998 100644 (file)
@@ -67,6 +67,10 @@ Pitch::tone_pitch () const
       o--;
     }
 
+  /*
+    we're effictively hardcoding the octave to 6 whole-tones,
+    which is as arbitrary as coding it to 1200 cents
+  */
   Rational tones ((o + n / scale_->step_tones_.size ()) * 6, 1);
   tones += scale_->step_tones_[n % scale_->step_tones_.size ()];
 
index b636948fa84c8490cb556ebf559a6204fc9dafd6..638aaf634d96fca8d61646e5cacad400bacb7764 100644 (file)
@@ -39,8 +39,6 @@ static SCM option_hash;
 
 void internal_set_option (SCM var, SCM val)
 {
-  scm_hashq_set_x (option_hash, var, val);
-
   if (0)
     ;
   else if (var == ly_symbol2scm ("profile-property-accesses"))
@@ -100,6 +98,16 @@ void internal_set_option (SCM var, SCM val)
       debug_page_breaking_scoring = to_boolean (val);
       val = scm_from_bool (to_boolean (val));
     }
+  else if (var == ly_symbol2scm ("datadir"))
+    {
+      /* ignore input value. */
+      val = ly_string2scm (lilypond_datadir);
+    }
+
+
+  scm_hashq_set_x (option_hash, var, val);
+
+
 }
 
 
index 2ff9fc44d37e7721780bf791d07d4398ac588f1e..42c54a65ff3863bf3d9635b9a21b3956f46698ed 100644 (file)
@@ -230,12 +230,8 @@ setup_paths (char const *argv0_ptr)
 
   if (char const *env = getenv ("LILYPOND_DATADIR"))
     {
-#ifdef __MINGW32__
       /* Normalize file name.  */
       lilypond_datadir = File_name (env).to_string ();
-#else
-      lilypond_datadir = env;
-#endif
     }
 
   /* When running from build dir, a full LILYPOND_DATADIR is set-up at
@@ -245,6 +241,9 @@ setup_paths (char const *argv0_ptr)
   if (!is_dir (lilypond_datadir.c_str ())
       && is_dir (build_datadir_current.c_str ()))
     lilypond_datadir = build_datadir_current;
+
+
+  lilypond_datadir = File_name (lilypond_datadir).canonicalized().to_string();
   
   global_path.append ("");
 
index 063b773a92ae2f3ccf58792ba566095bf884b0a2..dd92f083e36db01a468dcc5a2acf9d1299cd11ad 100644 (file)
@@ -227,8 +227,24 @@ Rest_collision::calc_positioning_done (SCM smob)
 
       Interval notedim;
       for (vsize i = 0; i < notes.size (); i++)
-       notedim.unite (notes[i]->extent (common, Y_AXIS));
-
+       {
+         if (Note_column::dir (notes[i]) == -dir)
+           {
+             /* try not to look at the stem, as looking at a beamed
+                note may trigger beam positioning prematurely.
+
+                This happens with dotted rests, which need Y
+                positioning to compute X-positioning.
+             */
+             Grob *head = Note_column::first_head (notes[i]);
+             if (head)
+               notedim.unite (head->extent (common, Y_AXIS));
+             else
+               programming_error ("Note_column without first_head()");
+           }
+         else
+           notedim.unite (notes[i]->extent (common, Y_AXIS));
+       }
 
       Real y = dir * max (0.0,
                          -dir * restdim[-dir] + dir * notedim[dir]  + minimum_dist);
index 0d56bb44bb12b427dcc883cfeecb42141b4180a7..045e3f3b6dfabb45c5c42ac349777f5311fdfe19 100644 (file)
@@ -99,7 +99,7 @@ Tab_note_heads_engraver::process_music ()
          SCM scm_pitch = event->get_property ("pitch");
          int min_fret = robust_scm2int (get_property ("minimumFret"), 0);
          int start = (high_string_one) ? 1 : string_count;
-         int end = (high_string_one) ? string_count : 1;
+         int end = (high_string_one) ? string_count+1 : 0;
 
          int i = start;
          do
index f7682c904c56db5af97bcd4c9c3f0c240e6a7b84..3105d784f1615a8e9ec459bfeb99289fa6bb3e1c 100644 (file)
@@ -61,6 +61,7 @@ Tie_formatting_problem::get_attachment (Real y, Drul_array<int> columns) const
 Tie_formatting_problem::Tie_formatting_problem ()
 {
   x_refpoint_ = 0;
+  use_horizontal_spacing_ = true;
 }
 
 Tie_formatting_problem::~Tie_formatting_problem ()
@@ -123,16 +124,23 @@ Tie_formatting_problem::set_column_chord_outline (vector<Item*> bounds,
     {
       if (Stem::is_normal_stem (stem))
        {
-         
          Interval x;
          x.add_point (stem->relative_coordinate (x_refpoint_, X_AXIS));
          x.widen (staff_space / 20); // ugh.
          Interval y;
-         Real stem_end_position =
-           Stem::is_cross_staff (stem)
-           ? get_grob_direction (stem) * infinity_f
-           : Stem::stem_end_position (stem) * staff_space * .5;
 
+         Real stem_end_position = 0.0;
+         if (Stem::is_cross_staff (stem))
+           stem_end_position =  get_grob_direction (stem) * infinity_f;
+         else
+           {
+             if (use_horizontal_spacing_ || !Stem::get_beam (stem))
+               stem_end_position = Stem::stem_end_position (stem) * staff_space * .5;
+             else
+               stem_end_position = Stem::note_head_positions (stem)[get_grob_direction (stem)]
+                 * staff_space * .5;
+           }
+         
          y.add_point (stem_end_position);
 
          Direction stemdir = get_grob_direction (stem);
@@ -347,7 +355,8 @@ Tie_formatting_problem::from_semi_ties (vector<Grob*> const &semi_ties, Directio
 {
   if (semi_ties.empty ())
     return;
-  
+
+  use_horizontal_spacing_ = false; 
   details_.from_grob (semi_ties[0]);
   vector<Item*> heads;
 
index 170bbb13eb14a081b751333dbe88ba28af75acdd..59e22f850f45558692efeb2845e23cd32be9ad4a 100644 (file)
@@ -131,8 +131,8 @@ tree-regen:
 
 ##
 ## todo: this also depends on .tfm, FIXME.
-$(outdir)/%.lisp $(outdir)/%.otf-gtable $(outdir)/%.enc  $(outdir)/%.tex $(outdir)/%.dep: $(outdir)/%.log
-       $(PYTHON) $(buildscript-dir)/mf-to-table.py --global-lisp=$(outdir)/$(<F:.log=.otf-gtable) --lisp=$(outdir)/$(<F:.log=.lisp) --outdir=$(outdir) --dep $(outdir)/$(<F:.log=.dep) --enc $(outdir)/$(<F:.log=.enc) --tex $(outdir)/$(<F:.log=.tex) $<
+$(outdir)/%.lisp $(outdir)/%.otf-gtable $(outdir)/%.enc $(outdir)/%.dep: $(outdir)/%.log
+       $(PYTHON) $(buildscript-dir)/mf-to-table.py --global-lisp=$(outdir)/$(<F:.log=.otf-gtable) --lisp=$(outdir)/$(<F:.log=.lisp) --outdir=$(outdir) --dep $(outdir)/$(<F:.log=.dep) --enc $(outdir)/$(<F:.log=.enc)  $<
 
 local-clean:
        rm -f mfplain.mem mfplain.log
index f2d9dbd9ca929527f153ddb4957f35881cdf684a..147813ef195087359bb1112e4c27e3e8f87c4a9e 100644 (file)
@@ -2986,8 +2986,12 @@ def conv (str):
                          ('right', m.group (4))]:
 
             if h and float (h):
+                once = m.group(1)
+                if not once:
+                    once = ''
+                    
                 s += (r"%s \override %s #'bound-details #'%s #'text = \markup { \draw-line #'(0 . %s) }"
-                      % (m.group(1), m.group (2), var, h))
+                      % (once, m.group (2), var, h))
 
                 s += '\n'
             
index c09e7572d5d3d0a77f687ca37c71e2c6e6c0bd3a..73c147c1599d4dfd1b2acf4108506ff7bc54de77 100644 (file)
         (is-eps (string-match "\\.eps$" name))
         (paper-size-string (if is-eps
                                " -dEPSCrop "
-                               (format "-dDEVICEWIDTHPOINTS=~,2f \
--dDEVICEHEIGHTPOINTS=~,2f "
+                               (ly:format "-dDEVICEWIDTHPOINTS=~$ \
+-dDEVICEHEIGHTPOINTS=~$ "
                                        paper-width paper-height )))
 
-        (cmd (format #f
+        (cmd (simple-format #f
                      "~a\
  ~a\
  ~a\
index eaf473058af7371ed6c0aabbe40ae9cfb0e0841e..c8eb537b255116872103570a271eb8172d7ef32b 100644 (file)
 
 
 (define-public (rhythmic-location->file-string a)
-  (format "~a.~a.~a"
+  (ly:format "~a.~a.~a"
          (car a)
          (ly:moment-main-numerator (cdr a))
          (ly:moment-main-denominator (cdr a))))
 
 (define-public (rhythmic-location->string a)
-  (format "bar ~a ~a"
+  (ly:format "bar ~a ~a"
          (car a)
          (ly:moment->string  (cdr a))))
 
index 7b1dfc810df3617325b7d0ff144920f8d8f28295..e7392bb6837b8e5fe459d0001d3a29d2229299e3 100644 (file)
@@ -3,7 +3,8 @@
 (use-modules (lily)
             (ice-9 rdelim)
             (ice-9 regex)
-            (ice-9 format))
+            (ice-9 format) ;; needed for ~8@ 
+            )
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
index a6773286c6aa7673ca4241dcc0a6b9a3719df222..956bd817bfa2a15e39ab68c965e54fb24957c8bb 100644 (file)
   (let*
       ((th (chain-assoc-get 'thickness props  0.1))
        (x (car dest))
-       (y (cdr dest)))
+       (y (cdr dest))
+       (s (ly:make-stencil
+          `(draw-line
+            ,th
+            0 0
+            ,x ,y)
 
-    (ly:make-stencil
-     `(draw-line
-       ,th
-       0 0
-       ,x ,y)
+          (cons (min x 0) (max x 0))
+          (cons (min y 0) (max y 0)))))
 
-     (cons (min x 0) (min y 0))
-     (cons (max x 0) (max y 0)))))
+    s))
 
 (define-builtin-markup-command (draw-circle layout props radius thickness fill)
   (number? number? boolean?)
index fab2d771771dd4303c8420d5c95d865bc0a56af0..85a4a9863600332d3c77044b92d456068a14cce6 100644 (file)
@@ -10,7 +10,6 @@
 
 (use-modules (ice-9 regex)
             (ice-9 string-fun)
-            (ice-9 format)
             (guile)
             (scm framework-ps)
             (scm paper-system)
@@ -20,6 +19,8 @@
             (srfi srfi-13)
             (lily))
 
+(define format ergonomic-simple-format)
+
 (define framework-eps-module (current-module))
 
 
index 89fae350c2e0072cbdb4144347ba3c68da1233c5..a035dc9b927049226604c7d545402455011cde90 100644 (file)
@@ -6,14 +6,13 @@
 
 (use-modules (ice-9 regex)
             (ice-9 string-fun)
-            (ice-9 format)
             (guile)
             (srfi srfi-1)
             (ice-9 pretty-print)
             (srfi srfi-13)
             (lily))
 
-(define-public (output-framework channel book scopes fields )
+(define-public (output-framework channel book scopes fields)
 
   
   #t)
index a119024a1dd0cb38c7636aae11f2bb80e7640de8..5d693358bfe4ed104d78075561cf4b53bd670dec 100644 (file)
             (scm clip-region)
             (lily))
 
-(define (format dest . rest)
-  (if (string? dest)
-      (apply simple-format (cons #f (cons dest rest)))
-      (apply simple-format (cons dest rest))))
+(define format ergonomic-simple-format)
 
 (define framework-ps-module (current-module))
 
 (define (write-preamble paper load-fonts? port)
 
   (define (load-font-via-GS font-name-filename)
-    (define (ps-load-file name)
-      (format
-       (if (string? name)
-          "(~a) (r) file .loadfont\n"
-          "% cannot find font file: ~a\n")
-       name))
+    (define (ps-load-file file-name)
+      (if (string? file-name)
+         (if (string-contains file-name (ly:get-option 'datadir))
+             (begin
+               (set! file-name (ly:string-substitute (ly:get-option 'datadir) "" file-name))
+               (format "lilypond-datadir (~a) concatstrings (r) file .loadfont" file-name))
+             (format "(~a) (r) file .loadfont\n" file-name))
+         (format "% cannot find font file: ~a\n" file-name)))
 
     (let* ((font (car font-name-filename))
           (name (cadr font-name-filename))
       pfas))
 
   (display "%%BeginProlog\n" port)
+
+  (format port
+           "/lilypond-datadir where {pop} {userdict /lilypond-datadir (~a) put } ifelse"
+           (ly:get-option 'datadir))
+  
   (if load-fonts?
       (for-each
        (lambda (f)
index ecbe711af88ed3d6ef3fd86ff107c273afac0c03..53905e087dcf56f6f93b1b94680c8b51d8feb8a0 100644 (file)
@@ -5,7 +5,6 @@
 
 (use-modules (ice-9 regex)
             (ice-9 string-fun)
-            (ice-9 format)
             (guile)
             (srfi srfi-1)
             (ice-9 pretty-print)
@@ -15,7 +14,7 @@
 
 (define-public (output-framework basename book scopes fields )
   (let*
-      ((file (open-output-file (format "~a.scm" basename))))
+      ((file (open-output-file (format #f "~a.scm" basename))))
     
     (display ";;Creator: LilyPond\n" file)
     (display ";; raw SCM output\n" file)
index 8f5f34d7c079c8057fe8521d206297f78badc734..87480f1955893dfdee22905f23a585940dd71f64 100644 (file)
@@ -17,6 +17,8 @@
             (srfi srfi-13)
             (ice-9 regex))
 
+(define format ergonomic-simple-format)
+
 (define-public (output-framework basename book scopes fields)
   (let* ((filename (format "~a.svg" basename))
         (outputter  (ly:make-paper-outputter (open-file filename "wb")
@@ -44,8 +46,8 @@
              '(version . "1.2")
 
              ;; Argggghhhh: SVG takes the px <-> mm mapping from the windowing system
-             `(width . ,(format #f "~s" page-width))
-             `(height . ,(format #f "~s" page-height))))
+             `(width . ,(format "~s" page-width))
+             `(height . ,(format "~s" page-height))))
     
     (dump (dump-fonts outputter paper))
     (dump
@@ -75,7 +77,7 @@
 (define (dump-page outputter page page-number page-count landscape? page-set?)
   (define (dump str) (display str (ly:outputter-port outputter)))
   
-  (dump (comment (format #f "Page: ~S/~S" page-number page-count)))
+  (dump (comment (format "Page: ~S/~S" page-number page-count)))
   (if (or landscape? page-set?)
       (dump
        (if landscape?
index a60f9877b11477f9173818605efb2548fbab9444..5553b5b442ea19e8dfabb7650c1f3bb0e73f162c 100644 (file)
@@ -10,7 +10,6 @@
 
 (use-modules (ice-9 regex)
             (ice-9 string-fun)
-            (ice-9 format)
             (scm page)
             (scm paper-system)
             (guile)
@@ -20,6 +19,8 @@
             (scm kpathsea)
             (lily))
 
+(define format ergonomic-simple-format)
+
 (define (output-formats)
   (define formats (ly:output-formats))
   (set! formats (completize-formats formats))
@@ -83,7 +84,7 @@
      (apply string-append
            (map
             (lambda (sub-name)
-              (format #f "\\font\\~a=~a scaled ~a%\n"
+              (format "\\font\\~a=~a scaled ~a%\n"
                       (tex-font-command-raw
                        sub-name (ly:font-magnification font))
                       sub-name
index 6bde0616bd2ebfb2d65691f0bb687efd65814ca2..2dcbebe9fc20df719f9da28676376d026b8a3a54 100644 (file)
 (use-modules (ice-9 regex)
             (scm paper-system)
             (ice-9 string-fun)
-            (ice-9 format)
             (guile)
             (srfi srfi-1)
             (srfi srfi-13)
             (lily))
 
+(define format ergonomic-simple-format)
+
 (define (header filename)
   (format  "% header
 \\input{lilypond-tex-metrics}
@@ -32,7 +33,7 @@
 ")
 
 (define-public (output-classic-framework basename book scopes fields)
-  (let* ((filename (format "~a.texstr" basename))
+  (let* ((filename (format #f "~a.texstr" basename))
         (outputter (ly:make-paper-outputter
                     (open-file filename "wb")
                     (ly:get-option 'backend)))
@@ -46,7 +47,7 @@
     (ly:outputter-dump-string outputter (footer))))
 
 (define-public (output-framework basename book scopes fields )
-  (let* ((filename (format "~a.texstr" basename))
+  (let* ((filename (format #f "~a.texstr" basename))
         (outputter
          (ly:make-paper-outputter
           (open-file filename "wb")
index 5f69f817de3a8c8a83358c8d7301ac1613c13663..6112d8ad7731b3d26855cd673ed0ec2744350b5d 100644 (file)
@@ -397,10 +397,10 @@ Line thickness is given by @var{th}, fret & string spacing by
           (fret-count (+ (- (cadr fret-range) (car fret-range)) 1))
            (label-text 
               (cond
-              ((equal?   number-type  'roman-lower) (format #f "~(~:@r~)" base-fret))
-              ((equal?  number-type 'roman-upper) (format #f "~:@r" base-fret))
-              ((equal? 'arabic number-type)  (format #f "~d" base-fret))
-              (else (format #f  "~(~:@r~)" base-fret)))))
+              ((equal?   number-type  'roman-lower) (fancy-format #f "~(~:@r~)" base-fret))
+              ((equal?  number-type 'roman-upper) (fancy-format #f "~:@r" base-fret))
+              ((equal? 'arabic number-type)  (fancy-format #f "~d" base-fret))
+              (else (fancy-format #f  "~(~:@r~)" base-fret)))))
        (if (eq? orientation 'normal)
            (ly:stencil-translate-axis
                (sans-serif-stencil layout props (* size label-font-mag) label-text)
index 48d911751aff6fbda380a2a6f4c735cc5e960704..645e2c192c7865ad79fe6164f3b3c2503672a0e7 100644 (file)
@@ -17,8 +17,6 @@
 (read-enable 'positions)
 (debug-enable 'debug)
 
-
-
 (define scheme-options-definitions
   `(
 
@@ -31,6 +29,7 @@
     (backend ps "which backend to use by default; Options: eps, ps [default], scm, svg, tex, texstr)")
     (check-internal-types #f "check every property assignment for types")
     (clip-systems #f "Generate cut-out snippets of a score")
+    (datadir #f "LilyPond prefix for data files (Readonly).")
     (debug-gc #f "dump memory debugging statistics")
     (debug-gc-assert-parsed-dead #f "for memory debugging:
 ensure that all refs to parsed objects are dead.  This is an internal option, and is switched on automatically for -ddebug-gc.") 
@@ -104,6 +103,7 @@ on errors, and print a stack trace.")
 
 (use-modules (ice-9 regex)
             (ice-9 safe)
+            (ice-9 format)
             (ice-9 rdelim)
              (ice-9 optargs)
             (oop goops)
@@ -114,6 +114,15 @@ on errors, and print a stack trace.")
             (scm memory-trace)
             (scm coverage)
             )
+(define-public fancy-format format)
+(define-public (ergonomic-simple-format dest . rest)
+  "Like ice-9 format, but without the memory consumption."
+  
+  (if (string? dest)
+      (apply simple-format (cons #f (cons dest rest)))
+      (apply simple-format (cons dest rest))))
+
+(define format ergonomic-simple-format)
 
 ;; my display
 (define-public (myd k v) (display k) (display ": ") (display v) (display ", ")
@@ -452,9 +461,10 @@ The syntax is the same as `define*-public'."
      outfile)
 
     (format outfile "\nprotected symbols: ~a\n"
-           (length (filter symbol?  (map car protects))))
-    
-            
+           (apply + (map (lambda (obj-count) (if (symbol? (car obj-count))
+                                                 (cdr obj-count)
+                                                 0))
+                            protects)))             
 
     ;; (display (ly:smob-protects))
     (newline outfile)
index b0bf088b3697fb2867bd267a5fdd2852e9a1554b..51a491a8ef5d4d07277a952fb31fb5327b92e40d 100644 (file)
 (use-modules
  (guile)
  (ice-9 regex)
+ (ice-9 format)
  (lily)
  (srfi srfi-1)
  (srfi srfi-13))
 
+(define fancy-format format)
+(define format ergonomic-simple-format)
 
 (define lily-unit-length 1.75)
 
 ;; Helper functions
 (define-public (attributes attributes-alist)
   (apply string-append
-        (map (lambda (x) (format #f " ~s=\"~a\"" (car x) (cdr x)))
+        (map (lambda (x) (format " ~s=\"~a\"" (car x) (cdr x)))
              attributes-alist)))
 
 (define-public (eo entity . attributes-alist)
   "o = open"
-  (format #f "<~S~a>\n" entity (attributes attributes-alist)))
+  (format "<~S~a>\n" entity (attributes attributes-alist)))
 
 (define-public (eoc entity . attributes-alist)
   " oc = open/close"
-  (format #f "<~S~a/>\n" entity (attributes attributes-alist)))
+  (format "<~S~a/>\n" entity (attributes attributes-alist)))
 
 (define-public (ec entity)
   "c = close"
-  (format #f "</~S>\n" entity))
+  (format "</~S>\n" entity))
 
 
 
@@ -69,7 +72,7 @@
        (apply eo (cons entity attributes-alist)) string (ec entity))))
 
 (define (offset->point o)
-  (format #f " ~S,~S" (car o)  (- (cdr o))))
+  (format " ~S,~S" (car o)  (- (cdr o))))
 
 (define (number-list->point lst)
   (define (helper lst)
@@ -95,7 +98,7 @@
   (* x x))
 
 (define (integer->entity integer)
-  (format #f "&#x~x;" integer))
+  (fancy-format "&#x~x;" integer))
 
 (define (char->entity char)
   (integer->entity (char->integer char)))
            (size (modified-font-metric-font-scaling font))
            (anchor "west"))
 
-       (format #f "font-family:~a;font-style:~a;font-size:~a;text-anchor:~a;"
+       (format "font-family:~a;font-style:~a;font-size:~a;text-anchor:~a;"
                (car name-style) (cadr name-style)
                size anchor))))
 
          expr
          ;; FIXME: Not using GNU coding standards [translate ()] here
          ;; to work around a bug in Microsoft Internet Explorer 6.0
-         `(transform . ,(format #f "translate(~f, ~f)"
+         `(transform . ,(ly:format "translate(~f, ~f)"
                                 x (- y)))))
 
 (define (polygon coords blot-diameter is-filled)
index 4be327839707c5e8a68ecd6f58d2f62433988ce6..00e0fea7ba2e1d54b6414e15924324bff7c7d85c 100644 (file)
@@ -42,7 +42,6 @@
 
 (use-modules (ice-9 regex)
             (ice-9 string-fun)
-            (ice-9 format)
             (guile)
             (srfi srfi-13)
             (scm framework-tex)
   (embedded-ps (list 'round-filled-box  x y width height blotdiam)))
 
 (define (text font s)
-  (format
+  (format #f
    "\\hbox{\\~a{}~a}" (tex-font-command font)
    (sanitize-tex-string s)))
 
index 71fbe9b9057c1dd22441565556db8575b32b20f2..a41a1ca6fa9f431d063bde48f4f45b30d4c3dfa7 100644 (file)
@@ -97,7 +97,7 @@
     (page-width  100)
     (page-height 100)
     (rename-page-1 #f)
-    (be-verbose #f)
+    (be-verbose (ly:get-option 'verbose))
     (pixmap-format 'png16m)
     (anti-alias-factor 1))
 
  ~a\
  -dGraphicsAlphaBits=4\
  -dTextAlphaBits=4\
- -q\
  -dNOPAUSE\
  -sDEVICE=~a\
  -sOutputFile=~S\
index 32a64fdedee300616c5cccca1490fe29beef80f4..db35a5ecc54af4228b43c2bcb2b5b72ef8f86603 100644 (file)
@@ -238,7 +238,7 @@ encloses the contents.
     (if (not (interval-sane? extent))
        (set! annotation (interpret-markup
                          layout text-props
-                         (make-simple-markup (format "~a: NaN/inf" name))))
+                         (make-simple-markup (simple-format #f "~a: NaN/inf" name))))
        (let ((text-stencil (interpret-markup
                             layout text-props
                              (markup #:whiteout #:simple name)))
@@ -249,9 +249,9 @@ encloses the contents.
                                               ((interval-empty? extent)
                                                (format "empty"))
                                               (is-length
-                                               (format "~$" (interval-length extent)))
+                                               (ly:format "~$" (interval-length extent)))
                                               (else
-                                               (format "(~$,~$)"
+                                               (ly:format "(~$,~$)"
                                                        (car extent) (cdr extent)))))))
              (arrows (ly:stencil-translate-axis 
                       (dimension-arrows (cons 0 (interval-length extent)))
@@ -282,7 +282,7 @@ encloses the contents.
        (factor (exact->inexact (/ size bbox-size)))
        (scaled-bbox
        (map (lambda (x) (* factor x)) bbox))
-       (clip-rect-string (format
+       (clip-rect-string (ly:format
                          "~a ~a ~a ~a rectclip"
                          (list-ref bbox 0) 
                          (list-ref bbox 1) 
@@ -295,7 +295,7 @@ encloses the contents.
         (list
          'embedded-ps
          (string-append
-          (format
+          (ly:format
           "
 gsave
 currentpoint translate
@@ -326,13 +326,12 @@ grestore
   (if (pair? paper-systems)
       (begin
        (let*
-           ((outname (format "~a-~a.signature" basename count)) )
+           ((outname (simple-format #f "~a-~a.signature" basename count)) )
             
          (ly:message "Writing ~a" outname)
          (write-system-signature outname (car paper-systems))
          (write-system-signatures basename (cdr paper-systems) (1+ count))))))
 
-
 (use-modules (scm paper-system))
 (define-public (write-system-signature filename paper-system)
   (define (float? x)
@@ -342,7 +341,9 @@ grestore
     (paper-system-system-grob paper-system))
   
   (define output (open-output-file filename))
-  
+
+  ;; todo: optionally use a command line flag? Or just junk this?
+  (define compare-expressions #f)
   (define (strip-floats expr)
     "Replace floats by #f"
     (cond
@@ -364,22 +365,12 @@ grestore
              rest))
        expr))
   
-
-  (define (pythonic-string expr)
-    "escape quotes and slashes for python consumption"
-    (regexp-substitute/global #f "([\n\\\\'\"])" (format "~a" expr) 'pre "\\" 1 'post))
-
-  (define (pythonic-pair expr)
-    (format "(~a,~a)"
-           (car expr) (cdr expr)))
-
-
   (define (raw-string expr)
     "escape quotes and slashes for python consumption"
-    (regexp-substitute/global #f "[@\n]" (format "~a" expr) 'pre " " 'post))
+    (regexp-substitute/global #f "[@\n]" (simple-format #f "~a" expr) 'pre " " 'post))
 
   (define (raw-pair expr)
-    (format "~a ~a"
+    (simple-format #f "~a ~a"
            (car expr) (cdr expr)))
   
   (define (found-grob expr)
@@ -394,13 +385,15 @@ grestore
         ;; todo: use stencil extent if available.
         (x-ext (ly:grob-extent grob system-grob X))
         (y-ext (ly:grob-extent grob system-grob Y))
-        )
-
-      (interpret-for-signature #f (lambda (e)
-                                   (set! collected (cons e collected)))
-                              rest)
-
-      (format output
+        (expression-skeleton
+         (if compare-expressions
+             (interpret-for-signature
+              #f (lambda (e)
+                   (set! collected (cons e collected)))
+              rest)
+            "")))
+
+      (simple-format output
              "~a@~a@~a@~a@~a\n"
              (cdr (assq 'name (ly:grob-property grob 'meta) ))
              (raw-string location)
@@ -432,7 +425,7 @@ grestore
 
   (if (ly:grob? system-grob)
       (begin
-       (display (format "# Output signature\n# Generated by LilyPond ~a\n" (lilypond-version))
+       (display (simple-format #f "# Output signature\n# Generated by LilyPond ~a\n" (lilypond-version))
                 output)
        (interpret-for-signature found-grob (lambda (x) #f)
                                 (ly:stencil-expr