]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.1.59 release/1.1.59
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 14 Jul 1999 16:19:15 +0000 (18:19 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 14 Jul 1999 16:19:15 +0000 (18:19 +0200)
37 files changed:
BUGS
Documentation/index.yo
Documentation/man/lilypond.yo
Documentation/man/out/lilypond.1
Documentation/tex/lilypond-regtest.doc
NEWS
TODO
VERSION
input/bugs/2pianobrace.ly [new file with mode: 0644]
input/bugs/choral.ly [deleted file]
input/test/collisions.ly
input/test/repeat-semifold.ly
lily/bar-engraver.cc
lily/break-align-item.cc
lily/col-info.cc
lily/colhpos.cc
lily/gourlay-breaking.cc
lily/include/col-info.hh
lily/include/colhpos.hh
lily/include/lily-guile.hh
lily/include/ly-symbols.hh
lily/include/spring-spacer.hh
lily/line-of-score.cc
lily/lookup.cc
lily/main.cc
lily/spacing-spanner.cc
lily/spring-spacer.cc
lily/word-wrap.cc
ly/engraver.ly
ly/params.ly
make/out/lelievijver.lsm
make/out/lilypond.lsm
make/out/lilypond.spec
scm/lily.scm
tex/lily-pdf-defs.tex [new file with mode: 0644]
tex/lily-ps-defs.tex
tex/lilyponddefs.tex

diff --git a/BUGS b/BUGS
index 59f9f827ab5726b77eedefc94d8ce4427bc08891..5fe9ab69ee795d1ab2b08e43e4cb6330eb621d6a 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -31,6 +31,17 @@ Lilypond 1.1.35-1.1.51,...:  Wierd errors in guile scm_gc_mark ()
 
 Some bugs may be captured in input/bugs/*y
 
+[Linux i386, RedHat 5.2 with updates to 6.0]
+
+Compiling with 
+
+       configure --disable-checking --enable-printing --disable-optimise --disable-debugging
+
+results in core dumps, during parsing of init files. Cause unknown.
+Solution: use
+
+       --enable-checking and --enable-optimize
+
 [Linux libg++ 2.7]
 
 LilyPond occasionally crashes while parsing the initialisation files.
index ca106c5d6eaa6400fc9b6496fb1dbca86863bab3..3271c33aa3ee0f3c67ef2453eb02397f9866128f 100644 (file)
@@ -29,7 +29,6 @@ itemize(
 it() url(Why?)(AIMS.html)
 it() url(Design criteria)(MANIFESTO.html)
 it()url(The GNU Music project)(gnu-music.html)
-it()url(Mutopia -- Music To the People)(mutopia.html)
 it()url(The lilypond
   logo (Big, format: .png))(DOEXPAND(pics)/lelieblond.png)
 it()url(The lilypond
index d82b76d5c34219512ed11d2a623b8d3907064118..c26ca52f0f2782babf7f095d7346d7e444ca5606 100644 (file)
@@ -26,12 +26,12 @@ manpageoptions()
 description(
 dit(-I,--include=)
     add file(FILE) to the search path for input files.
-dit(-M,--midi)
+dit(-m,--midi)
     Disable TeX output. If you have a \midi definition, it will do the 
     midi output only.
-dit(-d,--dependencies)
+dit(-M,--dependencies)
     Also output rules to be included in Makefile.
-dit(-D,--debug)
+dit(-d,--debug)
     Turn debugging info on.  GNU LilyPond reads the file file(.dstreamrc), 
     which lists what functions and classes may produce copious debugging
     output.
index 45d2a60fff8323c9befe4252e2194853029b906d..82839b59b5e56e3b5b384dd3a824a08d576be63f 100644 (file)
@@ -16,12 +16,12 @@ description file into beautiful sheet music\&.
 .SH "OPTIONS" 
 .IP "-I,--include=" 
 add \fBFILE\fP to the search path for input files\&.
-.IP "-M,--midi" 
+.IP "-m,--midi" 
 Disable TeX output\&. If you have a \emidi definition, it will do the 
 midi output only\&.
-.IP "-d,--dependencies" 
+.IP "-M,--dependencies" 
 Also output rules to be included in Makefile\&.
-.IP "-D,--debug" 
+.IP "-d,--debug" 
 Turn debugging info on\&.  GNU LilyPond reads the file \fB\&.dstreamrc\fP, 
 which lists what functions and classes may produce copious debugging
 output\&.
index 611478d23ad7e4add3c8f59f67b4a3ca9616298c..2b5d51e917426c854eee348a79d6cc63da2b5b32 100644 (file)
@@ -130,6 +130,7 @@ Unfolded behavior:
 \mudelafile{repeat-unfold.ly}
 
 Semi (un)folded behavior.  Voltas can start on non-barline moments.
+If they don't barlines should still be shown.
 
 \mudelafile{repeat-semifold.ly}
 
diff --git a/NEWS b/NEWS
index cc7169ce80e81d7b54739fc6d31f5d263b92a324..c722b2bafaa1b74045eaa3db66242d417c771b4e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,16 @@
+pl 58.uu1
+       - experimental pdftex support, courtesy Stephen Peters.
+       - --version support
+       - junked complicated loose column handling.
+       - only stretch the extra space after prefatory matter, not the
+entire width of prefatory matter.
+       - standardise(d) switches:-d for debug, -M for Make deps, -m for midi-only.
+       - bf: non_musical_space_strength  now works. Set to 8 (-> Strong! )
+       - bf: space after time_sig.
+       - bf: decrescendi.
+       - bf: barlines on voltas
+
+************
 pl 57.hwn1
        - bf: accidentals on grace notes.
        - \property graceAccidentalSpace
diff --git a/TODO b/TODO
index 92e9b48a21fd665ca7ccc568b2409a2d34d6f7db..304e29b7fe2b659c0718785ee6dbeb20cb5a43bb 100644 (file)
--- a/TODO
+++ b/TODO
@@ -20,12 +20,88 @@ typeface. ie. leading is vertical space  --hwn]
 . * junk delayed spanner breaking.
 . * check dangling_scm_sym working.
 . * revise pianobrace to put font stuff into Lookup
-. * standardise(d) switches: -v, --version; -d, --debug,
 . * spacing of accidentals
 . * restorations & repeats
-. * dotted rests?
-. * input/test/grace.ly spacing (triplet!)
+. * \score {
+  \context Staff \notes {
+c'2 fis'~
+% accidential after bar
+fis'4 % accidential should be here
+fis' g'2
+\repeat semi 2 {
+c' c'
+}
+\alternative {
+% no bars at the beginning of alternative 1 and at the end of alternative 2
+{
+d' d'
+}
+{
+c'1 c'
+}
+}
+d'4_"normal" d' \times 2/3 {e' e' e'}
+% no triplet bracket in \tiny
+\tiny d'4_"tiny" d' \times 2/3 {e' e' e'}
+  }
+}
+
+. * 
+So how do I do what I want to do?
+
+In Caro Mio Ben, bar 8, there's a syllable that starts on a note, and
+ends on a pair of grace notes.  Standard practice is to mark this with
+a slur starting on the main note and ending on the grace note, so a
+singer knows where to break the words.
+
+In bar 26, there's a \p marker that should appear below the grace
+note.
+
+In bar 27, there's a crescendo that's supposed to start at the start
+of the grace notes and extend to the note after the grace notes.
+
+How do I specify these?
+
+How can I control whether a grace note takes its time from the note
+before or the note after it (for the purposes of alignment with
+lyrics)?
+. *  / distance after 4/4 \key.
 . * spanners from grace to  normal ctxt
+. * Glen:
+1. I got a vertical line where I asked for a decrescendo.
+
+2. Slurs -- good to see some spacing between slurs and lyrics, but not
+there's several times too much space.
+
+3. Slurs with wrong slopes. Where a slur between two notes goes from the
+head of one to the stem of another it can have the wrong slope:
+         |   ___
+         |  /   \
+         | /    |
+        x|/     |
+                |
+               x|
+   The music goes down but the slur goes up (or vice versa). This looks
+wrong.
+
+4. Lyrics and \fermata collide. I know that the TODO has lyrics and scripts
+colliding; I'm just including it here because it's really an issue for me
+with fermata. Other scripts aren't a problem for me, but sometimes I need
+fermata on both sides of the staff (when sop and alto hold different notes,
+for example). In fact it's not just scripts and lyrics: In a choirstaff,
+scripts above the bass clef collide with scripts below the treble clef.
+
+5. Sometimes lyrics extend past the right end of the staff. I guess that
+this is a similar problem (if not another symptom of the same problem) as
+one of the spacing bugs mentioned in the TODO.
+
+6. The bar line at the beginning of an \alternative section has disappeared
+altogether.
+
+7. When it's a tight fit to get all the notes in the first line, the first
+note collides with the time signature. Is this the same as one of the
+spacing bugs mentioned in the TODO?
+
 .* 4.  Lyrics and grace sections don't go too well together.
         The words are aligned with the main note, not the start of the
         grace note.  This is usually wrong, but is sometimes right.
@@ -53,16 +129,12 @@ typeface. ie. leading is vertical space  --hwn]
 - The paper11/13/26 files have to be updated.
 . * Grace_slur_engraver.
 . * input/star-spangled-banner.ly: fold for lyrics?
+. * don't create $srcdir/share/
 . * Break_req handling is silly (break_forbid () + \break fucks up.)
 . * hangOnClef with non-breakable clefs.
-. * do scaled fonts generally 
+. * account for accidentals in spacing.
+. * collision of lyrics with span_bars. See star-spangled.
 . * fix partial measures in meaningful way.
-. * Michael
-
-- The two spacing bugs in the choral-1.ly I sent you earlier, small
-GIFs attached for easy reference: #1: time meter and first note on the
-line are too close; #2: last note on the line and next bar are too
-close.
 . * relative mode for midi2ly
 . * 
 Crescendi/diminuendi that cross a line break lose their vertical
diff --git a/VERSION b/VERSION
index 0e9fb9aa7bd458399e036a65968cb969120180c9..2e50a6e99631d6db00589ca345819b4363d360d8 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,7 +1,7 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=1
-PATCH_LEVEL=58
+PATCH_LEVEL=59
 MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
diff --git a/input/bugs/2pianobrace.ly b/input/bugs/2pianobrace.ly
new file mode 100644 (file)
index 0000000..a5c7cb4
--- /dev/null
@@ -0,0 +1,6 @@
+\score { \notes {
+\context StaffGroup <\context PianoStaff = PA< c4 d4 >
+ \context PianoStaff =PB < c4 d4 >
+>}
+}
+
diff --git a/input/bugs/choral.ly b/input/bugs/choral.ly
deleted file mode 100644 (file)
index 84a5d45..0000000
+++ /dev/null
@@ -1,241 +0,0 @@
-
-% TODO:
-% Copyright, Header etc.
-% Begleitsatz
-% Tempo
-
-\include "deutsch.ly"
-
-global = \notes {
-       \time 2/2; \partial 2*1;
-       \key g;
-
-       s2 | s1 | s1 |
-       \time 3/2;
-       s1. | s1. |
-       \time 2/2;
-       s1 | s1 | s1 | s2
-
-       s2 | s1 | s1 |
-       \time 3/2;
-       s1. | s1. |
-       \time 2/2;
-       s1 | s1
-       \time 3/2;
-       s1. \bar "||";
-
-       s1. | s1. | s1. | s1. |
-       s1. | s1. | s1. | s1. \bar "||";
-
-       \key es;
-       s1. | s1. | s1. | s1. |
-       s1. | s1. | s1. | s1 \bar "||";
-
-       \key g;
-       s2 |
-       \time 2/2;
-       s1 | s1 |
-       \time 3/2;
-       s1. | s1. |
-       \time 2/2;
-       s1 | s1 | s1 | s2
-
-       s2 | s1 | s1 |
-       \time 3/2;
-       s1. | s1. |
-       \time 2/2;
-       s1 | s1 | s1 \bar "|.";
-}
-
-themeMelody = \notes \relative c'' {
-       g2 | g d' | h a |
-       g fis g | a ~ a \breathe b |
-       d b | a a | g ~ g ~ | g \breathe
-
-       g2 | g d' | h a |
-       g fis g | a ~ a \breathe b |
-       d b |
-}
-
-themeBeforeBreak1EndMelody = \notes \relative  c'' {
-        a2 a | g ~ g ~ g4 r4
-}
-
-themeFinalEndMelody = \notes \relative  c'' {
-        a2 a ~ | a1^\fermata
-}
-
-themeRightHand = \notes \relative c' {
-       d2 | c <e g> | <e g> <d fis> | d2 es es4 c4 |
-       <d1 e1> <d2 f2> | <g2 b2> f2 | <cis2 e2> <e2 g2> |
-       <d2 f2> <c4 f4> cis4 | <dis2 fis2>
-
-       <c2 e2> | <c e> <e g> | <e g> <d fis> | d2 es es4 c4 |
-       <d1 e1> <d2 f2> | <g2 b2> f2 |
-}
-
-themeBeforeBreak1EndRightHand = \notes \relative c' {
-        <cis2 e2> <e2 g2> | <d2 f2> <c4 f4> cis4 <dis4 fis4> r4 |
-}
-
-themeFinalEndRightHand = \notes \relative c' {
-        <cis2 e2> <e2 g2> | <d1 f1>
-}
-
-themeLeftHand =        \notes \relative c {
-       <d2 g h> | <f a h> <g c> | <g cis> c | <g2 {a4 c4}> <a2 c2> <g2 {b4 a4}> |
-       <a,1 fis'1 a1> <d2 g2 b2> | <g2 b2 e2> <f2 a2 d2> | <a2 h2> <a2 cis2> |
-       <g2 b2> a2 | h2
-
-       g2 | <g a> <g c> | <g cis> c | <g2 {a4 c4}> <a2 c2> <g2 {b4 a4}> |
-       <a,1 fis'1 a1> <d2 g2 b2> | <g2 b2 e2> <f2 a2 d2> |
-}
-
-themeBeforeBreak1EndLeftHand = \notes \relative c' {
-        <a2 h2> <a2 cis2> | <g2 b2> a2 h4 r4 |
-}
-
-themeFinalEndLeftHand = \notes \relative c' {
-        <a2 h2> <a2 cis2> | <g1 b1>
-}
-
-themePedal = \notes \relative c' {
-       g4 fis | f2 c | a' d, |
-       h c es | d ~ d b |
-       e, g | a a | d, f4 a | h2
-
-       c2 | e2 c | a' d, |
-       h c es | d ~ d b |
-       e, g |
-}
-
-themeBeforeBreak1EndPedal = \notes \relative c {
-       a2 a | d,2 f4 a h4 r4 |
-}
-
-themeFinalEndPedal = \notes \relative c {
-       a2 a | d,1_\fermata
-}
-
-break1Melody = \notes \relative c'' {
-       g4( fis e fis d' h | )a1. |
-       g4( es g b es g | <fis1. )a1.> |
-       b,2 g es | d1. |
-       b'2 g d' | a1 r2 |
-}
-
-break1RightHand = \notes \relative c' {
-       e1. | g4( fis e fis g fis |
-       )es1. | dis'2 d4 c b a \breathe |
-       s1. | s1. |
-       es1 <es2 g2> | <dis1 fis1 > r2 |
-}
-
-break1LeftHand = \notes \relative c {
-       <
-               \context Voice = oben {
-                       \stemup
-                       c'1. | d2. c4 h a | b1. | d1. |
-               }
-               \context Voice = unten {
-                       \stemdown
-                       <c,1. g'1.> | <d1. a'1.> | <es1. g1.> | d2. e4 fis d |
-               }
-       >
-       r4 b2( g4 b c | d c b g fis d |
-       <)es1 c'1> <c2 c'2> | <h1 h'1> r2 |
-}
-
-break2RightHand = \notes \relative c'' {
-       g8 r8 c,8 r8 <fis8 g8> r8 c r g' r c, r |
-       <fis8 g8> r  c r  b' r  es, r  <es g> r  es  r |
-       b' r es, r <es g> r es r d' r <d, g> r |
-       d' r f, r <f b> r f r d' r <fis, a> r |
-       d' r g, r <g b> r g r d' r g, r |
-       es' r g, r <g b> r g b es r <a, c> r |
-       d8 r b r d8 f d b a r <a cis> r |
-       <fis1 a d1> \breathe
-}
-
-break2LeftHand = \notes \relative c' {
-       r8 g r g r g r g r g r g |
-       r8 g r g r b r b r b r b |
-       r c r c r c r c r h r h |
-       r d r d r d r d r d r d |
-       r d r d r d r d r c r c |
-       r <b es> r <b es> r <b es> r <g es'> r f' r <a, f'> |
-       r <b f'> r <b f'> r <g f'> r <g f'> r <a e'> r <a e'> |
-       <d,1 d'1>
-}
-
-break2Pedal = \notes \relative c {
-       c2 c g' | es1 d2 | c1 h2 |
-       b1 d2 \breathe | g2 g f2 | es1 f2 |
-       b,2 g a | d1 \breathe
-}
-
-\score {
-       <
-               \context PianoStaff <
-                       \context Staff = treble <
-                               \global
-                               \context Voice = melody {
-                                       \stemup \themeMelody \themeBeforeBreak1EndMelody
-                                       \break1Melody
-                                       \stemboth \break2RightHand
-                                       \stemup \themeMelody \themeFinalEndMelody
-                               }
-                               \context Voice = firstdown {
-                                       \stemdown \themeRightHand \themeBeforeBreak1EndRightHand
-                                       \break1RightHand
-                                       \notes {
-                                               s1. | s1. | s1. | s1. |
-                                               s1. | s1. | s1. | s1
-                                       }
-                                       \themeRightHand \themeFinalEndRightHand
-                               }
-                       >
-                       \context Staff = bass <
-                               \clef "bass";
-                               \global
-                               {
-                                       \themeLeftHand \themeBeforeBreak1EndLeftHand
-                                       \break1LeftHand
-                                       \break2LeftHand
-                                       \themeLeftHand \themeFinalEndLeftHand
-                               }
-                       >
-               >
-               \context Staff = pedal {
-                       \clef "bass";
-                       <
-                               \global
-                               {
-                                       \themePedal \themeBeforeBreak1EndPedal
-                                       \notes {
-                                               s1. | s1. | s1. | s1. |
-                                               s1. | s1. | s1. | s1. |
-                                       }
-                                       \break2Pedal
-                                       \themePedal \themeFinalEndPedal
-                               }
-                       >
-               }
-       >
-
-       \header {
-               title = "Choral I";
-               subtitle = "(über ``Aus meines Herzens Grunde'')";
-               composer = "Michael Krause 1999 (*1977)";
-               enteredby = "Michael Krause";
-               copyright = "dunno";
-       }
-
-       \paper {
-               linewidth = 18.0 \cm;
-               textheight = 28.0 \cm;
-
-               indent = 0.0 \mm;
-               \translator { \OrchestralScoreContext }
-       }
-}
index 1e8796cc5fd31080063e48ce515b8f70953006a4..370ce9463f8aa8700b278102ca4d94329f96ccfc 100644 (file)
@@ -24,14 +24,21 @@ threevoice = \context Staff \notes <
        \context Voice=iii { \stemdown c4 d e d c d es }
 >
 
+chordstest = \context Staff \notes <
+       \context Voice = i \relative c {
+               \stemup e4 dis c f g f a b b
+       }
+       \context Voice = ii \relative c {
+               \stemdown <a4 c> <a4 c> <a4 e'> <a4 c> <e' a> <e a> <e a> <a c> <a d>
+       }
+>
+
 \score{
        \notes \transpose c'' {  \twovoice  
        \twovoicesteminvert 
-       \threevoice  
-
+       \threevoice
+       \break \chordstest
        }
        
-
-       
 %      \midi { \tempo 4:80 }
 }
index 58d03f8cc88e8b98ccac3ecc6eff612b4665fd7e..6baf4e60fd8449b4f2c88193366d3fd3b47722a9 100644 (file)
@@ -4,6 +4,7 @@
 \repeat semi 3 { c^"3$\\times$ 0alt" d }
 % less alts than body
 \repeat semi 4 { c^"4$\\times$ 2alt" d } \alternative { e f }
+
 % more alts than body
 \repeat semi 2 { c^"2$\\times$ 3alt" d } \alternative { e f g } 
 }}
index 2d48eb6c4a3e5e1fa00c169ca67a8f8b19cc8a5e..84ada321e8157fb34bfb7e00f882fe9ace962f5a 100644 (file)
@@ -74,11 +74,11 @@ Bar_engraver::create_bar ()
 
 /**
    Make a barline.  If there are both |: and :| requested, merge them
-   to :|:
+   to :|:.
 
 */
 void
-Bar_engraver::request_bar (String type_str)
+Bar_engraver::request_bar (String requested_type)
 {
   Scalar prop = get_property ("barAtLineStart", 0);
   if (!now_mom ())
@@ -87,13 +87,17 @@ Bar_engraver::request_bar (String type_str)
       if (!prop.to_bool ())
        return;
     }
+  bool  bar_existed = bar_p_;
   create_bar ();
-
-  if (((type_str == "|:") && (bar_p_->type_str_ == ":|"))
-    || ((type_str == ":|") && (bar_p_->type_str_ == "|:")))
+  if (bar_existed && requested_type == "")
+    {
+      return;
+    }
+  else if (((requested_type == "|:") && (bar_p_->type_str_ == ":|"))
+    || ((requested_type == ":|") && (bar_p_->type_str_ == "|:")))
     bar_p_->type_str_ = ":|:";
-  else if (type_str_.length_i ())
-    bar_p_->type_str_ = type_str;
+  else
+    bar_p_->type_str_ = requested_type;
 }
 
 void 
index 5f5079dad550320239e4733f208a3ec4ddfc85d9..12aa5e08a0664941db2605062d04261bef060628 100644 (file)
@@ -108,13 +108,16 @@ Break_align_item::do_pre_processing()
 
   Real pre_space = elems[0]->extent (X_AXIS)[LEFT];
   Real spring_len = elems.top ()->extent (X_AXIS)[RIGHT];
+  Real stretch_distance =0.;  
   if (SCM_CAR (symbol_list) == extra_space_scm_sym)
     {
       spring_len += dists.top ();
+      stretch_distance = dists.top ();
     }
   else if (SCM_CAR (symbol_list) == minimum_space_scm_sym)
     {
       spring_len = spring_len >? dists.top ();
+      stretch_distance = spring_len;
     }
 
 
@@ -124,6 +127,10 @@ Break_align_item::do_pre_processing()
   column_l ()->set_elt_property (extra_space_scm_sym,
                                 scm_cons (gh_double2scm (pre_space),
                                           gh_double2scm (spring_len)));
+
+  column_l ()->set_elt_property (stretch_distance_scm_sym,
+                                gh_double2scm (stretch_distance));
+                                
 }
 
 
index 47d9c69c33f26bb8d9abcfd659ec97bf9115fd88..2ebfd15d4f06ab5313a04a9bb18c25efe54bce7e 100644 (file)
@@ -33,7 +33,6 @@ Column_info::Column_info (Paper_column *col_l, Real const *fixed_C)
 {
   if (fixed_C)
     fixpos_p_.set_l (fixed_C);
-  ugh_b_ = false;
   pcol_l_ = col_l;
   width_ = pcol_l_->extent(X_AXIS);
   if (width_.empty_b())
@@ -43,7 +42,6 @@ Column_info::Column_info (Paper_column *col_l, Real const *fixed_C)
 
 Column_info::Column_info()
 {
-  ugh_b_ = false;
   pcol_l_ =0;
 }
 
index 1e0a971a12152bce64c6a88e58438ed933fb4ae7..8d82c2c06d1f58c2360e0f47c6af8c4c0e75d39f 100644 (file)
@@ -15,7 +15,6 @@
 Column_x_positions::Column_x_positions()
 {
   energy_f_ = infinity_f;
-  ugh_b_ = false;
   satisfies_constraints_b_ = false;
   spacer_l_ =0;
 }
@@ -28,7 +27,7 @@ Column_x_positions::~Column_x_positions()
 void
 Column_x_positions::add_paper_column (Paper_column*c)
 {
-  cols.push (c);
+  cols_.push (c);
 }
 
 void
@@ -36,8 +35,8 @@ Column_x_positions::print() const
 {
 #ifndef NPRINT
   DOUT << "energy : " << energy_f_ << '\n';
-  DOUT << "line of " << config.size() << " cols\n";
-  Vector v (config);
+  DOUT << "line of " << config_.size() << " cols\n";
+  Vector v (config_);
   DOUT << v;
 #endif
 }
@@ -54,8 +53,7 @@ void
 Column_x_positions::set_stupid_solution(Vector v)
 {
   energy_f_ = infinity_f;
-  ugh_b_ = true;
-  config = v;
+  config_ = v;
 }
 
 void
index 284f1e83b308063b72ff938cf8c31a5ead2d1d04..cc494cfa8896f26b44de7bbad0feddf99547ef2b 100644 (file)
@@ -90,13 +90,13 @@ Gourlay_breaking::do_solve () const
            break;
            
          Column_x_positions approx;
-         approx.cols = line;
+         approx.cols_ = line;
            
          approx.spacer_l_ = generate_spacing_problem (line, 
            pscore_l_->paper_l_->line_dimensions_int (optimal_paths[start_idx].line_i_));
          spacer_p_list.append (new Killing_cons<Line_spacer> (approx.spacer_l_,0));
 
-         ( (Break_algorithm*)this)->approx_stats_.add (approx.cols);
+         ( (Break_algorithm*)this)->approx_stats_.add (approx.cols_);
          approx.approximate_solve_line ();
            
          if  (approx.energy_f_  > energy_bound_f_)
@@ -124,7 +124,7 @@ Gourlay_breaking::do_solve () const
          if (!candidate_lines[j].satisfies_constraints_b_) 
            {
              candidate_lines[j].solve_line ();
-             ( (Break_algorithm*)this)->exact_stats_.add (candidate_lines[j].cols);
+             ( (Break_algorithm*)this)->exact_stats_.add (candidate_lines[j].cols_);
            }
            
          Real this_energy 
@@ -171,7 +171,7 @@ Gourlay_breaking::do_solve () const
       assert (i > optimal_paths[i].prev_break_i_);
 
       // there was no "feasible path"
-      if (!optimal_paths[i].line_config_.config.size ()) {
+      if (!optimal_paths[i].line_config_.config_.size ()) {
        final_breaks.set_size (0);
        break;
       }
index d63c92b9ab65f3344146c75d03a6ada7408a6f42..8aea10dbc4ace847f35458621573d4214f026c15 100644 (file)
@@ -39,7 +39,7 @@ struct Column_info {
   bool ugh_b_;         
 
   Drul_array< Array<Spacer_rod> > rods_;
-  Drul_array< Array<Spacer_spring> > springs_;  
+  //  Drul_array< Array<Spacer_spring> > springs_;  
   
   Column_info();
   Column_info (Paper_column *,Real const *);
index 8b9d34b614e2ec06eeb1545f7e3a520733d6a2d1..98b808a5bb790db67507f8343a5c52f829707e59 100644 (file)
@@ -14,10 +14,9 @@ typedef Link_array<Paper_column>  Line_of_cols;
 
 struct Column_x_positions {
   Line_spacer * spacer_l_;
-  bool ugh_b_;
-  Line_of_cols error_col_l_arr_;
-  Line_of_cols cols;
-  Array<Real> config;
+  Line_of_cols cols_;
+  Array<Real> config_;
+  
   Real energy_f_;
   bool satisfies_constraints_b_;
 
index 395b277dd90524abc0e5a2cd3d6b45e163371026..33d8eda649a186e970c057124fd0946d498f4ee9 100644 (file)
@@ -8,8 +8,7 @@
 
 #ifndef LILY_GUILE_HH
 #define LILY_GUILE_HH
-// order of includes important?
-#include "config.hh"
+
 #include  "string.hh"
 
 #include <guile/gh.h>
index 25a2b8b38b2b0301f435990887ea69467be5245c..28d10c77459cf807dab07f58f9b5835f91e60e70 100644 (file)
@@ -64,6 +64,7 @@ DECLARE_LY_SYMBOL(rulesym);
 DECLARE_LY_SYMBOL(rulethickness);
 DECLARE_LY_SYMBOL(script_priority);
 DECLARE_LY_SYMBOL(staffheight);
+DECLARE_LY_SYMBOL(stretch_distance);
 DECLARE_LY_SYMBOL(style);
 DECLARE_LY_SYMBOL(text);
 DECLARE_LY_SYMBOL(transparent);
index de2d4b4aeea608b4c6386d1c10bc5280cddfdf64..354b664fb6fab29310953ebc9ac06c30a6b00c94 100644 (file)
@@ -51,11 +51,8 @@ private:
   Spring_spacer (Spring_spacer const&s);
   Cons<Idealspacing> *ideal_p_list_;
   Array<Column_info> cols_;
-  Array<Column_info> loose_col_arr_;
 
   
-  /// mark column #i# as being loose.
-  void loosen_column (int i);
   /// the index of #c# in #cols#
   int col_id (Paper_column const *c) const;
 
@@ -74,7 +71,6 @@ private:
 
 
   void handle_loose_cols();
-  void position_loose_cols (Vector &) const;
   bool try_initial_solution_and_tell (Vector&)const;
   Vector try_initial_solution() const;
 
@@ -82,7 +78,6 @@ private:
 
   Score_column* scol_l (int);
   void connect (int i,int j, Real,Real);
-  Line_of_cols error_pcol_l_arr() const;
   Real calculate_energy_f (Vector) const;
 public:
   static Line_spacer *constructor();
index be7a5e8dac47fcf806b2a81e2d3759e200ae5fe5..c53a33a9e8cc4f7f6647015f2dffa7db0e95ec03 100644 (file)
@@ -28,8 +28,8 @@ Line_of_score::contains_b (Paper_column const* c) const
 Line_of_score*
 Line_of_score::set_breaking (Array<Column_x_positions> const &breaking, int j) const
 {
-  const Link_array<Paper_column> &curline (breaking[j].cols);
-  const Array<Real> &config (breaking[j].config);
+  const Link_array<Paper_column> &curline (breaking[j].cols_);
+  const Array<Real> &config (breaking[j].config_);
   Line_of_score *line_l=0;
 
   line_l = dynamic_cast <Line_of_score*> (clone());
index e82dd2f808ba2e620eee290fcce3226c799e1c83..9dee0018d242b69fe1bada20135633585e1bfa8c 100644 (file)
@@ -490,6 +490,19 @@ Molecule
 Lookup::staff_brace (Real y, int staff_size) const
 {
   Molecule m;
+  /*
+  (define (pianobrace y staffht)
+    (let* ((step 1.0)
+          (minht (* 2 staffht))
+          (maxht (* 7 minht))
+          )
+      (string-append
+       (select-font (string-append "feta-braces" (number->string (inexact->exact staffht))) 0)
+       (char (max 0 (/  (- (min y (- maxht step)) minht) step))))
+      )
+    )
+  */
+
   
   Atom at  (gh_list (pianobrace_scm_sym,
                     gh_double2scm (y),
index 04e883c4dec46816b7019cdacf3f51e4306eaa4b..abc2f5d169a7abd77e7056e378f891d2dd9c1bff 100644 (file)
@@ -65,14 +65,15 @@ Long_option_init theopts[] = {
   {0, "warranty", 'w'},
   {0, "help", 'h'},
   {0, "test", 't'},
-  {0, "debug", 'D'},
+  {0, "debug", 'd'},
   {1, "init", 'i'},
   {1, "include", 'I'},
-  {0, "no-paper", 'M'},
-  {0, "dependencies", 'd'},
+  {0, "no-paper", 'm'},
+  {0, "dependencies", 'M'},    // like GCC
   {0, "no-timestamps", 'T'},   // why do we have this option?
   {0, "find-old-relative", 'Q'},
   {0, "ignore-version", 'V'},
+  {0, "version", 'v'},
   {1, "output-format", 'f'},
   {0, "safe", 's'},
   {0,0,0}
@@ -91,10 +92,10 @@ usage ()
     "  -a, --about            about LilyPond\n"
     );
   cout  << _ (
-    "  -D, --debug            enable debugging output\n"
+    "  -d, --debug            enable debugging output\n"
     );
   cout  << _ (
-    "  -d, --dependencies     write Makefile dependencies for every input file\n"
+    "  -M, --dependencies     write Makefile dependencies for every input file\n"
     );
   cout  << _ (
     "  -h, --help             this help\n"
@@ -109,7 +110,7 @@ usage ()
     "  -i, --init=FILE        use FILE as init file\n"
     );
   cout  << _ (
-    "  -M, --no-paper         produce midi output only\n"
+    "  -m, --no-paper         produce midi output only\n"
     );
   cout  << _ (
     "  -o, --output=FILE      set FILE as default output base\n"
@@ -322,6 +323,9 @@ main (int argc, char **argv)
     {
       switch (opt->shortname)
        {
+       case 'v':
+         exit (0);             // we print a version anyway.
+         break;
        case 't':
          experimental_features_global_b = true;
          *mlog << "*** enabling experimental features, you're on your own now ***\n";
@@ -358,13 +362,13 @@ main (int argc, char **argv)
        case 's':
          safe_global_b = true;
          break;
-       case 'd':
+       case 'M':
          dependency_global_b = true;
          break; 
-       case 'D':
+       case 'd':
          set_debug (true);
          break;
-       case 'M':
+       case 'm':
          no_paper_global_b = true;
          break;
        case 'T':
index 1860a77d82b6997e54587ed7b4bf1d21c9b48e1b..a307e1b1044b5d1d57cda128c23e98d97496db75 100644 (file)
@@ -90,19 +90,19 @@ Spacing_spanner::do_measure (int col1, int col2) const
          
          SCM hint = lc->get_elt_property (extra_space_scm_sym);
          SCM next_hint = rc->get_elt_property (extra_space_scm_sym);
-       
+         SCM stretch_hint = rc->get_elt_property (stretch_distance_scm_sym);
+           
          if (hint != SCM_BOOL_F)
            {
              hint = SCM_CDDR (hint);
              
              s.distance_f_ = gh_scm2double (hint); 
              if (!lc->musical_b ())
-               s.strength_f_ = 2.0;
+               s.strength_f_ = non_musical_space_strength; // fixed after complaints by michael krause 2.0;
            }
          else if (!lc->musical_b() && i+1 < col_count())
            {
              s.distance_f_ = default_bar_spacing (lc,rc,shortest);
-             s.strength_f_ = non_musical_space_strength; // fixed after complaints by michael krause
            }
          else if (lc->musical_b())
            {
@@ -129,7 +129,7 @@ Spacing_spanner::do_measure (int col1, int col2) const
              s.distance_f_ += correction;
            }
 
-         if (s.distance_f_ <=0)
+         if (s.distance_f_ == 0.0)
            {
              /*
                \bar "".  We give it 0 space, with high strength. 
@@ -137,6 +137,16 @@ Spacing_spanner::do_measure (int col1, int col2) const
              s.distance_f_ = 0.0 PT;
              s.strength_f_ = 20.0; 
            }
+         else if (stretch_hint != SCM_BOOL_F)
+           {
+             Real hint_sp = gh_scm2double (SCM_CDR (stretch_hint));
+             s.strength_f_ /= hint_sp;
+           }
+         else
+           {
+             s.strength_f_ /= s.distance_f_; 
+           }
+
          meas_springs.push (s);        
        }
     }
index 79ec147d692217b43943ffc4b0da2cac16544c03..9c1f6881d6e9445e3674ca8aeeae12aa8581ed53 100644 (file)
@@ -54,8 +54,6 @@ Spring_spacer::OK() const
 #ifndef NDEBUG
   for (int i = 1; i < cols_.size(); i++)
     assert (cols_[i].rank_i_ > cols_[i-1].rank_i_);
-  for (int i = 1; i < loose_col_arr_.size(); i++)
-    assert (loose_col_arr_[i].rank_i_ > loose_col_arr_[i-1].rank_i_);
 #endif
 }
 
@@ -78,72 +76,17 @@ Spring_spacer::handle_loose_cols()
   for (int i=1; i < fixed.size(); i++)
     connected.connect (fixed[i-1], fixed[i]);
 
+  /*
+    connect unconnected columns with distances of 1.0; 
+   */
   for (int i = cols_.size(); i--;)
     {
       if (! connected.equiv (fixed[0], i))
        {
-         warning (_f ("unconnected column: %d", i));
-         loosen_column (i);
+         connected.connect (i-1, i);
+         connect (i-1, i, 1.0, 1.0);
        }
     }
-  OK();
-}
-
-
-/**
-  Guess a stupid position for loose columns.  Put loose columns at
-  regular distances from enclosing calced columns
-  */
-void
-Spring_spacer::position_loose_cols (Vector &sol_vec) const
-{
-  if (!loose_col_arr_.size())
-    return ;
-  assert (sol_vec.dim());
-  Array<bool> fix_b_arr;
-  fix_b_arr.set_size (cols_.size() + loose_col_arr_.size ());
-  Real utter_right_f=-infinity_f;
-  Real utter_left_f =infinity_f;
-  for (int i=0; i < loose_col_arr_.size(); i++)
-    {
-      fix_b_arr[loose_col_arr_[i].rank_i_] = false;
-    }
-  for (int i=0; i < cols_.size(); i++)
-    {
-      int r= cols_[i].rank_i_;
-      fix_b_arr[r] = true;
-      utter_right_f = utter_right_f >? sol_vec (i);
-      utter_left_f = utter_left_f <? sol_vec (i);
-    }
-  Vector v (fix_b_arr.size());
-  int j =0;
-  int k =0;
-  for (int i=0; i < v.dim(); i++)
-    {
-      if (fix_b_arr[i])
-       {
-         assert (cols_[j].rank_i_ == i);
-         v (i) = sol_vec (j++);
-       }
-      else
-       {
-         Real left_pos_f =
-           (j>0) ?sol_vec (j-1) : utter_left_f;
-         Real right_pos_f =
-           (j < sol_vec.dim()) ? sol_vec (j) : utter_right_f;
-         int left_rank = (j>0) ? cols_[j-1].rank_i_ : 0;
-         int right_rank = (j<sol_vec.dim()) ? cols_[j].rank_i_ : sol_vec.dim ();
-
-         int d_r = right_rank - left_rank;
-         Column_info loose=loose_col_arr_[k++];
-         int r = loose.rank_i_ ;
-         assert (r > left_rank && r < right_rank);
-
-         v (i) =  (r - left_rank)*left_pos_f/ d_r +
-           (right_rank - r) *right_pos_f /d_r;
-       }
-    }
-  sol_vec = v;
 }
 
 bool
@@ -318,7 +261,7 @@ Spring_spacer::lower_bound_solution (Column_x_positions*positions) const
 
   DOUT << "Lower bound sol: " << solution_vec;
   positions->energy_f_ = calculate_energy_f (solution_vec);
-  positions->config = solution_vec;
+  positions->config_ = solution_vec;
   positions->satisfies_constraints_b_ = check_constraints (solution_vec);
 }
 
@@ -350,10 +293,8 @@ Spring_spacer::solve (Column_x_positions*positions) const
        {
          WARN << _ ("solution doesn't satisfy constraints") << '\n' ;
        }
-      position_loose_cols (solution_vec);
       positions->energy_f_ = calculate_energy_f (solution_vec);
-      positions->config = solution_vec;
-      positions->error_col_l_arr_ = error_pcol_l_arr();
+      positions->config_ = solution_vec;
     }
   else
     {
@@ -402,68 +343,13 @@ Spring_spacer::add_column (Paper_column  *col, bool fixed, Real fixpos)
        continue;
       
       if (cols_[idx].pcol_l_ != cr.other_l_)
-           continue;
-      
-      Real d  = cr.distance_f_;
-      if (fabs (d) < EPS)
-       {
-         connect (idx, this_rank, cr.distance_f_, cr.strength_f_); // large strength. 
-       }
-      else
-       connect (idx, this_rank, cr.distance_f_,
-                cr.strength_f_ / cr.distance_f_);
+       continue;
+      connect (idx, this_rank, cr.distance_f_, cr.strength_f_);
     }
       
   cols_.push (c);
 }
 
-Line_of_cols
-Spring_spacer::error_pcol_l_arr() const
-{
-  Link_array<Paper_column> retval;
-  for (int i=0; i< cols_.size(); i++)
-    if (cols_[i].ugh_b_)
-      retval.push (cols_[i].pcol_l_);
-  for (int i=0;  i < loose_col_arr_.size(); i++)
-    {
-      retval.push (loose_col_arr_[i].pcol_l_);
-    }
-  return retval;
-}
-
-/*
-  Ugh. Should junk this.
- */
-void
-Spring_spacer::loosen_column (int idx)
-{
-  Column_info c=cols_.get (idx);
-
-  Cons<Idealspacing> **pp = &ideal_p_list_;
-
-  while (*pp)
-    {
-      Idealspacing *j = (*pp)->car_;
-      if (j->cols_drul_[LEFT] == idx|| j->cols_drul_[RIGHT] == idx)
-       {
-         delete remove_cons (pp);
-       }
-      else
-       {
-         pp = &(*pp)->next_;
-       }
-    }
-  c.ugh_b_ = true;
-
-  int j=0;
-  for (; j < loose_col_arr_.size(); j++)
-    {
-      if (loose_col_arr_[j].rank_i_ > c.rank_i_)
-       break;
-    }
-  loose_col_arr_.insert (c,j);
-}
-
 
 void
 Spring_spacer::print() const
index f9c7ea8dfa5c5bcf215f42537ad2a2dbef556e34..81a407450ebc87fb7c8003e82fa83f8e1b186fe5 100644 (file)
@@ -66,13 +66,13 @@ Word_wrap::do_solve () const
          Paper_column* precol = dynamic_cast<Paper_column*>(pre);
          current.add_paper_column (precol);
 
-         current.spacer_l_ = generate_spacing_problem (current.cols, 
+         current.spacer_l_ = generate_spacing_problem (current.cols_
            pscore_l_->paper_l_->line_dimensions_int (line_no));
 
          // try to solve
-         if (!feasible (current.cols))
+         if (!feasible (current.cols_))
            {
-             if (!minimum.cols.size ())
+             if (!minimum.cols_.size ())
                {
                  warning (_ ("ugh, this measure is too long") 
                    + ", " + _f ("breakpoint: %d", break_idx) 
@@ -116,7 +116,7 @@ Word_wrap::do_solve () const
 
 
          // add nobreak version of breakable column
-         current.cols.top ()=breakpoints[break_idx];
+         current.cols_.top ()=breakpoints[break_idx];
          curcol_idx ++;
          break_idx++;
        }
index 36fe34569181b6663b971b9b310d168afd9ed27d..dfd6ca731ed93793397a4bf2e93acda6d91083f1 100644 (file)
@@ -9,8 +9,10 @@ StaffContext=\translator {
        voltaVisibility = "1";
 
        \consists "Multi_measure_rest_engraver";
-       \consists "Repeat_engraver";
        \consists "Bar_engraver";
+ % Bar_engraver must be first so default bars aren't overwritten
+% with empty ones.
+       \consists "Repeat_engraver";
        \consists "Clef_engraver";
        \consists "Key_engraver";
        \consists "Time_signature_engraver";
index ca52e36fab29b2b3a8410fe85f01cd67f46fdf95..6f606819cfa97095a27e5b5131296daf3a666d65 100644 (file)
@@ -190,8 +190,8 @@ postBreakPadding = 0.0;
 stemSpacingCorrection = 0.5*\interline;
 
 
-% relative strength of space following  time signature, 
-non_musical_space_strength = 4.0; 
+% relative strength of space following  tprefatory matter, and inline clefs.
+non_musical_space_strength = 40.0; 
 
 
 
index 369539b369ee47ac6bb3239e5b1df06e40be76b9..a8197b23005bef76e6a9f62389fb45ba853914b1 100644 (file)
@@ -1,6 +1,6 @@
 Begin3
 Titel: LilyPond
-Versie: 1.1.58
+Versie: 1.1.59
 Inschrijf datum: 14JUL99
 Beschrijving: @FLAPTEKST@
 Trefwoorden: muziek typezetten midi notatie
@@ -8,8 +8,8 @@ Auteur: hanwen@stack.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Onderhouden door: hanwen@cs.ruu.nl (Han-Wen Nienhuys)
 Voornaamste plek: sunsite.unc.edu /pub/Linux/apps
-       770k lilypond-1.1.58.tar.gz 
+       770k lilypond-1.1.59.tar.gz 
 Oorspronkelijke plek: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       770k lilypond-1.1.58.tar.gz 
+       770k lilypond-1.1.59.tar.gz 
 Copi-eer voorwaarden: GPL
 End
index 07d36ef0548521587be4e28ca07db6c6a6763acd..2041acb7ac9e1c87480256d88fd61c4e6fbc7ba0 100644 (file)
@@ -1,6 +1,6 @@
 Begin3
 Title: LilyPond
-Version: 1.1.58
+Version: 1.1.59
 Entered-date: 14JUL99
 Description: 
 
@@ -12,8 +12,8 @@ Author: hanwen@cs.ruu.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
-       770k lilypond-1.1.58.tar.gz 
+       770k lilypond-1.1.59.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       770k lilypond-1.1.58.tar.gz 
+       770k lilypond-1.1.59.tar.gz 
 Copying-policy: GPL
 End
index a6c7f5316a163645e4c3d5b5ddff06cfb869facf..9690f935a0f25d90666363452ea1da815e4f5296 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 1.1.58
+Version: 1.1.59
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.1.58.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.1.59.tar.gz
 Summary: A program for printing sheet music.
 URL: http://www.cs.uu.nl/~hanwen/lilypond
 Packager: Han-Wen Nienhuys <hanwen@cs.uu.nl>
index 139b94cfa81b2c7ce19064e0f09e57df06e28fc2..cdeca540f1671890216ef58f427285b204c4ef52 100644 (file)
    (("Clef_item"  "Span_bar") . (minimum_space 3.7))
    (("Time_signature" "Span_bar") . (minimum_space 2.0))
    (("Key_item"  "Span_bar") . (minimum_space 2.5))
-   (("Staff_bar" "Time_signature") . (minimum_space 2.0))
-   (("Time_signature" "begin-of-note") . (extra_space 1.0))    ; Huh? see twinkle.ly
+   (("Staff_bar" "Time_signature") . (minimum_space 1.5)) ;double check this.
+   (("Time_signature" "begin-of-note") . (extra_space 2.0)) ;double check this.
    (("Key_item" "begin-of-note") . (extra_space 2.5))
    (("Staff_bar" "begin-of-note") . (extra_space 1.0))
    (("Clef_item" "begin-of-note") . (minimum_space 5.0))
    )
 )
  
-
 (define (break-align-spacer this next)
   (let ((entry (assoc `(,this ,next) space-alist)))
     (if entry
   ; by executing a 0 0 moveto
        
   (define (embedded-ps s)
-    (string-append "\\special{ps: @beginspecial @setspecial " s " @endspecial}"))
+    (string-append "\\embeddedps{" s "}"))
 
   (define (end-output) 
     "\n\\EndLilyPondOutput")
 
   ;; UGH
    
-  (define (header-end) (string-append
-"\\special{!"
-"/stafflinethickness \\mudelapaperstaffline0 def " ;may we burn in hell.
-"/interline \\mudelapaperinterline0 %\n def "
-"interline 3 div /bracket_b exch def "
-"interline 2 mul /bracket_w exch def "
-"stafflinethickness 2 mul /bracket_t exch def "
-"interline 1.5 mul /bracket_v exch def "
-"bracket_v /bracket_u exch def "
-"50 /bracket_alpha exch def "
-"1 setlinecap}"))
+  (define (header-end) "\\turnOnPostScript")
 
   (define (header creator generate) 
     (string-append
                  
   (define (beam width slope thick)
     (string-append
-     (numbers->string (list width slope thick)) " draw_beam " ))
+     (numbers->string (list width slope thick)) " draw_beam" ))
 
   (define (bracket h)
     (invoke-dim1 " draw_bracket" h))
      (number->string (* 2 thick))
      " ] 0 draw_dashed_slur"))
 
-  (define (decrescendo w h cont thick)
+  (define (decrescendo thick w h cont)
     (string-append 
      (numbers->string (list w h (inexact->exact cont) thick))
      " draw_decrescendo"))
diff --git a/tex/lily-pdf-defs.tex b/tex/lily-pdf-defs.tex
new file mode 100644 (file)
index 0000000..0c15069
--- /dev/null
@@ -0,0 +1,283 @@
+% A Native PDF version of lily-ps-defs.tex, in which the language
+% features of the PS code are handled by TeX.  This takes the place of
+% lilyponddefs.ps, lily.ps, and lily-ps-defs.tex for PDFTeX.
+%
+% Note that this file will probably require changes if the lily.ps
+% file changes, which is annoying in the long run.  It might be best
+% if sometime the intelligence embodied in lily.ps could be moved up
+% to the GUILE level, so that the \embeddedps commands could consist
+% simply of moveto, lineto, curveto, fill, and stroke commands, with
+% numeric arguments.  Such a setup would allow this file to be simpler
+% and probably cause the resulting PostScript code to be faster as
+% well.
+
+% Redefine @ and _ so we can use them in definition names here.
+\catcode`\@=11
+\catcode`\_=11
+
+% Define a helper procedure for PDF coding.  This file really
+% shouldn't be read if \pdfliteral is undefined, but the alternate
+% definition is nice for testing.
+
+\ifx\pdfliteral\undefined
+  \def\LYPDF#1{\message{[ignored pdfliteral: #1]}}
+\else
+  \let\LYPDF=\pdfliteral
+\fi
+
+% Strip 'pt' off of dimensions.  Borrowed from latex.
+\begingroup
+  \catcode`P=12
+  \catcode`T=12
+  \lowercase{
+     \def\x{\def\lypdf@rempt##1.##2PT{##1\ifnum##2>\z@.##2\fi}}}
+  \expandafter\endgroup\x
+\def\lypdf@strippt{\expandafter\lypdf@rempt\the}
+
+\def\LYDIM#1{\expandafter\lypdf@strippt\dimen#1\space}
+
+\def\lypdf@correctfactor{65536}
+\def\lypdf@divcorrect#1{\multiply\dimen#1 \lypdf@correctfactor\relax}
+
+%% Stack handling.  The design for this is borrowed from supp-pdf.tex
+
+\newcount\nofLYPDFargs
+\def\@@LYPDF{@@LYPDF}
+
+% Add an argument to the `stack'
+\def\setLYPDFarg#1{
+  \advance\nofLYPDFargs by 1
+  \expandafter\def
+    \csname\@@LYPDF\the\nofLYPDFargs\endcsname
+    {#1}
+}
+
+% Get the values for stack variables.  The a form includes a closing
+% \space and is thus useful for embedding in \LYPDF macros.
+\def\gLYPDFa#1
+  {\csname\@@LYPDF#1\endcsname\space}
+\def\gLYPDFan#1
+  {\csname\@@LYPDF#1\endcsname}
+
+% Reset the stack back to normal.
+\def\resetLYPDFstack{\nofLYPDFargs=0}
+
+% A translator for \embeddedps commands.  This simply stacks up the
+% arguments and then passes the last arg to the appropriate lypdf@name
+% macro.
+
+\def\embeddedps#1{  
+  \lypdf@handleArgs#1 \\}
+
+%% Handle the argument list.  Note: when working with arrays, just
+%% keep tacking things onto a string until we get a close bracket.
+%% The various LYPDFarray... variables are used for that.
+\newif\ifLYPDFarray
+\def\LYPDFarraystart{[}
+\def\LYPDFarrayend{]}
+\def\LYPDFarraystring{}
+
+\def\lypdf@{lypdf@}
+\def\lypdf@handleArgs#1 #2\\{
+  \ifx\\#2\\% 
+    \csname\lypdf@#1\endcsname
+    \resetLYPDFstack
+  \else
+    \edef\argstring{#1}
+    \ifLYPDFarray%
+      \edef\LYPDFarraystring{\LYPDFarraystring\space\argstring}
+      \ifx\argstring\LYPDFarrayend%
+        \LYPDFarrayfalse
+        \setLYPDFarg{\LYPDFarraystring}
+      \fi
+    \else
+      \ifx\argstring\LYPDFarraystart%
+       \LYPDFarraytrue
+       \edef\LYPDFarraystring{[}
+      \else
+        \setLYPDFarg{#1}
+      \fi
+    \fi
+    \lypdf@handleArgs#2\\
+  \fi}
+
+% Here turning on PostScript sets up the bracket stuff.  This should
+% probably be called by a more generic header macro.
+\def\turnOnPostScript{\lypdf@load_bracket_dimens}%
+\def\turnOnExperimentalFeatures{}%
+
+%% TODO: lily-ps-defs sets a linecap of 1.  I'm not yet sure how to do that 
+%% for the Page Description level in PDFTeX.
+
+%% What follows are the definitions for the embeddedps commands.
+%% Notes that in general, \dimen0 and \dimen1 are the x and y
+%% positions of the cursor (used for rlineto handling), and dimen2-9
+%% are used for local dimension handling in the various commands.
+
+\def\lypdf@resetstring{\edef\lypdf@curstring{}}
+
+\def\lypdf@moveto#1#2{
+  \dimen0=#1pt
+  \dimen1=#2pt
+  \edef\lypdf@curstring{\lypdf@curstring\space\LYDIM0 \LYDIM1 m}
+}
+
+\def\lypdf@rmoveto#1#2{
+  \advance\dimen0 by #1 pt
+  \advance\dimen1 by #2 pt
+  \edef\lypdf@curstring{\lypdf@curstring\space\LYDIM0 \LYDIM1 m}
+}
+
+\def\lypdf@rlineto#1#2{
+  \advance\dimen0 by #1 pt
+  \advance\dimen1 by #2 pt
+  \edef\lypdf@curstring{\lypdf@curstring\space\LYDIM0 \LYDIM1 l}
+}
+
+\def\lypdf@draw_beam{% takes width, slope, thick
+  \dimen2=\gLYPDFa3 pt\divide\dimen2 by 2
+  \dimen3=\gLYPDFa1 pt\dimen3=\gLYPDFa2 \dimen3
+  \lypdf@resetstring
+  \lypdf@moveto{0}{-\LYDIM2}
+  \lypdf@rlineto{\gLYPDFa1}{\LYDIM3}
+  \lypdf@rlineto{0}{\gLYPDFa3}
+  \LYPDF{\lypdf@curstring\space 0 \LYDIM2 l b}
+}
+       
+\def\lypdf@draw_decrescendo{% takes width, ht, cont, thick
+  \LYPDF{\gLYPDFa4 w
+        \gLYPDFa1 \gLYPDFa3 m 0 \gLYPDFa2 l S 
+        \gLYPDFa1 -\gLYPDFa3 m 0 -\gLYPDFa2 l S}
+}
+\def\lypdf@draw_crescendo{% takes width, ht, cont, thick
+  \LYPDF{\gLYPDFa4 w
+        0 \gLYPDFa3 m \gLYPDFa1 \gLYPDFa2 l S -\gLYPDFa3 m 
+        \gLYPDFa1 -\gLYPDFa2 l S}
+}
+
+\def\lypdf@draw_tuplet{% takes height, gap, dx, dy, thickness, dir
+  \dimen2=\gLYPDFa1 pt\multiply\dimen2 by \gLYPDFa6 \relax   
+                                       % height*dir
+  \dimen3=\gLYPDFa2 pt                 % tuplet_gapx
+  \dimen0=\gLYPDFa3 pt
+  \dimen4=\gLYPDFa4 \dimen3 \divide\dimen4 by \dimen0
+      \lypdf@divcorrect4               % tuplet_gapy
+  \dimen5=\gLYPDFa3 pt \advance\dimen5 by-\dimen3
+      \divide\dimen5 by 2              % (dx-gx)/2
+  \dimen6=\gLYPDFa4 pt \advance\dimen6 by-\dimen4
+      \divide\dimen6 by 2              % (dx-gx)/2
+
+  \lypdf@resetstring
+  \lypdf@moveto{0}{0}
+  \lypdf@rlineto{0}{\LYDIM2}
+  \lypdf@rlineto{\LYDIM5}{\LYDIM6}
+  \lypdf@rmoveto{\LYDIM3}{\LYDIM4}
+  \lypdf@rlineto{\LYDIM5}{\LYDIM6}
+  \lypdf@rlineto{0}{-\LYDIM2}
+  \LYPDF{\gLYPDFa5 w 1 j 1 J \lypdf@curstring}
+}
+
+\def\lypdf@draw_volta{% takes height, width, thickness, v_start, v_end
+  \dimen2=\gLYPDFa1 pt                 % volta height
+  \ifnum\gLYPDFa4 =0
+    \edef\vstartstr{0 0 m 0 \LYDIM2 l\space}
+  \else
+    \edef\vstartstr{0 \LYDIM2 m\space}
+  \fi
+  \ifnum\gLYPDFa5 =0
+    \edef\vendstr{\gLYPDFa2 0 l\space}
+  \else
+    \edef\vendstr{}
+  \fi
+  \LYPDF{\gLYPDFa3 w 1 J 1 j \vstartstr \gLYPDFa2 \LYDIM2 l \vendstr S}
+}
+
+\def\lypdf@draw_bezier_sandwich{% sixteen coords, thickness
+  \LYPDF{\gLYPDFa17 w
+        \gLYPDFa15 \gLYPDFa16 m
+        \gLYPDFa9 \gLYPDFa10 \gLYPDFa11 \gLYPDFa12 \gLYPDFa13 \gLYPDFa14 c
+        \gLYPDFa7 \gLYPDFa8 l
+        \gLYPDFa1 \gLYPDFa2 \gLYPDFa3 \gLYPDFa4 \gLYPDFa5 \gLYPDFa6 c
+        b}}
+
+\def\lypdf@draw_dashed_slur{%
+  \LYPDF{1 J 1 j \gLYPDFa10 \gLYPDFa11 d \gLYPDFa9 w
+        \gLYPDFa1 \gLYPDFa2 m
+        \gLYPDFa3 \gLYPDFa4 \gLYPDFa5 \gLYPDFa6 \gLYPDFa7 \gLYPDFa8 c
+        S}}
+
+%% Definitions for the various dimensions used by the brackets.
+\newdimen\lypdf@interline     
+\newdimen\lypdf@bracket_b     
+\newdimen\lypdf@bracket_w     
+\newdimen\lypdf@bracket_v     
+\newdimen\lypdf@bracket_u     
+\newdimen\lypdf@bracket_t     
+
+\def\lypdf@load_bracket_dimens{
+  \lypdf@interline=\mudelapaperinterline pt
+  \lypdf@bracket_b=0.3333\lypdf@interline
+  \lypdf@bracket_w=2\lypdf@interline
+  \lypdf@bracket_v=1.5\lypdf@interline
+  \lypdf@bracket_u=\lypdf@bracket_v
+  \lypdf@bracket_t=\mudelapaperstaffline pt
+  \lypdf@bracket_t=2\lypdf@bracket_t
+  \relax
+}
+
+%alpha=50.  We calculate the sin and cos directly because TeX can't.
+\def\lypdf@bracket_sin{0.76604}%
+\def\lypdf@bracket_cos{0.64279}%
+
+\def\lypdf@draw_half_bracket{% dimen2 is the bracket height
+  \dimen3=\dimen2\advance\dimen3 by -\lypdf@bracket_t  % h - t
+
+  % Here, dimen0 and dimen1 are the end points of the bracket
+  \dimen0=\lypdf@bracket_b\relax\advance\dimen0 by \lypdf@bracket_v
+  \dimen1=\dimen3\advance\dimen1 by \lypdf@bracket_u
+
+  % bottom of half bracket and inner side
+  \edef\lypdf@halfbrack{0 0 m \lypdf@strippt\lypdf@bracket_b\space 0 l 
+       \lypdf@strippt\lypdf@bracket_b\space \LYDIM3 l}
+
+  % inner curve -- first control point is just 0.4*v to the right
+  \dimen4=\lypdf@bracket_b\advance\dimen4 by 0.4\lypdf@bracket_v
+  %  ... second point is calc'd using alpha
+  \dimen5=-0.25\lypdf@bracket_v\relax
+  \dimen6=\dimen0\advance\dimen6 by \lypdf@bracket_cos\dimen5\relax
+  \dimen7=\dimen1\advance\dimen7 by \lypdf@bracket_sin\dimen5\relax
+  % draw the curve
+  \edef\lypdf@halfbrack
+    {\lypdf@halfbrack\space\LYDIM4 \LYDIM3 \LYDIM6 \LYDIM7 \LYDIM0 \LYDIM1 c}
+
+  % outer curve -- second control point is just .5*v to the right
+  % (plus 1 pt)
+  \dimen4=0.5\lypdf@bracket_v\advance\dimen4 by 1pt
+  % ... first point is calc'd using alpha  
+  \dimen5=-0.15\lypdf@bracket_v\relax
+  \dimen6=\dimen0\advance\dimen6 by \lypdf@bracket_cos\dimen5\relax
+  \dimen7=\dimen1\advance\dimen7 by \lypdf@bracket_sin\dimen5\relax
+  % draw the curve, close, stroke, fill
+  \edef\lypdf@halfbrack
+    {\lypdf@halfbrack\space\LYDIM6 \LYDIM7 \LYDIM4 \LYDIM2 0 \LYDIM2 c b} 
+}
+
+\def\lypdf@draw_bracket{% height
+  \dimen2=\gLYPDFa1 pt \divide\dimen2 by 2
+                \advance\dimen2 by \lypdf@bracket_b\relax
+  % calculate the half bracket
+  \lypdf@draw_half_bracket
+  % set up graphics state, gsave, and flip the coord system 
+  % then draw both half brackets.
+  \LYPDF{\lypdf@strippt\lypdf@bracket_t\space w 
+       1 J 1 j q 1 0 0 -1 0 0 cm
+       \lypdf@halfbrack\space Q \lypdf@halfbrack}
+  }
+
+
+%% Clean up after ourselves.
+
+\catcode`\@=12
+\catcode`\_=8
+
+\endinput
index e94d19886979f04b6313bd9bdf116306d64c67eb..bad2bdc0a68ec1e69feea709558232b1cfac6b8f 100644 (file)
    \expandafter\special{! \includelilyps }
 }
 
+
+\def\turnOnPostScript{%
+        % This sets CTM so that you get to the currentpoint
+        % by executing a 0 0 moveto
+        \def\embeddedps##1{%
+                \special{ps: @beginspecial @setspecial ##1 @endspecial}       
+        }
+        %
+
+        \special{! 
+/stafflinethickness \mudelapaperstaffline\space def
+/interline \mudelapaperinterline\space def
+interline 3 div /bracket_b exch def
+interline 2 mul /bracket_w exch def
+stafflinethickness 2 mul /bracket_t exch def
+interline 1.5 mul /bracket_v exch def
+bracket_v /bracket_u exch def
+50 /bracket_alpha exch def
+1 setlinecap}
+}
+
+\def\turnOnExperimentalFeatures{}
+
index ada0b6442d8fffdeaf8847178d787010b4e12c6c..627e5987f05d4a77d848fca58b83fd4e250028b3 100644 (file)
 \def\interscoreline{\vskip 16pt}
 \def\placebox#1#2#3{%
         \botalign{\hbox{\raise #1\leftalign{\kern #2{}#3}}}}%
-\input lily-ps-defs
+
+% Are we using PDFTeX?  If so, use pdf definitions to translate
+% \embeddedps commands to embedded PDF.
+\ifx\pdfoutput\undefined  
+  \input lily-ps-defs
+\else
+  \pdfoutput=1
+  \input lily-pdf-defs
+\fi
+
 \def\EndLilyPondOutput{%
   \csname bye\endcsname
 }