]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.3.81 release/1.3.81
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 28 Aug 2000 09:59:46 +0000 (11:59 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 28 Aug 2000 09:59:46 +0000 (11:59 +0200)
==========

* Added property LyricVoice.associatedVoice to enable switching associated
  voice mid-stream. Association still defaults to context name.

1.3.80.h

49 files changed:
CHANGES
Documentation/faq.texi
Documentation/hacking.texi
Documentation/regression-test.tely
VERSION
input/bugs/grace-gets-slur.ly [new file with mode: 0644]
input/bugs/voice-switch.ly [new file with mode: 0644]
input/test/pushproperty.ly [new file with mode: 0644]
input/test/slur-broken-trend.ly [new file with mode: 0644]
input/test/tie-broken.ly [new file with mode: 0644]
lily/all-font-metrics.cc
lily/bar.cc
lily/beam-engraver.cc
lily/beam.cc
lily/break-align-item.cc
lily/chord-name.cc
lily/chord-tremolo-engraver.cc
lily/clef-engraver.cc
lily/dynamic-engraver.cc
lily/dynamic-performer.cc
lily/include/property-inspect.hh [deleted file]
lily/include/property-iterator.hh
lily/include/slur.hh
lily/include/translation-property.hh
lily/key-engraver.cc
lily/lily-guile.cc
lily/lookup.cc
lily/lyric-phrasing-engraver.cc
lily/main.cc
lily/music-iterator.cc
lily/my-lily-lexer.cc
lily/note-head.cc
lily/paper-outputter.cc
lily/paper-score.cc
lily/parser.yy
lily/property-iterator.cc
lily/script-engraver.cc
lily/slur-engraver.cc
lily/slur.cc
lily/stem.cc
lily/system-start-delimiter.cc
lily/tie.cc
lily/translation-property.cc [deleted file]
lily/translator.cc
ly/engraver.ly
make/out/lilypond.lsm
make/out/lilypond.spec
scm/chord-names.scm
scm/lily.scm

diff --git a/CHANGES b/CHANGES
index cea71eafa654d4bab6da9c67e649dac5226f11b5..d5564b062f9d3768c9ec1c166afc42b6f7e6571d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,7 +1,36 @@
-1.3.80.mb1
+1.3.80.gp1
 ==========
 
-* Added two faq:s
+* Added property LyricVoice.associatedVoice to enable switching associated
+  voice mid-stream. Association still defaults to context name.
+
+1.3.80.hwn1
+===========
+
+* \pushproperty, \popproperty: property settings with less memory
+cost. See input/test/pushproperty.ly and Documentation/hacking. Note:
+syntax is most likely only temporary.
+
+1.3.80.jcn1
+===========
+
+* (Line-)broken slurs now have vertical trend.
+
+* Better length for broken ties: no invisibly short ties.  Now ties may
+  collide with time signatures, though.
+
+* Don't typeset unfinished spanners, but kill them.
+
+* Added two FAQs (Mats)
+
+* Made workaround guile-1.4.1 backward incompatible (scm_)eval change.
+  Note that we must use (scm_)eval2 to remain backwards compatible with
+  guile < 1.4.1 snapshot.
+
+* Reincluded 79.jcn2 fix
+
+1.3.80
+======
 
 1.3.79.jcn5
 ===========
@@ -55,6 +84,7 @@
 
 1.3.79
 ======
+
 * etf2ly.py: Finale to LilyPond conversion.
 
 1.3.78.jcn4
@@ -2203,3 +2233,4 @@ pl 15.hwn1
 
 pl 15.jcn4
        - direct #... to scm parser  (Thanks to Gary Houston)
+
index 204e4d87779d41c1acb9e8890a1298cbfdfb5b1b..ae39d2e12bf513a5b604efd68a0562f1b29d79fc 100644 (file)
@@ -30,6 +30,14 @@ directly.
 
 Note: relative paths are meant to be relative to the source directory
 
+@subsubsection I've got a simple question, but this FAQ doesn't help!
+
+Please have a look in the searchable mail achives of
+@uref{http://www.mail-archive.com/gnu-music-discuss@@gnu.org/,
+gnu-music-discuss} and
+@uref{http://www.mail-archive.com/help-gnu-music@@gnu.org/, help-gnu-music}.
+Your question may well have been answered before.
+
 @node Installing,, ,top
 @section Installing
 
@@ -435,6 +443,21 @@ Upgrade/downgrade to 4.17.
 @node Running,, ,top
 @section Running
 
+@subsubsection LilyPond takes ages to run, what am I doing wrong?
+
+LilyPond uses a lot CPU time, and insane amounts of memory. The amount
+of memory it requires is proportional to the size of the score, in other
+words. For a moderately complex piano scores of 5 pages, the footprint
+can easily become 20 megs. (Our favorite test is the coriolan:
+approx. 100 megs for a 50 page  orchestral). If your system has not got
+enough memory, it can easily start swapping.
+
+A part of the memory is used as temporary storage, and is reclaimed
+through GUILE's garbage collection.  A way to trade in CPU time for
+storage is by decreasing the environment variable
+@var{GUILE_MAX_SEGMENT_SIZE} (default 8388608, which is 8 megs).
+
+
 @subsubsection Correcting errors is so tedious. Is there a better way?
 
 As of 1.3.73, lilypond provides support for the xdvi @code{src:}
index 8c6d9d0fffd7ae7a6a8bed4b477023ddf4d80335..c6c0ede9ae7ad4a90d786d60bf84bc3c7bde0c23 100644 (file)
@@ -2,6 +2,7 @@
 @setfilename internals.info
 @settitle LilyPond internals
 
+
 @node Top, LilyPond internals, (dir), (dir)
 @top
 
 * Overview::
 * mudela::                      
 * Request_engraver::            
-* Graphic elements::
-* Score elements::
-* Items::
-* Spanners::
-* Future work::
+* Backend::
 * Coding standards::
 * Making patches::
 * Localisation::
 @end menu
 
 @node LilyPond internals,  , Top, Top
+
 @menu
 * Overview::                      Overview
 * mudela::                        mudela
@@ -65,13 +63,6 @@ file.  A interesting and very big project is writing a GUI frontend to
 LilyPond.
 
 
-@unnumberedsubsec Website designers
-
-The current website for LilyPond is neat and simple, but it is not very
-pretty.  We would like to have a website with pretty pictures, one that
-looks appealing to new users.
-
-
 @chapter LilyPond internals
 
 
@@ -161,6 +152,8 @@ staffs.
 @node mudela, Request_engraver, Overview, Top
 @section mudela
 
+[FIXME: implementation has been generalised, so this is out of date]
+
 Most information is stored in the form of a request.  In music
 typesetting, the user might want to cram a lot more symbols on the
 paper than actually fits. To reflect this idea (the user asks more
@@ -259,12 +252,29 @@ will add the @code{Notehead} to the @code{Stem} it just created.
 To decide on merging, several engravers have been grouped. Please
 check @file{init/engraver.ly}.
 
+@node Backend, , , Top
+
+
 
+@section The backend of  LilyPond
 
-@node Graphic elements, , , Top 
-@section Graphic elements
 
 
+blah blah blah
+
+@menu
+* Graphic elements:: blah
+* Position and width Callbacks:: blah 
+* Score_element properties:: blah 
+* Score elements:: blah 
+* Items:: blah 
+* Spanners:: blah 
+* Future work:: blah 
+@end menu
+
+
+@node Graphic elements, , , Backend 
+
 Music notation is composed of a sets of interrelated glyphs.  In
 Lilypond every glyph usually is represented by one object, a so-called
 Graphic Object.  The primary relations between graphic objects involve
@@ -286,10 +296,9 @@ means that the staccato will always maintain a fixed offset wrt to the
 note head, whereever the head is moved to.
 
 In the same vein, all notes on a staff have their Y positions stored
-relative to an abstract object called Axis_group_spanner.  If the
-Axis_group_spanner of one staff is moved, the absolute Y positions of
-all objects in that spanner change along, in effect causing the staff
-and all its contents to move as a whole.
+relative to an object that groups the staff.  If that object is moved,
+the absolute Y positions of all objects in that spanner change along, in
+effect causing the staff and all its contents to move as a whole.
 
 Each graphic object stores a pointer and an relative offset for each
 direction: one for the X-axis, one for the Y-axis.  For example, the X
@@ -323,7 +332,124 @@ Graphical_axis_groups are special graphic objects, that are designed to
 function as a parent.  The size of a Graphical_axis_groups group is the
 union of its children.
 
-@node Score elements, ,  , Top
+@node Position and width Callbacks, , , Backend
+
+The positions are, as explained relative to a parent reference
+point. Most positions are not known when an object is created, so these
+are calculated as needed. This is done by adding a callback for a
+specific direction, eg
+
+@example
+        Real
+        my_translate (Score_element * ptr, Axis a)
+        @{
+                return 5.0 PT;
+        @}
+
+        [..]
+        my_element->add_offset_callback (my_translate, Y_AXIS) 
+@end example
+
+When a call is made to @code{my_element->relative_position (obj,
+Y_AXIS)}, @code{my_translate} will be called. The result is that
+my_element will be translated up by 5 pt.  There are numerous callbacks,
+for example
+@itemize @bullet
+@item to offset element by staff-spaces (See class
+@code{Staff_symbol_referencer}).
+@item to align elements next to other groups of elements (See class
+@code{Side_position_interface})
+@item to 
+@end itemize
+
+Offset callbacks can be stacked. The callbacks will be executed in the
+order that they were added.
+
+Width and height are similarly implemted using extent callbacks. There
+can be only one callback for each axis. No callback (the 0 ptr) means:
+"empty in this direction".
+
+@node Score_element properties, , , Backend
+
+Score elements can have other properties besides positioning, for
+example, text strings (for text objects) style settings, glyphs, padding
+settings (for scripts). These settings are stored in element properties.
+
+Properties are stored as GUILE association lists, with symbols as keys.
+Element properties can be accessed using the C++ functions
+
+@example
+  SCM  get_elt_property (SCM) const;
+  void set_elt_property (const char * , SCM val);
+  void set_immutable_elt_property (const char * , SCM val);
+  void set_immutable_elt_property (SCM key, SCM val);  
+  void set_elt_property (SCM , SCM val);  
+  void set_elt_pointer (const char*, SCM val);
+  SCM  remove_elt_property (const char* nm);
+@end example
+
+All lookup functions identify undefined properties with GUILE
+end-of-list (ie. @code{'()} in Scheme or @code{SCM_EOL} in C)
+
+Implementation wise, there are two kinds of properties:
+
+@itemize @bullet
+@item mutable properties:
+element properties that change from object to object. The storage of
+these are private to a Score element. Typically this is used to store
+lists of pointers to other objects
+
+@item immutable properties:
+element properties that are shared across objects. The storage is
+shared, and hence is read-only. Typically, this is used to store
+function callbacks, and values for shared element properties are read
+from @file{ly/engraver.ly}.
+
+
+
+The following is from lily 1.3.80, and it shows the settings for the bar
+numbers: Bar numbers are  breakable, and visible at the beginning of the
+line. The setting for @code{molecule-callback} indicates that Bar_number
+is implemented as a text.
+@example
+       basicBarNumberProperties = #`(
+               (molecule-callback . ,Text_item::brew_molecule)
+               (breakable . #t)
+               (visibility-lambda . ,begin-of-line-visible)
+       )
+@end example
+@end itemize
+
+
+In 1.3.81 an music expression was added to add to the immutable property
+list, eg. like this:
+
+@example
+        \pushproperty #'(basicBarNumberProperties)
+               #'visibility-lambda #end-of-line-visible
+@end example
+
+This will add the entry @code{`(visibility-lambda .
+,end-of-line-visible)} to the immutable property list for bar numbers,
+in effect overriding the setting from @file{ly/engraver.ly}. This can be
+undone as follows
+
+@example
+        \popproperty #'(basicBarNumberProperties)
+               #'visibility-lambda
+@end example
+
+Note that you must accompany these statements with a proper context
+selection in most cases.
+
+
+
+
+
+
+@node Score elements, ,  , Backend
+
+[FIXME: we want to get rid of dependencies in the implementation.]
 
 Besides relative positions there are lots of other relations between
 elements. Lilypond does not contain other specialized relation
@@ -360,7 +486,7 @@ notes, the second on the last three.
 The major derived classes of Score_element are Item and  Spanner.
 An item has one horizontal position.  A spanner hangs on two  items.
 
-@node Items, , , Top
+@node Items, , , Backend
 @section Items
 
 
@@ -394,7 +520,7 @@ other pointers) are substituted such that all dependencies point at the
 active items: either they point at the original, or they point at left
 and right.
 
-@node Spanners, , , Top
+@node Spanners, , , Backend
 @section Spanners
 
 Spanners are symbols that are of variable shape, eg. Slurs, beams, etc.
@@ -405,30 +531,25 @@ All spanners are spanned on two items, called the left and right
 boundary item.  The X reference point is the left boundary item.
 
 
-@node Future work, , , Top
+@node Future work, , , Backend
 @section Future work
 
 There are plans to unify Spanner and Item, so there will no longer be
 such a clear distinction between the two.  Right now, Score_elements are
 always either Item or either Spanner.
 
-Most of the properties of a graphic object are now member variables of
-the classes involved.  To offer configurability, we want to move these
-variables to scheme (GUILE) variables, and no longer use C++ code to
-calculate them, but use Scheme functions.
-
 @node Coding standards,  , , Top
 
-@chapter CodingStyle - standards while programming for GNU
-LilyPond
+@chapter CodingStyle - standards while programming for GNU LilyPond
 
-Functions and methods do not return errorcodes.
+Functions and methods do not return errorcodes: they never crash, but
+report a programming_error and try to carry on.q 
 
 
 @unnumberedsubsec Languages
 
-C++ and Python are preferred.  Perl is not.  Python code should use an
-indent of 8, using TAB characters.
+C++ and Python are preferred.  Perl is forbidden.  Python code should
+use an indent of 8, using TAB characters.
 
 @unnumberedsubsec Filenames
 
@@ -694,10 +815,7 @@ Use them.
 @node Making patches,  , , Top
 
 
-@unnumberedsec name
-    
-
-PATCHES - track and distribute your code changes
+@unnumberedsec  Track and distribute your code changes
 
 This page documents how to distribute your changes to GNU lilypond
     
index a22fa6376753d68397bd73a7ff5a71afc26e0569..39ae494574830da2a580e3800543d52186f4603a 100644 (file)
@@ -169,7 +169,7 @@ just after the preferatory matter, and on the right to the end of the
 staff.  A slur should follow the same vertical direction it would have
 in unbroken state.
 
-@mudelafile{slur-broken.ly}
+@mudelafile{slur-broken-trend.ly}
 
 Ties are strictly horizontal.  They are placed in between note heads.
 The horizontal middle should not overlap with a staffline.
diff --git a/VERSION b/VERSION
index 2fdcdd0a30d27d0a8f3c72466656892c7464ed6f..3284699c107968db6f7f9b24f57fc2cc8110e74a 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,8 +1,8 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
-PATCH_LEVEL=80
-MY_PATCH_LEVEL=mb1
+PATCH_LEVEL=81
+MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
diff --git a/input/bugs/grace-gets-slur.ly b/input/bugs/grace-gets-slur.ly
new file mode 100644 (file)
index 0000000..8836127
--- /dev/null
@@ -0,0 +1,11 @@
+
+\score {
+       \notes\relative c''{
+               \grace g8 g'2 ( )g
+       }
+       \paper {
+               linewidth=40.\mm;
+               indent=0.;
+       }
+}
+
diff --git a/input/bugs/voice-switch.ly b/input/bugs/voice-switch.ly
new file mode 100644 (file)
index 0000000..d515666
--- /dev/null
@@ -0,0 +1,21 @@
+\score{
+       \context Staff <
+               \context Voice=one\skip 1;
+               \context Voice=two\skip 1;
+               \context Voice=one \partcombine Voice
+                       \context Thread=one \notes\relative c'' {
+                               c2 c2
+                               c2 c2
+                       }
+                       \context Thread=two \notes\relative c'' {
+                               b2 a4 () a
+                               a2 a4 () a
+                               
+                       }
+       >
+       \paper{
+               linewidth=140.\mm;
+       }
+}
+
+
diff --git a/input/test/pushproperty.ly b/input/test/pushproperty.ly
new file mode 100644 (file)
index 0000000..7ca018f
--- /dev/null
@@ -0,0 +1,78 @@
+
+%{
+
+Look at ly/engraver.ly for inspiration on which basicXXXXProperties
+there are.
+
+Generally, you can find interesting element properties associated with
+\property in scm/generic-property.scm. For example, this file contains
+
+       (define generic-stem-properties
+         (cons 'stem-interface
+               (list
+                (list 'stemVerticalDirection dir? 'direction)
+                (list 'verticalDirection dir? 'direction)       
+                (list 'stemLength number? 'length)
+                (list 'flagStyle string? 'flag-style)
+       )))
+
+
+which means that setting \property stemVerticalDirection overrides
+setting \property verticalDirection, and that both have the effect of
+setting `direction' in Stem object. You can use \pushproperty for
+setting stem directions by doing.
+
+
+       \pushproperty #'(basicStemProperties) #'direction #1
+
+(#-1 if you want down).  
+
+Generally \pushproperty and \popproperty take precedence over
+\property, so in this example \property stemVerticalDirection will not
+work as long as you did a \pushproperty on basicStemProperties
+
+A modest amount of memory is involved each time you do a
+\pushproperty. If you do \popproperty in the right order (reversed
+from \pushproperty), then \popproperty doesn't cost memory.
+
+Correct:
+
+       \pushproperty #'(  ... ) #'symbolA #valueA
+       \pushproperty #'(  ... ) #'symbolB #valueB
+       \popproperty #'(  ... ) #'symbolB 
+       \popproperty #'(  ... ) #'symbolA 
+
+Incorrect (\popproperty costs memory):
+
+       \pushproperty #'(  ... ) #'symbolA #valueA
+       \pushproperty #'(  ... ) #'symbolB #valueB
+       \popproperty #'(  ... ) #'symbolA 
+       \popproperty #'(  ... ) #'symbolB 
+
+
+
+
+
+the syntax isn't likely to stay, so it is advisable to
+use identifiers, eg.
+
+    slursUp = \context Voice \pushproperty '(basicSlurProperties)
+           #'direction  #1
+    slursBoth = \context Voice \popproperty '(basicSlurProperties)
+
+%}
+
+\score { \notes
+\relative c' {
+       c4(
+       \context Voice \pushproperty #'(basicDotsProperties basicStemProperties
+       basicNoteColumnProperties basicScriptProperties basicTextProperties) #'direction #-1
+       ) c4 (
+       ) c4 (  
+       \context Voice \pushproperty #'(basicSlurProperties) #'direction #-1
+       ) c4 ( \context Voice  \popproperty #'(basicDotsProperties basicStemProperties
+               basicScriptProperties basicTextProperties) #'direction
+
+        ) c4  () c4 
+}
+}
diff --git a/input/test/slur-broken-trend.ly b/input/test/slur-broken-trend.ly
new file mode 100644 (file)
index 0000000..fb5cf7f
--- /dev/null
@@ -0,0 +1,13 @@
+\score{
+       \notes \relative c''{
+               e1( \break) a,
+               \time 2/4;
+               e'2( \break) a,(\break
+               a2\break
+               )e'2
+       }
+       \paper {
+               linewidth=40.\mm;
+               indent=0.;
+       }
+}
diff --git a/input/test/tie-broken.ly b/input/test/tie-broken.ly
new file mode 100644 (file)
index 0000000..166cd40
--- /dev/null
@@ -0,0 +1,17 @@
+\score{
+       \notes \relative c''{
+               c1~\break c
+               c4 c c c~\break
+               c c c c 
+
+               c1~\break
+               \time 8/8; c
+               c4 c c c~\break
+               \time 4/4;
+               c c c c 
+       }
+       \paper {
+               linewidth=40.\mm;
+               indent=0.;
+       }
+}
index 8c286e428d368b6cd569c6edb41da303dc4f32ba..d39c15bc266b0e1bbf169ff669b79d4b091b84b3 100644 (file)
@@ -153,7 +153,7 @@ All_font_metrics::find_font (String name)
   
   String def_name = default_font_sz_;
   SCM l = scm_assoc (ly_str02scm ("default"),
-                    scm_eval (ly_symbol2scm ("cmr-alist")));
+                    scm_eval2 (ly_symbol2scm ("cmr-alist"), SCM_EOL));
   
   if (l != SCM_BOOL_F)
     def_name = ly_scm2string (gh_cdr (l));
index 7eaa478b7dc6bd93aa464a9126425835e5c73b41..00625374feee98eaae8cad8a7cd328849f2715b8 100644 (file)
@@ -142,10 +142,11 @@ Bar::before_line_breaking  (SCM smob)
       if (bsd)
        {
          SCM breakdir = gh_int2scm (bsd);
-         g = scm_eval (gh_list (ly_symbol2scm ("break-barline"),
+         g = scm_eval2 (gh_list (ly_symbol2scm ("break-barline"),
                                 g,
                                 breakdir,
-                                SCM_UNDEFINED));
+                                SCM_UNDEFINED),
+                        SCM_EOL);
        }
     }
   else
index 8b404079f3c9f9f07d0bd17440a7c4ff8f471dca..a4ffe9a51930cd6d3934516bdf019f5beff39ed6 100644 (file)
@@ -200,9 +200,14 @@ Beam_engraver::do_removal_processing ()
   if (beam_p_)
     {
       prev_start_req_->origin ()->warning (_ ("unterminated beam"));
+#if 0
       finished_beam_p_ = beam_p_;
       finished_beam_info_p_ = beam_info_p_;
       typeset_beam ();
+#else
+      beam_p_->suicide ();
+      delete beam_info_p_;
+#endif
     }
 }
 
index 25fe6e901901559e2c556541f8f3f4b05189290b..a9ba9b076ed8477317ba7149b8b5775a2fd192f6 100644 (file)
@@ -125,12 +125,13 @@ Beam::get_default_dir (Score_element*me)
     } while (flip(&d) != DOWN);
   
 
-  SCM s = scm_eval (gh_list (ly_symbol2scm ("beam-dir-algorithm"),
+  SCM s = scm_eval2 (gh_list (ly_symbol2scm ("beam-dir-algorithm"),
                             ly_quote_scm (gh_cons (gh_int2scm (count[UP]),
                                                    gh_int2scm (count[DOWN]))),
                             ly_quote_scm (gh_cons (gh_int2scm (total[UP]),
                                                    gh_int2scm (total[DOWN]))),
-                            SCM_UNDEFINED));
+                            SCM_UNDEFINED),
+                    SCM_EOL);
   if (gh_number_p (s) && gh_scm2int (s))
     return to_dir (s);
   
@@ -244,7 +245,7 @@ Beam::set_stem_shorten (Score_element*m)
   int multiplicity = get_multiplicity (me);
 
   // grace stems?
-  SCM shorten = scm_eval (ly_symbol2scm ("beamed-stem-shorten"));
+  SCM shorten = scm_eval2 (ly_symbol2scm ("beamed-stem-shorten"), SCM_EOL);
 
   if (shorten == SCM_EOL)
     return;
@@ -550,7 +551,8 @@ Real
 Beam::quantise_dy_f (Score_element*me,Real dy) 
 {
   Array<Real> a;
-  for (SCM s = scm_eval (ly_symbol2scm ("beam-height-quants")); s !=SCM_EOL; s = gh_cdr (s))
+  for (SCM s = scm_eval2 (ly_symbol2scm ("beam-height-quants"), SCM_EOL);
+       s !=SCM_EOL; s = gh_cdr (s))
     a.push (gh_scm2double (gh_car (s)));
   
   if (a.size () <= 1)
@@ -580,10 +582,11 @@ Beam::quantise_y_f (Score_element*me,Real y, Real dy, int quant_dir)
   int multiplicity = get_multiplicity (me);
 
   Real staff_space = Staff_symbol_referencer::staff_space (me);
-  SCM quants = scm_eval (gh_list (ly_symbol2scm ("beam-vertical-position-quants"),
+  SCM quants = scm_eval2 (gh_list (ly_symbol2scm ("beam-vertical-position-quants"),
                                  gh_int2scm (multiplicity),
                                  gh_double2scm (dy/staff_space),
-                                 SCM_UNDEFINED));
+                                 SCM_UNDEFINED),
+                         SCM_EOL);
 
   Array<Real> a;
 
index 2c9e705117786d907d3eeac253729f83deb809e9..c325aa1aa3d134891df5f2d9b8234b9e8bd997e0 100644 (file)
@@ -107,7 +107,7 @@ Break_align_item::do_alignment (Score_element *me)
       SCM e = scm_assoc (scm_listify (current_origin,
                                      next_origin,
                                      SCM_UNDEFINED),
-                        scm_eval (ly_symbol2scm ("space-alist")));
+                        scm_eval2 (ly_symbol2scm ("space-alist"), SCM_EOL));
       
       SCM extra_space;
       if (e != SCM_BOOL_F)
index c8e8e785ac8e55a7c419476a2c0f4a74c7fe1b8c..3d786acc8182ae746c968ba96db344292d4f8278 100644 (file)
@@ -167,11 +167,12 @@ Chord_name::brew_molecule (SCM smob)
     bass = SCM_BOOL_F;
 
   SCM pitches =  sc->get_elt_property ("pitches");
-  SCM text = scm_eval (gh_list (ly_symbol2scm ("chord::user-name"),
+  SCM text = scm_eval2 (gh_list (ly_symbol2scm ("chord::user-name"),
                                style,
                                ly_quote_scm (pitches),
                                ly_quote_scm (gh_cons (inversion, bass)),
-                               SCM_UNDEFINED));
+                               SCM_UNDEFINED),
+                       SCM_EOL);
 
   return ly_text2molecule (sc, text).create_scheme ();
 }
index 63626bd0227cead1ca1466383f7e07b8f4d6b532..289ad00b2829a3d4277cb0744cc165bf283bec28 100644 (file)
@@ -113,8 +113,12 @@ Chord_tremolo_engraver::do_removal_processing ()
   if (beam_p_)
     {
       repeat_->origin ()->warning (_ ("unterminated chord tremolo"));
+#if 0
       finished_beam_p_ = beam_p_;
       typeset_beam ();
+#else
+      beam_p_->suicide ();
+#endif
     }
 }
 
index 5d287e38a8d2dee44abf0ab218d0f84023a6a6f6..df8b2eb23f843fb74452b05e021a869efad46510 100644 (file)
@@ -222,7 +222,7 @@ Clef_engraver::do_pre_move_processing()
       if(to_boolean (clef_p_->get_elt_property("non-default")))
        {
          vis = ly_symbol2scm ("all-visible");
-         vis = scm_eval (vis);
+         vis = scm_eval2 (vis, SCM_EOL);
        }
 
       if (vis)
index cfd5eae9a234c79b72bc0525074bda483c825112..c399d36f639befba1e1a1dd24576052a23b98970 100644 (file)
@@ -281,11 +281,13 @@ void
 Dynamic_engraver::do_removal_processing ()
 {
   typeset_all ();
-  
+
+#if 0  
   if (cresc_p_)
     {
       typeset_element (cresc_p_ );
       finished_cresc_p_ = cresc_p_;
+
       current_cresc_req_->origin ()->warning (_ ("unterminated (de)crescendo"));
     }
   if (line_spanner_)
@@ -293,6 +295,17 @@ Dynamic_engraver::do_removal_processing ()
       finished_line_spanner_ = line_spanner_;
     }
   typeset_all ();
+#else
+  if (cresc_p_)
+    {
+      current_cresc_req_->origin ()->warning (_ ("unterminated (de)crescendo"));
+      cresc_p_->suicide ();
+    }
+  if (line_spanner_)
+    {
+      line_spanner_->suicide ();
+    }
+#endif
 }
 
 void
index f51ae2beb67cd805e5c1b74ea83c9f6813ab9db7..3ed300021e056ac87647595b3b16706c7f9bbbaf 100644 (file)
@@ -66,12 +66,13 @@ Dynamic_performer::do_process_music ()
   if (text_script_req_l_)
     {
       
-      SCM s = scm_eval
+      SCM s = scm_eval2
        (gh_list
         (ly_symbol2scm ("dynamic-absolute-volume"),
          ly_quote_scm (ly_str02scm (text_script_req_l_->text_str_.ch_C ())),
-         SCM_UNDEFINED));
-      Real volume = gh_scm2double (scm_eval (ly_symbol2scm ("dynamic-default-volume")));
+         SCM_UNDEFINED),
+        SCM_EOL);
+      Real volume = gh_scm2double (scm_eval2 (ly_symbol2scm ("dynamic-default-volume"), SCM_EOL));
       if (gh_number_p (s))
        volume = gh_scm2double (s);
       
@@ -103,8 +104,9 @@ Dynamic_performer::do_process_music ()
            s = ly_str02scm ("piano");
          
          
-         s = scm_eval (gh_list (ly_symbol2scm ("instrument-equaliser"),
-                                s, SCM_UNDEFINED));
+         s = scm_eval2 (gh_list (ly_symbol2scm ("instrument-equaliser"),
+                                s, SCM_UNDEFINED),
+                        SCM_EOL);
          if (gh_pair_p (s))
            {
              Interval iv;
diff --git a/lily/include/property-inspect.hh b/lily/include/property-inspect.hh
deleted file mode 100644 (file)
index e591256..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/*   
-  property-inspect.hh -- declare various property related funcs.
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#ifndef PROPERTY_INSPECT_HH
-#define PROPERTY_INSPECT_HH
-
-#include "direction.hh"
-#include "lily-guile.hh"
-
-
-#endif /* PROPERTY_INSPECT_HH */
-
index f60632a9e8b584edadfc6858140916478dc6f892..7591fce27748d4e7e510af6bf88ec8a510031741 100644 (file)
 #define PROPERTY_ITERATOR_HH
 
 #include "music-iterator.hh"
+
+
+
+
 /**
   Iterate a property.  
  */
@@ -22,4 +26,17 @@ protected:
   virtual void do_process_and_next (Moment);
 };
 
+class Push_property_iterator : public Music_iterator
+{
+protected:
+  virtual void do_process_and_next (Moment);
+};
+
+class Pop_property_iterator : public Music_iterator
+{
+protected:
+  virtual void do_process_and_next (Moment);
+};
+
+
 #endif // PROPERTY_ITERATOR_HH
index 83d0900834b88ba1306d92a903a0d1646b6daa24..abc1b55b33d9b07e79084d10cec1955a7dd660db 100644 (file)
@@ -24,6 +24,8 @@ public:
   static SCM after_line_breaking (SCM);
   static SCM set_spacing_rods (SCM);
 private:  
+  static Real get_first_notecolumn_y (Score_element *me, Direction dir);
+  static Offset broken_trend_offset (Score_element *me, Direction dir);
   static Offset get_attachment (Score_element*me,Direction dir, Score_element**common) ;
   static void de_uglyfy (Score_element*me,Slur_bezier_bow* bb, Real default_height);
   static void set_extremities (Score_element*me);
index ffb2968a2967d98c039def18451b14f642131dd2..0b887470fc4d418729cf4bec0a70fc4073f44f5a 100644 (file)
@@ -26,4 +26,32 @@ public:
   VIRTUAL_COPY_CONS(Music);
 };
 
+/**
+   Push onto basic property list.
+   
+  symbols -- list of basic-property lists
+
+  element-property -- element property name
+
+  element-value -- element property value
+  
+ */
+class Push_translation_property : public Music
+{
+public:
+};
+
+/**
+  Restore previous setting.
+
+  symbols -- list of basic-property lists
+
+  element-property -- element property name
+ */
+class Pop_translation_property : public Music
+{
+public:
+};
+
+
 #endif // PROPERTY_HH
index 9f1b66d1a6822835e3a121080ea387197a36ec01..f19ddf1c1f78f34cb8d371c1c87a72ddc171008a 100644 (file)
@@ -78,7 +78,8 @@ Key_engraver::create_key (bool def)
 
   if (!def)
     item_p_->set_elt_property ("visibility-lambda",
-                              scm_eval (ly_symbol2scm  ("all-visible")));
+                              scm_eval2 (ly_symbol2scm  ("all-visible"),
+                                         SCM_EOL));
 
 }      
 
index 7877d3674f47e0aa274b773508eb424bf4d52ca2..325517061f1462385cbae071ea1ec6b60493cbb8 100644 (file)
@@ -45,7 +45,7 @@ ly_parse_scm (char const* s, int* n)
 {
   SCM str = gh_str02scm ((char*)s);
   SCM port = scm_mkstrport (SCM_INUM0, str, SCM_OPN | SCM_RDNG,
-                            "scm_eval_0str");
+                            "ly_eval_scm_0str");
   SCM from = scm_ftell (port);
 
   SCM form;
@@ -53,7 +53,7 @@ ly_parse_scm (char const* s, int* n)
 
   /* Read expression from port */
   if (!SCM_EOF_OBJECT_P (form = scm_read (port)))
-    answer = scm_eval_x (form);
+    answer = scm_eval_3 (form, 1, SCM_EOL);
 
   /*
    After parsing
index a6c24eddd35692b5f4f5b328090fd4d2806d00af..ab81aa4284d499048da21d6281e3d2c2dad99573 100644 (file)
@@ -267,7 +267,7 @@ Lookup::text (String style, String text, Paper_def *paper_l)
     }
 
   SCM l = scm_assoc (ly_str02scm (style.ch_C()),
-                    scm_eval (ly_symbol2scm ("cmr-alist")));
+                    scm_eval2 (ly_symbol2scm ("cmr-alist"), SCM_EOL));
 
   if (l != SCM_BOOL_F)
     {
index 5778517c6885d8b20db039057337f2e8d6524cda..c17f9ce5154aae60111f44c158e83e4a6b0b411d 100644 (file)
@@ -161,9 +161,16 @@ Lyric_phrasing_engraver::acknowledge_element(Score_element_info i)
   if (h->has_interface (ly_symbol2scm ("lyric-syllable-interface"))) {
 
     /* what's its LyricVoice context name? */
-    String lyric_voice_context_id = 
-      get_context_id(i.origin_trans_l_->daddy_trans_l_, "LyricVoice");
-    record_lyric(trim_suffix(lyric_voice_context_id), h);
+    String voice_context_id;
+    SCM voice_context_scm = i.origin_trans_l_->get_property("associatedVoice");
+    if (gh_string_p (voice_context_scm)) {
+      voice_context_id = ly_scm2string(voice_context_scm);
+    }
+    else {
+      voice_context_id = get_context_id(i.origin_trans_l_->daddy_trans_l_, "LyricVoice");
+      voice_context_id = trim_suffix(voice_context_id);
+    }
+    record_lyric(voice_context_id, h);
     return;
   }
 
@@ -481,7 +488,6 @@ Syllable_group::adjust_melisma_align()
       break;
     }
     group_translation_f_ += translation;
-    printf(" now %f.\n",float(group_translation_f_));
     for(int l = 0; l < lyric_list_.size(); l++) {
       lyric_list_[l]->translate_axis (translation, X_AXIS);
     }
index 3a8c8fcf5a33e8e9ec7bf827d25b82b99840400a..c1d6d6e6abf35264691649f3684979d1a4dde735 100644 (file)
@@ -326,10 +326,12 @@ main (int argc, char **argv)
   setup_paths ();
 
   /*
-    prepare guile for heavy mem usage. 
+    prepare guile for heavy mem usage.
+
+    putenv is POSIX, setenv is BSD 4.3
    */
-  setenv ("GUILE_INIT_SEGMENT_SIZE_1", "4194304", 0);
-  setenv ("GUILE_MAX_SEGMENT_SIZE", "8388608", 0);
+  putenv ("GUILE_INIT_SEGMENT_SIZE_1=4194304");
+  putenv ("GUILE_MAX_SEGMENT_SIZE=8388608");
 
 #if KPATHSEA && HAVE_KPATHSEA_KPATHSEA_H
   /*
index 9e88aeb12b1a7c6e0bc7f94a08233fc1f1752733..bfa597527b0dd5464fdf5cd82f5bc5bc1ad27457 100644 (file)
@@ -142,6 +142,10 @@ Music_iterator::static_get_iterator_p (Music  *m)
     p = new Property_iterator;
   else if (dynamic_cast<Change_translator   *> (m))
     p = new Change_iterator;
+  else if (dynamic_cast<Push_translation_property*>(m))
+    p = new Push_property_iterator;
+  else if (dynamic_cast<Pop_translation_property*>(m))
+    p = new Pop_property_iterator;
   else if (dynamic_cast<Time_scaled_music   *> (m))
     p = new Time_scaled_music_iterator;
   else if (dynamic_cast<Grace_music *> (m))
index 7bc2a0b54b49da1a2aefabae72379ca779ea8d95..6fe78ea1ccd69bb0ee649461818d647cf1ea9ba3 100644 (file)
@@ -58,6 +58,8 @@ static Keyword_ent the_key_tab[]={
   {"notenames", NOTENAMES},
   {"notes", NOTES},
   {"outputproperty", OUTPUTPROPERTY},
+  {"pushproperty", PUSHPROPERTY},
+  {"popproperty", POPPROPERTY},
   {"partial", PARTIAL},
   {"paper", PAPER},
   {"penalty", PENALTY},
index 505b75deb0fe8228c56a35ab17ab7aff0a9db121..71c7889a95685c83fca9150194dfe7d29190c9f5 100644 (file)
@@ -74,10 +74,11 @@ Note_head::brew_molecule (SCM smob)
 
   // ugh: use gh_call ()
   Molecule out = me->lookup_l()->afm_find (String ("noteheads-") + 
-               ly_scm2string (scm_eval (gh_list (ly_symbol2scm("find-notehead-symbol"),
+               ly_scm2string (scm_eval2 (gh_list (ly_symbol2scm("find-notehead-symbol"),
                                                  me->get_elt_property ("duration-log"),
                                                  ly_quote_scm(style),
-                                                 SCM_UNDEFINED))));
+                                                 SCM_UNDEFINED),
+                                         SCM_EOL)));
 
   if (streepjes_i) 
     {
index 39d1b49c0edccbce6fa06c66991e3417e3745de7..0a9cbd2fc53912a228975f389a5401fa2db4a216 100644 (file)
@@ -74,8 +74,8 @@ Paper_outputter::output_header ()
   SCM exp = gh_list (ly_symbol2scm ((String (output_global_ch) + "-scm").ch_C()),
                     ly_quote_scm (ly_symbol2scm ("all-definitions")),
                     SCM_UNDEFINED);
-  exp = scm_eval (exp);
-  scm_eval (exp);
+  exp = scm_eval2 (exp, SCM_EOL);
+  scm_eval2 (exp, SCM_EOL);
   
   String creator;
   if (no_timestamps_global_b)
@@ -137,14 +137,15 @@ Paper_outputter::dump_scheme (SCM s)
 {
   if  (verbatim_scheme_b_)
     {
-      SCM result =  scm_eval (scm_listify (ly_symbol2scm ("scm->string"),
-                                          ly_quote_scm (gh_car (s)), SCM_UNDEFINED));
+      SCM result =  scm_eval2 (scm_listify (ly_symbol2scm ("scm->string"),
+                                          ly_quote_scm (gh_car (s)), SCM_UNDEFINED),
+                              SCM_EOL);
          
       *stream_p_ << ly_scm2string (result);
     }
   else
     {
-      SCM result = scm_eval (s);
+      SCM result = scm_eval2 (s, SCM_EOL);
       char *c=gh_scm2newstr (result, NULL);
   
       *stream_p_ << c;
index 9c13a867eacf3556eac97c61bdce22f09d745e5d..508d93f24c303d3e9b267bd535a5dbfc93bfd176 100644 (file)
@@ -125,7 +125,11 @@ Paper_score::process ()
   scm = gh_list (ly_symbol2scm ("end-output"), SCM_UNDEFINED);
   outputter_l_->output_scheme (scm);
 
+  progress_indication ("\n");
   // huh?
   delete outputter_l_;
   outputter_l_ = 0;
+
+  if (verbose_global_b)
+    ly_display_scm (scm_gc_stats ()); 
 }
index 03ecf130d17297707b65d72610d8ada149d96b58..bb7b882e36dc261637d8eb36c9ce13cde659a94a 100644 (file)
@@ -165,6 +165,7 @@ yylex (YYSTYPE *s,  void * v_l)
 %token PARTIAL
 %token PENALTY
 %token PROPERTY
+%token PUSHPROPERTY POPPROPERTY
 %token PT_T
 %token RELATIVE
 %token REMOVE
@@ -681,6 +682,17 @@ Simple_music:
        }
        | MUSIC_IDENTIFIER { $$ = unsmob_music ($1)->clone (); }
        | property_def
+       | PUSHPROPERTY embedded_scm embedded_scm embedded_scm {
+               $$ = new Push_translation_property;
+               $$->set_mus_property ("symbols", $2);
+               $$->set_mus_property ("element-property", $3);
+               $$->set_mus_property ("element-value", $4);
+       }
+       | POPPROPERTY  embedded_scm embedded_scm {
+               $$ = new Pop_translation_property;
+               $$->set_mus_property ("symbols", $2);
+               $$->set_mus_property ("element-property", $3);
+       }
        | translator_change
        | Simple_music '*' bare_unsigned '/' bare_unsigned      {
                $$ = $1;
index 9f47bce0d19037c13006ad47baee2304c71b9b05..0e50832e64a7d55013b491b3366e171c7cab123d 100644 (file)
 void
 Property_iterator::do_process_and_next (Moment m)
 {
-  Translation_property * prop = dynamic_cast<Translation_property *> (music_l_);
-  SCM sym = prop->get_mus_property ("symbol");
+  SCM sym = music_l_->get_mus_property ("symbol");
   if (gh_symbol_p(sym))
-    report_to_l ()->set_property (sym, prop->get_mus_property ("value"));
+    report_to_l ()->set_property (sym, music_l_->get_mus_property ("value"));
   Music_iterator::do_process_and_next (m);
 }
 
+
+void
+Push_property_iterator::do_process_and_next (Moment m)
+{
+  SCM syms = music_l_->get_mus_property ("symbols");
+  SCM  eprop = music_l_->get_mus_property ("element-property");
+  SCM val = music_l_->get_mus_property ("element-value");
+
+  for (SCM s = syms; gh_pair_p (s); s = gh_cdr (s))
+    {
+      SCM sym = gh_car (s);
+      if (gh_symbol_p(sym))
+      {
+       SCM prev = report_to_l ()->get_property (sym);
+
+       prev = gh_cons (gh_cons (eprop, val), prev);
+       report_to_l ()->set_property (gh_car (s), prev);
+      }
+    }
+  Music_iterator::do_process_and_next (m);
+}
+
+void
+Pop_property_iterator::do_process_and_next (Moment m)
+{
+  SCM syms = music_l_->get_mus_property ("symbols");
+  SCM eprop = music_l_->get_mus_property ("element-property");
+  for (SCM s = syms; gh_pair_p (s); s = gh_cdr (s)) 
+    {
+    SCM sym = gh_car (s);
+    if (gh_symbol_p(sym))
+      {
+       SCM prev = report_to_l ()->get_property (sym);
+
+       SCM newprops= SCM_EOL ;
+       while (gh_pair_p (prev) && gh_caar (prev) != eprop)
+         {
+           newprops = gh_cons (gh_car (prev), newprops);
+           prev = gh_cdr (prev);
+         }
+
+       newprops = scm_reverse_x (newprops, gh_cdr (prev));
+       report_to_l ()->set_property (sym, newprops);
+      }
+    }
+  Music_iterator::do_process_and_next (m);
+}
index 3f47d8f7142715cd294bb8e14905a6531ce97851..bac852ce5582402b1310f26d5e05ffaa51e018c7 100644 (file)
@@ -58,7 +58,8 @@ Script_engraver::do_process_music()
       Articulation_req* l=script_req_l_arr_[i];
 
       SCM list = scm_assoc (ly_str02scm (l->articulation_str_.ch_C ()),
-                           scm_eval (ly_symbol2scm ("script-alist")));
+                           scm_eval2 (ly_symbol2scm ("script-alist"),
+                                      SCM_EOL));
       
       if (list == SCM_BOOL_F)
        {
index 839b64649a6910a9e4399f11f4c9c62d139797d5..2acdd0d99d079f39773dd0b781f1e36886b54bf0 100644 (file)
@@ -71,7 +71,14 @@ Slur_engraver::do_removal_processing ()
 {
   for (int i = 0; i < slur_l_stack_.size (); i++)
     {
+#if 0
       typeset_element (slur_l_stack_[i]);
+#else
+      /*
+       Let's not typeset unterminated stuff
+       */
+      slur_l_stack_[i]->suicide ();
+#endif     
     }
   slur_l_stack_.clear ();
   SCM wg = get_property ("weAreGraceContext");
@@ -94,8 +101,8 @@ Slur_engraver::do_process_music ()
       if (slur_req_l->span_dir_ == STOP)
        {
          if (slur_l_stack_.empty ())
-
-           slur_req_l->origin ()->warning (_f ("can't find both ends of %s", _ ("slur")));
+           slur_req_l->origin ()->warning (_f ("can't find start of %s",
+                                               _ ("slur")));
          else
            {
              Score_element* slur = slur_l_stack_.pop ();
index 4b6a9e081c93a0eb78467037297cfe564cd72f0d..e59f5fdf0362bedc9272accfa81fcb674dd5bfb1 100644 (file)
@@ -104,54 +104,6 @@ Slur::get_default_dir (Score_element*me)
 }
 
 
-
-
-
-Offset
-Slur::encompass_offset (Score_element*me,
-                       Score_element* col,
-                       Score_element **common) 
-{
-  Offset o;
-  Score_element* stem_l = unsmob_element (col->get_elt_property ("stem"));
-  
-  Direction dir = Directional_element_interface (me).get ();
-  
-  if (!stem_l)
-    {
-      warning (_ ("Slur over rest?"));
-      o[X_AXIS] = col->relative_coordinate (common[X_AXIS], X_AXIS);
-      o[Y_AXIS] = col->relative_coordinate (common[Y_AXIS], Y_AXIS);
-      return o;  
-    }
-  Direction stem_dir = Directional_element_interface (stem_l).get ();
-  o[X_AXIS] = stem_l->relative_coordinate (0, X_AXIS);
-
-  /*
-    Simply set x to middle of notehead
-   */
-
-  o[X_AXIS] -= 0.5 * stem_dir * col->extent (X_AXIS).length ();
-
-  if ((stem_dir == dir)
-      && !stem_l->extent (Y_AXIS).empty_b ())
-    {
-      o[Y_AXIS] = stem_l->relative_coordinate (common[Y_AXIS], Y_AXIS); // iuhg
-      o[Y_AXIS] += stem_l->extent (Y_AXIS)[dir];
-    }
-  else
-    {
-      o[Y_AXIS] = col->relative_coordinate (common[Y_AXIS], Y_AXIS);   // ugh
-      o[Y_AXIS] += col->extent (Y_AXIS)[dir];
-    }
-
-  /*
-   leave a gap: slur mustn't touch head/stem
-   */
-  o[Y_AXIS] += dir * me->paper_l ()->get_var ("slur_y_free");
-  return o;
-}
-
 MAKE_SCHEME_CALLBACK (Slur, after_line_breaking);
 SCM
 Slur::after_line_breaking (SCM smob)
@@ -180,7 +132,8 @@ Slur::set_extremities (Score_element*me)
        {
          
          // for (SCM s = get_elt_property ("slur-extremity-rules"); s != SCM_EOL; s = gh_cdr (s))
-         for (SCM s = scm_eval (ly_symbol2scm ("slur-extremity-rules"));
+         for (SCM s = scm_eval2 (ly_symbol2scm ("slur-extremity-rules"),
+                                 SCM_EOL);
               s != SCM_EOL; s = gh_cdr (s))
            {
              SCM r = gh_call2 (gh_caar (s), me->self_scm (),
@@ -197,13 +150,75 @@ Slur::set_extremities (Score_element*me)
   while (flip (&dir) != LEFT);
 }
 
+Real
+Slur::get_first_notecolumn_y (Score_element *me, Direction dir)
+{
+  Score_element *col = dir == LEFT
+    ? unsmob_element (gh_car (scm_reverse (me->get_elt_property
+                                          ("note-columns"))))
+    : unsmob_element
+    (gh_car (me->get_elt_property ("note-columns")));
+  
+  Score_element *common[] =
+  {
+    0,
+    me->common_refpoint (col, Y_AXIS)
+  };
+  Real y;
+  if (col == ((Spanner*)me)->get_bound (dir))
+    {
+      y = get_attachment (me, dir, common)[Y_AXIS];
+    }
+  else
+    {
+      y = encompass_offset (me, col, common)[Y_AXIS]
+       - me->relative_coordinate (common[Y_AXIS], Y_AXIS); 
+    }
+  return y;
+}
+
+Offset
+Slur::broken_trend_offset (Score_element *me, Direction dir)
+{
+  /*
+    A broken slur should maintain the same vertical trend
+    the unbroken slur would have had.
+  */
+  Offset o;
+  if (Spanner *mother =  dynamic_cast<Spanner*> (me->original_l_))
+    {
+      for (int i = dir == LEFT ? 0 : mother->broken_into_l_arr_.size ();
+          dir == LEFT ? i < mother->broken_into_l_arr_.size () : i;
+          dir == LEFT ? i++ : --i)
+       {
+         if (mother->broken_into_l_arr_[i - dir] == me)
+           {
+             Score_element *neighbour = mother->broken_into_l_arr_[i];
+             if (dir == RIGHT)
+               neighbour->set_elt_property ("direction",
+                                            me->get_elt_property ("direction"));
+             Real neighbour_y = get_first_notecolumn_y (neighbour, dir);
+             Real y = get_first_notecolumn_y (me, -dir);
+             o = Offset (0, (y + neighbour_y) / 2);
+             break;
+           }
+       }
+    }
+  return o;
+}
+
 Offset
 Slur::get_attachment (Score_element*me,Direction dir,
                      Score_element **common) 
 {
-  Spanner*sp = dynamic_cast<Spanner*>(me);
   SCM s = me->get_elt_property ("attachment");
+  if (!gh_symbol_p (index_cell (s, dir)))
+    {
+      set_extremities (me);
+      s = me->get_elt_property ("attachment");
+    }
   SCM a = dir == LEFT ? gh_car (s) : gh_cdr (s);
+  Spanner*sp = dynamic_cast<Spanner*>(me);
   String str = ly_symbol2string (a);
   Real ss = Staff_symbol_referencer::staff_space ((Score_element*)me);
   Real hs = ss / 2.0;
@@ -255,8 +270,18 @@ Slur::get_attachment (Score_element*me,Direction dir,
       SCM other_a = dir == LEFT ? gh_cdr (s) : gh_car (s);
       if (ly_symbol2string (other_a) != "loose-end")
        {
+#if 0
+         /*
+           The braindead way: horizontal
+         */
          o = Offset (0, get_attachment (me, -dir, common)[Y_AXIS]);
+#else
+         o = broken_trend_offset (me, dir);
+#endif
+
+         
        }
+       
     }
          
   SCM l = scm_assoc
@@ -264,7 +289,7 @@ Slur::get_attachment (Score_element*me,Direction dir,
                  gh_int2scm (stem ? Stem::get_direction (stem) : 1 * dir),
                  gh_int2scm (Directional_element_interface (me).get () * dir),
                  SCM_UNDEFINED),
-     scm_eval (ly_symbol2scm ("slur-extremity-offset-alist")));
+     scm_eval2 (ly_symbol2scm ("slur-extremity-offset-alist"), SCM_EOL));
   
   if (l != SCM_BOOL_F)
     {
@@ -284,6 +309,51 @@ Slur::get_attachment (Score_element*me,Direction dir,
   return o;
 }
 
+Offset
+Slur::encompass_offset (Score_element*me,
+                       Score_element* col,
+                       Score_element **common) 
+{
+  Offset o;
+  Score_element* stem_l = unsmob_element (col->get_elt_property ("stem"));
+  
+  Direction dir = Directional_element_interface (me).get ();
+  
+  if (!stem_l)
+    {
+      warning (_ ("Slur over rest?"));
+      o[X_AXIS] = col->relative_coordinate (common[X_AXIS], X_AXIS);
+      o[Y_AXIS] = col->relative_coordinate (common[Y_AXIS], Y_AXIS);
+      return o;  
+    }
+  Direction stem_dir = Directional_element_interface (stem_l).get ();
+  o[X_AXIS] = stem_l->relative_coordinate (0, X_AXIS);
+
+  /*
+    Simply set x to middle of notehead
+   */
+
+  o[X_AXIS] -= 0.5 * stem_dir * col->extent (X_AXIS).length ();
+
+  if ((stem_dir == dir)
+      && !stem_l->extent (Y_AXIS).empty_b ())
+    {
+      o[Y_AXIS] = stem_l->relative_coordinate (common[Y_AXIS], Y_AXIS); // iuhg
+      o[Y_AXIS] += stem_l->extent (Y_AXIS)[dir];
+    }
+  else
+    {
+      o[Y_AXIS] = col->relative_coordinate (common[Y_AXIS], Y_AXIS);   // ugh
+      o[Y_AXIS] += col->extent (Y_AXIS)[dir];
+    }
+
+  /*
+   leave a gap: slur mustn't touch head/stem
+   */
+  o[Y_AXIS] += dir * me->paper_l ()->get_var ("slur_y_free");
+  return o;
+}
+
 Array<Offset>
 Slur::get_encompass_offset_arr (Score_element*me) 
 {
index 9332b6532d515b313947d1107719c438c44d69d2..36f9c467933e0339f19de4f153b66890da4d50de 100644 (file)
@@ -260,7 +260,8 @@ Stem::get_default_stem_end_position (Score_element*me)
     }
   else
     {
-      s = scm_eval (ly_symbol2scm ((type_str + "stem-length").ch_C()));
+      s = scm_eval2 (ly_symbol2scm ((type_str + "stem-length").ch_C()),
+                    SCM_EOL);
       for (SCM q = s; q != SCM_EOL; q = gh_cdr (q))
        a.push (gh_scm2double (gh_car (q)));
                
@@ -270,7 +271,8 @@ Stem::get_default_stem_end_position (Score_element*me)
 
 
   a.clear ();
-  s = scm_eval (ly_symbol2scm ((type_str + "stem-shorten").ch_C()));
+  s = scm_eval2 (ly_symbol2scm ((type_str + "stem-shorten").ch_C()),
+                SCM_EOL);
   for (SCM q = s; q != SCM_EOL; q = gh_cdr (q))
     a.push (gh_scm2double (gh_car (q)));
 
@@ -547,14 +549,15 @@ Stem::calc_stem_info (Score_element*me)
   SCM s;
   String type_str = grace_b ? "grace-" : "";
   
-  s = scm_eval (ly_symbol2scm ((type_str + "beamed-stem-minimum-length").ch_C()));
+  s = scm_eval2 (ly_symbol2scm ((type_str + "beamed-stem-minimum-length").ch_C()), SCM_EOL);
   a.clear ();
   for (SCM q = s; q != SCM_EOL; q = gh_cdr (q))
     a.push (gh_scm2double (gh_car (q)));
 
 
   Real minimum_length = a[multiplicity <? (a.size () - 1)] * staff_space;
-  s = scm_eval (ly_symbol2scm ((type_str + "beamed-stem-length").ch_C()));
+  s = scm_eval2 (ly_symbol2scm ((type_str + "beamed-stem-length").ch_C()),
+                SCM_EOL);
 
   a.clear();
   for (SCM q = s; q != SCM_EOL; q = gh_cdr (q))
index ae4be7d551b757dbc0443b544c4a433fa3c2fa88..95ae1c7a6ffe68374c222a70b534a970fc913c60 100644 (file)
@@ -135,7 +135,7 @@ System_start_delimiter::staff_brace (Score_element*me,Real y)
   idx = idx >? 0;
 
   SCM l = scm_assoc (ly_str02scm ("brace"),
-                    scm_eval (ly_symbol2scm ("cmr-alist")));
+                    scm_eval2 (ly_symbol2scm ("cmr-alist"), SCM_EOL));
   
   String nm = "feta-braces";
   if (l != SCM_BOOL_F)
index 2b214131b1f4d5f4ee03169d1bfa4a0b5ac7d24f..9c7b70ff33dc8aba2b19d3909e092f4b04a024d2 100644 (file)
@@ -20,6 +20,7 @@
 #include "molecule.hh"
 #include "bezier-bow.hh"
 #include "stem.hh"
+#include "note-head.hh"
 
 /*
   tie: Connect two noteheads.
@@ -130,13 +131,37 @@ Tie::get_control_points (SCM smob)
   
   Score_element* l = me->get_bound (LEFT);
   Score_element* r = me->get_bound (RIGHT);  
-  Real width = r->relative_coordinate (commonx, X_AXIS)
-    + r->extent (X_AXIS)[LEFT]
-    - l->relative_coordinate (commonx, X_AXIS)
-    - l->extent (X_AXIS)[RIGHT]
-    -2* x_gap_f;
 
-  Real left_x = l->extent (X_AXIS)[RIGHT] + x_gap_f;
+  Real left_x;
+  if (Note_head::has_interface (me->get_bound (LEFT)))
+    left_x = l->extent (X_AXIS)[RIGHT] + x_gap_f;
+  else
+    left_x = l->extent (X_AXIS).length () / 2;
+
+  Real width;
+  if (Note_head::has_interface (me->get_bound (LEFT))
+      && Note_head::has_interface (me->get_bound (RIGHT)))
+    {
+      width = r->relative_coordinate (commonx, X_AXIS)
+       + r->extent (X_AXIS)[LEFT]
+       - l->relative_coordinate (commonx, X_AXIS)
+       - l->extent (X_AXIS)[RIGHT]
+       -2 * x_gap_f;
+    }
+  else
+    {
+      if (Note_head::has_interface (me->get_bound (LEFT)))
+       width = r->relative_coordinate (commonx, X_AXIS)
+         - l->relative_coordinate (commonx, X_AXIS)
+         - l->extent (X_AXIS)[RIGHT]
+         - 2 * x_gap_f;
+      else
+       width = r->relative_coordinate (commonx, X_AXIS)
+         - l->extent (X_AXIS).length () / 2
+         + r->extent (X_AXIS)[LEFT]
+         - l->relative_coordinate (commonx, X_AXIS)
+         - 2 * x_gap_f;
+    }
   
   Direction dir = Directional_element_interface (me).get();
   
diff --git a/lily/translation-property.cc b/lily/translation-property.cc
deleted file mode 100644 (file)
index cdd2579..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-  translation-property.cc -- implement Translation_property
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "translation-property.hh"
-#include "debug.hh"
-
-
-
index 579deaad472d4675736a4234d95e738814f1312d..68db603831d8396abbec3acb0d4955e63980b68c 100644 (file)
@@ -175,15 +175,27 @@ Translator::get_property (SCM sym) const
   return daddy_trans_l_->get_property (sym);
 }
 
-
-
 void
-Translator:: do_pre_move_processing(){}
+Translator:: do_pre_move_processing ()
+{
+}
+
 void
-Translator::do_post_move_processing(){}
+Translator::do_post_move_processing ()
+{
+}
+
 void
-Translator::do_process_music () {}
+Translator::do_process_music ()
+{
+}
+
 void
-Translator::do_creation_processing() {}
+Translator::do_creation_processing ()
+{
+}
+
 void
-Translator::do_removal_processing(){}
+Translator::do_removal_processing ()
+{
+}
index c4e4214931a0cc7d229d9f9e98429b7ce80d3337..0d1408d4c1856f8430bd01bb8bd0205f5c623a99 100644 (file)
@@ -148,6 +148,7 @@ VoiceContext = \translator {
        \consists "A2_engraver";
        \consists "Voice_devnull_engraver";
 
+       % ugh :  set these in Score context, please.
        startSustain = #"Ped."
        stopSustain = #"*"
        stopStartSustain = #"*Ped."
index 7ab5837caec138811961a88d5b837aa10b72d740..4281407c2221e41346961168eb2cccacd034b0cd 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Title: LilyPond
-Version: 1.3.80
-Entered-date: 21AUG00
+Version: 1.3.81
+Entered-date: 28AUG00
 Description: 
 Keywords: music notation typesetting midi fonts engraving
 Author: hanwen@cs.uu.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
-       1000k lilypond-1.3.80.tar.gz 
+       1000k lilypond-1.3.81.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       1000k lilypond-1.3.80.tar.gz 
+       1000k lilypond-1.3.81.tar.gz 
 Copying-policy: GPL
 End
index 54e6b94a72c2a6f94b47fbaf1df9ee8885a583f1..6741ab896e5b039647d77d40f4d1ad2564a8461d 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 1.3.80
+Version: 1.3.81
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.80.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.81.tar.gz
 Summary: A program for printing sheet music.
 URL: http://www.cs.uu.nl/~hanwen/lilypond
 # Icon: lilypond-icon.gif
index 5fa71559ac7bb05bab80c773580c3d947da445f1..5116a7904fb3587c11d8e7074eb699a382f05083 100644 (file)
   ;(display "b&i:") (display  base-and-inversion) (newline)
   (let ((diff (pitch::diff '(0 0 0) (car pitches)))
        (name-func 
-         (eval (string->symbol (string-append "chord::name-" style))))
+         (ly-eval (string->symbol (string-append "chord::name-" style))))
        (names-alist 
-         (eval (string->symbol (string-append "chord::names-alist-" style)))))
+         (ly-eval (string->symbol (string-append "chord::names-alist-" style)))))
   (let loop ((note-names (reverse pitches))
             (chord '())
             (user-name #f))
index c22f512b8ab30472eb9d6575c9942f451ee4792c..13f8359c55e5d513d0cb7ea935a30a3b17bc0b10 100644 (file)
 ;; do nothing in .scm output
 (define (comment s) "")
 
+;; URG guile-1.3/1.4 compatibility
+(define (ly-eval x) (eval2 x #f))
+
+(define (comment s) "")
+
 (define (mm-to-pt x)
   (* (/ 72.27 25.40) x)
   )
           (gulp-file name))))
 
 (define (scm-tex-output)
-  (eval (tex-scm 'all-definitions)))
+  (ly-eval (tex-scm 'all-definitions)))
                                
 (define (scm-ps-output)
-  (eval (ps-scm 'all-definitions)))
+  (ly-eval (ps-scm 'all-definitions)))
 
 (define (scm-as-output)
-  (eval (as-scm 'all-definitions)))
+  (ly-eval (as-scm 'all-definitions)))
        
 (define (index-cell cell dir)
   (if (equal? dir 1)