]> git.donarmstrong.com Git - lilypond.git/commitdiff
($(outdir)/%.pdf): add DVIPS_FLAGS. This will
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 13 Feb 2004 00:32:24 +0000 (00:32 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 13 Feb 2004 00:32:24 +0000 (00:32 +0000)
create scalable PS and PDFs  for input/{test,template,regression}.

* lily/context.cc (is_alias): move function.
(is_alias): add Bottom as context alias.
(find_create_translator): add Bottom as a context alias for creation.

* lily/stencil.cc: rename Molecule to Stencil. Changes throughout.

* lily/parser.yy (music_property_def): new syntax for property
assignments:

\set A.B = #C , \unset A.B
\override A.B #C = #D, \revert A.B #C

* lily/my-lily-lexer.cc: remove \property

170 files changed:
ChangeLog
Documentation/topdocs/NEWS.texi
Documentation/user/appendices.itely
Documentation/user/cheatsheet.itely
Documentation/user/converters.itely
Documentation/user/dedication.itely
Documentation/user/internals.itely
Documentation/user/introduction.itely
Documentation/user/lilypond-book.itely
Documentation/user/lilypond.tely
Documentation/user/literature.itely
Documentation/user/music-glossary.tely
Documentation/user/preface.itely
Documentation/user/refman.itely
Documentation/user/tutorial.itely
VERSION
input/example-1.ly
input/example-2.ly
input/example-3.ly
input/les-nereides.ly
input/mutopia-header.ly
input/puer-fragment.ly
input/screech-boink.ly
input/twinkle-pop.ly
lily/accidental.cc
lily/afm.cc
lily/ambitus.cc
lily/arpeggio.cc
lily/axis-group-interface.cc
lily/balloon.cc
lily/bar-line.cc
lily/beam.cc
lily/breathing-sign.cc
lily/chord-name.cc
lily/clef.cc
lily/cluster.cc
lily/context-def.cc [new file with mode: 0644]
lily/context.cc
lily/custos.cc
lily/dots.cc
lily/font-metric.cc
lily/grob.cc
lily/hairpin.cc
lily/horizontal-bracket.cc
lily/include/afm.hh
lily/include/bar-line.hh
lily/include/bar.hh
lily/include/chord-name.hh
lily/include/cluster.hh
lily/include/custos.hh
lily/include/font-metric.hh
lily/include/grob.hh
lily/include/ligature-engraver.hh
lily/include/lily-proto.hh
lily/include/line-interface.hh
lily/include/line-spanner.hh
lily/include/lookup.hh
lily/include/molecule.hh [deleted file]
lily/include/multi-measure-rest.hh
lily/include/note-head.hh
lily/include/percent-repeat-item.hh
lily/include/rest.hh
lily/include/scaled-font-metric.hh
lily/include/script.hh
lily/include/stem-tremolo.hh
lily/include/stem.hh
lily/include/stencil.hh [new file with mode: 0644]
lily/include/system-start-delimiter.hh
lily/include/system.hh
lily/include/text-item.hh
lily/include/time-signature.hh
lily/include/translator-group.hh
lily/include/translator.hh
lily/include/tuplet-bracket.hh
lily/include/vaticana-ligature.hh
lily/include/virtual-font-metric.hh
lily/key-signature-interface.cc
lily/ligature-engraver.cc
lily/line-interface.cc
lily/line-spanner.cc
lily/lookup.cc
lily/lyric-extender.cc
lily/lyric-hyphen.cc
lily/measure-grouping-spanner.cc
lily/mensural-ligature.cc
lily/molecule-scheme.cc [deleted file]
lily/molecule.cc [deleted file]
lily/multi-measure-rest.cc
lily/my-lily-lexer.cc
lily/note-collision.cc
lily/note-head.cc
lily/ottava-bracket.cc
lily/paper-column.cc
lily/paper-outputter.cc
lily/parser.yy
lily/percent-repeat-item.cc
lily/piano-pedal-bracket.cc
lily/piano-pedal-engraver.cc
lily/rest.cc
lily/scaled-font-metric.cc
lily/script-engraver.cc
lily/script.cc
lily/slur.cc
lily/span-bar.cc
lily/spanner.cc
lily/staff-symbol.cc
lily/stem-tremolo.cc
lily/stem.cc
lily/stencil-scheme.cc [new file with mode: 0644]
lily/stencil.cc [new file with mode: 0644]
lily/sustain-pedal.cc
lily/system-start-delimiter.cc
lily/system.cc
lily/text-item.cc
lily/text-spanner.cc
lily/tie.cc
lily/time-signature.cc
lily/translator-def.cc [deleted file]
lily/translator.cc
lily/tuplet-bracket.cc
lily/vaticana-ligature.cc
lily/virtual-font-metric.cc
lily/volta-bracket.cc
ly/a3-init.ly
ly/a4-init.ly
ly/accordion-defs-init.ly
ly/book-init-init.ly
ly/catalan.ly
ly/center-init.ly
ly/chord-modifiers-init.ly
ly/declarations-init.ly
ly/deutsch.ly
ly/dynamic-scripts-init.ly
ly/english.ly
ly/engraver-init.ly
ly/espanol.ly
ly/generate-documentation.ly
ly/generate-interface-doc-init.ly
ly/grace-init.ly
ly/gregorian-init.ly
ly/init.ly
ly/italiano.ly
ly/legal-init.ly
ly/letter-init.ly
ly/midi-init.ly
ly/nederlands.ly
ly/norsk.ly
ly/params-init.ly
ly/part-paper-init.ly
ly/performer-init.ly
ly/property-init.ly
ly/scale-definitions-init.ly
ly/script-init.ly
ly/spanners-init.ly
ly/suomi.ly
ly/svenska.ly
ly/tabloid-init.ly
make/ly-rules.make
make/ly-vars.make
make/mutopia-rules.make
scm/define-grob-properties.scm
scm/define-markup-commands.scm
scm/lily.scm
scm/molecule.scm [deleted file]
scm/new-markup.scm
scm/output-lib.scm
scm/script.scm
scm/stencil.scm [new file with mode: 0644]
scripts/convert-ly.py
stepmake/stepmake/tex-rules.make

index 1db881a0cfbbeb306c4b331b87c0ff6273d798d7..1663e1b656347c3503a67f8d4f48a6dea4e438e0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2004-02-13  Han-Wen Nienhuys   <hanwen@xs4all.nl>
+
+       * make/ly-rules.make ($(outdir)/%.pdf): add DVIPS_FLAGS. This will
+       create scalable PS and PDFs  for input/{test,template,regression}.
+
+2004-02-13  Han-Wen Nienhuys   <hanwen@xs4all.nl>
+
+       * lily/context.cc (is_alias): move function.
+       (is_alias): add Bottom as context alias. 
+       (find_create_translator): add Bottom as a context alias for creation.
+
+       * lily/stencil.cc: rename Molecule to Stencil. Changes throughout.
+
+       * lily/parser.yy (music_property_def): new syntax for property
+       assignments:
+
+       \set A.B = #C , \unset A.B
+       \override A.B #C = #D, \revert A.B #C 
+
+       * lily/my-lily-lexer.cc: remove \property
+
 2004-02-13  Heikki Junes  <hjunes@cc.hut.fi>
 
        * Documentation/user/refman.itely: add dots after seealso refs.
@@ -6,6 +27,10 @@
 
        * Documentation/user/music-glossary.itely: add Finnish author.
 
+2004-02-12  Han-Wen Nienhuys   <hanwen@xs4all.nl>
+
+       * VERSION (PACKAGE_NAME): release 2.1.21
+
 2004-02-12  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * Documentation/topdocs/NEWS.texi: Substitute Lyrics/LyricsVoice.
index 303a9fd1dcebdd73417feac2a4d6c956855cead2..81db48e9556b219bc106bad604070bc182df0a02 100644 (file)
@@ -18,6 +18,36 @@ Version 2.1.13
 
 @itemize @bullet
 
+@item The syntax for setting properties has been simplified:
+the following table lists the differences:
+
+@example
+\property A.B = #C                \set A.B = #C
+\property A.B \unset              \unset A.B
+\property A.B \set #C = #D        \override A.B #C = #D 
+\property A.B \override #C = #D   (removed)
+\property A.B \revert #C          \revert A.B #C
+@end example
+
+Furthermore, if @code{A} is left out, the bottommost context is used
+by default.  In other words, it is no longer necessary to explicitly
+mention @code{Voice}, @code{Lyrics} or @code{ChordNames}. 
+
+Old:
+
+@example
+   \property Voice.autoBeaming = ##f
+   \property Staff.TimeSignature \set #'style = #'C
+@end example
+
+New:
+
+@example
+   \set autoBeaming = ##f
+   \override Staff.TimeSignature #'style = #'C
+@end example
+
+
 @item Tweaks  made with @code{\override} and @code{\revert} no longer
 hide tweaks at higher context levels.
 
index 429c6344016f85e489301cba6565586cf800073e..902f5e7ba8fdd1be371e2e31c69080b1d6f7ac6d 100644 (file)
@@ -1,3 +1,4 @@
+\version "2.1.22"
 @node Reference manual details
 @appendix Reference manual details
 
index 3946457dc8b0374cb22185991e6a70bd9f5b65fc..a5dbf28612b680af60e0e182a9a4c6cf88ca25a5 100644 (file)
@@ -1,3 +1,4 @@
+\version "2.1.22"
 @c -*-texinfo-*-
 
 @node Cheat sheet
@@ -14,8 +15,8 @@
 @tab durations 
 @tab
 @lilypond[relative=1,notime]
-\property Staff.autoBeaming = ##f
-\property Staff.Clef = \turnOff
+\set Staff.autoBeaming =  ##f
+\set Staff.Clef =  \turnOff
 c1 c2 c8 c16
 @end lilypond
 
@@ -23,7 +24,7 @@ c1 c2 c8 c16
 @tab augmentation dots
 @tab
 @lilypond[relative=1,notime]
-\property Staff.Clef = \turnOff
+\set Staff.Clef =  \turnOff
 c4. c4..  
 @end lilypond
 
@@ -55,7 +56,7 @@ s4_" "
 @tab time signature
 @tab
 @lilypond
-\property Staff.Clef \set #'transparent = ##t 
+\override Staff.Clef   #'transparent = ##t 
 \time 3/4
 s4_" "
 \time 4/4
@@ -67,7 +68,7 @@ s16_" "
 @tab rest 
 @tab
 @lilypond[relative=1,notime]
-\property Staff.Clef = \turnOff
+\set Staff.Clef =  \turnOff
 r4 r8
 @end lilypond
 
@@ -75,8 +76,8 @@ r4 r8
 @tab tie
 @tab
 @lilypond[relative=1,notime]
-\property Score.timing = ##f
-\property Staff.autoBeaming = ##f
+\set Score.timing =  ##f
+\set Staff.autoBeaming =  ##f
 d ~ d
 @end lilypond
 
@@ -93,8 +94,8 @@ s4
 @tab raise octave
 @tab
 @lilypond[relative=1,notime]
-\property Score.timing = ##f
-\property Staff.autoBeaming = ##f
+\set Score.timing =  ##f
+\set Staff.autoBeaming =  ##f
 a a'
 @end lilypond
 
@@ -102,8 +103,8 @@ a a'
 @tab lower octave
 @tab
 @lilypond[relative=1,notime]
-\property Score.timing = ##f
-\property Staff.autoBeaming = ##f
+\set Score.timing =  ##f
+\set Staff.autoBeaming =  ##f
 c c,
 @end lilypond
 
@@ -112,9 +113,9 @@ c c,
 @tab slur
 @tab
 @lilypond[fragment,relative=1]
-\property Score.timing = ##f
-\property Staff.TimeSignature = \turnOff
-\property Staff.autoBeaming = ##f
+\set Score.timing =  ##f
+\set Staff.TimeSignature =  \turnOff
+\set Staff.autoBeaming =  ##f
 c( d e)
 @end lilypond
 
@@ -123,9 +124,9 @@ c( d e)
 @tab phrasing slur
 @tab
 @lilypond[fragment,relative=1]
-\property Score.timing = ##f
-\property Staff.TimeSignature = \turnOff
-\property Staff.autoBeaming = ##f
+\set Score.timing =  ##f
+\set Staff.TimeSignature =  \turnOff
+\set Staff.autoBeaming =  ##f
 c\(  c( d) e\)
 @end lilypond
 
@@ -134,9 +135,9 @@ c\(  c( d) e\)
 @tab beam
 @tab
 @lilypond[fragment,relative=1]
-\property Score.timing = ##f
-\property Staff.TimeSignature = \turnOff
-\property Staff.autoBeaming = ##f
+\set Score.timing =  ##f
+\set Staff.TimeSignature =  \turnOff
+\set Staff.autoBeaming =  ##f
 a8-[ b-]
 @end lilypond
 
@@ -154,7 +155,7 @@ a8-[ b-]
 @tab articulations
 @tab
 @lilypond[fragment,relative=1]
-\property Staff.TimeSignature = \turnOff
+\set Staff.TimeSignature =  \turnOff
 c-> c-.
 @end lilypond
 
@@ -163,7 +164,7 @@ c-> c-.
 @tab dynamics
 @tab
 @lilypond[fragment,relative=1]
-\property Staff.TimeSignature = \turnOff
+\set Staff.TimeSignature =  \turnOff
 c\mf c\sfz
 @end lilypond
 
@@ -172,9 +173,9 @@ c\mf c\sfz
 @tab crescendo
 @tab
 @lilypond[fragment,relative=1]
-\property Score.timing = ##f
-\property Staff.TimeSignature = \turnOff
-\property Staff.autoBeaming = ##f
+\set Score.timing =  ##f
+\set Staff.TimeSignature =  \turnOff
+\set Staff.autoBeaming =  ##f
 a\< a \!a
 @end lilypond
 
@@ -182,9 +183,9 @@ a\< a \!a
 @tab decrescendo
 @tab
 @lilypond[fragment,relative=1]
-\property Score.timing = ##f
-\property Staff.TimeSignature = \turnOff
-\property Staff.autoBeaming = ##f
+\set Score.timing =  ##f
+\set Staff.TimeSignature =  \turnOff
+\set Staff.autoBeaming =  ##f
 a\> a a\!
 @end lilypond
 
index d0d70609ef08ebed8e84d5c0382515b7a19e81b7..939a7d8c91dfaaed4373f5cf16054e77c6b9c6b0 100644 (file)
@@ -1,3 +1,4 @@
+\version "2.1.22"
 @c -*-texinfo-*-
 
 @node Converting from other formats
@@ -195,7 +196,7 @@ There is a rudimentary facility for adding LilyPond code to the ABC
 source file.  If you say:
 
 @example
-        %%LY voices \property Voice.autoBeaming=##f
+        %%LY voices \set autoBeaming = ##f
 @end example
 
 This will cause the text following the keyword ``voices'' to be inserted 
index 53779bb9a8be3d48e717c017f1a809e21594c39b..29534ae33254c7f18fcfbac081b75bae439b021a 100644 (file)
@@ -1,3 +1,4 @@
+\version "2.1.22"
 
 @quotation 
         We would like to dedicate this program to all the friends that we
index cf5f347b08d5022296e32b75c44ed39e62568652..235b3c3737a47268df3f201fc543b4b23ad38466 100644 (file)
@@ -1,3 +1,4 @@
+\version "2.1.22"
 @c -*-texinfo-*-
 @c Note:
 @c
@@ -72,7 +73,7 @@ regularly. For example, beaming behavior is tuned with
 These use mixed-caps naming: @code{autoBeamSettings},
 @code{ignoreMelismata}. They are assigned as follows:
 @example
-  \property Lyrics.ignoreMelismata = ...
+  \set ignoreMelismata =  ...
 @end example
 
 @item Layout properties
@@ -85,7 +86,7 @@ These properties use Scheme-style naming: @code{c0-position},
 @code{break-align-symbol}. They most often assigned as follows:
 
 @example
-  \property Score.RehearsalMark \set #'break-align-symbol = ...
+  \override Score.RehearsalMark   #'break-align-symbol = ...
 @end example
 
 @noindent
@@ -244,7 +245,7 @@ file using the following expression:
 @cindex properties, context
 
 @example
-\property @var{contextname}.@var{propname} = @var{value}
+\set @var{contextname}.@var{propname} =  @var{value}
 @end example
 
 @noindent
@@ -267,7 +268,7 @@ but you can force another context with the
 @code{\property}-command.  Hence the expressions
 
 @example
-\property @var{contextname}.@var{propname} = @var{value}
+\set @var{contextname}.@var{propname} =  @var{value}
 @end example
 
 @noindent
@@ -275,7 +276,7 @@ and
 
 @example
 \context @var{contextname}
-\property Current.@var{propname} = @var{value}
+\set Current.@var{propname} =  @var{value}
 @end example
 
 @noindent
@@ -285,7 +286,7 @@ without restriction to a specific context.
 
 Properties can be unset using the following statement.
 @example
-\property @var{contextname}.@var{propname} \unset
+\unset @var{contextname}.@var{propname} 
 @end example
 
 @cindex properties, unsetting
@@ -298,9 +299,6 @@ from a higher context), then this has no effect.
 
 @refbugs
 
-The syntax of @code{\unset} is asymmetric: @code{\property \unset} is not
-the inverse of @code{\property \set}.
-
 The context @code{Current} is confusing.  
 
 
@@ -488,7 +486,7 @@ The complete list of context  modifiers is the following:
 @itemize @bullet
 @item @code{\alias} @var{alternate-name}:
 This specifies a different name.  In the above example,
-@code{\property Staff.X = Y} will also work on @code{SimpleStaff}s.
+@code{\set Staff.X =  Y} will also work on @code{SimpleStaff}s.
 
 @item @code{\consistsend} @var{engravername}:
 Analogous to @code{\consists}, but makes sure that
@@ -557,7 +555,7 @@ evaluated as Scheme. For example, the boolean value @var{true} is
 @code{#t} in Scheme, so for LilyPond @var{true} looks like @code{##t},
 and can be used in property assignments:
 @example
-  \property Staff.autoBeaming = ##f
+  \set Staff.autoBeaming =  ##f
 @end example
 
 
@@ -661,7 +659,7 @@ During a run, transient objects are also created and destroyed.
 @item Scheme_hash_table
 @item Music_iterator
 
-@item Molecule: Device-independent page output object,
+@item Stencil: Device-independent page output object,
 including dimensions.
 
 @item Syllable_group
index f86fed776491fd338f11337b74a99ac40a439815..53ddde1bdc0e57f361e7f9d2ad3fb2b8a17a13da 100644 (file)
@@ -1,3 +1,4 @@
+\version "2.1.22"
 @c -*-texinfo-*-
 
 
@@ -311,14 +312,14 @@ and with some corrections. Can you spot which fragment is which?
 @cindex optical spacing
 @lilypond[noindent]
     \score { \notes {
-      \property Staff.NoteSpacing \set #'stem-spacing-correction
+      \override Staff.NoteSpacing   #'stem-spacing-correction
         = #0.6
       c'4 e''4 e'4 b'4 |
        \stemDown b'4 e''4 a'4 e''4| \stemBoth
        \bar "||"
-      \property Staff.NoteSpacing \override #'stem-spacing-correction
+      \override Staff.NoteSpacing   #'stem-spacing-correction
       = #0.0
-      \property Staff.StaffSpacing \override #'stem-spacing-correction
+      \override Staff.StaffSpacing   #'stem-spacing-correction
       = #0.0
       c'4 e''4 e'4 b'4 |
       \stemDown b'4 e''4 a'4 e''4|
@@ -393,7 +394,7 @@ high note and the `f', as shown in this example:
 @lilypond
 \score { \notes \relative c'' {
 \stemUp
-    \once\property Voice. DynamicLineSpanner  \override #'padding = #4.0 
+    \once\override DynamicLineSpanner    #'padding = #4.0 
     a4_\f f,8
        }
 \paper { raggedright = ##t }
@@ -402,7 +403,7 @@ high note and the `f', as shown in this example:
 
 This was achieved with the following input statement:
 @example
-   \once \property Voice. DynamicLineSpanner  \override #'padding = #4.0 
+   \once \override DynamicLineSpanner    #'padding = #4.0 
 @end example
 It increases the amount of space (@code{padding}) between the note and
 the dynamic symbol to 4.0 (which is measured in staff space, so 4.0
@@ -423,13 +424,13 @@ require them to be twice the thickness of the staff lines. The same
 mechanism can be used to adjust a setting globally. By issuing the
 following command, the entire piece is now formatted with thicker stems:
 @example
-    \property Score.Stem \override #'thickness = #3.0 
+    \override Score.Stem   #'thickness = #3.0 
 @end example
 
 @lilypond
 \score { \notes \relative c'' {
-    \property Score.Stem \override #'thickness = #3.0 
-    \once\property Voice. DynamicLineSpanner  \override #'padding = #4.0 
+    \override Score.Stem   #'thickness = #3.0 
+    \once\override DynamicLineSpanner    #'padding = #4.0 
 \stemUp
     a4_\f f,8
        }
@@ -449,7 +450,7 @@ example above is calculated by the function
 @code{Side_position_interface::aligned_side}.  If we want to replace
 this function by a more advanced one, we could issue
 @example
-    \property Voice.DynamicLineSpanner \override #'Y-offset-callbacks
+    \override DynamicLineSpanner   #'Y-offset-callbacks
        = #(list gee-whiz-gadget)
 @end example
 
index e0ad3a271e8ade88734490bd4d58e6ead53ca0d3..9b34ad23aabff09d481f978820d4444f91ba0c0d 100644 (file)
@@ -1,3 +1,4 @@
+\version "2.1.22"
 @c -*-texinfo-*-
 
 @ignore
index cba83e59181978f860779dddae2276ba098cac64..b6821bda026d09222ec321376988dd2fb7e5028b 100644 (file)
@@ -1,3 +1,4 @@
+\version "2.1.22"
 \input texinfo @c -*-texinfo-*-
 @setfilename lilypond.info
 @settitle GNU LilyPond
@@ -94,7 +95,7 @@ Copyright @copyright{} 1999--2004 by the authors
 @lilypond[raggedright]
 \score {
     \context Lyrics \notes {
-        \property Score.RehearsalMark \set #'self-alignment-X = #LEFT
+        \override Score.RehearsalMark   #'self-alignment-X = #LEFT
         \mark #(ly:export (string-append
              "(For LilyPond version " (lilypond-version) ")"))
         s2
index 74450e59a59299554fe09a95d3988a82b2193538..8d72521d22a57ac3416dde848c7364f483c59ba3 100644 (file)
@@ -1,3 +1,4 @@
+\version "2.1.22"
 @node Literature list
 @chapter Literature list
 
index 3c873754850f6f9cfe55083ca0cf7fa817deaedd..12d93573ccaa960bb4357215d60ff7e2e15f0a8f 100644 (file)
@@ -1,3 +1,4 @@
+\version "2.1.22"
 \input texinfo  @c -*-texinfo-*-
 @settitle Music Glossary
 @setfilename music-glosssary.info
@@ -213,14 +214,14 @@ flat lowers it by a whole tone. A natural cancels the effect of a previous
 accidental.
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Voice.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override TextScript   #'font-style = #'large
 \addlyrics
 \context Staff \notes\relative c'' {
   gis1 s s gisis s s ges s s geses s s g!
 }
 \context Lyrics \lyrics {
-  \property Lyrics . LyricText \set #'self-alignment-X = #-1
+  \override Lyrics .LyricText   #'self-alignment-X = #-1
   "sharp  " "db. sharp  " "flat  " "db. flat  " natural
 }
 @end lilypond
@@ -323,7 +324,7 @@ FI: luonnollinen molliasteikko,
 N: ?.
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
+\set Score.automaticBars =  ##f
 \notes\relative c'' {
 a1 b c d e f g a }
 @end lilypond
@@ -363,16 +364,16 @@ the duration of the long a. is proportional to that of the main note.
 \key d \major
 \time 4/4
 
-%\property Score.TextScript \set #'font-style = #'large
+%\override Score.TextScript   #'font-style = #'large
 <d a fis>4_"notation" r
-{ \property Voice.Stem \override #'flag-style = #'()
+{ \override Stem   #'flag-style = #'()
   \grace g16
-  \property Voice.Stem \revert #'flag-style
+  \revert Stem #'flag-style
    }
 fis8 e16 fis
-{ \property Voice.Stem \override #'flag-style = #'()
+{ \override Stem   #'flag-style = #'()
   \grace a16
-  \property Voice.Stem \revert #'flag-style
+  \revert Stem #'flag-style
   }
 g8 fis16 g |
 \cadenzaOn a4 \bar "||" \cadenzaOff }
@@ -387,7 +388,7 @@ An appoggiatura may have more notes preceding the main note.
 \notes\relative c'' {
   \key as \major
   \time 2/4
-%  \property Score.TextScript \set #'font-style = #'large
+%  \override Score.TextScript   #'font-style = #'large
   \grace { bes16 } as8_"notation" as16 bes as8 g |
   \grace { as16[( bes] } < c as >4-)
   \grace { as16[( bes] } < c as >4-) \bar "||"
@@ -572,8 +573,8 @@ Line connecting a series of notes (shorter than a quarter note).
 The number of beams determine the note value of the connected notes.
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Voice.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override TextScript   #'font-style = #'large
 \notes\relative c'' {
   g8_"1/8"[ g g g] s16
   g16_"1/16"[ g g g] s16
@@ -630,7 +631,7 @@ orchestral or choral score.
 
 @lilypond
 \context StaffGroup <<
-%  \property StaffGroup.minVerticalAlign = #12
+%  \set StaffGroup.minVerticalAlign =  #12
   \notes\relative c'' \context Staff = SA { \clef treble g4 e c2 }
   \notes\relative c \context Staff = SB { \clef bass c1 \bar "|." } >>
 @end lilypond
@@ -677,7 +678,7 @@ N: ?.
 in pre-1650 music.
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
+\set Score.automaticBars =  ##f
 \notes\relative c'' { g\breve }
 @end lilypond
 
@@ -707,9 +708,9 @@ Clef symbol indicating the position of the central C.  Used on all note
 lines.
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-\property Score.Clef \override #'full-size-change = ##t
-%\property Score.LyricText \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+\override Score.Clef   #'full-size-change = ##t
+%\override Score.LyricText   #'font-style = #'large
 \addlyrics
 \context Staff \notes\relative c' {
   \clef soprano c1 s s
@@ -719,7 +720,7 @@ lines.
   \clef baritone c s s
 }
 \context Lyrics \lyrics {
-  \property Lyrics . LyricText \override #'self-alignment-X = #-1
+  \override Lyrics .LyricText   #'self-alignment-X = #-1
   "Soprano  " "Mezzosoprano  " "Alto  " "Tenor  " Baritone
 }
 @end lilypond
@@ -806,8 +807,8 @@ third above the lower notes to define their quality as major or minor.  Such
 chords are denoted open chords
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Voice.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override TextScript   #'font-style = #'large
 \addlyrics
 \context Staff \notes\relative c'' {
   <g b d>1 s s
@@ -818,7 +819,7 @@ chords are denoted open chords
   <g b d f a> s s
 }
 \context Lyrics \lyrics{
-  \property Lyrics . LyricText \set #'self-alignment-X = #-1
+  \override Lyrics .LyricText   #'self-alignment-X = #-1
   "major  " "minor  " "diminished  " "augmented  "
   "seventh-chord  " "ninth-chord  "
 }
@@ -838,7 +839,7 @@ N: ?.
 A scale consisting of all 11 @aref{semitone}s.
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
+\set Score.automaticBars =  ##f
 \notes\relative c' { c1 cis d dis e f fis g gis a ais b c }
 @end lilypond
 
@@ -989,7 +990,7 @@ music of the baroque era, has been one of the most popular polyphonic
 composition methods.
 
 @lilypond[staffsize=11,noquote]
-\property Score.TimeSignature \override #'style =\turnOff
+\override Score.TimeSignature   #'style =\turnOff
 \notes\context PianoStaff <<
   \context Staff = SA \relative c' {
     \key bes \major
@@ -1094,11 +1095,11 @@ of the 20th century
 @lilypond
 \score {
     \notes {
-       \property Staff.Custos \set #'neutral-position = #4
-       \property Staff.Custos \set #'neutral-direction = #-1
-       \property Staff.Custos \set #'adjust-if-on-staffline = ##t
+       \override Staff.Custos   #'neutral-position = #4
+       \override Staff.Custos   #'neutral-direction = #-1
+       \override Staff.Custos   #'adjust-if-on-staffline = ##t
 
-       \property Staff.Custos \set #'style = #'hufnagel
+       \override Staff.Custos   #'style = #'hufnagel
        c'1
        \break < d' a' f''>1
     }
@@ -1152,8 +1153,8 @@ Abbreviated ``d.s.''.  Repetition, not from the beginning, but from
 another place frequently near the beginning marked by a sign:
 
 @lilypond
-%\property Voice.TextScript \set #'font-style = #'large
-\property Voice.TextScript \set #'font-shape = #'italic
+%\override TextScript   #'font-style = #'large
+\override TextScript   #'font-shape = #'italic
 \key g \major \time 4/4
 \notes\relative c'' { d1 | g,4^\segno  a b c | b a g2_"d.s." \bar "|." }
 @end lilypond
@@ -1210,13 +1211,13 @@ The church modes are used in gregorial chant and pre baroque early music but
 also to some extent in newer jazz music.
 
 @lilypond[notime,linewidth=110\mm]
-\property Score.automaticBars = ##f
-%\property Score.LyricText \set #'font-style = #'large
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override Score.LyricText   #'font-style = #'large
+%\override Score.TextScript   #'font-style = #'large
 \addlyrics
   \context Staff \notes\relative c' {
     c1 d
-    \property Voice.TextScript \set #'padding = #-4
+    \override TextScript   #'padding = #-4
     e^"~~ S" f g a b^"~~ S" c
   }
   \context Lyrics \lyrics {
@@ -1225,13 +1226,13 @@ also to some extent in newer jazz music.
 @end lilypond
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Score.LyricText \set #'font-style = #'large
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override Score.LyricText   #'font-style = #'large
+%\override Score.TextScript   #'font-style = #'large
 \addlyrics
   \context Staff \notes\relative c' {
     d1
-    \property Voice.TextScript \set #'padding = #-4
+    \override TextScript   #'padding = #-4
     e^"~~ S" f g a b^"~~ S" c d
   }
   \context Lyrics \lyrics {
@@ -1240,12 +1241,12 @@ also to some extent in newer jazz music.
 @end lilypond
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Score.LyricText \set #'font-style = #'large
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override Score.LyricText   #'font-style = #'large
+%\override Score.TextScript   #'font-style = #'large
 \addlyrics
   \notes\relative c' {
-    \property Voice.TextScript \set #'padding = #-4
+    \override TextScript   #'padding = #-4
     e1^"~~ S" f g a b^"~~ S" c d e
   }
   \context Lyrics \lyrics {
@@ -1254,13 +1255,13 @@ also to some extent in newer jazz music.
 @end lilypond
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Score.LyricText \set #'font-style = #'large
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override Score.LyricText   #'font-style = #'large
+%\override Score.TextScript   #'font-style = #'large
 \addlyrics
   \notes\relative c' {
     f1 g a
-    \property Voice.TextScript \set #'padding = #-4
+    \override TextScript   #'padding = #-4
     b^"~~ S" c d e^"~~ S" f
   }
   \context Lyrics \lyrics {
@@ -1269,13 +1270,13 @@ also to some extent in newer jazz music.
 @end lilypond
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Score.LyricText \set #'font-style = #'large
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override Score.LyricText   #'font-style = #'large
+%\override Score.TextScript   #'font-style = #'large
 \addlyrics
   \notes\relative c'' {
     g1 a
-    \property Voice.TextScript \set #'padding = #-4
+    \override TextScript   #'padding = #-4
     b^"~~ S" c d e^"~~ S" f g }
   \context Lyrics \lyrics {
     Mixolydian
@@ -1283,13 +1284,13 @@ also to some extent in newer jazz music.
 @end lilypond
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Score.LyricText \set #'font-style = #'large
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override Score.LyricText   #'font-style = #'large
+%\override Score.TextScript   #'font-style = #'large
 \addlyrics
   \notes\relative c'' {
     a1
-    \property Voice.TextScript \set #'padding = #-4
+    \override TextScript   #'padding = #-4
     b^"~~ S" c d e^"~~ S" f g a
   }
   \context Lyrics \lyrics {
@@ -1303,13 +1304,13 @@ harmonic minor scale type an augmented second (A) occurs between the 6th and
 7th tone.
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Score.LyricText \set #'font-style = #'large
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override Score.LyricText   #'font-style = #'large
+%\override Score.TextScript   #'font-style = #'large
 \addlyrics
   \notes\relative c' {
     c1 d
-    \property Voice.TextScript \set #'padding = #-4
+    \override TextScript   #'padding = #-4
     e^"~~ S" f g a b^"~~ S" c
   }
   \context Lyrics \lyrics {
@@ -1318,13 +1319,13 @@ harmonic minor scale type an augmented second (A) occurs between the 6th and
 @end lilypond
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Score.LyricText \set #'font-style = #'large
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override Score.LyricText   #'font-style = #'large
+%\override Score.TextScript   #'font-style = #'large
 \addlyrics
   \notes\relative c'' {
     a1
-    \property Voice.TextScript \set #'padding = #-4
+    \override TextScript   #'padding = #-4
     b^"~~ S" c d e^"~~ S" f g a
   }
   \context Lyrics \lyrics {
@@ -1333,13 +1334,13 @@ harmonic minor scale type an augmented second (A) occurs between the 6th and
 @end lilypond
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Score.LyricText \set #'font-style = #'large
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override Score.LyricText   #'font-style = #'large
+%\override Score.TextScript   #'font-style = #'large
 \addlyrics
   \notes\relative c'' {
     a1
-    \property Voice.TextScript \set #'padding = #-4
+    \override TextScript   #'padding = #-4
     b^"~~ S" c d e^"~~ S" f!^"~~ A" gis^"~~ S" a
   }
   \context Lyrics \lyrics {
@@ -1348,13 +1349,13 @@ harmonic minor scale type an augmented second (A) occurs between the 6th and
 @end lilypond
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Score.LyricText \set #'font-style = #'large
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override Score.LyricText   #'font-style = #'large
+%\override Score.TextScript   #'font-style = #'large
 \addlyrics
   \notes\relative c'' {
     a1
-    \property Voice.TextScript \set #'padding = #-4
+    \override TextScript   #'padding = #-4
     b^"~~ S" c d e fis gis^"~~ S"
     a g! f!^"~~ S" e d c^"~~ S" b a
   }
@@ -1694,14 +1695,14 @@ Two notes, intervals, or scales are enharmonic if they have different names
 but equal pitch.
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override Score.TextScript   #'font-style = #'large
 \addlyrics
 \context Staff \notes\relative c'' {
   gis1 s s as s s <des g,!> s s <cis g!> s s
 }
 \context Lyrics \lyrics {
-  \property Lyrics . LyricText \set #'self-alignment-X = #-1
+  \override Lyrics .LyricText   #'self-alignment-X = #-1
   "g sharp  " "a flat  " "dim fifth  " "augm fourth"
 }
 @end lilypond
@@ -1765,9 +1766,9 @@ symbol indicates playing an octave lower (for example on double bass
 @aref{strings}).
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-\property Staff.Clef \override #'full-size-change = ##t
-%\property Score.LyricText \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+\override Staff.Clef   #'full-size-change = ##t
+%\override Score.LyricText   #'font-style = #'large
 \addlyrics
 \notes\relative c {
   \clef varbaritone
@@ -1782,7 +1783,7 @@ symbol indicates playing an octave lower (for example on double bass
   f1
 }
 \context Lyrics \lyrics {
-  \property Lyrics . LyricText \set #'self-alignment-X = #-1
+  \override Lyrics .LyricText   #'self-alignment-X = #-1
   "baritone  "
   "bass  "
   "sub-bass  "
@@ -1858,8 +1859,8 @@ less than a quarter note.  The number of flags determines the
 @aref{note value}.
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override Score.TextScript   #'font-style = #'large
 \notes\relative c'' {
   g8_"1/8" s8
   g16_"1/16" s8
@@ -1942,9 +1943,9 @@ dominant (D, the chord on the fifth note).  Other are considered to be
 variants of the base chords.
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Score.LyricText \set #'font-style = #'large
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override Score.LyricText   #'font-style = #'large
+%\override Score.TextScript   #'font-style = #'large
 \addlyrics
 \context Voice \notes\relative c'' {
   <g e c >1 < a f d > < b g e >
@@ -1981,9 +1982,9 @@ indicates playing or singing an octave lower (most tenor parts in choral
 scores are notated like that).
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-\property Staff.Clef \set #'full-size-change = ##t
-%\property Score.LyricText \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+\override Staff.Clef   #'full-size-change = ##t
+%\override Score.LyricText   #'font-style = #'large
 \addlyrics
 \notes\relative c'' {
   \clef french
@@ -1996,7 +1997,7 @@ scores are notated like that).
   g s s
 }
 \context Lyrics \lyrics {
-  \property Lyrics . LyricText \set #'self-alignment-X = #-1
+  \override Lyrics .LyricText   #'self-alignment-X = #-1
   "french violin clef  "
   "violin clef  "
   "octaved up  "
@@ -2109,7 +2110,7 @@ section.  @aref{functional harmony}.
     \partial 4 < c g e >4 |
     < c a f > < b g d > < c g e >2
   }
-%  %\property Score.LyricText \set #'font-style = #'large
+%  %\override Score.LyricText   #'font-style = #'large
   \addlyrics
   \context Staff = SB \relative c {
     \clef bass
@@ -2139,8 +2140,8 @@ Tones sounding simultaneously.  Two note harmonies fall into the categories
 Consonances:
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override Score.TextScript   #'font-style = #'large
 \context Voice \notes\relative c'' {
   <g g>1_"unisone  " s
   <g b>_"third  " s
@@ -2155,8 +2156,8 @@ Consonances:
 Dissonances:
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override Score.TextScript   #'font-style = #'large
 \context Voice  \notes\relative c'' {
   <g a>1_"second  " s s
   <g f'>_"seventh  " s s
@@ -2198,9 +2199,9 @@ because they consist of three @aref{whole tone}s.  The addition
 of such two forms an octave.
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Score.LyricText \set #'font-style = #'large
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override Score.LyricText   #'font-style = #'large
+%\override Score.TextScript   #'font-style = #'large
 \addlyrics
 \context Voice \notes\relative c'' {
   < g g >1 s
@@ -2219,9 +2220,9 @@ of such two forms an octave.
 @end lilypond
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Score.LyricText \set #'font-style = #'large
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override Score.LyricText   #'font-style = #'large
+%\override Score.TextScript   #'font-style = #'large
 \addlyrics
 \context Staff \notes\relative c'' {
   < g c >^"perfect" s
@@ -2240,9 +2241,9 @@ of such two forms an octave.
 @end lilypond
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Score.LyricText \set #'font-style = #'large
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override Score.LyricText   #'font-style = #'large
+%\override Score.TextScript   #'font-style = #'large
 \addlyrics
 \context Staff \notes\relative c'' {
   < gis f'! >1^"dimin"  s
@@ -2274,8 +2275,8 @@ N: ?.
 The difference between an interval and an octave.
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override Score.TextScript   #'font-style = #'large
 \context Staff \notes\relative c'' {
   < g  a >1_"second " s s < g' a, >_"seventh " s s \bar "||"
   < g, b >_"third  " s s < g' b, >_"sixth  " s s \bar "||"
@@ -2368,7 +2369,7 @@ N: ?.
 A ledger line is an extension of the staff.
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
+\set Score.automaticBars =  ##f
 \notes\relative c'' { a,1 s c'' }
 @end lilypond
 
@@ -2388,7 +2389,7 @@ unlike (b) @emph{leggiero} or @emph{non-legato}, (c) @emph{portato} and
 (d) @aref{staccato}.
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
+\set Score.automaticBars =  ##f
 \addlyrics
 \context Staff \notes\relative c'' {
   c4-( d e-) \bar "||"
@@ -2397,7 +2398,7 @@ unlike (b) @emph{leggiero} or @emph{non-legato}, (c) @emph{portato} and
   c4-. d-. e-. \bar "||"
 }
 \context Lyrics \lyrics {
-%  \property Lyrics . LyricText \set #'font-style = #'large
+%  \override Lyrics .LyricText   #'font-style = #'large
   a
   b "" ""
   c
@@ -2463,9 +2464,9 @@ Note value: double length of @aref{breve}.
 @aref{note value}.
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
+\set Score.automaticBars =  ##f
 \notes\relative c'' {
-  \property Voice.NoteHead \set #'style = #'mensural
+  \override NoteHead   #'style = #'mensural
   g\longa
 }
 @end lilypond
@@ -2665,8 +2666,8 @@ N: ?.
 First C below the 440 Hz A.
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-\property Staff.Clef \set #'full-size-change = ##t
+\set Score.automaticBars =  ##f
+\override Staff.Clef   #'full-size-change = ##t
 \notes\relative c' {
   \clef bass c1 s
   \clef alto c s
@@ -2756,8 +2757,8 @@ The briefest intelligible and self-contained fragment of a musical theme or
 subject.
 
 @lilypond
-\property Score.TimeSignature \override #'style = \turnOff
-%\property Score.TextScript \set #'font-style = #'large
+\override Score.TimeSignature   #'style = \turnOff
+%\override Score.TextScript   #'font-style = #'large
 \notes\relative c'' {
   \time 4/4
   \key g \major
@@ -2796,7 +2797,7 @@ N: ?.
 @lilypond
 \notes\relative c'' {
   a1
-  \property Score.skipBars=##t R1*3
+  \set Score.skipBars = ##t R1*3
   a1
 }
 @end lilypond
@@ -2888,19 +2889,19 @@ but sometimes (mostly in pre baroque music) the double length note value
 @emph{longa} is used.
 
 @lilypond[notime]
-%\property Score.TextScript \set #'font-style = #'large
-\property Score.automaticBars = ##f
+%\override Score.TextScript   #'font-style = #'large
+\set Score.automaticBars =  ##f
 \notes\relative c'' {
-  \property Voice.NoteHead \override #'style = #'mensural
+  \override NoteHead   #'style = #'mensural
   g\longa_"longa" g\breve_"breve"
-  \property Voice.NoteHead \revert #'style
+  \revert NoteHead #'style
   g1_"1/1" g2_"1/2" g4_"1/4" s16 g8_"1/8" s16
   g16_"1/16" s16 g32_"1/32" s16 g64_"1/64" s32 }
 @end lilypond
 
 @lilypond[notime]
-%\property Score.TextScript \set #'font-style = #'large
-\property Score.automaticBars = ##f
+%\override Score.TextScript   #'font-style = #'large
+\set Score.automaticBars =  ##f
 \notes\relative c'' {
   r\longa_"longa" r\breve_"breve"
   r1_"1/1" r2_"1/2" r4_"1/4" s16 r8_"1/8" s16
@@ -2911,7 +2912,7 @@ An augmentation dot after a note multiplies the duration by one and a
 half.  Another dot adds yet a fourth of the duration.
 
 @lilypond
-%\property Score.TextScript \set #'font-style = #'large
+%\override Score.TextScript   #'font-style = #'large
 \notes\relative c'' {
   \time 4/4
   g4._"pointed" g8 g2 | g4 ~ g8 g g2 \bar "||"
@@ -2924,7 +2925,7 @@ Subdivisions by@w{ }2 (@emph{tuplets}) or@w{ }4 (@emph{quadruplets}) of
 dotted notes are also frequently used.
 
 @lilypond
-%\property Score.TextScript \set #'font-style = #'large
+%\override Score.TextScript   #'font-style = #'large
 \notes\relative c'' {
   \time 4/4
   \times 2/3 {g8_"triplets" g g} g4 g8 g g4 \bar "||"
@@ -2978,7 +2979,7 @@ the upper note is played first.
 @lilypond
 <<
   \context Staff = sa {
-%        \property Score.TextScript \set #'font-style = #'large
+%        \override Score.TextScript   #'font-style = #'large
     \notes\relative c'' {
       c2._"pre-1850"  b4\trill | c1 \bar "||"
       c2._"post-1850" b4\trill | c1 \bar "||"
@@ -2997,7 +2998,7 @@ Other frequently used ornaments are the @emph{turn}, the @emph{mordent} and the
 @lilypond
 <<
   \context Staff = sa {
-%        \property Score.TextScript \set #'font-style = #'large
+%        \override Score.TextScript   #'font-style = #'large
     \notes\relative c'' {
       a4_"turn" b\turn c2 \bar "||"
       g4_"mordent" a b\mordent a \bar "||"
@@ -3269,8 +3270,8 @@ N: ?.
 with the same @aref{key signature}.
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override Score.TextScript   #'font-style = #'large
 \notes\relative c' {
   \key es \major
   es1_"e flat major" f g as bes c d es
@@ -3279,8 +3280,8 @@ with the same @aref{key signature}.
 @end lilypond
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override Score.TextScript   #'font-style = #'large
 \notes\relative c' {
   \key es \major
   c1_"c minor" d es f g a! b! c \bar "||"
@@ -3397,9 +3398,9 @@ roots of chords.  The most important are degrees I = tonic (T), IV =
 sub@-do@-mi@-nant (S) and V = dominant (D).
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Score.LyricText \set #'font-style = #'large
-%\property Lyrics.minVerticalAlign = #8
+\set Score.automaticBars =  ##f
+%\override Score.LyricText   #'font-style = #'large
+%\set minVerticalAlign =  #8
 \addlyrics
 \context Staff \notes\relative c' {
   c1 d e f g a b c
@@ -3461,7 +3462,7 @@ semitone.  An octave may be divided into 12@w{ }semitones.
 @aref{interval}, @aref{chromatic scale}.
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
+\set Score.automaticBars =  ##f
 \notes\relative c'' { g1 gis s a bes s b! c }
 @end lilypond
 
@@ -3713,9 +3714,9 @@ Vertical line above or below a @aref{note head} shorter than a
 whole note.  @aref{beam}.
 
 @lilypond[notime]
-\property Score.autoBeaming = ##f
-\property Score.automaticBars = ##f
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.autoBeaming =  ##f
+\set Score.automaticBars =  ##f
+%\override Score.TextScript   #'font-style = #'large
 \notes\relative c'' {
   g2_"1/2" g' s16
   g,4_"1/4" g' s16
@@ -4018,7 +4019,7 @@ with figures designating the chief @aref{interval}s and
     es8 c d bes c as bes16 as g f | es4
   }
   \context Lyrics \lyrics {
-    \property Lyrics . VerticalAlign \override #'threshold = #'(6 . 12)
+    \override Lyrics .VerticalAlign   #'threshold = #'(6 . 12)
     << { "" "6" "" "4" "" "6" "" "" "6" "4" }
       { "" ""  "" "2" "" ""  "" "" ""  "2" } >>
   }
@@ -4041,7 +4042,7 @@ connects two succesive notes of the same pitch, and which has the function of
 uniting them into a single sound equal to the combined durations.
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
+\set Score.automaticBars =  ##f
 \notes\relative c'' { g2 ~ g4. }
 @end lilypond
 
@@ -4152,8 +4153,8 @@ a @aref{chord}, usually in the distance of a third
 (@aref{interval}).
 
 @lilypond[notime]
-\property Score.automaticBars = ##f
-%\property Score.TextScript \set #'font-style = #'large
+\set Score.automaticBars =  ##f
+%\override Score.TextScript   #'font-style = #'large
 \notes\relative c' {
   e2:32_"a"
   f:32 [ e8:16 f:16 g:16 a:16 ] s4
index 6e5647a9827c37728884384584483f8d3131df36..26c489ee1ef05c0576fef95fb47b2d04b4aa5f1c 100644 (file)
@@ -1,3 +1,4 @@
+\version "2.1.22"
 @comment @c -*-texinfo-*-
 
 
index d1c0019eff459e995c5c7cbac42e293d4c14cded..d8de08b5ed6ac32504e095c21839edf1fcf85dc1 100644 (file)
@@ -1,3 +1,4 @@
+\version "2.1.22"
 @c Note: -*-texinfo-*-
 @c This file is part of lilypond.tely
 
@@ -481,7 +482,7 @@ example, there are two triplets shown, while @code{\times} was only
 used once:
 
 @lilypond[fragment,relative,raggedright,verbatim]
-\property Voice.tupletSpannerDuration = #(ly:make-moment 1 4)
+\set tupletSpannerDuration =  #(ly:make-moment 1 4)
 \times 2/3 { c'8 c c c c c }
 @end lilypond
 
@@ -710,9 +711,9 @@ been checked for errors:
 
 @lilypond[fragment,raggedright,verbatim]
 \relative c'' { c8 d
-\property Score.skipTypesetting = ##t
+\set Score.skipTypesetting =  ##t
   e f g a g c, f e d
-\property Score.skipTypesetting = ##f
+\set Score.skipTypesetting =  ##f
 c d b bes a g c2 } 
 @end lilypond
 
@@ -958,7 +959,7 @@ The @code{set-octavation} function also takes -1 (for 8va bassa) and 2
 
 @example
   #(set-octavation 1)
-  \property Staff.ottavation = #"8"
+  \set Staff.ottavation =  #"8"
 @end example
 
 @seealso
@@ -1058,7 +1059,7 @@ The syntax for this command is
 @end example
 This is  internally translated into
 @example
-  \property Timing.measurePosition = -@var{length of duration}
+  \set Timing.measurePosition =  -@var{length of duration}
 @end example
 @cindex @code{|}
 The property @code{measurePosition} contains a rational number
@@ -1138,7 +1139,7 @@ connected between different staves of a @internalsref{StaffGroup}:
 
 
 The command @code{\bar @var{bartype}} is a short cut for doing
-@code{\property Score.whichBar = @var{bartype}} Whenever
+@code{\set Score.whichBar =  @var{bartype}} Whenever
 @code{whichBar} is set to a string, a bar line of that type is
 created.  At the start of a measure it is set to
 @code{defaultBarType}. The contents of @code{repeatCommands} are used
@@ -1225,7 +1226,7 @@ the @internalsref{NoteCollision} object, they are merged:
 @lilypond[verbatim,fragment,raggedright]
 \relative c'' \context Voice << {
      g8 g8 
-     \property Staff.NoteCollision \override
+     \override Staff.NoteCollision  
         #'merge-differently-dotted = ##t
      g8 g8
   } \\ { g8.[ f16] g8.[ f16] } 
@@ -1237,8 +1238,8 @@ Similarly, you can merge half note heads with eighth notes, by setting
 @lilypond[fragment,relative=2,verbatim]
 \context Voice << {
     c8 c4.
-    \property Staff.NoteCollision
-      \override #'merge-differently-headed = ##t
+    \override Staff.NoteCollision
+        #'merge-differently-headed = ##t
     c8 c4. } \\ { c2 c2 } >>
 @end lilypond
 
@@ -1356,14 +1357,14 @@ point are marked with @code{[} and @code{]}:
 
 Normally, beaming patterns within a beam are determined automatically.
 When this mechanism fouls up, the properties
-@code{Voice.stemLeftBeamCount} and @code{Voice.stemRightBeamCount} can
+@code{stemLeftBeamCount} and @code{stemRightBeamCount} can
 be used to control the beam subdivision on a stem.  If either property
 is set, its value will be used only once, and then it is erased.
 
 @lilypond[fragment,relative,verbatim]
   \context Staff {
     f8[ r16 f g a]
-    f8[ r16 \property Voice.stemLeftBeamCount = #1 f g a]
+    f8[ r16 \set stemLeftBeamCount =  #1 f g a]
   }
 @end lilypond
 @cindex @code{stemRightBeamCount}
@@ -1378,9 +1379,9 @@ but it take less typing:
 
 @lilypond[relative=1,verbatim,noindent]
         c16[ c c c c c c c]
-        \property Voice.subdivideBeams = ##t
+        \set subdivideBeams =  ##t
         c16[ c c c c c c c]
-        \property Score.beatLength = #(ly:make-moment 1 8)
+        \set Score.beatLength =  #(ly:make-moment 1 8)
         c16[ c c c c c c c]
 @end lilypond
 @cindex subdivideBeams
@@ -1424,14 +1425,14 @@ Automatically kneed beams cannot be used together with hidden staves.
 In normal time signatures, automatic beams can start on any note but can
 only end in a few positions within the measure: beams can end on a beat,
 or at durations specified by the properties in
-@code{Voice.autoBeamSettings}. The defaults for @code{autoBeamSettings}
+@code{autoBeamSettings}. The defaults for @code{autoBeamSettings}
 are defined in @file{scm/auto-beam.scm}.
 
 The value of @code{autoBeamSettings} is changed using
 @code{\override} and restored with @code{\revert}:
 @example
-\property Voice.autoBeamSettings \override #'(@var{BE} @var{P} @var{Q} @var{N} @var{M}) = @var{dur}
-\property Voice.autoBeamSettings \revert #'(@var{BE} @var{P} @var{Q} @var{N} @var{M})
+\override autoBeamSettings   #'(@var{BE} @var{P} @var{Q} @var{N} @var{M}) = @var{dur}
+\property autoBeamSettings \revert #'(@var{BE} @var{P} @var{Q} @var{N} @var{M})
 @end example
 Here, @var{BE} is the symbol @code{begin} or @code{end}. It determines
 whether the rule applies to begin or end-points.  The quantity
@@ -1443,7 +1444,7 @@ signatures).
 For example, if automatic beams should end on every quarter note, use
 the following:
 @example
-\property Voice.autoBeamSettings \override
+\override autoBeamSettings  
     #'(end * * * *) = #(ly:make-moment 1 4)
 @end example
 Since the duration of a quarter note is 1/4 of a whole note, it is
@@ -1452,7 +1453,7 @@ entered as @code{(ly:make-moment 1 4)}.
 The same syntax can be used to specify beam starting points. In this
 example, automatic beams can only end on a dotted quarter note:
 @example
-\property Voice.autoBeamSettings \override
+\override autoBeamSettings  
     #'(end * * * *) = #(ly:make-moment 3 8)
 @end example
 In 4/4 time signature, this means that automatic beams could end only on
@@ -1464,7 +1465,7 @@ should only be applied in @var{N}/@var{M} time signature is formed by
 replacing the second asterisks by @var{N} and @var{M}. For example, a
 rule for 6/8 time exclusively looks like
 @example
-\property Voice.autoBeamSettings \override
+\override autoBeamSettings  
     #'(begin * * 6 8) =  ... 
 @end example
 
@@ -1479,11 +1480,11 @@ accepting notes, this last beam will not be typeset at all.
 
 @cindex automatic beam generation
 @cindex autobeam
-@cindex @code{Voice.autoBeaming}
+@cindex @code{autoBeaming}
 @cindex lyrics
 
 For melodies that have lyrics, you may want to switch off 
-automatic beaming. This is done by setting @code{Voice.autoBeaming} to
+automatic beaming. This is done by setting @code{autoBeaming} to
 @code{#f}. 
 
 @refcommands
@@ -1506,8 +1507,8 @@ end at 3 eights; the third beam can only be corrected by specifying
 manual beaming.
 
 @lilypond[raggedright,fragment,relative,noverbatim,quote]
-  \property Voice.autoBeamSettings
-  \override #'(end * * * *) = #(ly:make-moment 3 8)
+  \override autoBeamSettings
+    #'(end * * * *) = #(ly:make-moment 3 8)
   % rather show case where it goes wrong
   %\time 12/8 c'8 c c c16 c c c c c c[ c c c] c8[ c] c4
   \time 12/8 c'8 c c c16 c c c c c c c c c c8 c c4
@@ -1768,7 +1769,7 @@ accidentals depending on the order in which the notes occur in the
 input file:
 
 @lilypond[raggedright,fragment,verbatim]
-\property Staff.autoAccidentals = #'( Staff (any-octave . 0) )
+\set Staff.autoAccidentals =  #'( Staff (any-octave . 0) )
 cis'4 <c'' c'> r2 | cis'4 <c' c''> r2
 | <cis' c''> r | <c'' cis'> r | 
 @end lilypond
@@ -1826,9 +1827,9 @@ the attachment type of the left and right end points:
 
 @lilypond[fragment,relative,verbatim]
   \slurUp
-  \property Voice.Stem \set #'length = #5.5
+  \override Stem   #'length = #5.5
   g'8(g g4)
-  \property Voice.Slur \set #'attachment = #'(stem . stem)
+  \override Slur   #'attachment = #'(stem . stem)
   g8( g g4)
 @end lilypond
 
@@ -1839,7 +1840,7 @@ stems might look better:
 @lilypond[fragment,relative,verbatim]
   \stemUp \slurUp
   d32( d'4 d8..)
-  \property Voice.Slur \set #'attachment = #'(stem . stem)
+  \override Slur   #'attachment = #'(stem . stem)
   d,32( d'4 d8..)
 @end lilypond
 
@@ -1928,7 +1929,7 @@ The glyph of the breath mark can be tweaked by overriding the
 any markup text.   For example,
 @lilypond[fragment,verbatim,relative]
 c'4
-\property Voice.BreathingSign \override #'text
+\override BreathingSign   #'text
  = #(make-musicglyph-markup "scripts-rvarcomma")
 \breathe
 d4
@@ -1982,8 +1983,8 @@ properties:
 
 @lilypond[fragment,relative,verbatim]
  \relative c' {  c1 
-  \property Voice.TextSpanner \set #'direction = #-1
-  \property Voice.TextSpanner \set #'edge-text = #'("rall " . "")
+  \override TextSpanner   #'direction = #-1
+  \override TextSpanner   #'edge-text = #'("rall " . "")
   c2\startTextSpan b c\stopTextSpan a }
 @end lilypond
 
@@ -2157,9 +2158,9 @@ In this case, setting @code{fingeringOrientations} will put  fingerings next
 to note heads:
 
 @lilypond[verbatim,raggedright,fragment,relative=1]
-       \property Voice.fingeringOrientations = #'(left down)
+       \set fingeringOrientations =  #'(left down)
        <c-1 es-2 g-4 bes-5 > 4
-       \property Voice.fingeringOrientations = #'(up right down)
+       \set fingeringOrientations =  #'(up right down)
        <c-1 es-2 g-4 bes-5 > 4
 @end lilypond
 
@@ -2304,9 +2305,9 @@ for example,
 @lilypond[fragment,verbatim,relative=1]
 \new Voice {
     \acciaccatura {
-      \property Voice.Stem \override #'direction = #-1
+      \override Stem   #'direction = #-1
       f16->
-      \property Voice.Stem \revert #'direction
+      \revert Stem #'direction
     }
     g4
 }
@@ -2447,7 +2448,7 @@ in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
 example:
 
 @example
- \property Staff.Hairpin \override #'minimum-length = #5
+ \override Staff.Hairpin   #'minimum-length = #5
 @end example
 
 You can also use a text saying @emph{cresc.} instead of hairpins. Here
@@ -2463,8 +2464,8 @@ is an example how to do it:
 You can also supply your own texts:
 @lilypond[fragment,relative,verbatim]
   \context Voice {
-    \property Voice.crescendoText = \markup { \italic "cresc. poco" }
-    \property Voice.crescendoSpanner = #'dashed-line
+    \set crescendoText =  \markup { \italic "cresc. poco" }
+    \set crescendoSpanner =  #'dashed-line
     a'2\< a a a\!\mf
   }
 @end lilypond
@@ -2650,9 +2651,9 @@ alphabetic characters. Or,
 
 @lilypond[verbatim,fragment,relative=2]
  c4
-    \property Score.repeatCommands = #'((volta "93") end-repeat)
+    \set Score.repeatCommands =  #'((volta "93") end-repeat)
  c4 c4
-    \property Score.repeatCommands = #'((volta #f))
+    \set Score.repeatCommands =  #'((volta #f))
  c4 c4
 @end lilypond
 
@@ -2709,7 +2710,7 @@ Tremolo marks can be printed on a single note by adding
 `@code{:}[@var{length}]' after the note.  The length must be at least 8.
 A @var{length} value of 8 gives one line across the note stem.  If the
 length is omitted, then then the last value (stored in
-@code{Voice.tremoloFlags}) is used:
+@code{tremoloFlags}) is used:
 
 @lilypond[verbatim,fragment,center]
   c'2:8 c':32 | c': c': |
@@ -2973,8 +2974,8 @@ up = \drums { hh8 hh hh hh hhp4 hhp }
 down = \drums { bd4 sn bd toml8 toml }
 \score {
     \new DrumStaff <<
-        \property DrumStaff.drumStyleTable
          = #(alist->hash-table mydrums)
+        \set DrumStaff.drumStyleTable
 #(alist->hash-table mydrums)
         \new DrumVoice { \voiceOne \up }
         \new DrumVoice { \voiceTwo \down }
     >>
@@ -3129,7 +3130,7 @@ Pedals can also be indicated by a sequence of brackets, by setting the
 @code{pedalSustainStyle} property to @code{bracket} objects: 
 
 @lilypond[fragment,verbatim]
- \property Staff.pedalSustainStyle = #'bracket
+ \set Staff.pedalSustainStyle =  #'bracket
  c''4\sustainDown d''4 e''4
  a'4\sustainUp\sustainDown
  f'4 g'4 a'4\sustainUp
@@ -3140,7 +3141,7 @@ obtained by setting the @code{pedalSustainStyle} style property to
 @code{mixed}:
 
 @lilypond[fragment,verbatim]
- \property Staff.pedalSustainStyle = #'mixed
+ \set Staff.pedalSustainStyle =  #'mixed
 c''4\sustainDown d''4 e''4
 c'4\sustainUp\sustainDown
  f'4 g'4 a'4\sustainUp
@@ -3161,7 +3162,7 @@ For fine-tuning of the appearance of a pedal bracket, the properties
 bracket may be extended to the end of the note head:
 
 @lilypond[fragment,verbatim]
-\property Staff.PianoPedalBracket \override
+\override Staff.PianoPedalBracket  
    #'shorten-pair = #'(0 . -1.0)
 c''4\sostenutoDown d''4 e''4 c'4
 f'4 g'4 a'4\sostenutoUp
@@ -3188,7 +3189,7 @@ in both staves, and set
 
 @lilypond[fragment,relative,verbatim]
   \context PianoStaff <<
-    \property PianoStaff.connectArpeggios = ##t
+    \set PianoStaff.connectArpeggios =  ##t
     \new Staff  { <c' e g c>\arpeggio }
     \new Staff { \clef bass  <c,, e g>\arpeggio }
   >>
@@ -3200,9 +3201,9 @@ arrowhead to the wiggly line.  This can be typeset by setting
 
 @lilypond[fragment,relative,verbatim]
   \context Voice {
-     \property Voice.Arpeggio \set #'arpeggio-direction = #1
+     \override Arpeggio   #'arpeggio-direction = #1
      <c e g c>\arpeggio
-     \property Voice.Arpeggio \set #'arpeggio-direction = #-1
+     \override Arpeggio   #'arpeggio-direction = #-1
      <c e g c>\arpeggio
   }
 @end lilypond
@@ -3214,7 +3215,7 @@ arpeggiate the chord. To draw these brackets, set the
 @code{\arpeggio} statements within the chords as before:
 
 @lilypond[fragment,relative,verbatim]
-    \property PianoStaff.Arpeggio \override
+    \override PianoStaff.Arpeggio  
         #'print-function = \arpeggioBracket
        <c' e g c>\arpeggio
 @end lilypond
@@ -3253,7 +3254,7 @@ can be printed automatically. This is enabled if the property
 
 @lilypond[fragment,relative,verbatim]
   \context PianoStaff <<
-    \property PianoStaff.followVoice = ##t
+    \set PianoStaff.followVoice =  ##t
     \context Staff \context Voice {
       c1
       \change Staff=two
@@ -3321,7 +3322,7 @@ Similarly, a  period following a alphabetic sequence, is included in the
 resulting string. As a consequence, spaces must be inserted around
 @code{\property} commands:
 @example
-  \property Lyrics . LyricText \set #'font-shape = #'italic
+  \override Lyrics .LyricText   #'font-shape = #'italic
 @end example
 
 @cindex @code{_}
@@ -3524,10 +3525,10 @@ The complete example is shown here:
   << \notes \relative c'' \context Voice = duet { \time 3/4
      g2 e4 a2 f4 g2.  }
   \lyrics << \lyricsto "duet" \new Lyrics {
-    \property Lyrics . stanza = "1"
+    \set stanza =  "1"
     Hi, my name is bert. }
   \lyricsto "duet" \new Lyrics {
-    \property Lyrics . stanza = "2" 
+    \set stanza =  "2" 
     Ooooo, ch\'e -- ri, je t'aime. }
   >> >>
 }
@@ -3537,16 +3538,16 @@ The complete example is shown here:
 @cindex singer's names
 @cindex name of singer 
 
-Stanza numbers can be added by setting @code{Lyrics.stanza}, e.g.
+Stanza numbers can be added by setting @code{stanza}, e.g.
 
 @example
-    \property Lyrics . stanza = "Bert"
+    \set stanza =  "Bert"
     @dots{}
-    \property Lyrics . stanza = "Ernie" 
+    \set stanza =  "Ernie" 
 @end example
 
 Notice how dots are surrounded with spaces in @code{\lyrics} mode, to
-prevent @code{Lyrics.stanza} being interpreted as a single
+prevent @code{stanza} being interpreted as a single
 string.
 
 Names of the singers should be added using @code{Lyrics
@@ -3709,14 +3710,14 @@ value for @code{minimumFret} is 0:
 
 @example
 e8 fis gis a b cis' dis' e'
-\property TabStaff.minimumFret = #8
+\set TabStaff.minimumFret =  #8
 e8 fis gis a b cis' dis' e'
 @end example
 @lilypond[noindent]
 frag = \notes {
     \key e \major
     e8 fis gis a b cis' dis' e'
-    \property TabStaff.minimumFret = #8
+    \set TabStaff.minimumFret =  #8
     e8 fis gis a b cis' dis' e'
 }
 \score {
@@ -3756,7 +3757,7 @@ g:
 
 @lilypond[fragment,verbatim]
   \context TabStaff <<
-    \property TabStaff.stringTunings =  #'(-5 -10 -15 -20)
+    \set TabStaff.stringTunings =   #'(-5 -10 -15 -20)
     
     \notes {
       a,4 c' a e' e c' a e'
@@ -3968,7 +3969,7 @@ scheme = \chords {
 \score {
   \notes <<
     \context ChordNames {
-        \property ChordNames.chordChanges = ##t
+        \set chordChanges =  ##t
         \scheme }
     \context Staff \transpose c c' \scheme
   >>
@@ -4003,8 +4004,8 @@ separators, e.g.
 @lilypond[fragment,verbatim]
 \context ChordNames \chords {
       c:7sus4
-      \property ChordNames.chordNameSeparator
       = \markup { \typewriter "|" }
+      \set chordNameSeparator
 \markup { \typewriter "|" }
       c:7sus4 }
 @end lilypond
 
@@ -4149,11 +4150,11 @@ example, @code{markFormatter} is set to a canned procedure. After a
 few measures, it is set to function that produces a boxed number. 
 
 @lilypond[verbatim,fragment,relative=1]
-  \property Score.markFormatter = #format-mark-numbers 
+  \set Score.markFormatter =  #format-mark-numbers 
   c1 \mark \default
   c1 \mark \default
-  \property Score.markFormatter
   = #(lambda (mark  context)
+  \set Score.markFormatter
 #(lambda (mark  context)
        (make-bold-markup (make-box-markup (number->string mark))))
   c1 \mark \default
   c1 \mark \default
@@ -4183,7 +4184,7 @@ In this case, during line breaks, marks must also be printed at the
 end of the line, and not at the beginning. Use the following to force
 that behavior:
 @example
-\property Score.RehearsalMark \override
+\override Score.RehearsalMark  
   #'break-visibility = #begin-of-line-invisible
 @end example
 
@@ -4253,7 +4254,7 @@ used, for the next ones @code{instr} is used:
 
 @quotation
 @lilypond[verbatim,raggedright]
-  \property Staff.instrument = "ploink " { c''4 }  
+  \set Staff.instrument =  "ploink " { c''4 }  
 @end lilypond
 @end quotation
 
@@ -4263,7 +4264,7 @@ names:
 @quotation
 @lilypond[fragment,verbatim,raggedright]
   \notes {
-    \property Staff.instrument = \markup {
+    \set Staff.instrument =  \markup {
         \column < "Clarinetti"
           { "in B"
             \smaller \musicglyph #"accidentals--1"
@@ -4365,7 +4366,7 @@ be expanded, and the appropriate number is added automatically:
 
 @lilypond[fragment,verbatim]
  \time 4/4 r1 | R1 | R1*2
- \property Score.skipBars = ##t R1*17  R1*4
+ \set Score.skipBars =  ##t R1*17  R1*4
 @end lilypond
 
 The @code{1} in @code{R1} is similar to the duration notation used for
@@ -4373,7 +4374,7 @@ notes. Hence, for time signatures other than 4/4, you must enter other
 durations.  This can be done with augmentation dots or fractions:
 
 @lilypond[fragment,verbatim]
- \property Score.skipBars = ##t
+ \set Score.skipBars =  ##t
  \time 3/4
   R2. | R2.*2
  \time 13/8
@@ -4492,7 +4493,7 @@ may set the property @var{soloADue} to false:
 
 @lilypond[verbatim,raggedright,fragment]
    \new Staff <<
-    \property Staff.soloADue = ##f
+    \set Staff.soloADue =  ##f
     \partcombine 
       {
         g a( b) r
@@ -4572,7 +4573,7 @@ for the full score, and one with cue notes for the instrumental part:
         \tag #'part <<
           R1 \\
           @{
-              \property Voice.fontSize = #-1
+              \set fontSize =  #-1
               c4_"cue" f2 g4 @} 
         >>
         \tag #'score R1
@@ -4628,8 +4629,8 @@ output:
 @cindex @code{transposing}
 
 @example
-        \property Staff.instrument = #"Cl. in B-flat"
-        \property Staff.transposing = #-2
+        \set Staff.instrument =  #"Cl. in B-flat"
+        \set Staff.transposing =  #-2
 @end example
 
 
@@ -4723,7 +4724,7 @@ printings of the 16th century.
 The following example demonstrates the @code{neo_mensural} style:
 
 @lilypond[fragment,raggedright,verbatim]
-  \property Voice.NoteHead \set #'style = #'neo_mensural
+  \override NoteHead   #'style = #'neo_mensural
   a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
 @end lilypond
 
@@ -4840,7 +4841,7 @@ in historic prints of the 16th century.
 The following example demonstrates the @code{neo_mensural} style:
 
 @lilypond[fragment,raggedright,verbatim]
-  \property Voice.Rest \set #'style = #'neo_mensural
+  \override Rest   #'style = #'neo_mensural
   r\longa r\breve r1 r2 r4 r8 r16
 @end lilypond
 
@@ -4889,7 +4890,7 @@ modern style mensural C clef @tab
 @code{neo_mensural_c1}, @code{neo_mensural_c2},
 @code{neo_mensural_c3}, @code{neo_mensural_c4} @tab
 @lilypond[relative,notime]
-\property Staff.TimeSignature \set #'transparent = ##t
+\override Staff.TimeSignature   #'transparent = ##t
 \clef "neo_mensural_c2" c
 @end lilypond
 
@@ -4913,7 +4914,7 @@ petrucci style mensural C clefs, for use  on different  stafflines
 
 @tab
 @lilypond[relative,notime]
-\property Staff.TimeSignature \set #'transparent = ##t
+\override Staff.TimeSignature   #'transparent = ##t
 \clef "petrucci_c2" c
 @end lilypond
 
@@ -4922,7 +4923,7 @@ petrucci style mensural C clefs, for use  on different  stafflines
 petrucci style mensural F clef @tab
 @code{petrucci_f} @tab
 @lilypond[relative,notime]
-\property Staff.TimeSignature \set #'transparent = ##t
+\override Staff.TimeSignature   #'transparent = ##t
 \clef "petrucci_f" c
 @end lilypond
 
@@ -4931,7 +4932,7 @@ petrucci style mensural F clef @tab
 petrucci style mensural G clef @tab
 @code{petrucci_g} @tab
 @lilypond[relative,notime]
-\property Staff.TimeSignature \set #'transparent = ##t
+\override Staff.TimeSignature   #'transparent = ##t
 \clef "petrucci_g" c
 @end lilypond
 
@@ -4941,7 +4942,7 @@ historic style mensural C clef @tab
 @code{mensural_c1}, @code{mensural_c2}, @code{mensural_c3},
 @code{mensural_c4} @tab
 @lilypond[relative,notime]
-\property Staff.TimeSignature \set #'transparent = ##t
+\override Staff.TimeSignature   #'transparent = ##t
 \clef "mensural_c2" c
 @end lilypond
 
@@ -4950,7 +4951,7 @@ historic style mensural C clef @tab
 historic style mensural F clef @tab
 @code{mensural_f} @tab
 @lilypond[relative,notime]
-\property Staff.TimeSignature \set #'transparent = ##t
+\override Staff.TimeSignature   #'transparent = ##t
 \clef "mensural_f" c
 @end lilypond
 
@@ -4959,7 +4960,7 @@ historic style mensural F clef @tab
 historic style mensural G clef @tab
 @code{mensural_g} @tab
 @lilypond[relative,notime]
-\property Staff.TimeSignature \set #'transparent = ##t
+\override Staff.TimeSignature   #'transparent = ##t
 \clef "mensural_g" c
 @end lilypond
 
@@ -4968,8 +4969,8 @@ historic style mensural G clef @tab
 Editio Vaticana style do clef @tab
 @code{vaticana_do1}, @code{vaticana_do2}, @code{vaticana_do3} @tab
 @lilypond[relative,notime]
-    \property Staff.StaffSymbol \set #'line-count  = #4
-\property Staff.TimeSignature \set #'transparent = ##t
+    \override Staff.StaffSymbol   #'line-count  = #4
+\override Staff.TimeSignature   #'transparent = ##t
 \clef "vaticana_do2" c
 @end lilypond
 
@@ -4978,8 +4979,8 @@ Editio Vaticana style do clef @tab
 Editio Vaticana style fa clef @tab
 @code{vaticana_fa1}, @code{vaticana_fa2} @tab
 @lilypond[relative,notime]
-    \property Staff.StaffSymbol \set #'line-count  = #4
-\property Staff.TimeSignature \set #'transparent = ##t
+    \override Staff.StaffSymbol   #'line-count  = #4
+\override Staff.TimeSignature   #'transparent = ##t
 \clef "vaticana_fa2" c
 @end lilypond
 
@@ -4988,8 +4989,8 @@ Editio Vaticana style fa clef @tab
 Editio Medicaea style do clef @tab
 @code{medicaea_do1}, @code{medicaea_do2}, @code{medicaea_do3} @tab
 @lilypond[relative,notime]
-    \property Staff.StaffSymbol \set #'line-count  = #4
-\property Staff.TimeSignature \set #'transparent = ##t
+    \override Staff.StaffSymbol   #'line-count  = #4
+\override Staff.TimeSignature   #'transparent = ##t
 \clef "medicaea_do2" c
 @end lilypond
 
@@ -4998,8 +4999,8 @@ Editio Medicaea style do clef @tab
 Editio Medicaea style fa clef @tab
 @code{medicaea_fa1}, @code{medicaea_fa2} @tab
 @lilypond[relative,notime]
-    \property Staff.StaffSymbol \set #'line-count  = #4
-\property Staff.TimeSignature \set #'transparent = ##t
+    \override Staff.StaffSymbol   #'line-count  = #4
+\override Staff.TimeSignature   #'transparent = ##t
 \clef "medicaea_fa2" c
 @end lilypond
 
@@ -5008,8 +5009,8 @@ Editio Medicaea style fa clef @tab
 historic style hufnagel do clef @tab
 @code{hufnagel_do1}, @code{hufnagel_do2}, @code{hufnagel_do3} @tab
 @lilypond[relative,notime]
-    \property Staff.StaffSymbol \set #'line-count  = #4
-\property Staff.TimeSignature \set #'transparent = ##t
+    \override Staff.StaffSymbol   #'line-count  = #4
+\override Staff.TimeSignature   #'transparent = ##t
 \clef "hufnagel_do2" c
 @end lilypond
 
@@ -5018,8 +5019,8 @@ historic style hufnagel do clef @tab
 historic style hufnagel fa clef @tab
 @code{hufnagel_fa1}, @code{hufnagel_fa2} @tab
 @lilypond[relative,notime]
-    \property Staff.StaffSymbol \set #'line-count  = #4
-\property Staff.TimeSignature \set #'transparent = ##t
+    \override Staff.StaffSymbol   #'line-count  = #4
+\override Staff.TimeSignature   #'transparent = ##t
 \clef "hufnagel_fa2" c
 @end lilypond
 
@@ -5028,7 +5029,7 @@ historic style hufnagel fa clef @tab
 historic style hufnagel combined do/fa clef @tab
 @code{hufnagel_do_fa} @tab
 @lilypond[relative,notime]
-\property Staff.TimeSignature \set #'transparent = ##t
+\override Staff.TimeSignature   #'transparent = ##t
 \clef "hufnagel_do_fa" c
 @end lilypond
 
@@ -5040,14 +5041,14 @@ historic style hufnagel combined do/fa clef @tab
 @c Supported clefs:
 @c @code{percussion}
 @c
-@c @lilypond{\property Staff.TimeSignature \set #'transparent = ##t \clef "percussion" c'}
+@c @lilypond{\override Staff.TimeSignature   #'transparent = ##t \clef "percussion" c'}
 @c
 @c @item modern style tab clef (glyph: @code{clefs-tab})
 @c
 @c Supported clefs:
 @c @code{tab}
 @c
-@c @lilypond{\context Staff \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #6 \property Staff.TimeSignature \set #'transparent = ##t \clef "tab" c'}
+@c @lilypond{\context Staff \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #6 \override Staff.TimeSignature   #'transparent = ##t \clef "tab" c'}
 
 @emph{Modern style} means ``as is typeset in contemporary editions of
 transcribed mensural music''.
@@ -5089,9 +5090,9 @@ select ancient flags.  Besides the @code{default} flag style,
  only @code{mensural} style is supported:
 
 @lilypond[fragment,raggedright,verbatim]
-  \property Voice.Stem \set #'flag-style = #'mensural
-  \property Voice.Stem \set #'thickness = #1.0
-  \property Voice.NoteHead \set #'style = #'mensural
+  \override Stem   #'flag-style = #'mensural
+  \override Stem   #'thickness = #1.0
+  \override NoteHead   #'style = #'mensural
   \autoBeamOff
   c'8 d'8 e'8 f'8 c'16 d'16 e'16 f'16 c'32 d'32 e'32 f'32 s8
   c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
@@ -5105,10 +5106,10 @@ of the end of each flare is different between notes on staff lines and
 notes between staff lines:
 
 @lilypond[fragment,raggedright]
-  \property Voice.Stem \set #'flag-style = #'mensural
-  \property Voice.Stem \set #'thickness = #1.0
-  \property Voice.Stem \set #'adjust-if-on-staffline = ##f
-  \property Voice.NoteHead \set #'style = #'mensural
+  \override Stem   #'flag-style = #'mensural
+  \override Stem   #'thickness = #1.0
+  \override Stem   #'adjust-if-on-staffline = ##f
+  \override NoteHead   #'style = #'mensural
   \autoBeamOff
   c'8 d'8 e'8 f'8 c'16 d'16 e'16 f'16 c'32 d'32 e'32 f'32 s8
   c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
@@ -5136,8 +5137,8 @@ following table:
 @lilypond
 \score {
     \notes {
-        \property Score.timing = ##f
-        \property Score.barAlways = ##t
+        \set Score.timing =  ##f
+        \set Score.barAlways =  ##t
         s_\markup { "$\\backslash$time 4/4" }
          ^\markup { "       " \musicglyph #"timesig-neo_mensural4/4" }
        s
@@ -5260,7 +5261,7 @@ The result looks like this:
 \score {
     \notes {
        a'1
-       \property Staff.Custos \set #'style = #'mensural
+       \override Staff.Custos   #'style = #'mensural
        \break
        g'
     }
@@ -5500,10 +5501,10 @@ automatic transcription of the ligatures.
 For example,
 
 @example
-        \property Score.timing = ##f
-        \property Score.defaultBarType = "empty"
-        \property Voice.NoteHead \set #'style = #'neo_mensural
-        \property Staff.TimeSignature \set #'style = #'neo_mensural
+        \set Score.timing =  ##f
+        \set Score.defaultBarType =  "empty"
+        \override NoteHead   #'style = #'neo_mensural
+        \override Staff.TimeSignature   #'style = #'neo_mensural
         \clef "petrucci_g"
         \[ g\longa c\breve a\breve f\breve d'\longa \]
         s4
@@ -5512,10 +5513,10 @@ For example,
 @lilypond[raggedright]
 \score {
     \notes \transpose c c' {
-        \property Score.timing = ##f
-        \property Score.defaultBarType = "empty"
-        \property Voice.NoteHead \set #'style = #'neo_mensural
-        \property Staff.TimeSignature \set #'style = #'neo_mensural
+        \set Score.timing =  ##f
+        \set Score.defaultBarType =  "empty"
+        \override NoteHead   #'style = #'neo_mensural
+        \override Staff.TimeSignature   #'style = #'neo_mensural
         \clef "petrucci_g"
         \[ g\longa c\breve a\breve f\breve d'\longa \]
         s4
@@ -5538,10 +5539,10 @@ to the following:
 @lilypond[raggedright]
 \score {
     \notes \transpose c c' {
-        \property Score.timing = ##f
-        \property Score.defaultBarType = "empty"
-        \property Voice.NoteHead \set #'style = #'neo_mensural
-        \property Staff.TimeSignature \set #'style = #'neo_mensural
+        \set Score.timing =  ##f
+        \set Score.defaultBarType =  "empty"
+        \override NoteHead   #'style = #'neo_mensural
+        \override Staff.TimeSignature   #'style = #'neo_mensural
         \clef "petrucci_g"
         \[ g\longa c\breve a\breve f\breve d'\longa \]
         s4
@@ -7308,7 +7309,7 @@ entering the chant, as the following short excerpt demonstrates:
 \score {
 <<
   \context VaticanaVoice = "cantus" {
-    \property Score.BarNumber \set #'transparent = ##t
+    \override Score.BarNumber   #'transparent = ##t
     \notes {
       \[ c'\melisma c' \flexa a \] \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
       \[ f\melisma \pes a c' c' \pes d'\melismaEnd \] c' \divisioMinima \break
@@ -7542,7 +7543,7 @@ Do not confuse layout properties with translation
 properties. Translation properties always use a mixed caps style
 naming, and are manipulated using @code{\property}:
 @example
-  \property Context.propertyName  = @var{value}
+  \set Context.propertyName =  @var{value}
 @end example
 
 Layout properties are use Scheme style variable naming, i.e.  lower
@@ -7596,8 +7597,8 @@ Changing a variable for only one object is commonly achieved with
 @code{\once}:
 
 @example
-\once \property @var{context}.@var{objectname}
-  \override @var{symbol} = @var{value}
+\once \override @var{context}.@var{objectname}
+    @var{symbol} = @var{value}
 @end example
 Here @var{symbol} is a Scheme expression of symbol type, @var{context}
 and @var{objectname} is a string and @var{value} is a Scheme expression.
@@ -7608,7 +7609,7 @@ changed from its original setting:
 
 @lilypond[verbatim,fragment,relative=1]
   c4 
-  \once \property Voice.Stem \set #'thickness = #4
+  \once \override Stem   #'thickness = #4
   c4
   c4
 @end lilypond
@@ -7617,7 +7618,7 @@ changed from its original setting:
 For changing more objects, the same command, without @code{\once} can
 be used:
 @example
-\property @var{context}.@var{objectname} \override @var{symbol} = @var{value}
+\override @var{context}.@var{objectname}   @var{symbol} = @var{value}
 @end example
 This command adds @code{@var{symbol} = @var{value}} to the definition
 of @var{objectname} in the context @var{context}, and this definition
@@ -7634,14 +7635,14 @@ The @code{\set} shorthand performs a revert followed by an override,
 and is often more convenient to use
 
 @example
-\property @var{context}.@var{objectname} \set @var{symbol} = @var{value}
+\override @var{context}.@var{objectname}   @var{symbol} = @var{value}
 @end example
 
 Some examples: 
 @lilypond[verbatim,quote]
-c'4 \property Voice.Stem \override #'thickness = #4.0
+c'4 \override Stem   #'thickness = #4.0
 c'4
-c'4 \property Voice.Stem \revert #'thickness
+c'4 \revert Stem #'thickness
 c'4
 @end lilypond
 
@@ -7649,9 +7650,9 @@ The following example gives exactly the same result as the previous
 one (assuming the system default for stem thickness is 1.3):
 @c
 @lilypond[verbatim,quote]
-  c'4 \property Voice.Stem \set #'thickness = #4.0
+  c'4 \override Stem   #'thickness = #4.0
   c'4
-  c'4 \property Voice.Stem \set #'thickness = #1.3
+  c'4 \override Stem   #'thickness = #1.3
   c'4
 @end lilypond
 
@@ -7695,7 +7696,7 @@ list is a singly linked list, we can treat it as a stack, and
 @code{\override} and @code{\revert} are push and pop operations.  The
 association list is stored in a normal context property, hence
 @example
- \property Voice.NoteHead  = #'() 
+ \set NoteHead =  #'() 
 @end example
 will effectively erase @internalsref{NoteHead}s from the current
 @internalsref{Voice}. Typically, this will blank the object. However,
@@ -7832,15 +7833,15 @@ By increasing the value of @code{padding}, we can move away the
 fingering.  The following command inserts 3 staff spaces of white
 between the note and the fingering:
 @example
-\once \property Voice.Fingering \set #'padding = #3
+\once \override Fingering   #'padding = #3
 @end example
 
 Inserting this command before the Fingering object is created,
 i.e. before @code{c2}, yields the following result:
 
 @lilypond[relative=2,fragment,verbatim]
-\once \property Voice.Fingering
-  \set #'padding = #3
+\once \override Fingering
+    #'padding = #3
 c-2
 \stemUp
 f
@@ -7862,7 +7863,7 @@ Fingering_engraver is part of contexts: Voice
 @end example
 so tuning the settings for Fingering should be done with
 @example
-  \property Voice.Fingering \set @dots{}
+  \override Fingering   @dots{}
 @end example
 
 Of course, the tweak may also done in a larger context than
@@ -7927,7 +7928,7 @@ negative numbers make the font smaller, positive numbers larger. An
 example is given below:
 @c
 @lilypond[fragment,relative=1,verbatim,quote]
-  c4 c4 \property Voice.fontSize = #-1
+  c4 c4 \set fontSize =  #-1
   f4 g4
 @end lilypond
 This command will set @code{font-size} (see below), and does
@@ -7943,8 +7944,8 @@ notes. An elaborate example of those is in
 The font used for printing a object can be selected by setting
 @code{font-name}, e.g.
 @example
-  \property Staff.TimeSignature
-    \set #'font-name = #"cmr17"
+  \override Staff.TimeSignature
+      #'font-name = #"cmr17"
 @end example
 
 @noindent
@@ -7988,9 +7989,9 @@ For any of these properties, the value @code{*} (i.e. the symbol
 @code{*}, entered as @code{#'*}), acts as a wildcard. This can be used
 to override default setting, which are always present. For example:
 @example
-  \property Lyrics . LyricText \override #'font-series = #'bold
-  \property Lyrics . LyricText \override #'font-family = #'typewriter
-  \property Lyrics . LyricText \override #'font-shape  = #'*
+  \override Lyrics .LyricText   #'font-series = #'bold
+  \override Lyrics .LyricText   #'font-family = #'typewriter
+  \override Lyrics .LyricText   #'font-shape  = #'*
 @end example
 
 @cindex @code{font-style}
@@ -8391,7 +8392,7 @@ done with the property @code{minimumVerticalExtent}. It takes a pair
 of numbers, so if you want to make it smaller from its, then you could
 set
 @example
-  \property Staff.minimumVerticalExtent = #'(-4 . 4)
+  \set Staff.minimumVerticalExtent =  #'(-4 . 4)
 @end example
 This sets the vertical size of the current staff to 4 staff spaces on
 either side of the center staff line.  The argument of
@@ -8493,9 +8494,9 @@ exaggerated corrections:
     \score { \notes {
       c'4 e''4 e'4 b'4 |
       b'4 e''4 b'4 e''4|
-      \property Staff.NoteSpacing \override #'stem-spacing-correction
+      \override Staff.NoteSpacing   #'stem-spacing-correction
       = #1.5
-      \property Staff.StaffSpacing \override #'stem-spacing-correction
+      \override Staff.StaffSpacing   #'stem-spacing-correction
       = #1.5
       c'4 e''4 e'4 b'4 |
       b'4 e''4 b'4 e''4|      
index 81cd61d2acac9f9b1328028c4b08d77cb85fd412..b220d2ca0a6ce138074b3d647c9350cc2f6ee0f4 100644 (file)
@@ -1,3 +1,4 @@
+\version "2.1.22"
 @c -*-texinfo-*-
 @c This file is part of lilypond.tely
 
@@ -100,8 +101,8 @@ a1 a2 a4 a16 a32
 @end example
 
 @lilypond[notime]
-\property Score.timing = ##f
-\property Staff.autoBeaming = ##f
+\set Score.timing =  ##f
+\set Staff.autoBeaming =  ##f
 \transpose c c' { a1 a2 a4 a16 a32 s16_" " }
 @end lilypond
 
@@ -112,7 +113,7 @@ a4 a a2 a
 @end example
 
 @lilypond[notime]
-\property Score.timing = ##f
+\set Score.timing =  ##f
 \transpose c c' { a a a2 a s16_" " }
 @end lilypond
 
@@ -126,9 +127,9 @@ r2 r4 r8 r16
 @end example
 
 @lilypond[fragment]
-\property Score.timing = ##f
-\property Staff.Clef = \turnOff
-\property Staff.TimeSignature = \turnOff
+\set Score.timing =  ##f
+\set Staff.Clef =  \turnOff
+\set Staff.TimeSignature =  \turnOff
 r2 r4 r8 r16
 s16_" "
 @end lilypond
@@ -143,7 +144,7 @@ a2. a4 a8. a16
 @end example
 
 @lilypond[notime]
-\property Score.timing = ##f
+\set Score.timing =  ##f
 \transpose c c' { a2. a4 a8. a16 s16_" " }
 @end lilypond
 
@@ -159,7 +160,7 @@ The @rglos{meter} (or @rglos{time signature}) can be set with the
 
 @c a clef here may lead to confusion
 @lilypond
-\property Staff.Clef \set #'transparent = ##t 
+\override Staff.Clef   #'transparent = ##t 
 \time 3/4
 s4_" "
 \time 6/8
@@ -182,7 +183,7 @@ The @rglos{clef} can be set using the @code{\clef} command:
 @end example
 
 @lilypond[notime]
-\property Score.timing = ##f
+\set Score.timing =  ##f
 \clef violin
 s4_" "
 \clef bass
@@ -383,7 +384,7 @@ cis1 ees fisis aeses
 @end example
 
 @lilypond[notime]
-\property Score.timing = ##f
+\set Score.timing =  ##f
 \transpose c c' { cis1 ees fisis aeses s16_" " }
 @end lilypond
 
@@ -401,7 +402,7 @@ g
 @end example
 
 @lilypond[fragment]
-\property Staff.TimeSignature = \turnOff
+\set Staff.TimeSignature =  \turnOff
 \key d \major
 g'1
 \key c \minor
@@ -427,7 +428,7 @@ not be added automatically, and you must enter what you want to hear.
 
 For example, in this example:
 @lilypond[fragment]
-\property Staff.TimeSignature = \turnOff
+\set Staff.TimeSignature =  \turnOff
 \key d \major
 d' cis' fis'
 @end lilypond
@@ -445,7 +446,7 @@ staff.'' Rather, it means: ``a note with pitch D-natural.'' In the key
 of A-flat, it gets an accidental:
 
 @lilypond[fragment]
-\property Staff.TimeSignature =\turnOff
+\set Staff.TimeSignature = \turnOff
 \key as \major
 d'
 @end lilypond
@@ -566,8 +567,8 @@ c'4 c'' c''' \clef bass c c,
 @end example
 
 @lilypond[fragment]
-\property Score.timing = ##f
-\property Staff.TimeSignature = \turnOff
+\set Score.timing =  ##f
+\set Staff.TimeSignature =  \turnOff
 c'4 c'' c''' \clef bass c c,
 @end lilypond
 @end quotation
@@ -599,8 +600,8 @@ one.  For example, @code{c f} goes up while @code{c g} goes down:
 @end example
 
 @lilypond[fragment]
-\property Score.timing = ##f
-\property Staff.TimeSignature = \turnOff
+\set Score.timing =  ##f
+\set Staff.TimeSignature =  \turnOff
 \relative c'' {
   c f c g c
 }
@@ -636,8 +637,8 @@ Larger intervals are made by adding octavation quotes.
 @end example
 
 @lilypond[fragment]
-\property Score.timing = ##f
-\property Staff.TimeSignature = \turnOff
+\set Score.timing =  ##f
+\set Staff.TimeSignature =  \turnOff
 \relative c'' {
   c f, f c' c g' c,
 }
@@ -665,8 +666,8 @@ Here is an example of the difference between relative mode and
 @end example
 
 @lilypond[fragment]
-\property Score.timing = ##f
-\property Staff.TimeSignature = \turnOff
+\set Score.timing =  ##f
+\set Staff.TimeSignature =  \turnOff
 \relative a {
 \clef bass
   a d a e d c' d'
@@ -682,8 +683,8 @@ Here is an example of the difference between relative mode and
 @end example
 
 @lilypond[fragment]
-\property Score.timing = ##f
-\property Staff.TimeSignature = \turnOff
+\set Score.timing =  ##f
+\set Staff.TimeSignature =  \turnOff
 \clef bass
   a d a e d c' d'
 @end lilypond
@@ -1401,7 +1402,7 @@ accidentals to print, and where barlines must be placed, are stored in
 variables. These variables are called @emph{context properties}.
 The properties can also be manipulated from input files. Consider this input:
 @example
-\property Staff.autoBeaming = ##f
+\set Staff.autoBeaming =  ##f
 @end example 
 
 @noindent
@@ -1411,7 +1412,7 @@ property controls whether beams are printed automatically:
 @c
 @lilypond[relative=1,fragment,verbatim]
   c8 c c c
-  \property Staff.autoBeaming = ##f
+  \set Staff.autoBeaming =  ##f
   c8 c c c  
 @end lilypond
 
@@ -1425,23 +1426,23 @@ entered as follows:
 @itemize @bullet
 @item a string, enclosed in double quotes, for example,
 @example
-  \property Staff.instrument = #"French Horn"
+  \set Staff.instrument =  #"French Horn"
 @end example
 @item a boolean: either @code{#t} or @code{#f}, for true and false
 respectively, e.g.
 @example
-  \property Voice.autoBeaming = ##f
-  \property Score.skipBars = ##t
+  \set autoBeaming =  ##f
+  \set Score.skipBars =  ##t
 @end example
 
 @item a number, such as
 @example
-  \property Score.currentBarNumber = #20
+  \set Score.currentBarNumber =  #20
 @end example
 
 @item a symbol, which is introduced by a quote character, as in 
 @example
-  \property Staff.crescendoSpanner = #'dashed-line
+  \set Staff.crescendoSpanner =  #'dashed-line
 @end example
 
 @item a pair, which is also introduced by a quote character, like in
@@ -1449,15 +1450,15 @@ the following statements, which set properties to the pairs (-7.5, 6)
 and (3, 4) respectively:
 
 @example
-  \property Staff.minimumVerticalExtent  = #'(-7.5 . 6)
-  \property Staff.timeSignatureFraction  = #'(3 . 4)
+  \set Staff.minimumVerticalExtent =  #'(-7.5 . 6)
+  \set Staff.timeSignatureFraction =  #'(3 . 4)
 @end example
 
 @item a list, which is also introduced by a quote character. In the
 following example, the @code{breakAlignOrder} property is set to a
 list of symbols:
 @example
-  \property Score.breakAlignOrder =
+  \set Score.breakAlignOrder = 
     #'(left-edge time-signature key-signatures)
 @end example
 
@@ -1489,14 +1490,14 @@ values, we can alter the look of a formatted score:
 
 @lilypond[verbatim,relative]
   c4
-  \property Voice.Stem \override #'thickness = #3.0
+  \override Stem   #'thickness = #3.0
   c4 c4 c4 
 @end lilypond
 
 @noindent
 In the example shown here, the layout property @code{thickness} (a
 symbol) is set to 3 in the @code{Stem} layout objects of the current
-Voice.  As a result, the notes following @code{\property} have thicker
+  As a result, the notes following @code{\property} have thicker
 stems.
 
 In most cases of manual overrides, only a single object must be
@@ -1504,12 +1505,12 @@ changed. This can be achieved by prefixing @code{\once} to the
 @code{\property} statement, i.e.
 
 @example
- \once \property Voice.Stem \set #'thickness = #3.0
+ \once \override Stem   #'thickness = #3.0
 @end example
 
 @lilypond[relative]
   c4
-  \once \property Voice.Stem \set #'thickness = #3.0
+  \once \override Stem   #'thickness = #3.0
   c4 c4 c4 
 @end lilypond
 
@@ -1547,8 +1548,8 @@ the left, and 1.8 staff space downwards:
 @lilypond[relative=1,verbatim]
 \stemUp
 f-5
-\once \property Voice.Fingering
-  \set #'extra-offset = #'(-0.3 . -1.8) 
+\once \override Fingering
+    #'extra-offset = #'(-0.3 . -1.8) 
 f-5
 @end lilypond
 
@@ -1568,7 +1569,7 @@ in that voice, the tie appears to cross voices:
 
 @lilypond[fragment,relative=1,verbatim]
   c4 << {
-      \once \property Voice.Stem \set #'transparent = ##t
+      \once \override Stem   #'transparent = ##t
       b8~ b8
   } \\ {
        b[ g8]
@@ -1585,7 +1586,7 @@ tweak}:
 
 @lilypond[relative=1,verbatim]
   c2\fermata
-  \property Voice.Script \set #'padding = #3
+  \override Script   #'padding = #3
   b2\fermata
 @end lilypond
 
@@ -1712,14 +1713,14 @@ When printing the part, the following @code{skipBars} property must be
 set to false, to prevent the rest from being expanded in three one bar
 rests:
 @example
-  \property Score.skipBars = ##t
+  \set Score.skipBars =  ##t
 @end example
 Prepending the rest and the property setting above, leads to the
 following result:
 
 @lilypond[raggedright]
 \score {\notes { \transpose f c' \relative c { \time 2/4
-\property Score.skipBars = ##t 
+\set Score.skipBars =  ##t 
         R2*3
     r4 f8 a cis4 f e d } }}
 @end lilypond
diff --git a/VERSION b/VERSION
index 10726fa34fa022c7f51f33ba7cba68fdb4dab699..892d972eef6c1e08a39c8c551a9b0f1d204ba738 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,6 +1,6 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=1
-PATCH_LEVEL=21
+PATCH_LEVEL=22
 MY_PATCH_LEVEL=
 
index 82095e1b9c6515f98953b89835a97a2fc9062284..f636adeed6da4b00ca01655ab29bba5261abdfed 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.7"
+\version "2.1.22"
 
 % A simple scale in LilyPond
 %
index b4bcb5c9acbc6540d4da1f1a140e4067948cc9fc..694483050f18dd9ba4d316af67573543ab1155d6 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.7"
+\version "2.1.22"
 % Some beamed and slurred notes of different taste in LilyPond
 %
 % Type:
index 8714771e224b06fb006a3c59bef4f3c82e57ae9e..84c7f60c8ef7a41cc75406df3b8939ea8430cd1a 100644 (file)
@@ -1,5 +1,5 @@
 #(ly:set-option 'old-relative)
-\version "2.1.7"
+\version "2.1.22"
 
 one =  \notes\relative c{
        c'' d e f
index a0f2465e0cce1688db0688b0cf9a31c2b3091896..c30b8472379df5dd148073af2d88f8c766cf8141 100644 (file)
@@ -1,5 +1,5 @@
 #(ly:set-option 'old-relative)
-\version "2.1.7"
+\version "2.1.22"
 
 \header {
     composer =   "ARTHUR GRAY"
@@ -43,7 +43,7 @@ treble = \new Voice \notes\relative c''{
 
     \change Staff=bass
 
-    \once\property Voice.TextScript \set #'extra-offset = #'(-3 . -4) %tweak
+    \once\override TextScript  #'extra-offset = #'(-3 . -4) %tweak
            
     cis,16^2(^\markup {\small \italic "m.d." }
     <fis fis,>8 <e! e,!>
@@ -53,22 +53,22 @@ treble = \new Voice \notes\relative c''{
     \change Staff=treble
     
     \slurUp
-    \property PianoStaff.connectArpeggios = ##t
+    \set PianoStaff.connectArpeggios =  ##t
 
     #(set-octavation 1)
 
-    \once\property Voice.TextScript \set #'extra-offset = #'(-3 . -2) %tweak
+    \once\override TextScript  #'extra-offset = #'(-3 . -2) %tweak
            
     \tieUp
     cis''''4^\markup { \small \italic "m.g." }\arpeggio~
     \grace {
-       \property Voice.Stem \override #'stroke-style = #"grace"
+       \override Stem  #'stroke-style = #"grace"
   
          cis8
         
          %\stemBoth Hmm
        
-        \property Voice.Stem \set #'direction = #0
+        \override Stem  #'direction = #0
         
           a16[-5( fis dis]
         #(set-octavation 0)
@@ -77,7 +77,7 @@ treble = \new Voice \notes\relative c''{
         % the small grace in lower staff comes after us
         s32
     
-       \property Voice.Stem \revert #'stroke-style
+       \revert Stem #'stroke-style
     }
 
 
@@ -88,10 +88,10 @@ treble = \new Voice \notes\relative c''{
     r8 <a' a,>8(\mf <gis gis,> <fis fis,>
     
     % \fingerUp
-    \property Voice.Fingering \set #'direction = #1
+    \override Fingering  #'direction = #1
     
     % Manual fix for collision with slur
-    \property Voice.Fingering \set #'extra-offset = #'(0 . 1) %tweak
+    \override Fingering  #'extra-offset = #'(0 . 1) %tweak
     <gis gis,> <fis fis,> e)-1-4-5 r
 
     | %6
@@ -106,8 +106,8 @@ trebleTwo =  \new Voice \notes\relative c''{
     \stemDown
     \slurDown
     % \fingerDown
-    \property Voice.Fingering \set #'direction = #-1
-    \property Voice.Fingering \set #'extra-offset = #'(0 . 1.2)
+    \override Fingering  #'direction = #-1
+    \override Fingering  #'extra-offset = #'(0 . 1.2)
     s2
     | %1
     s1*2
@@ -132,8 +132,8 @@ bass =  \new Voice \notes\relative c{
     \key a \major
     
     % Allow ugly (highly blown-up) slurs
-    \property Voice.Slur \override #'beautiful = #5.0 %tweak
-    \property Voice.Slur \override #'attachment-offset = #'((0 . 3) . (0 . -4))  %tweak
+    \override Slur  #'beautiful = #5.0 %tweak
+    \override Slur  #'attachment-offset = #'((0 . 3) . (0 . -4))  %tweak
     \slurDown
     
     \dynamicUp
@@ -143,35 +143,35 @@ bass =  \new Voice \notes\relative c{
     <cis cis,>4
     \change Staff=treble
     \stemDown
-    \property Voice.Slur \override #'attachment = #'(stem . stem) %tweak
+    \override Slur  #'attachment = #'(stem . stem) %tweak
     <a'' eis cis>4)\arpeggio
     
-    \property Voice.Slur \revert #'attachment %tweak
+    \revert Slur #'attachment %tweak
     \change Staff=bass
     \stemBoth
     
-    \property Voice.Slur \revert #'y-free %tweak
-    \property Voice.Slur \override #'y-free = #0.1 %tweak
-    \property Voice.Slur \revert #'attachment-offset %tweak
-    \property Voice.Slur \override #'attachment-offset = #'((0 . 3) . (0 . 8)) %tweak
+    \revert Slur #'y-free %tweak
+    \override Slur  #'y-free = #0.1 %tweak
+    \revert Slur #'attachment-offset %tweak
+    \override Slur  #'attachment-offset = #'((0 . 3) . (0 . 8)) %tweak
     r8. cis,,16( <fis fis,>8 <gis gis,>
     
     | %3
-    \property Voice.Stem \set #'length = #5 %tweak
+    \override Stem  #'length = #5 %tweak
     <a a,>4
     \change Staff=treble
                            
-    \property Voice.Stem \revert #'length %tweak
-    \property Voice.Stem \revert #'direction
-    \property Voice.Stem \override #'direction = #-1
+    \revert Stem #'length %tweak
+    \revert Stem #'direction
+    \override Stem  #'direction = #-1
     <a' fis cis>)\arpeggio
     \change Staff=bass
-    \property Voice.Stem \revert #'direction
+    \revert Stem #'direction
     r2
     
     | %4
-    \property Voice.Slur \revert #'beautiful %tweak
-    \property Voice.Slur \revert #'attachment-offset %tweak
+    \revert Slur #'beautiful %tweak
+    \revert Slur #'attachment-offset %tweak
     \stemDown
     <b,, b,>4
     \clef treble
@@ -182,7 +182,7 @@ bass =  \new Voice \notes\relative c{
     >>
     
     \grace {
-       \property Voice.Stem \override #'stroke-style = #"grace"
+       \override Stem  #'stroke-style = #"grace"
   
         s8
         s16 s s
@@ -191,7 +191,7 @@ bass =  \new Voice \notes\relative c{
        \clef bass
        <e,,, e,>32(
     
-       \property Voice.Stem \revert #'stroke-style
+       \revert Stem #'stroke-style
     }
     <gis' e>2)
     
@@ -199,18 +199,18 @@ bass =  \new Voice \notes\relative c{
     \slurUp
     
     % \fingerDown
-    \property Voice.Fingering \set #'direction = #-1
+    \override Fingering  #'direction = #-1
     
     %%a,8 e'[-5(<a-2 cis-3>])
     a,8 e'[-5(<a cis>])-2-3
     %%r b,-5 <e-3 gis-5 d'>4
     r b,-5 <e gis d'>4-3-5
     \slurBoth
-    \once \property Voice.Fingering \set #'extra-offset = #'(0 . -1) %tweak
+    \once \override Fingering  #'extra-offset = #'(0 . -1) %tweak
     e,8[-5(
     
     | %6
-    \once \property Voice.Fingering \set #'extra-offset = #'(0 . -1) %tweak
+    \once \override Fingering  #'extra-offset = #'(0 . -1) %tweak
     a)-2]
     \slurUp
     e'[(<a cis>)] r b, <e gis d'>4
@@ -233,27 +233,27 @@ bassTwo =  \new Voice \notes\relative c{
 }
 
 middleDynamics = \notes{
-    \property Dynamics.TextScript \set #'padding = #-1 %tweak
+    \override Dynamics.TextScript  #'padding = #-1 %tweak
     s2
     s1*2
     | %4
     s2
     \grace {
-  \property Voice.Stem \override #'stroke-style = #"grace"
+  \override Stem  #'stroke-style = #"grace"
   
           s8
           s16 s s
           s32 s
-           \once\property Dynamics.Hairpin \set #'extra-offset = #'(0 . 2) %tweak
+           \once\override Dynamics.Hairpin  #'extra-offset = #'(0 . 2) %tweak
           s\> s
           s32 s s s\!
     
-  \property Voice.Stem \revert #'stroke-style }
+  \revert Stem #'stroke-style }
 
     s32 s-"rall." s s s8 s4
     | %5
     s2-"a tempo" s8
-    \once\property Dynamics.Hairpin \set #'extra-offset = #'(1 . 0) %tweak
+    \once\override Dynamics.Hairpin  #'extra-offset = #'(1 . 0) %tweak
     s \> s s
     | %6 
     s8\!
@@ -270,25 +270,25 @@ lowerDynamics = \notes{
     s2\sustainDown s8. s16\sustainUp s4
     | %4
     s4\sustainDown
-    \property Dynamics.pedalSustainStrings = #'("Ped." "*Ped." "*")
+    \set Dynamics.pedalSustainStrings =  #'("Ped." "*Ped." "*")
     
     % grace destroys pedal-line-spanner?
     % let's do manual tweak:
-    \once\property Dynamics.SustainPedal \set #'extra-offset = #'(10 . 0) %tweak
+    \once\override Dynamics.SustainPedal  #'extra-offset = #'(10 . 0) %tweak
     s8\sustainUp
-    \once\property Dynamics.SustainPedal \set #'extra-offset = #'(16 . 0) %tweak
+    \once\override Dynamics.SustainPedal  #'extra-offset = #'(16 . 0) %tweak
     s8\sustainDown
 %{
     s4
     \grace {
-  \property Voice.Stem \override #'stroke-style = #"grace"
+  \override Stem  #'stroke-style = #"grace"
   
           s8
           s16 s s
           s32 s s s\sustainUp
           s32 s s s\sustainDown
     
-  \property Voice.Stem \revert #'stroke-style }
+  \revert Stem #'stroke-style }
 
 %}
     s2
@@ -300,19 +300,19 @@ lowerDynamics = \notes{
     %
     % that's what gray wants, anyway.
     
-    \property Dynamics.pedalSustainStyle = #'mixed
+    \set Dynamics.pedalSustainStyle =  #'mixed
     s8\sustainDown s s
     s s\sustainUp\sustainDown s
     s
-    \once \property Dynamics.pedalSustainStyle = #'text
+    \once \set Dynamics.pedalSustainStyle =  #'text
     s\sustainUp
 
     | %6
-    \property Dynamics.pedalSustainStyle = #'mixed
+    \set Dynamics.pedalSustainStyle =  #'mixed
     s8\sustainDown s s
     s s\sustainUp\sustainDown s
     s
-    \once \property Dynamics.pedalSustainStyle = #'text
+    \once \set Dynamics.pedalSustainStyle =  #'text
     s\sustainUp
     | %7
 }
index f83fc4129720f50eb9ebd79475af6f75bf26afda..8a145e394417a400da8aaf39b3aae097b0d60f5e 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.7"
+\version "2.1.22"
 \header {
   title =      "Title"
   subtitle =   "Subtitle"
index c41f00d66c840d2b8ad77712762b85c2452237e7..772a3b35c3eb25038f9487eeb61ca6172d475268 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.21"
+\version "2.1.22"
 \header {
     title      = "Puer natus est nobis (excerptum)"
     subtitle   = "Antiphona ad introitum VII"
index 253e28a26b2402915dac06e3ba3e8a2f33f2af7e..2db75a5bd14617a2c1916f4481e73075e1e83e30 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.7"
+\version "2.1.22"
 \header {
     title = "Screech and boink"
     subtitle = "Random complex notation"
@@ -13,9 +13,9 @@
 
 
            << {
-               \property Voice.Stem \revert #'direction
+               \revert Stem #'direction
                \change Staff = down
-               \property Voice.subdivideBeams = ##t         
+               \set subdivideBeams =  ##t           
                g16.[
                    \change Staff = up
                    c'''32      \change Staff = down
@@ -23,8 +23,8 @@
                    c'''32      \change Staff = down
                    g16]
                \change Staff = up
-               \property Voice.Stem \set #'direction = #1
-               \property Voice.followVoice = ##t
+               \override Stem  #'direction = #1
+               \set followVoice =  ##t
                c'''32([ b''16 a''16 gis''16 g''32)]  } \\
               { s4 \times 2/3 { d'16[ f' g'] } as'32[ b''32 e'' d''] } \\
               { s4 \autoBeamOff d''8.. f''32  } \\
        \context Staff = down {
            \clef bass
            \key c \minor
-           \property Voice.subdivideBeams = ##f
-           \property Voice.Stem \set #'french-beaming =  ##t
-           \property Voice.Beam \set #'thickness = #0.3
-           \property Voice.Stem \set #'thickness = #4.0
+           \set subdivideBeams =  ##f
+           \override Stem  #'french-beaming =  ##t
+           \override Beam  #'thickness = #0.3
+           \override Stem  #'thickness = #4.0
            g'16[ b16 fis16 g16]
            << \apply #notes-to-clusters { 
                as16 <as b>
@@ -46,7 +46,7 @@
                <g cis>
            } \\
               {
-                  \property Staff.Arpeggio \set #'arpeggio-direction =#-1
+                  \override Staff.Arpeggio  #'arpeggio-direction =#-1
                   <cis, e, gis, b, cis>4\arpeggio  }
           >>
        }
index e7402179800f042a0afb4d7501d4e934390dc062..80c4ea8f60f9f78be45233f543a2a9f9af7a4ab3 100644 (file)
@@ -1,5 +1,5 @@
 #(ly:set-option 'old-relative)
-\version "2.1.21"
+\version "2.1.22"
 \header{
 filename =      "twinkle-pop.ly"
 xtitle =        "Ah, vous dirais-je, maman "
@@ -34,7 +34,7 @@ acc =  \chords {
 }
 
 text =  \lyrics{ 
-        \property Lyrics . LyricText \set #'font-shape = #'italic
+        \override LyricText  #'font-shape = #'italic
 
         Ah!4 vous dir -- ai -- je ma man2
         Ce4 qui cau -- se mon tour -- ment2
index dd5634d5d9ff28401d3c11dccaa05827516ad5ce..8c27bd2b2ee541dd96c0e1e56515327e68f3cd8c 100644 (file)
@@ -6,7 +6,7 @@
  */
 #include "font-interface.hh"
 #include "item.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "accidental-interface.hh"
 #include "paper-def.hh"
 #include "pitch.hh"
 */
 
 
-Molecule
-parenthesize (Grob*me, Molecule m)
+Stencil
+parenthesize (Grob*me, Stencil m)
 {
-  Molecule open = Font_interface::get_default_font (me)->find_by_name (String ("accidentals-leftparen"));
-  Molecule close = Font_interface::get_default_font (me)->find_by_name (String ("accidentals-rightparen"));
-  m.add_at_edge (X_AXIS, LEFT, Molecule (open), 0,0);
-  m.add_at_edge (X_AXIS, RIGHT, Molecule (close), 0,0);
+  Stencil open = Font_interface::get_default_font (me)->find_by_name (String ("accidentals-leftparen"));
+  Stencil close = Font_interface::get_default_font (me)->find_by_name (String ("accidentals-rightparen"));
+  m.add_at_edge (X_AXIS, LEFT, Stencil (open), 0,0);
+  m.add_at_edge (X_AXIS, RIGHT, Stencil (close), 0,0);
 
   return m;
 }
@@ -201,13 +201,13 @@ Accidental_interface::print (SCM smob)
   else
     fm = Font_interface::get_default_font (me);
 
-  Molecule mol;
+  Stencil mol;
   for (SCM s = me->get_grob_property ("accidentals");
        gh_pair_p (s); s = gh_cdr (s))
     {
       int alteration = gh_scm2int (gh_car (s));
       String font_char = get_fontcharname (style, alteration);
-      Molecule acc (fm->find_by_name ("accidentals-" + font_char));
+      Stencil acc (fm->find_by_name ("accidentals-" + font_char));
 
       if (acc.is_empty ())
        {
index 26d9b252d9728ebd2eb8496c6a2c728521ff5813..db6ff873172b5f1f7767ed92bb3207d76178c215 100644 (file)
@@ -12,7 +12,7 @@
 #include "warn.hh"             // error()
 #include "libc-extension.hh"
 #include "afm.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "dimensions.hh"
 
 Adobe_font_metric::Adobe_font_metric (AFM_Font_info * fi)
@@ -178,9 +178,9 @@ Adobe_font_metric::~Adobe_font_metric ()
 }
 
 /*
-  return a molecule, without fontification 
+  return a stencil, without fontification 
  */
-Molecule
+Stencil
 Adobe_font_metric::find_by_name (String s) const
 {
   AFM_CharMetricInfo const *cm = find_char_metric (s);
@@ -191,7 +191,7 @@ Adobe_font_metric::find_by_name (String s) const
        Why don't we return empty?
        */
       
-      Molecule m;
+      Stencil m;
       m.set_empty (false);
       return m;
     }
@@ -203,5 +203,5 @@ Adobe_font_metric::find_by_name (String s) const
   //  at= fontify_atom ((Font_metric*)this, at);
   Box b = afm_bbox_to_box (cm->charBBox);
 
-  return Molecule (b, at);
+  return Stencil (b, at);
 }
index 9a9e3c6649553d876fb0a2c1f202e9773b9b2871..75e3dff62d2d82769922b0a9a6b559c554effa41 100644 (file)
@@ -9,7 +9,7 @@
 #include "staff-symbol-referencer.hh"
 #include "pitch.hh"
 #include "ambitus.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "note-head.hh"
 #include "item.hh"
 #include "font-interface.hh"
@@ -100,14 +100,14 @@ number_accidentals (SCM key_signature, Pitch *pitch,
 }
 
 void
-add_accidentals (Item *me, Molecule *head, int num_acc,
+add_accidentals (Item *me, Stencil *head, int num_acc,
                 Pitch *pitch, String accidentals_style, Real yoffs)
 {
   if (!num_acc)
     return;
   if (pitch->get_alteration())
     {
-      Molecule accidental (Font_interface::get_default_font (me)->
+      Stencil accidental (Font_interface::get_default_font (me)->
                           find_by_name (String ("accidentals-") +
                                         accidentals_style +
                                         to_string (pitch->get_alteration ())));
@@ -116,7 +116,7 @@ add_accidentals (Item *me, Molecule *head, int num_acc,
     }
   if (num_acc == 2)
     {
-      Molecule natural (Font_interface::get_default_font (me)->
+      Stencil natural (Font_interface::get_default_font (me)->
                        find_by_name (String ("accidentals-") +
                                      accidentals_style +
                                      to_string ("0")));
@@ -130,7 +130,7 @@ SCM
 Ambitus::print (SCM smob)
 {
   Item *me = (Item *)unsmob_grob (smob);
-  Molecule molecule = Molecule ();
+  Stencil stencil = Stencil ();
 
   SCM scm_note_head_style = me->get_grob_property ("note-head-style");
   String note_head_style;
@@ -187,10 +187,10 @@ Ambitus::print (SCM smob)
     }
 
   // create heads
-  Molecule head_min =
+  Stencil head_min =
     Font_interface::get_default_font (me)->find_by_name (note_head_style);
   head_min.translate_axis (0.5*p_min, Y_AXIS);
-  Molecule head_max =
+  Stencil head_max =
     Font_interface::get_default_font (me)->find_by_name (note_head_style);
   head_max.translate_axis (0.5*p_max, Y_AXIS);
 
@@ -203,9 +203,9 @@ Ambitus::print (SCM smob)
       Interval x_extent = 0.5 * Interval (-linethickness, +linethickness);
       Interval y_extent = 0.5 * Interval (p_min + 1.35, p_max - 1.35);
       Box line_box (x_extent, y_extent);
-      Molecule line = Lookup::round_filled_box (line_box, blotdiameter);
+      Stencil line = Lookup::round_filled_box (line_box, blotdiameter);
       line.translate_axis (0.5 * head_min.extent (X_AXIS).length (), X_AXIS);
-      molecule.add_molecule (line);
+      stencil.add_stencil (line);
     }
 
   // add ledger lines
@@ -214,16 +214,16 @@ Ambitus::print (SCM smob)
   Real right_ledger_protusion = left_ledger_protusion;
   Interval l_extents = Interval (hd[LEFT] - left_ledger_protusion,
                                 hd[RIGHT] + right_ledger_protusion);
-  Molecule ledger_lines;
+  Stencil ledger_lines;
   int interspaces = Staff_symbol_referencer::line_count (me) - 1;
   ledger_lines =
     Note_head::brew_ledger_lines (me, p_min, interspaces, l_extents, 0,true);
   ledger_lines.translate_axis (0.5 * p_min, Y_AXIS);
-  molecule.add_molecule (ledger_lines);
+  stencil.add_stencil (ledger_lines);
   ledger_lines =
     Note_head::brew_ledger_lines (me, p_max, interspaces, l_extents, 0, true);
   ledger_lines.translate_axis (0.5 * p_max, Y_AXIS);
-  molecule.add_molecule (ledger_lines);
+  stencil.add_stencil (ledger_lines);
 
   // add accidentals
   SCM key_signature = me->get_grob_property ("key-signature");
@@ -247,10 +247,10 @@ Ambitus::print (SCM smob)
                   accidentals_style, 0.5 * p_max);
 
   // add heads
-  molecule.add_molecule (head_min);
-  molecule.add_molecule (head_max);
+  stencil.add_stencil (head_min);
+  stencil.add_stencil (head_max);
 
-  return molecule.smobbed_copy ();
+  return stencil.smobbed_copy ();
 }
 
 ADD_INTERFACE (Ambitus, "ambitus-interface",
index ee0c7ceab9ca71e6e66052bb47887153fadbd7e0..d2bc00f67ba3e977689983f32ef49d60fc3f7199 100644 (file)
@@ -6,7 +6,7 @@
   (c) 2000--2004 Jan Nieuwenhuizen <janneke@gnu.org>
  */
 
-#include "molecule.hh"
+#include "stencil.hh"
 #include "paper-def.hh"
 #include "arpeggio.hh"
 #include "grob.hh"
@@ -72,11 +72,11 @@ Arpeggio::print (SCM smob)
       dir = to_dir (ad);
     }
   
-  Molecule mol;
+  Stencil mol;
   Font_metric *fm =Font_interface::get_default_font (me);
-  Molecule squiggle = fm->find_by_name ("scripts-arpeggio");
+  Stencil squiggle = fm->find_by_name ("scripts-arpeggio");
 
-  Molecule arrow ;  
+  Stencil arrow ;  
   if (dir)
     {
       arrow = fm->find_by_name ("scripts-arpeggio-arrow-" + to_string (dir));
@@ -128,7 +128,7 @@ Arpeggio::brew_chord_bracket (SCM smob)
   Real dy = heads.length() + sp;
   Real x = 0.7;
 
-  Molecule mol (Lookup::bracket (Y_AXIS, Interval (0, dy), lt, x, lt));
+  Stencil mol (Lookup::bracket (Y_AXIS, Interval (0, dy), lt, x, lt));
   mol.translate_axis (heads[LEFT] - sp/2.0, Y_AXIS);
   return mol.smobbed_copy();
 }
@@ -146,7 +146,7 @@ Arpeggio::width_callback (SCM smob, SCM axis)
   Grob * me = unsmob_grob (smob);
   Axis a = (Axis)gh_scm2int (axis);
   assert (a == X_AXIS);
-  Molecule arpeggio = Font_interface::get_default_font (me)->find_by_name ("scripts-arpeggio");
+  Stencil arpeggio = Font_interface::get_default_font (me)->find_by_name ("scripts-arpeggio");
 
   return ly_interval2scm (arpeggio.extent (X_AXIS) * 1.5);
 }
index b7ac5e3aacd787e5d7228f4094e4e6eb8d3eb2ac..3758ee9abb8e8d6b24d86966e503b09ea645fa9b 100644 (file)
@@ -93,9 +93,9 @@ Axis_group_interface::set_axes (Grob*me,Axis a1, Axis a2)
   /*
     why so convoluted ? (fixme/documentme?) 
    */
-  if (me->has_extent_callback_b (Grob::molecule_extent_proc, a1))
+  if (me->has_extent_callback_b (Grob::stencil_extent_proc, a1))
     me->set_extent (Axis_group_interface::group_extent_callback_proc,a1);
-  if (me->has_extent_callback_b (Grob::molecule_extent_proc, a2))
+  if (me->has_extent_callback_b (Grob::stencil_extent_proc, a2))
     me->set_extent (Axis_group_interface::group_extent_callback_proc,a2);
 }
 
index 9bb11b2017f8f70c4bd812b2e78e3b9d8fc42369..6c29895f4b56a12b08039a6e7d37aaaf3da556db 100644 (file)
@@ -7,7 +7,7 @@
 #include "line-interface.hh"
 #include "lookup.hh"
 #include "font-interface.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "lily-guile.hh"
 #include "paper-def.hh"
 #include "misc.hh"
@@ -34,7 +34,7 @@ Balloon_interface::print (SCM smob)
       scm_mol = scm_call_1 (cb, smob);
     }
 
-  if (!unsmob_molecule (scm_mol))
+  if (!unsmob_stencil (scm_mol))
     return scm_mol;
 
   SCM scm_off = me->get_grob_property ("balloon-text-offset");
@@ -43,7 +43,7 @@ Balloon_interface::print (SCM smob)
     return scm_mol;
 
   Offset off = ly_scm2offset (scm_off);
-  Molecule * m = unsmob_molecule (scm_mol);
+  Stencil * m = unsmob_stencil (scm_mol);
   Box orig_extent = m->extent_box ();
   Box box_extent = orig_extent;
 
@@ -51,10 +51,10 @@ Balloon_interface::print (SCM smob)
   box_extent.widen (w, w);
   
   
-  Molecule fr = Lookup::frame (box_extent, 0.1, 0.05);
+  Stencil fr = Lookup::frame (box_extent, 0.1, 0.05);
 
   
-  fr.add_molecule (*m);
+  fr.add_stencil (*m);
 
 
 
@@ -66,7 +66,7 @@ Balloon_interface::print (SCM smob)
   SCM text = Text_item::interpret_markup (me->get_paper ()->self_scm (), chain, bt);
 
   
-  Molecule *text_mol = unsmob_molecule (text);
+  Stencil *text_mol = unsmob_stencil (text);
   
   Offset z1;
 
@@ -79,12 +79,12 @@ Balloon_interface::print (SCM smob)
 
   Offset z2 = z1 + off;
   
-  fr.add_molecule (Line_interface::line (me, z1, z2));
+  fr.add_stencil (Line_interface::line (me, z1, z2));
 
   text_mol->translate (z2);
-  fr.add_molecule (*text_mol);
+  fr.add_stencil (*text_mol);
   
-  fr = Molecule (orig_extent, fr.get_expr ());
+  fr = Stencil (orig_extent, fr.get_expr ());
   return fr.smobbed_copy ();
 }
 
index 6bf140efec83e154dae024351a80341ec7b99271..39934f72f231efd024eba7b92325f894cce6c038 100644 (file)
@@ -13,7 +13,7 @@
 #include "grob.hh"
 #include "bar-line.hh"
 #include "string.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "paper-def.hh"
 #include "font-interface.hh"
 
@@ -44,7 +44,7 @@ Bar_line::print (SCM smob)
 }
 
 
-Molecule
+Stencil
 Bar_line::compound_barline (Grob*me, String str, Real h)
 {
   Real kern = robust_scm2double (me->get_grob_property ("kern"), 1);
@@ -60,17 +60,17 @@ Bar_line::compound_barline (Grob*me, String str, Real h)
   hair *= staffline;
   fatline *= staffline;
   
-  Molecule thin = simple_barline (me, hair, h);
-  Molecule thick = simple_barline (me, fatline, h);
-  Molecule dot = Font_interface::get_default_font (me)->find_by_name ("dots-dot");
+  Stencil thin = simple_barline (me, hair, h);
+  Stencil thick = simple_barline (me, fatline, h);
+  Stencil dot = Font_interface::get_default_font (me)->find_by_name ("dots-dot");
   Real dist = ( Staff_symbol_referencer::line_count (me) & 1 ? 1 :
                (staff_space<2 ? 2 : .5) ) * staff_space;
-  Molecule colon (dot);
+  Stencil colon (dot);
   colon.translate_axis(dist,Y_AXIS);
-  colon.add_molecule(dot);
+  colon.add_stencil(dot);
   colon.translate_axis(-dist/2,Y_AXIS);
 
-  Molecule m;
+  Stencil m;
   
   if (str == "")
     {
@@ -130,16 +130,16 @@ Bar_line::compound_barline (Grob*me, String str, Real h)
       for (int i = 0 ; i < c - 1; i++)
        {
          Real y = (- (c-1.0) / 2 + 0.5  +   i * staff_space);
-         Molecule d (dot);
+         Stencil d (dot);
 
          d. translate_axis (y,Y_AXIS);
-         m.add_molecule (d);
+         m.add_stencil (d);
        }
     }
   return m;
 }
 
-Molecule
+Stencil
 Bar_line::simple_barline (Grob *me,Real w, Real h) 
 {
   Real blot = me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter"));
index 0e2553fc80be9226de6b91574b3f207658df4a35..0d34e2ff7226b6bc84e6dbd3b2873b0df21af499 100644 (file)
@@ -28,7 +28,7 @@ Notes:
 
 #include <math.h> // tanh.
 
-#include "molecule.hh" 
+#include "stencil.hh" 
 #include "directional-element-interface.hh"
 #include "beaming.hh"
 #include "beam.hh"
@@ -350,7 +350,7 @@ Beam::print (SCM grob)
 
   Real gap_length =robust_scm2double ( me->get_grob_property ("gap"), 0.0);
   
-  Molecule the_beam;
+  Stencil the_beam;
   Real lt = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
   
   for (int i = 0; i<= stems.size(); i++)
@@ -414,8 +414,8 @@ Beam::print (SCM grob)
       
 
       Real blot = me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter"));
-      Molecule whole = Lookup::beam (dydx, w, thick, blot);
-      Molecule gapped;
+      Stencil whole = Lookup::beam (dydx, w, thick, blot);
+      Stencil gapped;
 
       int gap_count = 0;
       if (gh_number_p (me->get_grob_property ("gap-count")))
@@ -431,7 +431,7 @@ Beam::print (SCM grob)
       int k = 0;
       for (int j = full_beams.size (); j--;)
        {
-         Molecule b (whole);
+         Stencil b (whole);
          
          if (k++ < gap_count)
            {
@@ -441,7 +441,7 @@ Beam::print (SCM grob)
          b.translate_axis (last_xposn -  x0 + stem_offset, X_AXIS);
          b.translate_axis (dydx * (last_xposn - x0) + bdy * full_beams[j], Y_AXIS);
 
-         the_beam.add_molecule (b);          
+         the_beam.add_stencil (b);           
        }
 
       
@@ -466,20 +466,20 @@ Beam::print (SCM grob)
          Real w = (i>0 && st) ? (xposn - last_xposn) : break_overshoot;
          w = w/2 <? nw_f;
 
-         Molecule half = Lookup::beam (dydx, w, thick, blot);
+         Stencil half = Lookup::beam (dydx, w, thick, blot);
          for (int j = lfliebertjes.size(); j--;)
            {
-             Molecule b (half);
+             Stencil b (half);
              b.translate_axis (last_xposn -  x0, X_AXIS);
              b.translate_axis (dydx * (last_xposn-x0) + bdy * lfliebertjes[j], Y_AXIS);
-             the_beam.add_molecule (b);              
+             the_beam.add_stencil (b);       
            }
          for (int j = rfliebertjes.size(); j--;)
            {
-             Molecule b (half);
+             Stencil b (half);
              b.translate_axis (xposn -  x0 - w , X_AXIS);
              b.translate_axis (dydx * (xposn-x0 -w) + bdy * rfliebertjes[j], Y_AXIS);
-             the_beam.add_molecule (b);              
+             the_beam.add_stencil (b);       
            }
        }
 
@@ -506,7 +506,7 @@ Beam::print (SCM grob)
       String str;
       SCM properties = Font_interface::font_alist_chain (me);
 
-      Molecule tm = *unsmob_molecule (Text_item::interpret_markup
+      Stencil tm = *unsmob_stencil (Text_item::interpret_markup
        (me->get_paper ()->self_scm (), properties, quant_score));
       the_beam.add_at_edge (Y_AXIS, UP, tm, 5.0, 0);
     }
index 8805654b1941bf6d139a3b7245a3cb1a1ced40c1..a4180549fff48d0ccf3b4862ea0c21088ccb1b5b 100644 (file)
@@ -14,7 +14,7 @@
 #include "directional-element-interface.hh"
 #include "breathing-sign.hh"
 #include "string.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "paper-def.hh"
 #include "lookup.hh"
 
@@ -64,7 +64,7 @@ Breathing_sign::divisio_minima (SCM smob)
   Interval xdim (0, thickness);
   Interval ydim (-0.5 * staff_space, +0.5 * staff_space);
   Box b (xdim, ydim);
-  Molecule out = Lookup::round_filled_box (b, blotdiameter);
+  Stencil out = Lookup::round_filled_box (b, blotdiameter);
   return out.smobbed_copy ();
 }
 
@@ -104,7 +104,7 @@ Breathing_sign::divisio_maior (SCM smob)
   Interval xdim (0, thickness);
   Interval ydim (-0.5 * height, +0.5 * height);
   Box b (xdim, ydim);
-  Molecule out = Lookup::round_filled_box (b, blotdiameter);
+  Stencil out = Lookup::round_filled_box (b, blotdiameter);
   return out.smobbed_copy ();
 }
 
@@ -134,7 +134,7 @@ Breathing_sign::divisio_maxima (SCM smob)
   Interval xdim (0, thickness);
   Interval ydim (-0.5 * staff_size, +0.5 * staff_size);
   Box b (xdim, ydim);
-  Molecule out = Lookup::round_filled_box (b, blotdiameter);
+  Stencil out = Lookup::round_filled_box (b, blotdiameter);
   return out.smobbed_copy ();
 }
 
@@ -164,10 +164,10 @@ Breathing_sign::finalis (SCM smob)
   Interval xdim (0, thickness);
   Interval ydim (-0.5 * staff_size, +0.5 * staff_size);
   Box b (xdim, ydim);
-  Molecule line1 = Lookup::round_filled_box (b, blotdiameter);
-  Molecule line2 (line1);
+  Stencil line1 = Lookup::round_filled_box (b, blotdiameter);
+  Stencil line2 (line1);
   line2.translate_axis (0.5 * staff_space, X_AXIS);
-  line1.add_molecule (line2);
+  line1.add_stencil (line2);
 
   return line1.smobbed_copy ();
 }
index 50c5c43a76c2a48931ea7d5081f9d3815679f25f..1077e3ec6f2467436d595d1830691a884ee9ca75 100644 (file)
@@ -7,7 +7,7 @@
 */
 
 #include "chord-name.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "paper-def.hh"
 #include "font-interface.hh"
 #include "grob.hh"
index 9a493ddeef7dcb6be0cfef53667c57c2fdb506b4..d3855201147f737900e1cde1702b881fd634d9cb 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "clef.hh"
 #include "string.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "item.hh"
 #include "font-interface.hh"
 
@@ -58,7 +58,7 @@ Clef::print (SCM smob)
 
   String glyph = String (ly_scm2string (glyph_scm));
   Font_metric *fm = Font_interface::get_default_font (me);
-  Molecule out = fm->find_by_name (glyph);
+  Stencil out = fm->find_by_name (glyph);
   if (out.is_empty ())
     {
       me->warning (_f ("clef `%s' not found", glyph.to_str0 ()));
index dda873e6c15a5bb867cadfea28caf5b70b93db1b..fedaaf4d79d0192ed6ffd5802bcb4ddee31c3e0a 100644 (file)
@@ -27,7 +27,7 @@
    TODO: Add support for cubic spline segments.
 
  */
-Molecule
+Stencil
 brew_cluster_piece (Grob *me, Array<Offset> bottom_points, Array<Offset> top_points)
 {
   Real blotdiameter = Staff_symbol_referencer::staff_space (me)/2;
@@ -49,11 +49,11 @@ brew_cluster_piece (Grob *me, Array<Offset> bottom_points, Array<Offset> top_poi
     {
       programming_error ("#'style should be symbol.");
       me->suicide();
-      return  Molecule();
+      return  Stencil();
     }
 
 
-  Molecule out = Molecule ();
+  Stencil out = Stencil ();
   Array<Offset> points;
   points.clear ();
   int size = bottom_points.size ();
@@ -65,7 +65,7 @@ brew_cluster_piece (Grob *me, Array<Offset> bottom_points, Array<Offset> top_poi
          box.add_point (bottom_points[i] - hvpadding);
          box.add_point (Offset(top_points[i + 1][X_AXIS],
                                top_points[i][Y_AXIS]) + hvpadding);
-         out.add_molecule (Lookup::round_filled_box (box, blotdiameter));
+         out.add_stencil (Lookup::round_filled_box (box, blotdiameter));
        }
     }
   else if (String::compare (shape, "rightsided-stairs") == 0)
@@ -76,7 +76,7 @@ brew_cluster_piece (Grob *me, Array<Offset> bottom_points, Array<Offset> top_poi
          box.add_point (Offset(bottom_points[i][X_AXIS],
                                bottom_points[i + 1][Y_AXIS]) - hvpadding);
          box.add_point (top_points[i + 1] + hvpadding);
-         out.add_molecule (Lookup::round_filled_box (box, blotdiameter));
+         out.add_stencil (Lookup::round_filled_box (box, blotdiameter));
        }
     }
   else if (String::compare (shape, "centered-stairs") == 0)
@@ -91,7 +91,7 @@ brew_cluster_piece (Grob *me, Array<Offset> bottom_points, Array<Offset> top_poi
                         hvpadding);
          box.add_point (Offset (right_xmid, top_points[i][Y_AXIS]) +
                         hvpadding);
-         out.add_molecule (Lookup::round_filled_box (box, blotdiameter));
+         out.add_stencil (Lookup::round_filled_box (box, blotdiameter));
          left_xmid = right_xmid;
        }
       Real right_xmid = bottom_points[size - 1][X_AXIS];
@@ -100,7 +100,7 @@ brew_cluster_piece (Grob *me, Array<Offset> bottom_points, Array<Offset> top_poi
                     hvpadding);
       box.add_point (Offset (right_xmid, top_points[size - 1][Y_AXIS]) +
                     hvpadding);
-      out.add_molecule (Lookup::round_filled_box (box, blotdiameter));
+      out.add_stencil (Lookup::round_filled_box (box, blotdiameter));
     }
   else if (String::compare (shape, "ramp") == 0)
     {
@@ -116,7 +116,7 @@ brew_cluster_piece (Grob *me, Array<Offset> bottom_points, Array<Offset> top_poi
          points.push (top_points[i] + vpadding);
        }
       points.push (top_points[0] + vpadding + hpadding);
-      out.add_molecule (Lookup::round_filled_polygon (points, blotdiameter));
+      out.add_stencil (Lookup::round_filled_polygon (points, blotdiameter));
     }
   else
     {
@@ -213,7 +213,7 @@ Cluster::print (SCM smob)
   bottom_points.reverse ();
   top_points.reverse ();
 
-  Molecule out = brew_cluster_piece (me, bottom_points, top_points);
+  Stencil out = brew_cluster_piece (me, bottom_points, top_points);
   return out.smobbed_copy ();
 }
 
diff --git a/lily/context-def.cc b/lily/context-def.cc
new file mode 100644 (file)
index 0000000..f48e78d
--- /dev/null
@@ -0,0 +1,319 @@
+/*   
+  translator-def.cc --  implement Context_def
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2000--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#include "lily-proto.hh"
+#include "context-def.hh"
+#include "translator-group.hh"
+#include "warn.hh"
+#include "music-output-def.hh"
+#include "ly-smobs.icc"
+
+int
+Context_def::print_smob (SCM smob, SCM port, scm_print_state*)
+{
+  Context_def* me = (Context_def*) SCM_CELL_WORD_1 (smob);
+
+  scm_puts ("#<Context_def ", port);
+  scm_display (me->context_name_, port);
+  scm_puts (">", port);
+  return 1;
+}
+
+
+SCM
+Context_def::mark_smob (SCM smob)
+{
+  Context_def* me = (Context_def*) SCM_CELL_WORD_1 (smob);
+
+  scm_gc_mark (me->description_);
+  scm_gc_mark (me->context_aliases_);
+  scm_gc_mark (me->accept_mods_);
+  scm_gc_mark (me->translator_mods_);
+  scm_gc_mark (me->property_ops_);  
+  scm_gc_mark (me->translator_group_type_);
+  return me->context_name_;
+}
+
+
+Context_def::Context_def ()
+{
+  context_aliases_ = SCM_EOL;
+  translator_group_type_ = SCM_EOL;
+  accept_mods_ = SCM_EOL;
+  translator_mods_ = SCM_EOL;
+  property_ops_ = SCM_EOL;
+  context_name_ = SCM_EOL;
+  description_ = SCM_EOL;
+
+  smobify_self();
+}
+
+Context_def::~Context_def ()
+{
+}
+
+Context_def::Context_def (Context_def const & s)
+  : Input (s)
+{
+  context_aliases_ = SCM_EOL;
+  translator_group_type_ = SCM_EOL;
+  accept_mods_ = SCM_EOL;   
+  translator_mods_ = SCM_EOL;
+  property_ops_ = SCM_EOL;
+  context_name_ = SCM_EOL;
+  description_ = SCM_EOL;
+  
+  smobify_self();
+  description_ = s.description_;
+
+  accept_mods_ = s.accept_mods_;
+  property_ops_ = s.property_ops_;
+  translator_mods_ = s.translator_mods_;
+  context_aliases_ = s.context_aliases_;
+  translator_group_type_ = s.translator_group_type_;
+  context_name_ = s.context_name_;
+}
+
+
+void
+Context_def::add_context_mod (SCM mod)
+{
+  SCM tag  = gh_car (mod);
+  if (ly_symbol2scm ("description")  == tag)
+    {
+      description_ = gh_cadr (mod);
+      return ;
+    }
+
+  SCM sym = gh_cadr (mod);
+  if (gh_string_p (sym))
+    sym = scm_string_to_symbol (sym);
+  
+  if (ly_symbol2scm ("consists") == tag
+      || ly_symbol2scm ("consists-end") == tag
+      || ly_symbol2scm ("remove") == tag)
+    {
+      if (!get_translator (sym))
+       error (_f ("Program has no such type: `%s'", ly_symbol2string (sym).to_str0 ()));
+      else
+       translator_mods_ = gh_cons (scm_list_2 (tag, sym), translator_mods_ );
+    }
+  else if (ly_symbol2scm ("accepts") == tag
+          || ly_symbol2scm ("denies") == tag)
+    {
+      accept_mods_ = gh_cons (scm_list_2 (tag, sym), accept_mods_); 
+    }
+  else if (ly_symbol2scm ("poppush") == tag
+          || ly_symbol2scm ("pop") == tag
+          || ly_symbol2scm ("push") == tag
+          || ly_symbol2scm ("assign") == tag
+          || ly_symbol2scm ("unset") == tag)
+    {
+      property_ops_ = gh_cons (mod, property_ops_);
+    }
+  else if (ly_symbol2scm ("alias") == tag)
+    {
+      context_aliases_ = gh_cons (sym, context_aliases_);
+    }
+  else if (ly_symbol2scm ("translator-type")  == tag)
+    {
+      translator_group_type_ = sym;
+    }
+  else if (ly_symbol2scm ("context-name")  == tag)
+    {
+      context_name_ = sym;
+    }
+  else
+    {
+      programming_error ("Unknown context mod tag.");
+    }
+}
+
+
+
+SCM
+Context_def::get_context_name () const
+{
+  return context_name_;
+}
+
+SCM
+Context_def::get_accepted (SCM user_mod) const
+{
+  SCM mods = scm_reverse_x (scm_list_copy (accept_mods_),
+                           user_mod);
+  SCM acc = SCM_EOL;
+  for (SCM s = mods; gh_pair_p (s); s = gh_cdr (s))
+    {
+      SCM tag = gh_caar (s);
+      SCM sym = gh_cadar (s);
+      if (tag == ly_symbol2scm ("accepts"))
+       acc = gh_cons (sym, acc);
+      else if (tag == ly_symbol2scm ("denies"))
+       acc = scm_delete_x (sym, acc);
+    }
+  return acc;
+}
+
+          
+Link_array<Context_def>
+Context_def::path_to_acceptable_translator (SCM type_sym, Music_output_def* odef) const
+{
+  assert (gh_symbol_p (type_sym));
+  
+  SCM accepted = get_accepted (SCM_EOL);
+
+  Link_array<Context_def> accepteds;
+  for (SCM s = accepted; gh_pair_p (s); s = ly_cdr (s))
+    {
+      Context_def *t = unsmob_context_def (odef->find_translator (ly_car (s)));
+      if (!t)
+       continue;
+      accepteds.push (t);
+    }
+
+  Link_array<Context_def> best_result;
+  for (int i=0; i < accepteds.size (); i++)
+    {
+      /*
+       don't check aliases, because \context Staff should not create RhythmicStaff.
+      */
+      if (gh_equal_p (accepteds[i]->get_context_name (), type_sym))
+       {
+         best_result.push (accepteds[i]);
+         return best_result;
+       }
+    }
+      
+  int best_depth= INT_MAX;
+  for (int i=0; i < accepteds.size (); i++)
+    {
+      Context_def * g = accepteds[i];
+
+      Link_array<Context_def> result
+       = g->path_to_acceptable_translator (type_sym, odef);
+      if (result.size () && result.size () < best_depth)
+       {
+         result.insert (g,0);
+         best_result = result;
+
+         /*
+           this following line was added in 1.9.3, but hsould've been
+           there all along... Let's hope it doesn't cause nightmares.
+          */
+         best_depth = result.size();
+       }
+    }
+
+  return best_result;
+}
+
+IMPLEMENT_SMOBS (Context_def);
+IMPLEMENT_DEFAULT_EQUAL_P (Context_def);
+
+
+
+
+SCM
+Context_def::get_translator_names (SCM user_mod) const
+{
+  SCM l1 = SCM_EOL;
+  SCM l2 = SCM_EOL;
+
+  SCM mods = scm_reverse_x (scm_list_copy (translator_mods_),
+                           user_mod);
+  
+  for (SCM s = mods; gh_pair_p (s); s = gh_cdr (s))
+    {
+      SCM tag = gh_caar (s);
+      SCM arg = gh_cadar (s);
+
+      if (gh_string_p (arg))
+       arg = scm_string_to_symbol (arg);
+      
+      if (ly_symbol2scm ("consists") == tag)
+       l1 = gh_cons (arg, l1);
+      else if (ly_symbol2scm ("consists-end") == tag)
+       l2 = gh_cons (arg, l2);
+      else if (ly_symbol2scm ("remove") == tag)
+       {
+         l1 = scm_delete_x (arg, l1);
+         l2 = scm_delete_x (arg, l2);
+       }
+    }
+
+  return scm_append_x (scm_list_2 (l1, l2));
+}
+
+
+Translator_group *
+Context_def::instantiate (SCM ops)
+{
+  Translator * g = get_translator (translator_group_type_);
+  g = g->clone (); 
+
+  Translator_group *tg = dynamic_cast<Translator_group*> (g);
+  tg->definition_ = self_scm ();
+
+  SCM trans_names = get_translator_names (ops); 
+  tg->simple_trans_list_ = names_to_translators (trans_names, tg);
+  tg->accepts_list_ = get_accepted  (ops);
+  return tg;
+}
+
+
+SCM
+Context_def::clone_scm () const
+{
+  Context_def * t = new Context_def (*this);
+  scm_gc_unprotect_object (t->self_scm());
+  return t->self_scm();
+}
+
+SCM
+Context_def::make_scm ()
+{
+  Context_def* t = new Context_def;
+  scm_gc_unprotect_object (t->self_scm());
+  return t->self_scm();
+}
+
+void
+Context_def::apply_default_property_operations (Translator_group *tg)
+{
+  apply_property_operations (tg , property_ops_);
+}
+
+SCM
+Context_def::to_alist () const
+{
+  SCM l = SCM_EOL;
+
+  l = gh_cons (gh_cons (ly_symbol2scm ("consists"),
+                       get_translator_names (SCM_EOL)), l);
+  l = gh_cons (gh_cons (ly_symbol2scm ("description"),  description_), l);
+  l = gh_cons (gh_cons (ly_symbol2scm ("aliases"),  context_aliases_), l);
+  l = gh_cons (gh_cons (ly_symbol2scm ("accepts"),  get_accepted (SCM_EOL)), l);
+  l = gh_cons (gh_cons (ly_symbol2scm ("property-ops"),  property_ops_), l);
+  l = gh_cons (gh_cons (ly_symbol2scm ("context-name"),  context_name_), l);
+  l = gh_cons (gh_cons (ly_symbol2scm ("group-type"),  translator_group_type_), l);    
+
+  return l;  
+}
+
+bool
+Context_def::is_alias (SCM sym) const
+{
+  bool b  = sym == context_name_;
+
+  for (SCM a = context_aliases_; !b && gh_pair_p (a); a = ly_cdr (a))
+    b = b || sym == ly_car (a);
+
+  return b;
+}
index cf5b1616798b74f1ed176bd46a9d22a40ba8c508..bbf12d4b18f41020a0a7ee7da097a1976f712a2d 100644 (file)
@@ -22,7 +22,8 @@ Translator_group::find_existing_translator (SCM n, String id)
     {
       Translator *  t = unsmob_translator (ly_car (p));
       
-      r = dynamic_cast<Translator_group*> (t)->find_existing_translator (n, id);    }
+      r = dynamic_cast<Translator_group*> (t)->find_existing_translator (n, id);
+    }
 
   return r;
 }
@@ -35,6 +36,12 @@ Translator_group::find_create_translator (SCM n, String id, SCM operations)
   if (existing)
     return existing;
 
+  if (n == ly_symbol2scm ("Bottom"))
+    {
+      Translator_group* tg = get_default_interpreter ();
+      tg->id_string_ = id;
+      return tg;
+    }
 
   /*
     TODO: use accepts_list_.
@@ -153,6 +160,15 @@ Translator_group::internal_get_property (SCM sym) const
   return val;
 }
 
+bool
+Translator_group::is_alias (SCM sym) const
+{
+  if (sym == ly_symbol2scm ("Bottom")
+      && !gh_pair_p (accepts_list_))
+    return true;
+  return unsmob_context_def (definition_)->is_alias (sym);
+}
+
 void
 Translator_group::internal_set_property (SCM sym, SCM val)
 {
index 8024fa946541e59d257712466d73a67f6fc4f64f..7b2300ca7eb1a24ad5e15550f8328bc101e70775 100644 (file)
@@ -19,7 +19,7 @@
 #include "direction.hh"
 #include "staff-symbol-referencer.hh"
 #include "custos.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "warn.hh"
 #include "note-head.hh"
 #include "item.hh"
@@ -85,9 +85,9 @@ Custos::print (SCM smob)
       font_char += "2";
     }
 
-  Molecule molecule
+  Stencil stencil
     = Font_interface::get_default_font (me)->find_by_name (font_char);
-  if (molecule.is_empty ())
+  if (stencil.is_empty ())
     {
       me->warning (_f ("custos `%s' not found", font_char));
       return SCM_EOL;
@@ -99,12 +99,12 @@ Custos::print (SCM smob)
       int interspaces = Staff_symbol_referencer::line_count (me)-1;
       if (abs (pos) - interspaces > 1)
        {
-         Molecule ledger_lines =
+         Stencil ledger_lines =
            Note_head::brew_ledger_lines (me, pos, interspaces,
-                                         molecule.extent (X_AXIS), 0, true);
-         molecule.add_molecule (ledger_lines);
+                                         stencil.extent (X_AXIS), 0, true);
+         stencil.add_stencil (ledger_lines);
        }
-      return molecule.smobbed_copy ();
+      return stencil.smobbed_copy ();
     }
 }
 
index 2bb9dfdf7a15407b99d099597f7750a28a256991..f87c719e3b0ea6ec440d7077d6e43a14e87b4bcb 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "dots.hh"
 #include "item.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "paper-def.hh"
 #include "font-interface.hh"
 #include "lookup.hh"
@@ -20,13 +20,13 @@ SCM
 Dots::print (SCM d)
 {
   Grob *sc = unsmob_grob (d);
-  Molecule mol;
+  Stencil mol;
   
   SCM c = sc->get_grob_property ("dot-count");
 
   if (gh_number_p (c))
     {
-      Molecule d = Font_interface::get_default_font (sc)->find_by_name (String ("dots-dot"));
+      Stencil d = Font_interface::get_default_font (sc)->find_by_name (String ("dots-dot"));
       Real dw = d.extent (X_AXIS).length ();
       
 
index b7345b86e182df9859e0e3fcbd1502417601fdb5..1d0428b278e80a628d1eda33c969068e29d80c38 100644 (file)
@@ -13,7 +13,7 @@
 
 #include "virtual-methods.hh"
 #include "warn.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "ly-smobs.icc"
 #include "font-metric.hh"
 #include "string.hh"
@@ -155,16 +155,16 @@ IMPLEMENT_SMOBS (Font_metric);
 IMPLEMENT_DEFAULT_EQUAL_P (Font_metric);
 IMPLEMENT_TYPE_P (Font_metric, "ly:font-metric?");
 
-Molecule
+Stencil
 Font_metric::find_by_name (String) const
 {
-  Molecule m ;
+  Stencil m ;
   return m;
 }
 
 LY_DEFINE(ly_find_glyph_by_name, "ly:find-glyph-by-name", 2 , 0, 0,
          (SCM font, SCM name),
-         "This function retrieves a Molecule for the glyph named @var{name} in "
+         "This function retrieves a Stencil for the glyph named @var{name} in "
 "@var{font}.  The font must be available as an AFM file. If the glyph "
 "is not found, #f is returned. ")
 {
@@ -172,7 +172,7 @@ LY_DEFINE(ly_find_glyph_by_name, "ly:find-glyph-by-name", 2 , 0, 0,
   SCM_ASSERT_TYPE(fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
   SCM_ASSERT_TYPE(gh_string_p (name), name, SCM_ARG2, __FUNCTION__, "string");
 
-  Molecule m =  fm->find_by_name (ly_scm2string (name));
+  Stencil m =  fm->find_by_name (ly_scm2string (name));
 
   /*
     TODO: make optional argument for default if not found.
@@ -183,14 +183,14 @@ LY_DEFINE(ly_find_glyph_by_name, "ly:find-glyph-by-name", 2 , 0, 0,
 
 LY_DEFINE(ly_get_glyph, "ly:get-glyph", 2 , 0, 0,
          (SCM font, SCM index),
-         "This function retrieves a Molecule for the glyph numbered @var{index} in "
+         "This function retrieves a Stencil for the glyph numbered @var{index} in "
 "@var{font}. ")
 {
   Font_metric *fm = unsmob_metrics (font);
   SCM_ASSERT_TYPE(fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
   SCM_ASSERT_TYPE(gh_number_p (index), index, SCM_ARG2, __FUNCTION__, "number");
 
-  return fm->get_ascii_char_molecule (gh_scm2int (index)).smobbed_copy ();
+  return fm->get_ascii_char_stencil (gh_scm2int (index)).smobbed_copy ();
 }
 
 LY_DEFINE(ly_text_dimension,"ly:text-dimension", 2 , 0, 0,
@@ -209,22 +209,22 @@ LY_DEFINE(ly_text_dimension,"ly:text-dimension", 2 , 0, 0,
   return gh_cons (ly_interval2scm (b[X_AXIS]), ly_interval2scm(b[Y_AXIS]));
 }
 
-Molecule
-Font_metric::get_ascii_char_molecule (int code)  const
+Stencil
+Font_metric::get_ascii_char_stencil (int code)  const
 {
   SCM at = scm_list_n (ly_symbol2scm ("char"), gh_int2scm (code),
                       SCM_UNDEFINED);
   at = fontify_atom (this, at);
   Box b = get_ascii_char (code);
-  return Molecule (b, at);
+  return Stencil (b, at);
 }
 
-Molecule
-Font_metric::get_indexed_char_molecule (int code)  const
+Stencil
+Font_metric::get_indexed_char_stencil (int code)  const
 {
   SCM at = scm_list_n (ly_symbol2scm ("char"), gh_int2scm (code),
                       SCM_UNDEFINED);
   at = fontify_atom (this, at);
   Box b = get_indexed_char (code);
-  return Molecule (b, at);
+  return Stencil (b, at);
 }
index f2998d0b64ad97a983b38a0d18f34167ee515059..d44f3ce7c53aab0665404436af76107d698e7b4e 100644 (file)
 #include "group-interface.hh"
 #include "misc.hh"
 #include "paper-score.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "grob.hh"
 #include "warn.hh"
 #include "spanner.hh"
 #include "system.hh"
 #include "item.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "misc.hh"
 #include "music.hh"
 #include "item.hh"
@@ -114,7 +114,7 @@ Grob::Grob (SCM basicprops)
       else if (cb != SCM_BOOL_F
          && !gh_procedure_p (cb) && !gh_pair_p (cb)
          && gh_procedure_p (get_grob_property ("print-function")))
-       cb = molecule_extent_proc;
+       cb = stencil_extent_proc;
     
       dim_cache_[a].dimension_ = cb;
     }
@@ -152,14 +152,14 @@ Grob::~Grob ()
 }
 
 
-MAKE_SCHEME_CALLBACK (Grob,molecule_extent,2);
+MAKE_SCHEME_CALLBACK (Grob,stencil_extent,2);
 SCM
-Grob::molecule_extent (SCM element_smob, SCM scm_axis)
+Grob::stencil_extent (SCM element_smob, SCM scm_axis)
 {
   Grob *s = unsmob_grob (element_smob);
   Axis a = (Axis) gh_scm2int (scm_axis);
 
-  Molecule *m = s->get_molecule ();
+  Stencil *m = s->get_stencil ();
   Interval e ;
   if (m)
     e = m->extent (a);
@@ -201,31 +201,31 @@ Grob::calculate_dependencies (int final, int busy, SCM funcname)
   status_= final;
 }
 
-Molecule *
-Grob::get_molecule ()  const
+Stencil *
+Grob::get_stencil ()  const
 {
   if (!live())
     {
       return 0;
     }
   
-  SCM mol = get_grob_property ("molecule");
-  if (unsmob_molecule (mol))
-    return unsmob_molecule (mol);
+  SCM mol = get_grob_property ("stencil");
+  if (unsmob_stencil (mol))
+    return unsmob_stencil (mol);
 
-  mol = get_uncached_molecule ();
+  mol = get_uncached_stencil ();
   
   if (live ())
     {
       Grob *me = (Grob*)this;
-      me->set_grob_property ("molecule", mol);
+      me->set_grob_property ("stencil", mol);
     }
   
-  return unsmob_molecule (mol);  
+  return unsmob_stencil (mol);  
 }
 
 SCM
-Grob::get_uncached_molecule ()const
+Grob::get_uncached_stencil ()const
 {
   SCM proc = get_grob_property ("print-function");
 
@@ -233,9 +233,9 @@ Grob::get_uncached_molecule ()const
   if (gh_procedure_p (proc)) 
     mol = gh_apply (proc, scm_list_n (this->self_scm (), SCM_UNDEFINED));
   
-  Molecule *m = unsmob_molecule (mol);
+  Stencil *m = unsmob_stencil (mol);
   
-  if (unsmob_molecule (mol))
+  if (unsmob_stencil (mol))
     {
       SCM origin = ly_symbol2scm ("no-origin");
       
@@ -252,18 +252,18 @@ Grob::get_uncached_molecule ()const
 
       // ugr.
       
-      mol = Molecule (m->extent_box (),
+      mol = Stencil (m->extent_box (),
                      scm_list_n (origin, m->get_expr (), SCM_UNDEFINED)
                      ). smobbed_copy ();
 
-      m = unsmob_molecule (mol);
+      m = unsmob_stencil (mol);
     }
   
   /*
     transparent retains dimensions of element.
    */
   if (m && to_boolean (get_grob_property ("transparent")))
-    mol = Molecule (m->extent_box (), SCM_EOL).smobbed_copy ();
+    mol = Stencil (m->extent_box (), SCM_EOL).smobbed_copy ();
 
   return mol;
 }
@@ -805,7 +805,7 @@ ADD_INTERFACE (Grob, "grob-interface",
 "other grobs (i.e. pointers).  This big graph of grobs specifies the\n"
 "notation problem. The solution of this problem is a description of the\n"
 "printout in closed form, i.e. a list of values.  These values are\n"
-"Molecules.\n"
+"Stencils.\n"
 "\n"
 "All grobs have an X and Y-position on the page.  These X and Y positions\n"
 "are stored in a relative format, so they can easily be combined by\n"
@@ -824,7 +824,7 @@ ADD_INTERFACE (Grob, "grob-interface",
 "is also an abstract grob: it only moves around chords, but doesn't print\n"
 "anything.\n"
 ,
-  "X-offset-callbacks Y-offset-callbacks X-extent-callback molecule cause "
+  "X-offset-callbacks Y-offset-callbacks X-extent-callback stencil cause "
 "Y-extent-callback print-function extra-offset spacing-procedure "
 "staff-symbol interfaces dependencies X-extent Y-extent extra-X-extent "
 "meta layer before-line-breaking-callback "
index 5e96a3854f6e927ae4155d04e4c335963639ed43..fcb3c621da2a87e69ad6eab9dcc94b398f64b673 100644 (file)
@@ -7,7 +7,7 @@
 */
 
 #include "staff-symbol-referencer.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "line-interface.hh"
 #include "hairpin.hh"
 #include "spanner.hh"
@@ -120,9 +120,9 @@ Hairpin::print (SCM smob)
     should do relative to staff-symbol staff-space?
    */
 
-  Molecule mol;
+  Stencil mol;
   mol  = Line_interface::line (me, Offset (0, starth), Offset (width, endh));
-  mol.add_molecule (Line_interface::line (me,
+  mol.add_stencil (Line_interface::line (me,
                                                 Offset (0, -starth),
                                                 Offset (width, -endh)));
 
index 5c5039a5d18f357ba01bd7f02e7857fd7305bae4..8d74224bfa3307aa64d2e573a3aa50a15b42e6dd 100644 (file)
@@ -56,7 +56,7 @@ Horizontal_bracket::print (SCM smob)
   Real thickness = Staff_symbol_referencer::line_thickness (me);
   thickness *= robust_scm2double (me->get_grob_property ("thickness"), 1.0);
   
-  Molecule b = Lookup::bracket (X_AXIS, ext, thickness, - d* 1.0, thickness/2); 
+  Stencil b = Lookup::bracket (X_AXIS, ext, thickness, - d* 1.0, thickness/2); 
   
   b.translate_axis ( - sp->get_bound (LEFT)->relative_coordinate (cx, X_AXIS), X_AXIS);
 
index 1e9cf55509dbbcc8feae691d9008593208fc7d60..14ab748e93d9c6ab03b1e54df26ff4ff5a639a7a 100644 (file)
@@ -41,7 +41,7 @@ protected:
   Array<int> ascii_to_metric_idx_;
   std::map<String,int> name_to_metric_dict_;
 
-  virtual Molecule find_by_name (String) const;
+  virtual Stencil find_by_name (String) const;
 
   Adobe_font_metric (AFM_Font_info*);
 };
index 60dcb51cd06076ed02e202a63f926a67680ff913..945109c4d95503f81cf2fc93b41a7e8e376fde8b 100644 (file)
@@ -18,8 +18,8 @@ class Bar_line
 public:
   static bool has_interface (Grob*);
   
-  static Molecule compound_barline (Grob*, String, Real height) ;
-  static Molecule simple_barline (Grob*, Real wid, Real height) ;      
+  static Stencil compound_barline (Grob*, String, Real height) ;
+  static Stencil simple_barline (Grob*, Real wid, Real height) ;      
   DECLARE_SCHEME_CALLBACK (get_staff_bar_size, (SCM ));
   DECLARE_SCHEME_CALLBACK (print, (SCM ));
   DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM ));
index 641ae51d1b7c0f75c80da529079df33eb2421d75..e87836a75c69ff20803c27a6bbd53fcbe51ba7e7 100644 (file)
@@ -18,8 +18,8 @@ class Bar
 public:
   static bool has_interface (Grob*);
   
-  static Molecule compound_barline (Grob*, String, Real height) ;
-  static Molecule simple_barline (Grob*, Real wid, Real height) ;      
+  static Stencil compound_barline (Grob*, String, Real height) ;
+  static Stencil simple_barline (Grob*, Real wid, Real height) ;      
   DECLARE_SCHEME_CALLBACK (get_staff_bar_size, (SCM ));
   DECLARE_SCHEME_CALLBACK (print, (SCM ));
   DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM ));
index b06a861daa812a4763ca2e74c80c3b97494becaa..a775a2b79abfca6cc328fcc1e430dbada4eb8103 100644 (file)
@@ -10,7 +10,7 @@
 #define CHORD_NAME_HH
 
 #include "lily-guile.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 
 
 class Chord_name
index dd3639e95b5b3dbbec59fecb4f7b92462d5eab2e..490863be636385ea65739436bed9017152a2674a 100644 (file)
@@ -10,7 +10,7 @@
 #define CLUSTER_HH
 
 #include "lily-guile.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 
 class Cluster
 {
index fb5e52e86b14c80126420181c8ddf7f5c8610c37..0d6401130b9bcec3664ee30cdd24e152ea37b878 100644 (file)
@@ -17,8 +17,8 @@ struct Custos
   static bool has_interface (Grob*);
 
 private:
-  static void add_streepjes (Grob* me, int pos, int interspaces, Molecule* custos_);
-  static Molecule create_ledger_line (Interval x_extent, Grob *me) ;
+  static void add_streepjes (Grob* me, int pos, int interspaces, Stencil* custos_);
+  static Stencil create_ledger_line (Interval x_extent, Grob *me) ;
 
 };
 
index cb9206efdcae1cbb3d8da6eb87d8231976871d72..4f8079f963f6dc1569b677594ceaf4edd31896bb 100644 (file)
@@ -29,9 +29,9 @@ public:
   virtual Box text_dimension (String)  const;
   virtual int name_to_index (String) const;
 
-  virtual Molecule find_by_name (String) const;
-  virtual Molecule get_indexed_char_molecule (int k) const;
-  virtual Molecule get_ascii_char_molecule (int k) const;  
+  virtual Stencil find_by_name (String) const;
+  virtual Stencil get_indexed_char_stencil (int k) const;
+  virtual Stencil get_ascii_char_stencil (int k) const;  
   
   DECLARE_SMOBS (Font_metric,);
 private:
index 49c5556c13c2574d2dabfc013c2e04c4a1b4ebe0..4a111b233dd7444021524fd6c1295a96caca41b5 100644 (file)
@@ -111,14 +111,14 @@ public:
   virtual void discretionary_processing ();
   virtual SCM do_derived_mark () const;
 
-  Molecule * get_molecule () const;
-  SCM get_uncached_molecule () const;
+  Stencil * get_stencil () const;
+  SCM get_uncached_stencil () const;
 
   SCM get_property_alist_chain (SCM) const;
   void suicide ();
   bool live () const;
   
-  DECLARE_SCHEME_CALLBACK (molecule_extent, (SCM smob, SCM axis));
+  DECLARE_SCHEME_CALLBACK (stencil_extent, (SCM smob, SCM axis));
 
   static SCM ly_set_grob_property (SCM, SCM,SCM);
   static SCM ly_get_grob_property (SCM, SCM);  
index aa09d022975cb3d7bf3a8a0a86d286e16f3ba6ec..a63920598f9f8fa57ea9bac2ea86f28b287eaabe 100644 (file)
@@ -45,8 +45,8 @@ private:
 
   Grob *last_bound_;
 
-  void override_molecule_callback ();
-  void revert_molecule_callback ();
+  void override_stencil_callback ();
+  void revert_stencil_callback ();
 };
 
 #endif // LIGATURE_ENGRAVER_HH
index b085da12d1ee6a01d2d2ea25fc14ec9968262635..659a6b606bf402b72639606ceac36214de24155b 100644 (file)
@@ -94,7 +94,7 @@ class Midi_tempo;
 class Midi_text;
 class Midi_time_signature;
 class Midi_track;
-class Molecule;
+class Stencil;
 class Moment;
 class Music;
 class Music_iterator;
index 0bf56707a09bf0cafdaf22a7a6c4fa668b6b4fe7..576fcce7fccd03a77933d5236de39893ec0d89c9 100644 (file)
@@ -14,10 +14,10 @@ source file of the GNU LilyPond music typesetter
 
 struct Line_interface
 {
-  static Molecule line (Grob *me, Offset from, Offset to);
+  static Stencil line (Grob *me, Offset from, Offset to);
   static bool has_interface (Grob*);
-  static Molecule make_dashed_line (Real th, Offset from, Offset to, Real, Real);
-  static Molecule make_line (Real th, Offset from, Offset to);
+  static Stencil make_dashed_line (Real th, Offset from, Offset to, Real, Real);
+  static Stencil make_line (Real th, Offset from, Offset to);
 };
 
 #endif /* LINE_INTERFACE_HH */
index 4dda796de4e7464bc6421bf397f0d8e7533dea1a..79a08e2c812d8cd1099452baac0cb63ec67d1889 100644 (file)
@@ -17,7 +17,7 @@ class Line_spanner
 public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK(after_line_breaking, (SCM));  
-  static Molecule line_molecule (Grob* me, Offset f, Offset t);
+  static Stencil line_stencil (Grob* me, Offset f, Offset t);
   static bool has_interface (Grob*);
 
 private:
index a86be7885218cc1f3f000f55d51b40dd13615d88..b84097ee2e7188b0739027753585d297f74f93ac 100644 (file)
 #define LOOKUP_HH
 
 #include "string.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "flower-proto.hh"
 #include "direction.hh"
 #include "box.hh"
 
 struct Lookup
 {
-  static Molecule dot (Offset p, Real radius);
-  static Molecule bracket (Axis a, Interval iv, Real thick, Real protude, Real blot);
-  static Molecule accordion (SCM arg, Real interline_f, Font_metric*fm);
-  static Molecule round_filled_polygon (Array<Offset> points, Real blotdiameter);
-  static Molecule frame (Box b, Real thick, Real blot);
-  static Molecule slur (Bezier controls, Real cthick, Real thick);
-  static Molecule bezier_sandwich (Bezier top_curve, Bezier bottom_curve);
-  static Molecule beam (Real slope, Real width, Real thick, Real blot);
-  static Molecule dashed_slur (Bezier, Real thick, Real dash);
-  static Molecule blank (Box b);
-  static Molecule filled_box (Box b);
-  static Molecule round_filled_box (Box b, Real blotdiameter);
-  static Molecule repeat_slash (Real w, Real slope, Real th);
-  static Molecule horizontal_line (Interval w, Real th);
-  static Molecule triangle (Interval, Real, Real);
+  static Stencil dot (Offset p, Real radius);
+  static Stencil bracket (Axis a, Interval iv, Real thick, Real protude, Real blot);
+  static Stencil accordion (SCM arg, Real interline_f, Font_metric*fm);
+  static Stencil round_filled_polygon (Array<Offset> points, Real blotdiameter);
+  static Stencil frame (Box b, Real thick, Real blot);
+  static Stencil slur (Bezier controls, Real cthick, Real thick);
+  static Stencil bezier_sandwich (Bezier top_curve, Bezier bottom_curve);
+  static Stencil beam (Real slope, Real width, Real thick, Real blot);
+  static Stencil dashed_slur (Bezier, Real thick, Real dash);
+  static Stencil blank (Box b);
+  static Stencil filled_box (Box b);
+  static Stencil round_filled_box (Box b, Real blotdiameter);
+  static Stencil repeat_slash (Real w, Real slope, Real th);
+  static Stencil horizontal_line (Interval w, Real th);
+  static Stencil triangle (Interval, Real, Real);
 };
 
 #endif // LOOKUP_HH
diff --git a/lily/include/molecule.hh b/lily/include/molecule.hh
deleted file mode 100644 (file)
index 78aace7..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
-  molecule.hh -- declare Molecule
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-#ifndef MOLECULE_HH
-#define MOLECULE_HH
-
-#include <stdlib.h>            // size_t
-#include "lily-proto.hh"
-#include "box.hh"
-#include "axes.hh"
-#include "direction.hh"
-#include "lily-guile.hh"
-#include "smobs.hh"
-
-/** a group of individually translated symbols. You can add molecules
-    to the top, to the right, etc.
-
-    It is implemented as a "tree" of scheme expressions, as in
-
-     Expr = combine Expr Expr
-              | translate Offset Expr
-             | SCHEME
-             ;
-
-    SCHEME is a Scheme expression that --when eval'd-- produces the
-    desired output.  
-
-
-    Because of the way that Molecule is implemented, it is the most
-    efficient to add "fresh" molecules to what you're going to build.
-    
-    Dimension behavior:
-
-    Empty molecules have empty dimensions.  If add_at_edge is used to
-    init the molecule, we assume that
-    DIMENSIONS = (Interval (0,0),Interval (0,0)
-*/
-class Molecule
-{
-  friend SCM ly_molecule_set_extent_x (SCM, SCM, SCM);
-  
-  Box dim_;
-  SCM expr_;
-  
-  DECLARE_SIMPLE_SMOBS (Molecule,);  
-public:
-  Molecule (Box, SCM s);
-  Molecule ();
-
-
-  SCM smobbed_copy () const;
-  SCM get_expr () const;
-
-  /**
-     Set dimensions to empty, or to (Interval (0,0),Interval (0,0) */
-  void set_empty (bool);
-  void add_at_edge (Axis a, Direction d, const Molecule &m, Real padding,
-                   Real minimum);
-  void add_molecule (Molecule const &m);
-  void translate (Offset);
-  void align_to (Axis a, Real x);
-  void translate_axis (Real,Axis);
-  
-  Interval extent (Axis) const;
-  Box extent_box () const;
-  /**
-     codify THIS into a Scheme expression.
-   */
-  SCM create_scheme () const;
-  bool is_empty () const;
-
-
-  static SCM ly_get_molecule_extent (SCM mol, SCM axis);
-  static SCM ly_set_molecule_extent_x (SCM,SCM,SCM);
-  static SCM ly_molecule_combined_at_edge (SCM,SCM,SCM,SCM,SCM);
-};
-
-
-DECLARE_UNSMOB(Molecule,molecule);
-SCM fontify_atom (Font_metric const*, SCM atom);
-
-Molecule create_molecule (SCM print);
-
-
-
-#endif
index c3f6c751420c3879384765538e94e8e4304e7da6..c863940ec17dacf55b6185b53f9753feb383d370 100644 (file)
@@ -22,11 +22,11 @@ public:
   DECLARE_SCHEME_CALLBACK (percent, (SCM));
   static  void add_column (Grob*,Item*);
   DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM ));
-  DECLARE_SCHEME_CALLBACK (centered_molecule, (SCM ));
+  DECLARE_SCHEME_CALLBACK (centered_stencil, (SCM ));
   
-  static Molecule big_rest (Grob*,Real);
-  static Molecule symbol_molecule (Grob*,Real);  
-  static Molecule church_rest (Grob*, Font_metric*, int,Real);
+  static Stencil big_rest (Grob*,Real);
+  static Stencil symbol_stencil (Grob*,Real);  
+  static Stencil church_rest (Grob*, Font_metric*, int,Real);
 };
 
 #endif /* MULTI_MEASURE_REST_HH */
index 7c41206e52fabea928bf49503e229477c521b519..194f7c2c241e5418ef32b2cc59a2dff3714d4984 100644 (file)
@@ -8,7 +8,7 @@
 #define NOTEHEAD_HH
 
 #include "lily-guile.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 
 /** ball at the end of the stem. Also takes care of ledger lines.
 
@@ -22,9 +22,9 @@ class Note_head
 public:
   DECLARE_SCHEME_CALLBACK (print, (SCM ));
   static Interval head_extent (Grob*, Axis);
-  static Molecule brew_ledger_lines (Grob *me, int pos, int interspaces,
+  static Stencil brew_ledger_lines (Grob *me, int pos, int interspaces,
                                     Interval x_extent, Real, bool);
-  DECLARE_SCHEME_CALLBACK (brew_ez_molecule, (SCM));
+  DECLARE_SCHEME_CALLBACK (brew_ez_stencil, (SCM));
   DECLARE_SCHEME_CALLBACK (extent, (SCM,SCM));
   static bool has_interface (Grob*);
   static Real stem_attachment_coordinate (Grob *, Axis a);
index 2db9741ae2870afbc30de0031f056a6f0dc2a307..f810b48677bc0cf8cbb4ea7cd0e92a4a3a4665a9 100644 (file)
@@ -18,8 +18,8 @@ public:
   static bool has_interface (Grob*);
   DECLARE_SCHEME_CALLBACK (beat_slash, (SCM ));  
   DECLARE_SCHEME_CALLBACK (double_percent, (SCM ));
-  static Molecule x_percent (Grob*,int,Real,Real );
-  static Molecule brew_slash (Grob*);
+  static Stencil x_percent (Grob*,int,Real,Real );
+  static Stencil brew_slash (Grob*);
 };
 
 #endif /* PERCENT_REPEAT_ITEM_HH */
index 3df7a120bdfcde5e5ac8a570501d13e82850329d..88e9a74eed713caff0a2a0b78b35216f5fb8e8c4 100644 (file)
@@ -18,7 +18,7 @@ public:
   DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM ));
   static bool has_interface (Grob*);
   static String glyph_name (Grob*, int, String); 
-  static SCM brew_internal_molecule (SCM);
+  static SCM brew_internal_stencil (SCM);
   DECLARE_SCHEME_CALLBACK (extent_callback, (SCM,SCM));
   DECLARE_SCHEME_CALLBACK (print, (SCM ));
 };
index 2b27d71b4ded48624180204db56391828ecf97e8..71c827625076c1708b46f61bada74c2c69cd3f60 100644 (file)
@@ -18,7 +18,7 @@
 struct Scaled_font_metric : public Font_metric
 {
   virtual Box text_dimension (String) const;
-  virtual Molecule find_by_name (String) const;
+  virtual Stencil find_by_name (String) const;
   static SCM make_scaled_font_metric (Font_metric*, Real);
   virtual int count () const;
   virtual Offset get_indexed_wxwy (int) const;
index 494e8977889b007cdb83cdb306150e5186eec0cd..4417e9f2335eef4e18c779c3a84409c7e77c0646 100644 (file)
@@ -21,7 +21,7 @@
 class Script_interface
 {
 public:
-  static Molecule get_molecule (Grob*,Direction d);
+  static Stencil get_stencil (Grob*,Direction d);
   
   static bool  has_interface (Grob*);
   DECLARE_SCHEME_CALLBACK (print, (SCM ));
index a0aa600f50641aa1f970ccf7068987418b7b54ea..8cddd8f18a742c45973f875006c9b79c8dd3a810 100644 (file)
@@ -22,7 +22,7 @@ public:
   DECLARE_SCHEME_CALLBACK (print, (SCM ));
   DECLARE_SCHEME_CALLBACK (height, (SCM,SCM));
   static void set_stem (Grob*me, Grob *st);
-  static Molecule raw_molecule (Grob*);
+  static Stencil raw_stencil (Grob*);
 };
 
 #endif /* ABBREV_HH */
index 02466710d8a0c0f74cbe9368d7c01f7cab946b66..65c23a2f7f2ac14a8f26d0f1c1558eb08086f26c 100644 (file)
@@ -37,7 +37,7 @@ public:
   static Real get_default_stem_end_position (Grob*me);
   static void position_noteheads (Grob *);
   static Real stem_end_position (Grob *);
-  static Molecule flag (Grob *);
+  static Stencil flag (Grob *);
   static bool has_interface (Grob *);
   static void set_spacing_hints (Grob *);
   
diff --git a/lily/include/stencil.hh b/lily/include/stencil.hh
new file mode 100644 (file)
index 0000000..9d81bdc
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+  stencil.hh -- declare Stencil
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+#ifndef STENCIL_HH
+#define STENCIL_HH
+
+#include <stdlib.h>            // size_t
+#include "lily-proto.hh"
+#include "box.hh"
+#include "axes.hh"
+#include "direction.hh"
+#include "lily-guile.hh"
+#include "smobs.hh"
+
+/** a group of individually translated symbols. You can add stencils
+    to the top, to the right, etc.
+
+    It is implemented as a "tree" of scheme expressions, as in
+
+     Expr = combine Expr Expr
+              | translate Offset Expr
+             | SCHEME
+             ;
+
+    SCHEME is a Scheme expression that --when eval'd-- produces the
+    desired output.  
+
+
+    Because of the way that Stencil is implemented, it is the most
+    efficient to add "fresh" stencils to what you're going to build.
+    
+    Dimension behavior:
+
+    Empty stencils have empty dimensions.  If add_at_edge is used to
+    init the stencil, we assume that
+    DIMENSIONS = (Interval (0,0),Interval (0,0)
+*/
+class Stencil
+{
+  friend SCM ly_stencil_set_extent_x (SCM, SCM, SCM);
+  
+  Box dim_;
+  SCM expr_;
+  
+  DECLARE_SIMPLE_SMOBS (Stencil,);  
+public:
+  Stencil (Box, SCM s);
+  Stencil ();
+
+
+  SCM smobbed_copy () const;
+  SCM get_expr () const;
+
+  /**
+     Set dimensions to empty, or to (Interval (0,0),Interval (0,0) */
+  void set_empty (bool);
+  void add_at_edge (Axis a, Direction d, const Stencil &m, Real padding,
+                   Real minimum);
+  void add_stencil (Stencil const &m);
+  void translate (Offset);
+  void align_to (Axis a, Real x);
+  void translate_axis (Real,Axis);
+  
+  Interval extent (Axis) const;
+  Box extent_box () const;
+  /**
+     codify THIS into a Scheme expression.
+   */
+  SCM create_scheme () const;
+  bool is_empty () const;
+
+
+  static SCM ly_get_stencil_extent (SCM mol, SCM axis);
+  static SCM ly_set_stencil_extent_x (SCM,SCM,SCM);
+  static SCM ly_stencil_combined_at_edge (SCM,SCM,SCM,SCM,SCM);
+};
+
+
+DECLARE_UNSMOB(Stencil,stencil);
+SCM fontify_atom (Font_metric const*, SCM atom);
+
+Stencil create_stencil (SCM print);
+
+
+
+#endif
index 59e87f29e3370fd5cf5e34d6b3e29ac8adf1d0e2..828a11da7cd52d86e590afc87dcc12b77831f6f9 100644 (file)
@@ -25,9 +25,9 @@ public:
   static bool has_interface (Grob*);
   DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM ));
   static void try_collapse (Grob*);
-  static Molecule staff_bracket (Grob*,Real) ;
-  static Molecule staff_brace (Grob*,Real) ;
-  static Molecule simple_bar (Grob*,Real) ;
+  static Stencil staff_bracket (Grob*,Real) ;
+  static Stencil staff_brace (Grob*,Real) ;
+  static Stencil simple_bar (Grob*,Real) ;
 };
 
 #endif /* SYSTEM_START_DELIMITER_HH */
index 1f77cac75a1b7f5f415e6c936349ddcbbb48e7cc..df209eb5fe4e27bcd004834b66fbc17199461a45 100644 (file)
@@ -41,7 +41,7 @@ public:
   
   void add_column (Paper_column*);
   void typeset_grob (Grob*);
-  void output_molecule (SCM, Offset);
+  void output_stencil (SCM, Offset);
   void output_scheme (SCM);
   void pre_processing ();
 protected:
index e272303e4b78ad1d2a230dfeaf0260a756c52a5b..1ef5255c5d301463222603949702b1280a8bae21 100644 (file)
@@ -13,7 +13,7 @@
 
 #include "lily-proto.hh"
 #include "lily-guile.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 
 class Text_item
 {
index 2488c7566011f9272526b06d3d9e94cf8820a059..ac25f89c86ef23b2e76dc29407d4d0a7411acd6b 100644 (file)
@@ -20,8 +20,8 @@
 struct Time_signature
 {
   static bool has_interface (Grob*);
-  static Molecule special_time_signature (Grob*,SCM,int,int) ;
-  static Molecule numbered_time_signature (Grob*,int, int);
+  static Stencil special_time_signature (Grob*,SCM,int,int) ;
+  static Stencil numbered_time_signature (Grob*,int, int);
   DECLARE_SCHEME_CALLBACK (print, (SCM ));
 };
 #endif // METER_HH
index 6bf46324bf82d30589bea94e4c0c6764c671e0dc..36ac26cf2f874126c4dd2610a278c40fa8753715 100644 (file)
@@ -53,7 +53,7 @@ public:
   Translator_group (Translator_group const &);
   Translator_group ();
 
-
+  bool is_alias (SCM) const;
   void add_fresh_group_translator (Translator *trans);
   void add_used_group_translator (Translator *trans);
   bool is_bottom_context () const;
index 00ffc86d94d978bda9a792f360df43844288d068..fe4d51aaa5e9b5cbcda1284b28be3eee2e332772 100644 (file)
@@ -38,7 +38,6 @@ class Translator
 public:
   Music_output_def * output_def_;
   
-  bool is_alias (SCM) const;
   Translator (Translator const &);
 
   
index 0b372352016be7a7826cdabf792109a5335b67f6..b875a2f2cb6ee1976e3c5e282763e8771f84af25 100644 (file)
@@ -31,7 +31,7 @@ public:
   DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM ));
 
   DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM ));
-  static Molecule make_bracket (Grob *me,  Axis protusion_axis,
+  static Stencil make_bracket (Grob *me,  Axis protusion_axis,
                                Offset dz,  Drul_array<Real> height,
                                Real gap, Drul_array<Real> widen,
                                Drul_array<Real> shorten);
index 333a64992ecfba38d3ad3813d41ddd467bd33022..ee68e696494a5ce638b7470949aac6466f2d705b 100644 (file)
@@ -10,7 +10,7 @@
 #define VATICANA_LIGATURE_HH
 
 #include "lily-guile.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 
 struct Vaticana_ligature
 {
index 0946ac8ebae73754efce6e22af6e8c7ac9891857..a3859954dfe5ed3a33dc31f81e3661e7c1d52466 100644 (file)
@@ -22,11 +22,11 @@ public:
   virtual int count () const;
   virtual Box get_indexed_char (int ascii) const;
   virtual Box get_ascii_char (int ascii) const;
-  virtual Molecule get_indexed_char_molecule (int ascii) const;
-  virtual Molecule get_ascii_char_molecule (int ascii) const;
+  virtual Stencil get_indexed_char_stencil (int ascii) const;
+  virtual Stencil get_ascii_char_stencil (int ascii) const;
   virtual Offset get_indexed_wxwy (int) const;
   virtual int name_to_index (String)const;
-  virtual Molecule find_by_name (String) const;
+  virtual Stencil find_by_name (String) const;
 
 protected:
   virtual void derived_mark () const;
index 123a6da6c5fdf6bb7a14af983edba8d3b44f51ff..eb936456ff2ed16b57df0ec7c8a5c7590eba630e 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "item.hh"
 
-#include "molecule.hh"
+#include "stencil.hh"
 #include "paper-def.hh"
 #include "font-interface.hh"
 #include "staff-symbol-referencer.hh"
@@ -114,7 +114,7 @@ Key_signature_interface::print (SCM smob)
     }
 
   SCM newas = me->get_grob_property ("new-accidentals");  
-  Molecule mol;
+  Stencil mol;
 
   SCM c0s = me->get_grob_property ("c0-position");
   int c0p = 0;
@@ -132,7 +132,7 @@ Key_signature_interface::print (SCM smob)
       int alteration = gh_scm2int (ly_cdar (s));
       String font_char =
        Accidental_interface::get_fontcharname (style, alteration);
-      Molecule acc (fm->find_by_name ("accidentals-" + font_char));
+      Stencil acc (fm->find_by_name ("accidentals-" + font_char));
 
       if (acc.is_empty ())
        {
@@ -162,7 +162,7 @@ Key_signature_interface::print (SCM smob)
 
       mol.add_at_edge (X_AXIS, LEFT, Lookup::blank (Box (x,y)), 0, 0);
 
-      Molecule natural;
+      Stencil natural;
       if (gh_pair_p (old))
        natural=Font_interface::get_default_font (me)->
            find_by_name (String ("accidentals-") + style + String ("0"));
@@ -177,7 +177,7 @@ Key_signature_interface::print (SCM smob)
              int alteration = 0;
              int pos = alteration_pos (what, alteration, c0p);
 
-             Molecule m = natural;
+             Stencil m = natural;
               m.translate_axis (pos* inter, Y_AXIS);
 
              /*
index 49b4cfa20990366c1b6915de4df9d9490818f730..a026118b98667e4b2dc3406725988d42bd772aa6 100644 (file)
@@ -110,7 +110,7 @@ Ligature_engraver::create_ligature_spanner ()
  * nests \[ and \].
  */
 void
-Ligature_engraver::override_molecule_callback ()
+Ligature_engraver::override_stencil_callback ()
 {
   SCM target_callback = ly_symbol2scm ("print-function");
   SCM source_callback = ly_symbol2scm ("ligature-primitive-callback");
@@ -134,7 +134,7 @@ Ligature_engraver::override_molecule_callback ()
  * nests \[ and \].
  */
 void
-Ligature_engraver::revert_molecule_callback ()
+Ligature_engraver::revert_stencil_callback ()
 {
   SCM symbol = ly_symbol2scm ("NoteHead");
   SCM key = ly_symbol2scm ("print-function");
@@ -166,7 +166,7 @@ Ligature_engraver::process_music ()
       finished_ligature_ = ligature_;
       primitives_.clear ();
       ligature_ = 0;
-      revert_molecule_callback ();
+      revert_stencil_callback ();
     }
   last_bound_ = unsmob_grob (get_property ("currentMusicalColumn"));
 
@@ -206,7 +206,7 @@ Ligature_engraver::process_music ()
       ligature_start_mom_ = now_mom ();
       
       announce_grob(ligature_, reqs_drul_[START]->self_scm());
-      override_molecule_callback ();
+      override_stencil_callback ();
     }
 }
 
index a4adb8e3571ba7704826a62f9ccdd6d0624c9903..091eac7cf1050d3e9b3202276568a08332663212 100644 (file)
@@ -8,14 +8,14 @@ source file of the GNU LilyPond music typesetter
  */
 
 #include "line-interface.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "grob.hh"
 #include "staff-symbol-referencer.hh"
 #include "lookup.hh"
 #include "paper-def.hh"
 
 
-Molecule
+Stencil
 Line_interface::make_dashed_line (Real thick, Offset from, Offset to,
                             Real dash_period, Real dash_fraction)
 {
@@ -38,12 +38,12 @@ Line_interface::make_dashed_line (Real thick, Offset from, Offset to,
   box[X_AXIS].widen (thick/2);
   box[Y_AXIS].widen (thick/2);  
 
-  Molecule m = Molecule (box, at);
+  Stencil m = Stencil (box, at);
   m.translate (from);
   return m;
 }
 
-Molecule
+Stencil
 Line_interface::make_line (Real th, Offset from, Offset to)
 {
   SCM at = scm_list_n (ly_symbol2scm ("draw-line"),
@@ -61,10 +61,10 @@ Line_interface::make_line (Real th, Offset from, Offset to)
   box[X_AXIS].widen (th/2);
   box[Y_AXIS].widen (th/2);  
 
-  return Molecule (box, at);
+  return Stencil (box, at);
 }
 
-Molecule
+Stencil
 Line_interface::line (Grob *me, Offset from, Offset to)
 {
   Real thick = Staff_symbol_referencer::line_thickness (me)
@@ -86,7 +86,7 @@ Line_interface::line (Grob *me, Offset from, Offset to)
        * robust_scm2double (me->get_grob_property ("dash-period"), 1.0);
 
       if (period < 0)
-       return Molecule ();
+       return Stencil ();
   
       return make_dashed_line (thick, from, to, period, fraction);
     }
index e7e59d525948f9fc7186aa8f3eff8dbceded1dcc..2f91fd7aa5328d49834871f1e8be8c477b49546d 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <math.h>
 
-#include "molecule.hh"
+#include "stencil.hh"
 #include "item.hh"
 #include "spanner.hh"
 #include "line-spanner.hh"
@@ -21,8 +21,8 @@
 #include "lookup.hh"
 #include "line-interface.hh"
 
-Molecule
-zigzag_molecule (Grob *me, 
+Stencil
+zigzag_stencil (Grob *me, 
                 Offset from,
                 Offset to)
 {
@@ -53,7 +53,7 @@ zigzag_molecule (Grob *me,
   b[X_AXIS].widen (thick/2);
   b[Y_AXIS].widen (thick/2);
      
-  return Molecule (b, list);
+  return Stencil (b, list);
 }
 
 MAKE_SCHEME_CALLBACK(Line_spanner, after_line_breaking, 1);
@@ -91,8 +91,8 @@ Line_spanner::after_line_breaking (SCM  g)
 }
 
 
-Molecule
-Line_spanner::line_molecule (Grob *me, 
+Stencil
+Line_spanner::line_stencil (Grob *me, 
                             Offset from,
                             Offset to)
 {
@@ -106,7 +106,7 @@ Line_spanner::line_molecule (Grob *me,
          || (type == ly_symbol2scm ("trill") && dz[Y_AXIS] != 0)))
     {
       return  (type == ly_symbol2scm ("zigzag"))
-       ? zigzag_molecule (me, from, to)
+       ? zigzag_stencil (me, from, to)
        : Line_interface::line (me, from, to);
     }
   else if (gh_symbol_p (type)
@@ -120,8 +120,8 @@ Line_spanner::line_molecule (Grob *me,
       Font_metric *fm = select_font (me->get_paper (),
                                                  gh_cons (style_alist,
                                                           alist_chain));
-      Molecule m = fm->find_by_name ("scripts-trill-element");
-      Molecule mol;
+      Stencil m = fm->find_by_name ("scripts-trill-element");
+      Stencil mol;
 
       do
        mol.add_at_edge (X_AXIS, RIGHT, m, 0,0);
@@ -139,7 +139,7 @@ Line_spanner::line_molecule (Grob *me,
       mol.translate (from);
       return mol;
     }
-  return Molecule();
+  return Stencil();
 }
 
 /*
@@ -166,7 +166,7 @@ line_spanner_common_parent (Grob *me)
   Warning: this thing is a cross-staff object, so it should have empty Y-dimensions.
 
  (If not, you risk that this is called from the staff-alignment
-  routine, via molecule_extent. At this point, the staves aren't
+  routine, via stencil_extent. At this point, the staves aren't
   separated yet, so it doesn't work cross-staff.
 
 */
@@ -245,7 +245,7 @@ Line_spanner::print (SCM smob)
       dz = (dz.length () - 2*gap) *dir;
       
   
-      Molecule l (line_molecule (me, Offset(0, 0), dz));
+      Stencil l (line_stencil (me, Offset(0, 0), dz));
 
       l.translate (dir * gap +  p1
                   - Offset (me->relative_coordinate (commonx, X_AXIS),
@@ -280,7 +280,7 @@ Line_spanner::print (SCM smob)
       ofxy = dxy * (off/dxy.length ());
       dxy -= 2*ofxy;
   
-      Molecule line = line_molecule (me, Offset (0,0),dxy);
+      Stencil line = line_stencil (me, Offset (0,0),dxy);
 
       line.translate_axis (bound[LEFT]->extent (bound[LEFT], X_AXIS).length ()/2, X_AXIS); 
       line.translate (ofxy - my_off + his_off);
index 0d950735b0e80e8379642bbef593435f633719ab..667aef9431a0b3dcca41d2ff3475f048b749521f 100644 (file)
 #include "file-path.hh"
 #include "main.hh"
 #include "lily-guile.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "lookup.hh"
 #include "font-metric.hh"
 #include "interval.hh"
 
-Molecule
+Stencil
 Lookup::dot (Offset p, Real radius)
 {
   SCM at = (scm_list_n (ly_symbol2scm ("dot"),
@@ -34,7 +34,7 @@ Lookup::dot (Offset p, Real radius)
   Box box;
   box.add_point (p - Offset (radius, radius));
   box.add_point (p + Offset (radius, radius));
-  return Molecule (box, at);
+  return Stencil (box, at);
 }
 
 
@@ -56,7 +56,7 @@ Lookup::dot (Offset p, Real radius)
  *       <----->
  *        width
  */
-Molecule 
+Stencil 
 Lookup::beam (Real slope, Real width, Real thick, Real blot) 
 {
   Real height = slope * width; 
@@ -72,10 +72,10 @@ Lookup::beam (Real slope, Real width, Real thick, Real blot)
                    gh_double2scm (thick),
                    gh_double2scm (blot),
                    SCM_UNDEFINED);
-  return Molecule (b, at);
+  return Stencil (b, at);
 }
 
-Molecule
+Stencil
 Lookup::dashed_slur (Bezier b, Real thick, Real dash)
 {
   SCM l = SCM_EOL;
@@ -92,12 +92,12 @@ Lookup::dashed_slur (Bezier b, Real thick, Real dash)
                               SCM_UNDEFINED));
 
   Box box (Interval (0,0),Interval (0,0));
-  return   Molecule (box, at);
+  return   Stencil (box, at);
 }
 
 
 
-Molecule
+Stencil
 Lookup::horizontal_line (Interval w, Real th)
 {
   SCM at = scm_list_n (ly_symbol2scm ("horizontal-line"),
@@ -111,17 +111,17 @@ Lookup::horizontal_line (Interval w, Real th)
   box[X_AXIS] = w;
   box[Y_AXIS] = Interval (-th/2,th/2);
 
-  return Molecule (box, at);
+  return Stencil (box, at);
 }
 
 
-Molecule
+Stencil
 Lookup::blank (Box b) 
 {
-  return Molecule (b, scm_makfrom0str (""));
+  return Stencil (b, scm_makfrom0str (""));
 }
 
-Molecule
+Stencil
 Lookup::filled_box (Box b) 
 {
   SCM  at  = (scm_list_n (ly_symbol2scm ("filledbox"),
@@ -131,7 +131,7 @@ Lookup::filled_box (Box b)
                     gh_double2scm (b[Y_AXIS][UP]),                    
                     SCM_UNDEFINED));
 
-  return Molecule (b,at);
+  return Stencil (b,at);
 }
 
 /*
@@ -161,7 +161,7 @@ Lookup::filled_box (Box b)
  * |<-------------------------->|
  *       Box extent(X_AXIS)
  */
-Molecule
+Stencil
 Lookup::round_filled_box (Box b, Real blotdiameter)
 {
   if (b.x ().length () < blotdiameter)
@@ -183,13 +183,13 @@ Lookup::round_filled_box (Box b, Real blotdiameter)
                        gh_double2scm (blotdiameter),
                        SCM_UNDEFINED));
 
-  return Molecule (b,at);
+  return Stencil (b,at);
 }
 
          
 
 /*
- * Create Molecule that represents a filled polygon with round edges.
+ * Create Stencil that represents a filled polygon with round edges.
  *
  * LIMITATIONS:
  *
@@ -228,7 +228,7 @@ Lookup::round_filled_box (Box b, Real blotdiameter)
  * postscript routine in the backend effectively does, but on the
  * shrinked polygon). --jr
  */
-Molecule
+Stencil
 Lookup::round_filled_polygon (Array<Offset> points, Real blotdiameter)
 {
   /* TODO: Maybe print a warning if one of the above limitations
@@ -249,7 +249,7 @@ Lookup::round_filled_polygon (Array<Offset> points, Real blotdiameter)
 
   /* special cases: degenerated polygons */
   if (points.size () == 0)
-    return Molecule ();
+    return Stencil ();
   if (points.size () == 1)
     return dot (points[0], 0.5 * blotdiameter);
   if (points.size () == 2)
@@ -316,7 +316,7 @@ Lookup::round_filled_polygon (Array<Offset> points, Real blotdiameter)
                                gh_double2scm (blotdiameter),
                                SCM_UNDEFINED);
 
-  Molecule polygon = Molecule (box, polygon_scm);
+  Stencil polygon = Stencil (box, polygon_scm);
   shrinked_points.clear ();
   return polygon;
 }
@@ -325,10 +325,10 @@ Lookup::round_filled_polygon (Array<Offset> points, Real blotdiameter)
 /*
   TODO: deprecate?
  */
-Molecule
+Stencil
 Lookup::frame (Box b, Real thick, Real blot)
 {
-  Molecule m;
+  Stencil m;
   Direction d = LEFT;
   for (Axis a = X_AXIS; a < NO_AXES; a = Axis (a + 1))
     {
@@ -340,7 +340,7 @@ Lookup::frame (Box b, Real thick, Real blot)
          edges[o][DOWN] = b[o][DOWN] - thick/2;
          edges[o][UP] = b[o][UP] + thick/2;      
          
-         m.add_molecule (round_filled_box (edges, blot));
+         m.add_stencil (round_filled_box (edges, blot));
        }
       while (flip (&d) != LEFT);
     }
@@ -350,7 +350,7 @@ Lookup::frame (Box b, Real thick, Real blot)
 /*
   Make a smooth curve along the points 
  */
-Molecule
+Stencil
 Lookup::slur (Bezier curve, Real curvethick, Real linethick) 
 {
   Real alpha = (curve.control_[3] - curve.control_[0]).arg ();
@@ -391,7 +391,7 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick)
   b[X_AXIS].unite (back.extent (X_AXIS));
   b[Y_AXIS].unite (back.extent (Y_AXIS));
 
-  return Molecule (b, at);
+  return Stencil (b, at);
 }
 
 /*
@@ -417,7 +417,7 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick)
  *    |
  *
  */
-Molecule
+Stencil
 Lookup::bezier_sandwich (Bezier top_curve, Bezier bottom_curve)
 {
   /*
@@ -444,28 +444,28 @@ Lookup::bezier_sandwich (Bezier top_curve, Bezier bottom_curve)
   y_extent.unite (bottom_curve.extent (Y_AXIS));
   Box b (x_extent, y_extent);
 
-  return Molecule (b, horizontal_bend);
+  return Stencil (b, horizontal_bend);
 }
 
 /*
   TODO: junk me.
  */
-Molecule
+Stencil
 Lookup::accordion (SCM s, Real staff_space, Font_metric *fm) 
 {
-  Molecule m;
+  Stencil m;
   String sym = ly_scm2string (ly_car (s));
   String reg = ly_scm2string (ly_car (ly_cdr (s)));
 
   if (sym == "Discant")
     {
-      Molecule r = fm->find_by_name ("accordion-accDiscant");
-      m.add_molecule (r);
+      Stencil r = fm->find_by_name ("accordion-accDiscant");
+      m.add_stencil (r);
       if (reg.left_string (1) == "F")
        {
-         Molecule d = fm->find_by_name ("accordion-accDot");
+         Stencil d = fm->find_by_name ("accordion-accDot");
          d.translate_axis (staff_space * 2.5 PT, Y_AXIS);
-         m.add_molecule (d);
+         m.add_stencil (d);
          reg = reg.right_string (reg.length ()-1);
        }
       int eflag = 0x00;
@@ -491,135 +491,135 @@ Lookup::accordion (SCM s, Real staff_space, Font_metric *fm)
        }
       if (eflag & 0x02)
        {
-         Molecule d = fm->find_by_name ("accordion-accDot");
+         Stencil d = fm->find_by_name ("accordion-accDot");
          d.translate_axis (staff_space * 1.5 PT, Y_AXIS);
-         m.add_molecule (d);
+         m.add_stencil (d);
        }
       if (eflag & 0x04)
        {
-         Molecule d = fm->find_by_name ("accordion-accDot");
+         Stencil d = fm->find_by_name ("accordion-accDot");
          d.translate_axis (staff_space * 1.5 PT, Y_AXIS);
          d.translate_axis (0.8 * staff_space PT, X_AXIS);
-         m.add_molecule (d);
+         m.add_stencil (d);
        }
       if (eflag & 0x01)
        {
-         Molecule d = fm->find_by_name ("accordion-accDot");
+         Stencil d = fm->find_by_name ("accordion-accDot");
          d.translate_axis (staff_space * 1.5 PT, Y_AXIS);
          d.translate_axis (-0.8 * staff_space PT, X_AXIS);
-         m.add_molecule (d);
+         m.add_stencil (d);
        }
       if (reg.left_string (2) == "SS")
        {
-         Molecule d = fm->find_by_name ("accordion-accDot");
+         Stencil d = fm->find_by_name ("accordion-accDot");
          d.translate_axis (0.5 * staff_space PT, Y_AXIS);
          d.translate_axis (0.4 * staff_space PT, X_AXIS);
-         m.add_molecule (d);
+         m.add_stencil (d);
          d.translate_axis (-0.8 * staff_space PT, X_AXIS);
-         m.add_molecule (d);
+         m.add_stencil (d);
          reg = reg.right_string (reg.length ()-2);
        }
       if (reg.left_string (1) == "S")
        {
-         Molecule d = fm->find_by_name ("accordion-accDot");
+         Stencil d = fm->find_by_name ("accordion-accDot");
          d.translate_axis (0.5 * staff_space PT, Y_AXIS);
-         m.add_molecule (d);
+         m.add_stencil (d);
          reg = reg.right_string (reg.length ()-1);
        }
     }
   else if (sym == "Freebase")
     {
-      Molecule r = fm->find_by_name ("accordion-accFreebase");
-      m.add_molecule (r);
+      Stencil r = fm->find_by_name ("accordion-accFreebase");
+      m.add_stencil (r);
       if (reg.left_string (1) == "F")
        {
-         Molecule d = fm->find_by_name ("accordion-accDot");
+         Stencil d = fm->find_by_name ("accordion-accDot");
          d.translate_axis (staff_space * 1.5 PT, Y_AXIS);
-         m.add_molecule (d);
+         m.add_stencil (d);
          reg = reg.right_string (reg.length ()-1);
        }
       if (reg == "E")
        {
-         Molecule d = fm->find_by_name ("accordion-accDot");
+         Stencil d = fm->find_by_name ("accordion-accDot");
          d.translate_axis (staff_space * 0.5 PT, Y_AXIS);
-         m.add_molecule (d);
+         m.add_stencil (d);
        }
     }
   else if (sym == "Bayanbase")
     {
-      Molecule r = fm->find_by_name ("accordion-accBayanbase");
-      m.add_molecule (r);
+      Stencil r = fm->find_by_name ("accordion-accBayanbase");
+      m.add_stencil (r);
       if (reg.left_string (1) == "T")
        {
-         Molecule d = fm->find_by_name ("accordion-accDot");
+         Stencil d = fm->find_by_name ("accordion-accDot");
          d.translate_axis (staff_space * 2.5 PT, Y_AXIS);
-         m.add_molecule (d);
+         m.add_stencil (d);
          reg = reg.right_string (reg.length ()-1);
        }
       /* include 4' reed just for completeness. You don't want to use this. */
       if (reg.left_string (1) == "F")
        {
-         Molecule d = fm->find_by_name ("accordion-accDot");
+         Stencil d = fm->find_by_name ("accordion-accDot");
          d.translate_axis (staff_space * 1.5 PT, Y_AXIS);
-         m.add_molecule (d);
+         m.add_stencil (d);
          reg = reg.right_string (reg.length ()-1);
        }
       if (reg.left_string (2) == "EE")
        {
-         Molecule d = fm->find_by_name ("accordion-accDot");
+         Stencil d = fm->find_by_name ("accordion-accDot");
          d.translate_axis (staff_space * 0.5 PT, Y_AXIS);
          d.translate_axis (0.4 * staff_space PT, X_AXIS);
-         m.add_molecule (d);
+         m.add_stencil (d);
          d.translate_axis (-0.8 * staff_space PT, X_AXIS);
-         m.add_molecule (d);
+         m.add_stencil (d);
          reg = reg.right_string (reg.length ()-2);
        }
       if (reg.left_string (1) == "E")
        {
-         Molecule d = fm->find_by_name ("accordion-accDot");
+         Stencil d = fm->find_by_name ("accordion-accDot");
          d.translate_axis (staff_space * 0.5 PT, Y_AXIS);
-         m.add_molecule (d);
+         m.add_stencil (d);
          reg = reg.right_string (reg.length ()-1);
        }
     }
   else if (sym == "Stdbase")
     {
-      Molecule r = fm->find_by_name ("accordion-accStdbase");
-      m.add_molecule (r);
+      Stencil r = fm->find_by_name ("accordion-accStdbase");
+      m.add_stencil (r);
       if (reg.left_string (1) == "T")
        {
-         Molecule d = fm->find_by_name ("accordion-accDot");
+         Stencil d = fm->find_by_name ("accordion-accDot");
          d.translate_axis (staff_space * 3.5 PT, Y_AXIS);
-         m.add_molecule (d);
+         m.add_stencil (d);
          reg = reg.right_string (reg.length ()-1);
        }
       if (reg.left_string (1) == "F")
        {
-         Molecule d = fm->find_by_name ("accordion-accDot");
+         Stencil d = fm->find_by_name ("accordion-accDot");
          d.translate_axis (staff_space * 2.5 PT, Y_AXIS);
-         m.add_molecule (d);
+         m.add_stencil (d);
          reg = reg.right_string (reg.length ()-1);
        }
       if (reg.left_string (1) == "M")
        {
-         Molecule d = fm->find_by_name ("accordion-accDot");
+         Stencil d = fm->find_by_name ("accordion-accDot");
          d.translate_axis (staff_space * 2 PT, Y_AXIS);
          d.translate_axis (staff_space PT, X_AXIS);
-         m.add_molecule (d);
+         m.add_stencil (d);
          reg = reg.right_string (reg.length ()-1);
        }
       if (reg.left_string (1) == "E")
        {
-         Molecule d = fm->find_by_name ("accordion-accDot");
+         Stencil d = fm->find_by_name ("accordion-accDot");
          d.translate_axis (staff_space * 1.5 PT, Y_AXIS);
-         m.add_molecule (d);
+         m.add_stencil (d);
          reg = reg.right_string (reg.length ()-1);
        }
       if (reg.left_string (1) == "S")
        {
-         Molecule d = fm->find_by_name ("accordion-accDot");
+         Stencil d = fm->find_by_name ("accordion-accDot");
          d.translate_axis (staff_space * 0.5 PT, Y_AXIS);
-         m.add_molecule (d);
+         m.add_stencil (d);
          reg = reg.right_string (reg.length ()-1);
        }
     }
@@ -627,28 +627,28 @@ Lookup::accordion (SCM s, Real staff_space, Font_metric *fm)
      for the rectangle */
   else if (sym == "SB")
     {
-      Molecule r = fm->find_by_name ("accordion-accSB");
-      m.add_molecule (r);
+      Stencil r = fm->find_by_name ("accordion-accSB");
+      m.add_stencil (r);
     }
   else if (sym == "BB")
     {
-      Molecule r = fm->find_by_name ("accordion-accBB");
-      m.add_molecule (r);
+      Stencil r = fm->find_by_name ("accordion-accBB");
+      m.add_stencil (r);
     }
   else if (sym == "OldEE")
     {
-      Molecule r = fm->find_by_name ("accordion-accOldEE");
-      m.add_molecule (r);
+      Stencil r = fm->find_by_name ("accordion-accOldEE");
+      m.add_stencil (r);
     }
   else if (sym == "OldEES")
     {
-      Molecule r = fm->find_by_name ("accordion-accOldEES");
-      m.add_molecule (r);
+      Stencil r = fm->find_by_name ("accordion-accOldEES");
+      m.add_stencil (r);
     }
   return m;  
 }
 
-Molecule
+Stencil
 Lookup::repeat_slash (Real w, Real s, Real t)
 {
   SCM wid = gh_double2scm (w);
@@ -660,11 +660,11 @@ Lookup::repeat_slash (Real w, Real s, Real t)
   Box b (Interval (0, w + sqrt (sqr(t/s) + sqr (t))),
         Interval (0, w * s));
 
-  return Molecule (b, slashnodot); //  http://slashnodot.org
+  return Stencil (b, slashnodot); //  http://slashnodot.org
 }
 
 
-Molecule
+Stencil
 Lookup::bracket (Axis a, Interval iv, Real thick, Real protude, Real blot)
 {
   Box b;
@@ -672,20 +672,20 @@ Lookup::bracket (Axis a, Interval iv, Real thick, Real protude, Real blot)
   b[a] = iv;
   b[other] = Interval(-1, 1) * thick * 0.5;
   
-  Molecule m =  round_filled_box (b, blot);
+  Stencil m =  round_filled_box (b, blot);
 
   b[a] = Interval (iv[UP] - thick, iv[UP]);
   Interval oi = Interval (-thick/2, thick/2 + fabs (protude)) ;
   oi *=  sign (protude);
   b[other] = oi;
-  m.add_molecule (round_filled_box (b, blot));
+  m.add_stencil (round_filled_box (b, blot));
   b[a] = Interval (iv[DOWN], iv[DOWN]  +thick);
-  m.add_molecule (round_filled_box (b,blot));
+  m.add_stencil (round_filled_box (b,blot));
 
   return m;
 }
 
-Molecule
+Stencil
 Lookup::triangle (Interval iv, Real thick, Real protude)
 {
   Box b ;
@@ -697,7 +697,7 @@ Lookup::triangle (Interval iv, Real thick, Real protude)
                      gh_double2scm (iv.length()), 
                      gh_double2scm (protude), SCM_UNDEFINED);
 
-  return Molecule (b, s);
+  return Stencil (b, s);
 }
 
 
index 40ee4b391c44d2919e6cff9a45af0a407ecd3da8..05e90ba421d45bbef0d7db5c759325e0cbd1e294 100644 (file)
@@ -11,7 +11,7 @@
 #include "box.hh"
 #include "warn.hh"
 #include "lookup.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "paper-column.hh"
 #include "paper-def.hh"
 #include "lyric-extender.hh"
@@ -106,7 +106,7 @@ Lyric_extender::print (SCM smob)
   if (w < 1.5 * h)
     return SCM_EOL;
   
-  Molecule  mol (Lookup::round_filled_box (Box (Interval (0,w), Interval (0,h)),
+  Stencil  mol (Lookup::round_filled_box (Box (Interval (0,w), Interval (0,h)),
                                           0.8 * h));
   mol.translate_axis (left_point - me->relative_coordinate (common, X_AXIS), X_AXIS);
   return mol.smobbed_copy ();
index f608ddc77f2c91c0f509aa79a26b9e2f35d52128..3691dedc624c126f1370a5e02297bb735d1cd789 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "box.hh"
 #include "lookup.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "paper-def.hh"
 #include "paper-column.hh"
 #include "spanner.hh"
@@ -74,14 +74,14 @@ Hyphen_spanner::print (SCM smob)
   space_left = space_left >? 0.0;
   
   Box b (Interval (0, dl), Interval (h,h+th));
-  Molecule dash_mol (Lookup::round_filled_box (b, 0.8 * lt));
+  Stencil dash_mol (Lookup::round_filled_box (b, 0.8 * lt));
 
-  Molecule total;
+  Stencil total;
   for (int i = 0; i < n; i++)
     {
-      Molecule m (dash_mol);
+      Stencil m (dash_mol);
       m.translate_axis (span_points[LEFT] + i * dp + space_left / 2, X_AXIS);
-      total.add_molecule (m);
+      total.add_stencil (m);
     }
 
   total.translate_axis ( -me->relative_coordinate (common, X_AXIS), X_AXIS);
index 780e77547b679e9bf759b8befd4fb33f7a9b26b6..2896a3d8e8730c57ce24672887f94ab908ed2171 100644 (file)
@@ -40,7 +40,7 @@ Measure_grouping::print (SCM grob)
 
   Interval iv (0,w);
 
-  Molecule m;
+  Stencil m;
 
   /*
     TODO: use line interface
index 9d09027e14f3040548605ed87e4538d150d907ad..0866707bd188dac9e2d0dca82eef7a28ef137d7c 100644 (file)
@@ -10,7 +10,7 @@
 #include "item.hh"
 #include "mensural-ligature.hh"
 #include "font-interface.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "lookup.hh"
 #include "staff-symbol-referencer.hh"
 #include "note-head.hh"
@@ -22,7 +22,7 @@
  *
  * TODO: move this function to class Lookup?
  */
-Molecule
+Stencil
 brew_flexa (Grob *me,
            Real interval,
            bool solid,
@@ -33,7 +33,7 @@ brew_flexa (Grob *me,
 {
   Real staff_space = Staff_symbol_referencer::staff_space (me);
   Real height = 0.6 * staff_space;
-  Molecule molecule = Molecule ();
+  Stencil stencil = Stencil ();
 
   if (add_cauda)
     {
@@ -57,9 +57,9 @@ brew_flexa (Grob *me,
        -0.5*height - cauda_box_y.length();
 
       Box cauda_box (cauda_box_x, cauda_box_y);
-      Molecule cauda = Lookup::filled_box (cauda_box);
+      Stencil cauda = Lookup::filled_box (cauda_box);
       cauda.translate_axis (y_correction, Y_AXIS);
-      molecule.add_molecule (cauda);
+      stencil.add_stencil (cauda);
     }
 
   Real slope = (interval / 2.0 * staff_space) / width;
@@ -72,38 +72,38 @@ brew_flexa (Grob *me,
 
   if (solid)
     {
-      Molecule solid_head =
+      Stencil solid_head =
        Lookup::beam (corrected_slope, width, height, 0.0);
-      molecule.add_molecule (solid_head);
+      stencil.add_stencil (solid_head);
     }
   else // outline
     {
-      Molecule left_edge =
+      Stencil left_edge =
        Lookup::beam (corrected_slope, thickness, height, 0.0);
-      molecule.add_molecule(left_edge);
+      stencil.add_stencil(left_edge);
 
-      Molecule right_edge =
+      Stencil right_edge =
        Lookup::beam (corrected_slope, thickness, height, 0.0);
       right_edge.translate_axis (width-thickness, X_AXIS);
       right_edge.translate_axis (corrected_slope * (width-thickness), Y_AXIS);
-      molecule.add_molecule(right_edge);
+      stencil.add_stencil(right_edge);
 
-      Molecule bottom_edge =
+      Stencil bottom_edge =
        Lookup::beam (corrected_slope, width, thickness, 0.0);
       bottom_edge.translate_axis (-0.5*height, Y_AXIS);
-      molecule.add_molecule (bottom_edge);
+      stencil.add_stencil (bottom_edge);
 
-      Molecule top_edge =
+      Stencil top_edge =
        Lookup::beam (corrected_slope, width, thickness, 0.0);
       top_edge.translate_axis (+0.5*height, Y_AXIS);
-      molecule.add_molecule (top_edge);
+      stencil.add_stencil (top_edge);
     }
-  molecule.translate_axis (ypos_correction, Y_AXIS);
-  return molecule;
+  stencil.translate_axis (ypos_correction, Y_AXIS);
+  return stencil;
 }
 
 void
-add_ledger_lines (Grob *me, Molecule *out, int pos, Real offs,
+add_ledger_lines (Grob *me, Stencil *out, int pos, Real offs,
                  bool ledger_take_space)
 {
   int interspaces = Staff_symbol_referencer::line_count (me)-1;
@@ -115,16 +115,16 @@ add_ledger_lines (Grob *me, Molecule *out, int pos, Real offs,
 
       Interval l_extents = Interval (hd[LEFT] - left_ledger_protusion,
                                     hd[RIGHT] + right_ledger_protusion);
-      Molecule ledger_lines =
+      Stencil ledger_lines =
        Note_head::brew_ledger_lines (me, pos, interspaces,
                                      l_extents,0,
                                      ledger_take_space);
       ledger_lines.translate_axis (offs, Y_AXIS);
-      out->add_molecule (ledger_lines);
+      out->add_stencil (ledger_lines);
     }
 }
 
-Molecule
+Stencil
 internal_brew_primitive (Grob *me, bool ledger_take_space)
 {
   SCM primitive_scm = me->get_grob_property ("primitive");
@@ -132,10 +132,10 @@ internal_brew_primitive (Grob *me, bool ledger_take_space)
     {
       programming_error ("Mensural_ligature:"
                         "undefined primitive -> ignoring grob");
-      return Molecule ();
+      return Stencil ();
     }
 
-  Molecule out;
+  Stencil out;
   int primitive = gh_scm2int (primitive_scm);
   int delta_pitch = 0;
   Real thickness = 0.0;
@@ -157,7 +157,7 @@ internal_brew_primitive (Grob *me, bool ledger_take_space)
   switch (primitive)
     {
       case MLP_NONE:
-       return Molecule();
+       return Stencil();
       case MLP_BB:
        out = brew_flexa (me, delta_pitch, false,
                          flexa_width, thickness, true, DOWN);
@@ -182,7 +182,7 @@ internal_brew_primitive (Grob *me, bool ledger_take_space)
       default:
        programming_error (_f ("Mensural_ligature:"
                               "unexpected case fall-through"));
-       return Molecule ();
+       return Stencil ();
     }
 
   SCM join_left_scm = me->get_grob_property ("join-left-amount");
@@ -198,8 +198,8 @@ internal_brew_primitive (Grob *me, bool ledger_take_space)
        Interval (0, -join_left * 0.5 * staff_space);
       Box join_box (x_extent, y_extent);
 
-      Molecule join = Lookup::round_filled_box (join_box, blotdiameter);
-      out.add_molecule (join);
+      Stencil join = Lookup::round_filled_box (join_box, blotdiameter);
+      out.add_stencil (join);
     }
 
   int pos = (int)rint (Staff_symbol_referencer::get_position (me));
diff --git a/lily/molecule-scheme.cc b/lily/molecule-scheme.cc
deleted file mode 100644 (file)
index 3ac21c0..0000000
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
-  molecule-scheme.cc -- implement Molecule
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "molecule.hh"
-#include "font-metric.hh"
-
-LY_DEFINE(ly_molecule_set_extent_x,"ly:molecule-set-extent!", 3 , 0, 0, 
-         (SCM mol, SCM axis, SCM np),
-         "Set the extent (@var{extent} must be a pair of numbers) of @var{mol} in \n"
-"@var{axis} direction (0 or 1 for x- and y-axis respectively).\n"
-"\n"
-"Note that an extent @code{(A . B)} is an interval and hence @code{A} is\n"
-"smaller than @code{B}, and is often negative.\n"
-)
-{
-  Molecule* m = unsmob_molecule (mol);
-  SCM_ASSERT_TYPE (m, mol, SCM_ARG1, __FUNCTION__, "molecule");
-  SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
-  SCM_ASSERT_TYPE (is_number_pair (np), np, SCM_ARG3, __FUNCTION__, "number pair");
-
-  Interval iv = ly_scm2interval (np);
-  m->dim_[Axis (gh_scm2int (axis))] = iv;
-
-  return SCM_UNDEFINED;
-}
-
-
-LY_DEFINE(ly_translate_molecule_axis,"ly:molecule-translate-axis", 3, 0, 0, 
-         (SCM mol, SCM amount, SCM axis),
-         "Return a @var{mol}, but translated by @var{amount} in @var{axis} direction")
-{
-  Molecule* m = unsmob_molecule (mol);
-  SCM_ASSERT_TYPE (m, mol, SCM_ARG1, __FUNCTION__, "molecule");
-  SCM_ASSERT_TYPE (gh_number_p (amount), amount, SCM_ARG2, __FUNCTION__, "number pair");
-  SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
-
-
-  Molecule q (*m);
-  q.translate_axis (gh_scm2double (amount), Axis (gh_scm2int (axis)));
-
-  return q.smobbed_copy();
-}
-
-LY_DEFINE(ly_translate_molecule,"ly:molecule-translate", 2, 0, 0, 
-         (SCM mol, SCM offset),
-         "Return a @var{mol}, but translated by @var{offset} (a pair of numbers).")
-{
-  Molecule* m = unsmob_molecule (mol);
-  SCM_ASSERT_TYPE (m, mol, SCM_ARG1, __FUNCTION__, "molecule");
-  SCM_ASSERT_TYPE (is_number_pair (offset), offset, SCM_ARG2, __FUNCTION__, "number pair");
-  Offset o = ly_scm2offset (offset);
-  
-  Molecule q (*m);
-  q.translate (o);
-  return q.smobbed_copy();
-}
-
-LY_DEFINE(ly_molecule_get_extent,
-         "ly:molecule-get-extent", 2 , 0, 0,  (SCM mol, SCM axis),
-         "Return a pair of numbers signifying the extent of @var{mol} in "
-"@var{axis} direction (0 or 1 for x and y axis respectively)."
-)
-{
-  Molecule *m = unsmob_molecule (mol);
-  SCM_ASSERT_TYPE (m, mol, SCM_ARG1, __FUNCTION__, "molecule");
-  SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
-  return ly_interval2scm (m->extent (Axis (gh_scm2int (axis))));
-}
-
-
-LY_DEFINE(ly_molecule_combined_at_edge,
-         "ly:molecule-combine-at-edge",
-         4, 2, 0,  (SCM first, SCM axis, SCM direction,
-                    SCM second,
-                    SCM padding,
-                    SCM minimum),
-         "Construct a molecule by putting @var{second} next to "
-"@var{first}. @var{axis} can be 0 (x-axis) or 1 (y-axis), @var{direction} can be "
-"-1 (left or down) or 1 (right or up). "
-"The molecules are juxtaposed with  @var{padding} as extra space. If "
-"this puts the reference points closer than @var{minimum}, they are moved "
-"by the latter amount.")
-
-{
-  Molecule * m1 = unsmob_molecule (first);
-  Molecule * m2 = unsmob_molecule (second);
-  Molecule result;
-
-
-  SCM_ASSERT_TYPE(is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
-  SCM_ASSERT_TYPE(is_direction (direction), direction, SCM_ARG4, __FUNCTION__, "dir");
-
-  Real p = 0.0;
-  if (padding != SCM_UNDEFINED)
-    {
-      SCM_ASSERT_TYPE(gh_number_p (padding), padding, SCM_ARG5, __FUNCTION__, "number");
-      p = gh_scm2double (padding);
-    }
-  Real m =0.0;
-  if (minimum != SCM_UNDEFINED)
-    {
-      SCM_ASSERT_TYPE(gh_number_p (minimum), minimum, SCM_ARG6, __FUNCTION__, "number");
-      m = gh_scm2double (minimum);
-    }
-  
-  if (m1)
-    result = *m1;
-  if (m2)
-    result.add_at_edge (Axis (gh_scm2int (axis)), Direction (gh_scm2int (direction)),
-                       *m2, p, m);
-
-  return result.smobbed_copy ();
-}
-
-/*
-  FIXME: support variable number of arguments. 
-  
- */
-LY_DEFINE(ly_molecule_add , 
-         "ly:molecule-add", 0, 0, 1, (SCM args),
-         "Combine molecules. Takes any number of arguments."
-         )
-{
-#define FUNC_NAME __FUNCTION__
-  SCM_VALIDATE_REST_ARGUMENT (args);
-
-  Molecule result;
-
-  while (!SCM_NULLP (args))
-    {
-      Molecule * m = unsmob_molecule (gh_car (args));
-
-      if (!m)
-       SCM_ASSERT_TYPE(m, gh_car (args), SCM_ARGn, __FUNCTION__,
-                       "Molecule");
-
-      result.add_molecule (*m);
-
-      args = gh_cdr (args);
-    }
-  
-  return result.smobbed_copy ();
-}
-
-LY_DEFINE(ly_make_molecule,
-         "ly:make-molecule", 3, 0, 0,  (SCM expr, SCM xext, SCM yext),
-         " \n"
-"The objective of any typesetting system is to put ink on paper in the \n"
-"right places. For LilyPond, this final stage is left to the @TeX{} and \n"
-"the printer subsystem. For lily, the last stage in processing a score is \n"
-"outputting a description of what to put where.  This description roughly \n"
-"looks like \n"
-"@example \n"
-"        PUT glyph AT (x,y) \n"
-"        PUT glyph AT (x,y) \n"
-"        PUT glyph AT (x,y)  \n"
-"@end example \n"
-"you merely have to look at the tex output of lily to see this. \n"
-"Internally these instructions are encoded in Molecules.@footnote{At some \n"
-"point LilyPond also contained Atom-objects, but they have been replaced \n"
-"by Scheme expressions, making the name outdated.}  A molecule is \n"
-"what-to-print-where information that also contains dimension information \n"
-"(how large is this glyph?). \n"
-" \n"
-"Conceptually, Molecules can be constructed from Scheme code, by \n"
-"translating a Molecule and by combining two molecules. In BNF \n"
-"notation: \n"
-" \n"
-"@example \n"
-"Molecule  :: COMBINE Molecule Molecule \n"
-"           | TRANSLATE Offset Molecule \n"
-"           | GLYPH-DESCRIPTION \n"
-"           ; \n"
-"@end example \n"
-" \n"
-"If you are interested in seeing how this information is stored, you \n"
-"can run with the @code{-f scm} option. The scheme expressions are then \n"
-"dumped in the output file.")
-{
-  SCM_ASSERT_TYPE (is_number_pair (xext), xext, SCM_ARG2, __FUNCTION__, "number pair");
-  SCM_ASSERT_TYPE (is_number_pair (yext), yext, SCM_ARG3, __FUNCTION__, "number pair");  
-
-  Box b (ly_scm2interval (xext), ly_scm2interval(yext));
-  Molecule m (b, expr);
-  return m.smobbed_copy ();
-}
-
-
-SCM
-fontify_atom (Font_metric const * met, SCM f)
-{
-  if (f == SCM_EOL)
-    return f;
-  else
-    return  scm_list_n (ly_symbol2scm ("fontify"),
-                       ly_quote_scm (met->description_), f, SCM_UNDEFINED);
-}
-
-LY_DEFINE(ly_fontify_atom,"ly:fontify-atom", 2, 0, 0, 
-         (SCM met, SCM f),
-         "Add a font selection command for the font metric @var{met} to @var{f}.")
-{
-  SCM_ASSERT_TYPE(unsmob_metrics (met), met, SCM_ARG1, __FUNCTION__, "font metric");
-
-  return fontify_atom (unsmob_metrics (met), f);
-}
-LY_DEFINE(ly_align_to_x,"ly:molecule-align-to!", 3, 0, 0,  (SCM mol, SCM axis, SCM dir),
-
-         "Align @var{mol} using its own extents. @var{dir} is a number -1, 1 are "
-         " left and right respectively. Other values are interpolated (so 0 means "
-         " the center. ")
-{
-  SCM_ASSERT_TYPE(unsmob_molecule (mol), mol, SCM_ARG1, __FUNCTION__, "molecule");
-  SCM_ASSERT_TYPE(is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
-  SCM_ASSERT_TYPE(gh_number_p (dir), dir, SCM_ARG3, __FUNCTION__, "number");
-
-  unsmob_molecule (mol)->align_to ((Axis)gh_scm2int (axis),
-                                  gh_scm2double (dir));
-
-  return SCM_UNDEFINED;
-}
diff --git a/lily/molecule.cc b/lily/molecule.cc
deleted file mode 100644 (file)
index 552e886..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
-  molecule.cc -- implement Molecule
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include <math.h>
-#include <libc-extension.hh>   // isinf
-
-#include "font-metric.hh" 
-#include "dimensions.hh"
-#include "interval.hh"
-#include "string.hh"
-#include "molecule.hh"
-#include "warn.hh"
-
-
-#include "ly-smobs.icc"
-
-
-SCM
-Molecule::smobbed_copy () const
-{
-  Molecule * m = new Molecule (*this);
-
-  return m->smobbed_self ();
-}
-
-Interval
-Molecule::extent (Axis a) const
-{
-  return dim_[a];
-}
-
-Molecule::Molecule (Box b, SCM func)
-{
-  expr_ = func;
-  dim_ = b;
-}
-
-Molecule::Molecule ()
-{
-  expr_ = SCM_EOL;
-  set_empty (true);
-}
-
-void
-Molecule::translate (Offset o)
-{
-  Axis a = X_AXIS;
-  while (a < NO_AXES)
-    {
-      if (abs (o[a]) > 100 CM
-         || isinf (o[a]) || isnan (o[a]))
-       {
-         programming_error ("Improbable offset for translation: setting to zero");
-         o[a] =  0.0;
-       }
-      incr (a);
-    }
-
-  expr_ = scm_list_n (ly_symbol2scm ("translate-molecule"),
-                  ly_offset2scm (o),
-                  expr_, SCM_UNDEFINED);
-  if (!is_empty ())
-    dim_.translate (o);
-}
-  
-
-void
-Molecule::translate_axis (Real x,Axis a)
-{
-  Offset o (0,0);
-  o[a] = x;
-  translate (o);
-}  
-
-
-
-void
-Molecule::add_molecule (Molecule const &m)
-{
-  expr_ = scm_list_n (ly_symbol2scm ("combine-molecule"),
-                  m.expr_,
-                  expr_, SCM_UNDEFINED);
-  dim_.unite (m.dim_);
-}
-
-void
-Molecule::set_empty (bool e)
-{
-  if (e)
-    {
-      dim_[X_AXIS].set_empty ();
-      dim_[Y_AXIS].set_empty ();
-    }
-  else
-    {
-      dim_[X_AXIS] = Interval (0,0);
-      dim_[Y_AXIS] = Interval (0,0);
-    }
-}
-
-
-void
-Molecule::align_to (Axis a, Real x)
-{
-  if (is_empty ())
-    return ;
-
-  Interval i (extent (a));
-  translate_axis (-i.linear_combination (x), a);
-}
-
-/*
-  See scheme Function.
- */
-void
-Molecule::add_at_edge (Axis a, Direction d, Molecule const &m, Real padding,
-                      Real minimum)
-{
-  Real my_extent= is_empty () ? 0.0 : dim_[a][d];
-  Interval i (m.extent (a));
-  Real his_extent;
-  if (i.is_empty ())
-    {
-      programming_error ("Molecule::add_at_edge: adding empty molecule.");
-      his_extent = 0.0;
-    }
-  else
-    his_extent = i[-d];      
-
-  Real offset = (my_extent -  his_extent)  + d*padding;
-  if (minimum > 0  && fabs (offset) <  minimum)
-    offset = sign (offset) * minimum; 
-  
-  Molecule toadd (m);
-  toadd.translate_axis (offset, a);
-  add_molecule (toadd);
-}
-
-
-
-/*
-  Hmm... maybe this is not such a good idea ; stuff can be empty,
-  while expr_ == '()
- */
-bool
-Molecule::is_empty () const
-{
-  return expr_ == SCM_EOL;
-}
-
-SCM
-Molecule::get_expr () const
-{
-  return expr_;
-}
-
-
-
-Box
-Molecule::extent_box () const
-{
-  return dim_;
-}
-IMPLEMENT_SIMPLE_SMOBS (Molecule);
-
-
-int
-Molecule::print_smob (SCM , SCM port, scm_print_state *)
-{
-  scm_puts ("#<Molecule ", port);
-  scm_puts (" >", port);
-  
-  return 1;
-}
-
-  
-SCM
-Molecule::mark_smob (SCM s)
-{
-  Molecule  *r = (Molecule *) ly_cdr (s);
-  
-  return r->expr_;
-}
-
-IMPLEMENT_TYPE_P (Molecule, "ly:molecule?");
-IMPLEMENT_DEFAULT_EQUAL_P (Molecule);
-
index 36dbd2424122c15645b4160d80cc67f5701db352..ad45fbc197f141a916d82ba7101beb06fe4a2a81 100644 (file)
@@ -13,7 +13,7 @@
 #include "paper-column.hh" // urg
 #include "font-interface.hh"
 #include "rest.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "misc.hh"
 #include "spanner.hh"
 #include "staff-symbol-referencer.hh"
@@ -29,7 +29,7 @@ Multi_measure_rest::percent (SCM smob)
   Grob *me = unsmob_grob (smob);
   Spanner *sp = dynamic_cast<Spanner*> (me);
   
-  Molecule r = Percent_repeat_item_interface::x_percent (me, 1,  0.75, 1.6);
+  Stencil r = Percent_repeat_item_interface::x_percent (me, 1,  0.75, 1.6);
 
   // ugh copy & paste.
   
@@ -97,8 +97,8 @@ Multi_measure_rest::print (SCM smob)
   Real x_off = (sp_iv[LEFT] -  rx) >? 0;
 
 
-  Molecule mol;
-  mol.add_molecule (symbol_molecule (me, space));
+  Stencil mol;
+  mol.add_stencil (symbol_stencil (me, space));
 
   int measures = 0;
   SCM m (me->get_grob_property ("measure-count"));
@@ -113,8 +113,8 @@ Multi_measure_rest::print (SCM smob)
 
 
 
-Molecule
-Multi_measure_rest::symbol_molecule (Grob *me, Real space)
+Stencil
+Multi_measure_rest::symbol_stencil (Grob *me, Real space)
 {
   int measures = 0;
   SCM m (me->get_grob_property ("measure-count"));
@@ -123,14 +123,14 @@ Multi_measure_rest::symbol_molecule (Grob *me, Real space)
       measures = gh_scm2int (m);
     }
   if (measures <= 0)
-    return Molecule();
+    return Stencil();
   
 
   SCM limit = me->get_grob_property ("expand-limit");
   if (measures > gh_scm2int (limit))
     {
       Real padding = 0.15;  
-      Molecule s =  big_rest (me, (1.0 - 2*padding) * space);
+      Stencil s =  big_rest (me, (1.0 - 2*padding) * space);
       s.translate_axis (padding * space,  X_AXIS); 
       return s;
     }
@@ -146,7 +146,7 @@ Multi_measure_rest::symbol_molecule (Grob *me, Real space)
     {
       if (sml == SCM_BOOL_T)
        {
-         Molecule s = musfont->find_by_name (Rest::glyph_name (me, -1, ""));
+         Stencil s = musfont->find_by_name (Rest::glyph_name (me, -1, ""));
 
          s.translate_axis ((space - s.extent (X_AXIS).length ())/2, X_AXIS);
       
@@ -154,7 +154,7 @@ Multi_measure_rest::symbol_molecule (Grob *me, Real space)
        }
       else
        {
-         Molecule s = musfont->find_by_name (Rest::glyph_name (me, 0, ""));
+         Stencil s = musfont->find_by_name (Rest::glyph_name (me, 0, ""));
 
          /*
            ugh.
@@ -177,7 +177,7 @@ Multi_measure_rest::symbol_molecule (Grob *me, Real space)
 /*
   WIDTH can also be 0 to determine the minimum size of the object.
  */
-Molecule
+Stencil
 Multi_measure_rest::big_rest (Grob *me, Real width)
 {
   Real thick_thick =robust_scm2double (me->get_grob_property ("thick-thickness"), 1.0);
@@ -192,8 +192,8 @@ Multi_measure_rest::big_rest (Grob *me, Real width)
   
   Real blot = width ? (.8 * (y <? ythick)) : 0.0;
   
-  Molecule m =  Lookup::round_filled_box (b, blot);
-  Molecule yb = Lookup::round_filled_box (Box (Interval (-0.5, 0.5)* ythick, Interval (-ss, ss)), blot);
+  Stencil m =  Lookup::round_filled_box (b, blot);
+  Stencil yb = Lookup::round_filled_box (Box (Interval (-0.5, 0.5)* ythick, Interval (-ss, ss)), blot);
 
   m.add_at_edge (X_AXIS, RIGHT, yb, 0, 0);
   m.add_at_edge (X_AXIS, LEFT, yb, 0, 0);
@@ -206,7 +206,7 @@ Multi_measure_rest::big_rest (Grob *me, Real width)
 /*
   Kirchenpause (?)
  */
-Molecule
+Stencil
 Multi_measure_rest::church_rest (Grob*me, Font_metric *musfont, int measures,
                                 Real space)
 {
@@ -237,7 +237,7 @@ Multi_measure_rest::church_rest (Grob*me, Font_metric *musfont, int measures,
              k = -1;
            }
 
-         Molecule r (musfont->find_by_name ("rests-" + to_string (k)));
+         Stencil r (musfont->find_by_name ("rests-" + to_string (k)));
          symbols_width += r.extent (X_AXIS).length ();
          mols = gh_cons (r.smobbed_copy (), mols);
        }
@@ -260,7 +260,7 @@ Multi_measure_rest::church_rest (Grob*me, Font_metric *musfont, int measures,
              l --;
            }
 
-         Molecule r (musfont->find_by_name ("rests-" + to_string (k)));
+         Stencil r (musfont->find_by_name ("rests-" + to_string (k)));
          if (k == 0)
            {
              Real staff_space = Staff_symbol_referencer::staff_space (me);
@@ -281,10 +281,10 @@ Multi_measure_rest::church_rest (Grob*me, Font_metric *musfont, int measures,
       inner_padding = 1.0;
     }
   
-  Molecule mol; 
+  Stencil mol; 
   for (SCM  s = mols; gh_pair_p (s); s = gh_cdr(s))
     {
-      mol.add_at_edge (X_AXIS, LEFT, *unsmob_molecule (gh_car (s)), inner_padding, 0);
+      mol.add_at_edge (X_AXIS, LEFT, *unsmob_stencil (gh_car (s)), inner_padding, 0);
     }
   mol.align_to (X_AXIS, LEFT);
   mol.translate_axis (outer_padding_factor *  inner_padding, X_AXIS);
@@ -319,7 +319,7 @@ Multi_measure_rest::set_spacing_rods (SCM smob)
   
   Item* combinations[4][2]={{l,r}, {lb,r}, {l,rb},{lb,rb}};
 
-  Real sym_width = symbol_molecule (me, 0.0).extent (X_AXIS).length ();
+  Real sym_width = symbol_stencil (me, 0.0).extent (X_AXIS).length ();
   
   for (int i=0; i < 4; i++)
     {
index 06a91a352b6d7ee605ad01b8ae28e1d026905faa..f412d4d2bad57262756c013d2484d9bd942fda26 100644 (file)
@@ -67,7 +67,6 @@ static Keyword_ent the_key_tab[]={
   {"paper", PAPER},
   {"partcombine", PARTCOMBINE},
   {"partial", PARTIAL},
-  {"property", PROPERTY},
   {"relative", RELATIVE},
   {"remove", REMOVE},
   {"repeat", REPEAT},
index 9683378af874daa18fca99d0b0bc216dde12461b..4d1992e9cb6a8057fdcfb977f56f45d905ff34a8 100644 (file)
@@ -204,7 +204,7 @@ check_meshing_chords (Grob *me,
       if (wipe_ball->live ())
        {
          wipe_ball->set_grob_property ("transparent", SCM_BOOL_T);
-         wipe_ball->set_grob_property ("molecule", SCM_EOL);
+         wipe_ball->set_grob_property ("stencil", SCM_EOL);
 
          if (Grob *d = unsmob_grob (wipe_ball->get_grob_property ("dot")))
            d->suicide ();
index e620fdf7a42c277802a969cc33b4947fcb68898d..af32eeb209285373e251c9c57ea4f46ff6ee78b3 100644 (file)
@@ -14,7 +14,7 @@
 #include "note-head.hh"
 #include "warn.hh"
 #include "font-interface.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "event.hh"
 #include "rhythmic-head.hh"
 #include "staff-symbol-referencer.hh"
@@ -62,7 +62,7 @@
   TODO: ledger lines are also a property of the staff. Maybe move them
   to there?
  */
-Molecule
+Stencil
 Note_head::brew_ledger_lines (Grob *me,
                               int pos,
                               int interspaces,
@@ -75,7 +75,7 @@ Note_head::brew_ledger_lines (Grob *me,
   int line_count = (abs (pos) < interspaces)
     ? 0
     : (abs (pos) - interspaces) / 2;
-  Molecule molecule = Molecule();
+  Stencil stencil = Stencil();
 
 
   if (line_count)
@@ -86,11 +86,11 @@ Note_head::brew_ledger_lines (Grob *me,
       Interval y_extent =
        Interval (-0.5*(ledgerlinethickness),
                  +0.5*(ledgerlinethickness));
-      Molecule proto_ledger_line =
+      Stencil proto_ledger_line =
        Lookup::round_filled_box (Box (x_extent, y_extent), blotdiameter);
 
       x_extent[LEFT] += left_shorten;
-      Molecule proto_first_line =
+      Stencil proto_first_line =
        Lookup::round_filled_box (Box (x_extent, y_extent), blotdiameter);
 
       if (!take_space)
@@ -106,25 +106,25 @@ Note_head::brew_ledger_lines (Grob *me,
       
       for (int i = 0; i < line_count; i++)
         {
-          Molecule ledger_line ((i == 0) 
+          Stencil ledger_line ((i == 0) 
                                ? proto_first_line
                                : proto_ledger_line
                                );
           ledger_line.translate_axis (-dir * inter_f * i * 2 + offs, Y_AXIS);
-          molecule.add_molecule (ledger_line);
+          stencil.add_stencil (ledger_line);
         }
     }
 
-  return molecule;
+  return stencil;
 }
 
-Molecule
+Stencil
 internal_print (Grob *me, bool with_ledgers)
 {
   SCM style  = me->get_grob_property ("style");
   if (!gh_symbol_p (style))
     {
-      return Molecule ();
+      return Stencil ();
     }
 
   SCM log = gh_int2scm (Note_head::get_balltype (me));
@@ -133,7 +133,7 @@ internal_print (Grob *me, bool with_ledgers)
   String font_char = "noteheads-" + ly_scm2string (scm_font_char);
 
   Font_metric * fm = Font_interface::get_default_font (me);
-  Molecule out = fm->find_by_name (font_char);
+  Stencil out = fm->find_by_name (font_char);
   if (out.is_empty ())
     {
       me->warning (_f ("note head `%s' not found", font_char.to_str0 ()));
@@ -170,7 +170,7 @@ internal_print (Grob *me, bool with_ledgers)
           */
        }
 
-      out.add_molecule (Note_head::brew_ledger_lines (me, pos, interspaces,
+      out.add_stencil (Note_head::brew_ledger_lines (me, pos, interspaces,
                                                      ledger_size,
                                                      left_shorten,
                                                      false));
@@ -203,14 +203,14 @@ Note_head::head_extent (Grob *me, Axis a)
   SCM brewer = me->get_grob_property ("print-function");
   if (brewer == Note_head::print_proc)
     {
-      Molecule mol = internal_print (me, false);
+      Stencil mol = internal_print (me, false);
   
       if (!mol.is_empty ())
        return mol.extent (a);
     }
   else
     {
-      Molecule * mol = me->get_molecule ();
+      Stencil * mol = me->get_stencil ();
       if (mol)
        return  mol->extent (a) ;
     }
@@ -220,7 +220,7 @@ Note_head::head_extent (Grob *me, Axis a)
 
 /*
   This is necessary to prevent a cyclic dependency: the appearance of
-  the ledgers depends on positioning, so the Grob::get_molecule() can
+  the ledgers depends on positioning, so the Grob::get_stencil() can
   not be used for determining the note head extent.
   
  */ 
@@ -233,9 +233,9 @@ Note_head::extent (SCM smob, SCM axis)
   return ly_interval2scm (head_extent (me, (Axis) gh_scm2int (axis)));
 }
 
-MAKE_SCHEME_CALLBACK (Note_head,brew_ez_molecule,1);
+MAKE_SCHEME_CALLBACK (Note_head,brew_ez_stencil,1);
 SCM
-Note_head::brew_ez_molecule (SCM smob)
+Note_head::brew_ez_stencil (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
   int l = Note_head::get_balltype (me);
@@ -258,7 +258,7 @@ Note_head::brew_ez_molecule (SCM smob)
                       gh_int2scm (1-b),
                       SCM_UNDEFINED);
   Box bx (Interval (0, 1.0), Interval (-0.5, 0.5));
-  Molecule m (bx, at);
+  Stencil m (bx, at);
 
   int pos = (int)rint (Staff_symbol_referencer::get_position (me));
   int interspaces = Staff_symbol_referencer::line_count (me)-1;
@@ -266,7 +266,7 @@ Note_head::brew_ez_molecule (SCM smob)
     {
       Interval hd = m.extent (X_AXIS);
       hd.widen ( hd.length ()/4);
-      m.add_molecule (brew_ledger_lines (me, pos, interspaces, hd, 0, false));
+      m.add_stencil (brew_ledger_lines (me, pos, interspaces, hd, 0, false));
     }
 
   return m.smobbed_copy ();
index 9adaded43ca4ca6d659f7407742d1636ae51cc8a..7e72c8c937031f476683ac6a57088930f9ed6c73 100644 (file)
@@ -7,7 +7,7 @@
 
  */
 
-#include "molecule.hh"
+#include "stencil.hh"
 #include "text-item.hh"
 #include "text-spanner.hh"
 #include "line-spanner.hh"
@@ -68,9 +68,9 @@ Ottava_bracket::print (SCM smob)
 
   SCM properties = Font_interface::font_alist_chain (me);
   SCM markup = me->get_grob_property ("text");
-  Molecule text;
+  Stencil text;
   if (Text_item::markup_p (markup)) 
-    text = *unsmob_molecule (Text_item::interpret_markup (paper->self_scm (), properties, markup));
+    text = *unsmob_stencil (Text_item::interpret_markup (paper->self_scm (), properties, markup));
 
 
   Drul_array<Real> shorten = robust_scm2interval (me->get_grob_property ("shorten-pair"),
@@ -130,7 +130,7 @@ Ottava_bracket::print (SCM smob)
   if (broken[RIGHT])
     edge_height[RIGHT] = 0.0;
   
-  Molecule b;
+  Stencil b;
   if (!bracket_span_points.is_empty () && bracket_span_points.length () > 0.001)
     b = Tuplet_bracket::make_bracket (me,
                                      Y_AXIS, Offset (bracket_span_points.length (), 0),
@@ -153,14 +153,14 @@ Ottava_bracket::print (SCM smob)
 
   */
   
-  b = Molecule (Box (b.extent (X_AXIS),
+  b = Stencil (Box (b.extent (X_AXIS),
                     Interval (0.1,0.1)),
                b.get_expr ());
   
   b.translate_axis (bracket_span_points[LEFT], X_AXIS);
   text.translate_axis (span_points[LEFT], X_AXIS);
   text.align_to (Y_AXIS, CENTER);
-  b.add_molecule (text);
+  b.add_stencil (text);
   
   b.translate_axis (- me->relative_coordinate (common, X_AXIS), X_AXIS);
   
index f6f081f54bf4f97f83c75b2a8165218b9c9a7961..af2469199941743b690c33b9f83a375518e11e42 100644 (file)
@@ -12,7 +12,7 @@
 #include "warn.hh"
 #include "axis-group-interface.hh"
 #include "spaceable-grob.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "text-item.hh"
 #include "lookup.hh"
 #include "font-interface.hh"
@@ -122,14 +122,14 @@ Paper_column::print (SCM p)
   SCM scm_mol = Text_item::interpret_markup (me->get_paper ()->self_scm (),
                                             properties,
                                             scm_makfrom0str (r.to_str0 ()));
-  Molecule t = *unsmob_molecule (scm_mol);
+  Stencil t = *unsmob_stencil (scm_mol);
   t.align_to (X_AXIS, CENTER);
   t.align_to (Y_AXIS, DOWN);
   
-  Molecule l = Lookup::filled_box (Box (Interval (-0.01, 0.01),
+  Stencil l = Lookup::filled_box (Box (Interval (-0.01, 0.01),
                                       Interval (-2, -1)));
 
-  t.add_molecule (l);
+  t.add_stencil (l);
   return t.smobbed_copy ();                                            
 }
 
index e31c61b4a99b35b5c25a327dd644ec5b48c64dc7..bda8c562fbfea54db1dec9e1e75f790bc5654ced 100644 (file)
@@ -13,7 +13,7 @@
 #include "dimensions.hh"
 #include "virtual-methods.hh"
 #include "paper-outputter.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "array.hh"
 #include "string-convert.hh"
 #include "warn.hh"
index dfbe3dfc32118fcab336f3b7680a54f662398258..7cd980afc5d452346e771d56c97e192916205e6e 100644 (file)
@@ -283,7 +283,6 @@ yylex (YYSTYPE *s,  void * v)
 %token PAPER
 %token PARTCOMBINE
 %token PARTIAL
-%token PROPERTY
 %token RELATIVE
 %token REMOVE
 %token REPEAT
@@ -381,8 +380,9 @@ yylex (YYSTYPE *s,  void * v)
 %type <scm>  embedded_scm scalar
 %type <music>  Music Sequential_music Simultaneous_music 
 %type <music>  relative_music re_rhythmed_music 
-%type <music>  music_property_def context_change 
-%type <scm> Music_list
+%type <music>  music_property_def context_change
+%type <scm> context_prop_spec 
+%type <scm> Music_list 
 %type <scm> property_operation context_mod translator_mod optional_context_mod
 %type <outputdef>  music_output_def_body music_output_def_head
 %type <music>  post_event tagged_post_event
@@ -1168,27 +1168,52 @@ context_mod:
        }
        ;
 
-music_property_def:
-       PROPERTY STRING '.' property_operation {
-               Music * t = property_op_to_music ($4);
-               Music *csm = MY_MAKE_MUSIC("ContextSpeccedMusic");
-
-               csm->set_mus_property ("element", t->self_scm ());
-               scm_gc_unprotect_object (t->self_scm ());
-
-               $$ = csm;
-               $$->set_spot (THIS->here_input ());
+context_prop_spec:
+       STRING  {
+               $$ = scm_list_n (ly_symbol2scm ("Bottom"), scm_string_to_symbol ($1), SCM_UNDEFINED);
+       }
+       | STRING '.' STRING {
+               $$ = scm_list_n (scm_string_to_symbol ($1), scm_string_to_symbol ($3), SCM_UNDEFINED);
+       }
+       ;
 
-               csm-> set_mus_property ("context-type", scm_string_to_symbol ($2));
+music_property_def:
+       OVERRIDE context_prop_spec embedded_scm '=' scalar {
+               $$ = property_op_to_music (scm_list_n (
+                       ly_symbol2scm ("poppush"),
+                       gh_cadr ($2),
+                       $3, $5, SCM_UNDEFINED));
+               $$= context_spec_music (gh_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
+       }
+       | SET context_prop_spec '=' scalar {
+               $$ = property_op_to_music (scm_list_n (
+                       ly_symbol2scm ("assign"),
+                       gh_cadr ($2),
+                       $4, SCM_UNDEFINED));
+               $$= context_spec_music (gh_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
+       }
+       | REVERT context_prop_spec embedded_scm {
+               $$ = property_op_to_music (scm_list_n (
+                       ly_symbol2scm ("pop"),
+                       gh_cadr ($2),
+                       $3, SCM_UNDEFINED));
+
+               $$= context_spec_music (gh_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
+       }
+       | UNSET context_prop_spec {
+               $$ = property_op_to_music (scm_list_n (
+                       ly_symbol2scm ("unset"),
+                       gh_cadr ($2)));
+               $$= context_spec_music (gh_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
        }
        | ONCE music_property_def {
                $$ = $2;
-               SCM e = $2->get_mus_property ("element");
-               unsmob_music (e)->set_mus_property ("once", SCM_BOOL_T);
+               $$->set_mus_property ("once", SCM_BOOL_T);
        }
        ;
 
 
+
 scalar:
         string          { $$ = $1; }
         | bare_int      { $$ = gh_int2scm ($1); }
@@ -2448,7 +2473,8 @@ context_spec_music (SCM type, SCM id, Music * m, SCM ops)
        csm->set_mus_property ("element", m->self_scm ());
        scm_gc_unprotect_object (m->self_scm ());
 
-       csm->set_mus_property ("context-type", scm_string_to_symbol (type));
+       csm->set_mus_property ("context-type",
+               gh_symbol_p (type) ? type : scm_string_to_symbol (type));
        csm->set_mus_property ("property-operations", ops);
 
        if (gh_string_p (id))
index 5688ce5fa5841c14c7d5ea14744bf7a278b7c7e9..480acb826c8440447fed7391634f2fa985337727 100644 (file)
 
 #include "grob.hh"
 #include "lookup.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "font-interface.hh"
 #include "font-metric.hh" 
 #include "percent-repeat-item.hh"
 
 
-Molecule
+Stencil
 Percent_repeat_item_interface::brew_slash ( Grob *me)
 {
   Real slope = robust_scm2double (me->get_grob_property ("slope"), 1);
@@ -26,7 +26,7 @@ Percent_repeat_item_interface::brew_slash ( Grob *me)
     todo: check out if in staff-rule thickness normally.
    */
   Real thick = robust_scm2double (me->get_grob_property ("thickness"), 1);
-  Molecule m = Lookup::repeat_slash (wid, slope, thick);
+  Stencil m = Lookup::repeat_slash (wid, slope, thick);
   m.translate_axis (-m.extent (Y_AXIS).center (), Y_AXIS);
   return m;
 }
@@ -34,20 +34,20 @@ Percent_repeat_item_interface::brew_slash ( Grob *me)
 /*
   todo: use grob props for dot_neg_kern, slash_neg_kern?
  */
-Molecule
+Stencil
 Percent_repeat_item_interface::x_percent (Grob *me, int count,
                                          Real dot_neg_kern,
                                          Real slash_neg_kern)
 {
-  Molecule m ;
-  Molecule s = brew_slash (me);
+  Stencil m ;
+  Stencil s = brew_slash (me);
 
   for (int i  = count; i--;)
     {
       m.add_at_edge (X_AXIS, RIGHT, s, -slash_neg_kern,0);
     }
-  Molecule d1 = Font_interface::get_default_font (me)->find_by_name ("dots-dot");
-  Molecule d2  =  d1;
+  Stencil d1 = Font_interface::get_default_font (me)->find_by_name ("dots-dot");
+  Stencil d2  =  d1;
   d1.translate_axis (0.5, Y_AXIS );
   d2.translate_axis (-0.5, Y_AXIS);
   
@@ -62,7 +62,7 @@ SCM
 Percent_repeat_item_interface::double_percent (SCM grob)
 {
   Grob *me = unsmob_grob (grob);
-  Molecule m = x_percent (me, 2, 0.75, 1.6);
+  Stencil m = x_percent (me, 2, 0.75, 1.6);
   m.translate_axis (- m.extent (X_AXIS).center (), X_AXIS);
   return m.smobbed_copy ();
 }
@@ -72,7 +72,7 @@ SCM
 Percent_repeat_item_interface::beat_slash (SCM grob)
 {
   Grob *me = unsmob_grob (grob);
-  Molecule m = brew_slash (me);
+  Stencil m = brew_slash (me);
 
   return m.smobbed_copy ();
 }
index 957a79527492f633de8fb46b98e01ffc895e11a0..fb9a2ac4f664dcc718332351c9a868ffa991d1ec 100644 (file)
@@ -7,7 +7,7 @@ source file of the GNU LilyPond music typesetter
 
 */
 
-#include "molecule.hh"
+#include "stencil.hh"
 #include "spanner.hh"
 #include "item.hh"
 #include "tuplet-bracket.hh"
@@ -69,7 +69,7 @@ Piano_pedal_bracket::print (SCM smob)
     }
   
 
-  Molecule m ;
+  Stencil m ;
   if (!span_points.is_empty () &&
       span_points.length () > 0.001)
     {
index b9068bea0cb6911870007ddbc9846dde5e6b56dd..77283f3bce6442ec8bcaa617e1b5cd8b50cd12fe 100644 (file)
@@ -340,7 +340,7 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed)
        p->bracket_->set_bound (RIGHT, cmc);
 
       /*
-       Set properties so that the molecule-creating function will
+       Set properties so that the stencil-creating function will
        know whether the right edge should be flared ___/
        */
 
@@ -364,7 +364,7 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed)
       p->bracket_  = make_spanner ("PianoPedalBracket");
 
       /*
-       Set properties so that the molecule-creating function will
+       Set properties so that the stencil-creating function will
        know whether the left edge should be flared \___
       */
 
@@ -376,7 +376,7 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed)
 
 
       /* Set this property for 'mixed style' pedals,    Ped._______/\ ,  
-        so the molecule function will shorten the ____ line by the length of the Ped. text.
+        so the stencil function will shorten the ____ line by the length of the Ped. text.
       */
 
       if (mixed)
index 210e756814bbf7c9cdf8c215ac8142db71d60563..0d01e41155905843a35a73d5bbca751716700de1 100644 (file)
@@ -6,7 +6,7 @@
   (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-#include "molecule.hh"
+#include "stencil.hh"
 #include "paper-def.hh"
 #include "font-interface.hh"
 #include "rest.hh"
@@ -114,13 +114,13 @@ Rest::glyph_name (Grob *me, int balltype, String style)
 MAKE_SCHEME_CALLBACK (Rest,print,1);
 
 SCM
-Rest::brew_internal_molecule (SCM smob)
+Rest::brew_internal_stencil (SCM smob)
 {
   Grob* me = unsmob_grob (smob);
 
   SCM balltype_scm = me->get_grob_property ("duration-log");
   if (!gh_number_p (balltype_scm))
-    return Molecule ().smobbed_copy ();
+    return Stencil ().smobbed_copy ();
 
   int balltype = gh_scm2int (balltype_scm);
   
@@ -133,7 +133,7 @@ Rest::brew_internal_molecule (SCM smob)
 
   Font_metric *fm = Font_interface::get_default_font (me);
   String font_char = glyph_name (me, balltype, style);
-  Molecule out = fm->find_by_name (font_char);
+  Stencil out = fm->find_by_name (font_char);
   if (out.is_empty ())
     {
       me->warning (_f ("rest `%s' not found, ", font_char.to_str0 ()));
@@ -145,18 +145,18 @@ Rest::brew_internal_molecule (SCM smob)
 SCM 
 Rest::print (SCM smob) 
 {
-  return brew_internal_molecule (smob);
+  return brew_internal_stencil (smob);
 }
 MAKE_SCHEME_CALLBACK (Rest,extent_callback,2);
 /*
-  We need the callback. The real molecule has ledgers depending on
+  We need the callback. The real stencil has ledgers depending on
   Y-position. The Y-position is known only after line breaking.  */
 SCM
 Rest::extent_callback (SCM smob, SCM ax)
 {
   Axis a = (Axis) gh_scm2int (ax);
-  SCM m = brew_internal_molecule (smob);
-  return ly_interval2scm (unsmob_molecule (m)->extent (a));
+  SCM m = brew_internal_stencil (smob);
+  return ly_interval2scm (unsmob_stencil (m)->extent (a));
 }
 
 
index ca0039386d88c074ca4256db0c963dc1ba4553d9..b3a07b3270200529662b76b606c20a1ddbc1b244 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "scaled-font-metric.hh"
 #include "string.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 
 
 Scaled_font_metric::Scaled_font_metric (Font_metric* m, Real magn)
@@ -31,13 +31,13 @@ Scaled_font_metric::make_scaled_font_metric (Font_metric*m, Real s)
   return sfm->self_scm ();
 }
 
-Molecule
+Stencil
 Scaled_font_metric::find_by_name (String s) const
 {
-  Molecule m = orig_->find_by_name (s);
+  Stencil m = orig_->find_by_name (s);
   Box b = m.extent_box ();
   b.scale (magnification_);
-  Molecule q (b,fontify_atom ((Font_metric*) this, m.get_expr ()));
+  Stencil q (b,fontify_atom ((Font_metric*) this, m.get_expr ()));
 
   return q ;
 }
index 03826157bf269bc69a171e4aff67924f4e1038fc..e313e0a0e02e901b7bca1b499f831217ee75bd41 100644 (file)
@@ -103,7 +103,7 @@ void make_script_from_event (Grob *p,
   *descr = art;  
 
 
-  copy_property (p, ly_symbol2scm ("script-molecule"), art);
+  copy_property (p, ly_symbol2scm ("script-stencil"), art);
   copy_property (p, ly_symbol2scm ("direction"), art);
   copy_property (p, ly_symbol2scm ("side-relative-direction"), art);
 
index 3e8a8148b74656c7792a094d09e3eaf14c2b2b93..619f4e420baaea8ee5218b7783a89665b1cbfa6d 100644 (file)
 #include "side-position-interface.hh"
 #include "paper-def.hh"
 #include "item.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "lookup.hh"
 #include "stem.hh"
 #include "note-column.hh"
 
-Molecule
-Script_interface::get_molecule (Grob * me, Direction d)
+Stencil
+Script_interface::get_stencil (Grob * me, Direction d)
 {
-  SCM s = me->get_grob_property ("script-molecule");
+  SCM s = me->get_grob_property ("script-stencil");
   assert (gh_pair_p (s));
 
   SCM key = ly_car (s);
@@ -41,7 +41,7 @@ Script_interface::get_molecule (Grob * me, Direction d)
   else
     assert (false);
 
-  return Molecule ();
+  return Stencil ();
 }
 
 MAKE_SCHEME_CALLBACK (Script_interface,before_line_breaking,1);
@@ -86,11 +86,11 @@ Script_interface::print (SCM smob)
   Direction dir = Side_position_interface::get_direction (me);
   if (!dir)
     {
-      programming_error ("Script direction not known, but molecule wanted.");
+      programming_error ("Script direction not known, but stencil wanted.");
       dir= DOWN;
     }
   
-  return get_molecule (me, dir).smobbed_copy ();
+  return get_stencil (me, dir).smobbed_copy ();
 }
 
 
@@ -111,5 +111,5 @@ ADD_INTERFACE (Text_script,"text-script-interface",
 
 ADD_INTERFACE (Script_interface, "script-interface",
   "",
-  "script-priority script-molecule");
+  "script-priority script-stencil");
 
index 5777cdcf206497f94a9e8550f5e93e66abc52639..9868d30b9c5cdf2d05a1df6422735124c00cf052 100644 (file)
@@ -29,7 +29,7 @@
 #include "note-column.hh"
 #include "stem.hh"
 #include "paper-column.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "warn.hh"
 #include "slur-bezier-bow.hh"
 #include "main.hh"
@@ -528,9 +528,9 @@ Slur::height (SCM smob, SCM ax)
   Grob * me = unsmob_grob (smob);
   assert (a == Y_AXIS);
 
-  SCM mol = me->get_uncached_molecule ();
+  SCM mol = me->get_uncached_stencil ();
   Interval ext;
-  if (Molecule * m = unsmob_molecule (mol))
+  if (Stencil * m = unsmob_stencil (mol))
     ext = m->extent (a);
   return ly_interval2scm (ext);
 }
@@ -559,7 +559,7 @@ Slur::print (SCM smob)
   if (!scm_ilength (me->get_grob_property ("note-columns")))
     return SCM_EOL;
 
-  Molecule a;
+  Stencil a;
   SCM d =  me->get_grob_property ("dashed");
   if (gh_number_p (d))
     a = Lookup::dashed_slur (one, thick, thick * robust_scm2double (d, 0));
index 46c39c679815d55f0be205393620c87af136e52d..a8b18623370fc475deacdc06677a28f6930c3167 100644 (file)
@@ -10,7 +10,7 @@
 #include "font-interface.hh"
 #include "dimensions.hh"
 #include "paper-def.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "warn.hh"
 #include "axis-group-interface.hh"
 #include "group-interface.hh"
@@ -71,7 +71,7 @@ Span_bar::print (SCM smobbed_me)
   String glyph_string = ly_scm2string (glyph);
 
   /* compose span_bar_mol */
-  Molecule span_bar_mol;
+  Stencil span_bar_mol;
 
   Interval prev_extent;
   for (SCM elts = first_elt; gh_pair_p (elts); elts = ly_cdr (elts))
@@ -93,11 +93,11 @@ Span_bar::print (SCM smobbed_me)
            }
          else
            {
-             Molecule interbar = Bar_line::compound_barline (staff_bar,
+             Stencil interbar = Bar_line::compound_barline (staff_bar,
                                                              glyph_string,
                                                              l.length ());
              interbar.translate_axis (l.center (), Y_AXIS);
-             span_bar_mol.add_molecule (interbar);
+             span_bar_mol.add_stencil (interbar);
            }
        }
       prev_extent = ext;
@@ -121,7 +121,7 @@ Span_bar::width_callback (SCM element_smob, SCM scm_axis)
   /*
     urg.
   */
-  Molecule m = Bar_line::compound_barline (se, gl, 40 PT);
+  Stencil m = Bar_line::compound_barline (se, gl, 40 PT);
   
   return ly_interval2scm (m.extent (X_AXIS));
 }
index fdc34380a47545dc50772c85c7a0402a9a89cec9..0a4a585d03a693b04c65541222e023353b311249 100644 (file)
@@ -13,7 +13,7 @@
 #include "spanner.hh"
 #include "paper-column.hh"
 #include "paper-score.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "paper-outputter.hh"
 #include "paper-column.hh"
 #include "system.hh"
index a8ef6c0d1bf2413a0a275a17d50769726db373b8..ab0c72b0d52e5dfa96e3da8a1c4ff7abe7208335 100644 (file)
@@ -9,7 +9,7 @@
 #include "lookup.hh"
 #include "dimensions.hh"
 #include "paper-def.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "warn.hh"
 #include "item.hh"
 #include "staff-symbol.hh"
@@ -68,14 +68,14 @@ Staff_symbol::print (SCM smob)
   int l = Staff_symbol::line_count (me);
   
   Real height = (l-1) * staff_space (me) /2;
-  Molecule m;
+  Stencil m;
   for (int i=0; i < l; i++)
     {
-      Molecule a =
+      Stencil a =
        Lookup::horizontal_line (Interval (0,width), t);
 
       a.translate_axis (height - i * staff_space (me), Y_AXIS);
-      m.add_molecule (a);
+      m.add_stencil (a);
     }
 
   return m.smobbed_copy ();
index c3a8b54c523e6689f272578c52155c000126cdf4..327433bbdbe1cb0f2e9a6eb610833569ce436a7f 100644 (file)
@@ -46,17 +46,17 @@ Stem_tremolo::height (SCM smob, SCM ax)
   Grob * me = unsmob_grob (smob);
   assert (a == Y_AXIS);
 
-  SCM mol = me->get_uncached_molecule ();
+  SCM mol = me->get_uncached_stencil ();
 
-  if (Molecule *m = unsmob_molecule (mol))
+  if (Stencil *m = unsmob_stencil (mol))
     return ly_interval2scm (m->extent (a));
   else
     return ly_interval2scm (Interval());
 }
 
 
-Molecule
-Stem_tremolo::raw_molecule (Grob *me)
+Stencil
+Stem_tremolo::raw_stencil (Grob *me)
 {
   Grob *stem = unsmob_grob (me->get_grob_property ("stem"));
   Grob *beam = Stem::get_beam (stem);
@@ -87,7 +87,7 @@ Stem_tremolo::raw_molecule (Grob *me)
   width *= ss;
   thick *= ss;
   
-  Molecule a (Lookup::beam (dydx, width, thick, blot));
+  Stencil a (Lookup::beam (dydx, width, thick, blot));
   a.translate (Offset (-width/2, width / 2 * dydx));
   
   int tremolo_flags = 0;
@@ -100,7 +100,7 @@ Stem_tremolo::raw_molecule (Grob *me)
       programming_error ("No tremolo flags?");
 
       me->suicide();
-      return Molecule ();
+      return Stencil ();
     }
 
   /*
@@ -110,12 +110,12 @@ Stem_tremolo::raw_molecule (Grob *me)
    */
   Real beam_translation = beam ? Beam::get_beam_translation (beam) : 0.81;
 
-  Molecule mol; 
+  Stencil mol; 
   for (int i = 0; i < tremolo_flags; i++)
     {
-      Molecule b (a);
+      Stencil b (a);
       b.translate_axis (beam_translation * i, Y_AXIS);
-      mol.add_molecule (b);
+      mol.add_stencil (b);
     }
   return mol;
 }
@@ -134,7 +134,7 @@ Stem_tremolo::print (SCM grob)
     ? Beam::get_beam_translation (beam)
     : 0.81;
 
-  Molecule mol = raw_molecule (me);
+  Stencil mol = raw_stencil (me);
   Interval mol_ext = mol.extent (Y_AXIS);
   Real ss = Staff_symbol_referencer::staff_space (me);
 
index a5d0c00e73498c698e5bba73674b8b2780470baf..c0af303c0c9a31fcd0fd37dc1359fbe0199c6684 100644 (file)
@@ -23,7 +23,7 @@
 #include "paper-def.hh"
 #include "rhythmic-head.hh"
 #include "font-interface.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "paper-column.hh"
 #include "misc.hh"
 #include "beam.hh"
@@ -345,13 +345,13 @@ Stem::get_default_stem_end_position (Grob*me)
        Crude hack: add extra space if tremolo flag is there.
 
        We can't do this for the beam, since we get into a loop
-       (Stem_tremolo::raw_molecule() looks at the beam.)
+       (Stem_tremolo::raw_stencil() looks at the beam.)
        
         --hwn 
       */
       
       Real minlen =
-       1.0 + 2 * Stem_tremolo::raw_molecule (trem).extent (Y_AXIS).length  () / ss;
+       1.0 + 2 * Stem_tremolo::raw_stencil (trem).extent (Y_AXIS).length  () / ss;
       
       if (durlog >= 3)
        {
@@ -559,10 +559,10 @@ Stem::height (SCM smob, SCM ax)
   Grob * me = unsmob_grob (smob);
   assert (a == Y_AXIS);
 
-  SCM mol = me->get_uncached_molecule ();
+  SCM mol = me->get_uncached_stencil ();
   Interval iv;
   if (mol != SCM_EOL)
-    iv = unsmob_molecule (mol)->extent (a);
+    iv = unsmob_stencil (mol)->extent (a);
   if (Grob *b =get_beam (me))
     {
       Direction d = get_direction (me);
@@ -573,7 +573,7 @@ Stem::height (SCM smob, SCM ax)
 }
 
 
-Molecule
+Stencil
 Stem::flag (Grob*me)
 {
   /* TODO: maybe property stroke-style should take different values,
@@ -589,7 +589,7 @@ Stem::flag (Grob*me)
 
   if (flag_style == "no-flag")
     {
-      return Molecule ();
+      return Stencil ();
     }
 
   bool adjust = to_boolean (me->get_grob_property ("adjust-if-on-staffline"));
@@ -648,7 +648,7 @@ Stem::flag (Grob*me)
   String font_char =
     flag_style + to_string (dir) + staffline_offs + to_string (duration_log (me));
   Font_metric *fm = Font_interface::get_default_font (me);
-  Molecule flag = fm->find_by_name ("flags-" + font_char);
+  Stencil flag = fm->find_by_name ("flags-" + font_char);
   if (flag.is_empty ())
     {
       me->warning (_f ("flag `%s' not found", font_char));
@@ -661,14 +661,14 @@ Stem::flag (Grob*me)
       if (!stroke_style.is_empty ())
        {
          String font_char = to_string (dir) + stroke_style;
-         Molecule stroke = fm->find_by_name ("flags-" + font_char);
+         Stencil stroke = fm->find_by_name ("flags-" + font_char);
          if (stroke.is_empty ())
            {
              me->warning (_f ("flag stroke `%s' not found", font_char));
            }
          else
            {
-             flag.add_molecule (stroke);
+             flag.add_stencil (stroke);
            }
        }
     }
@@ -707,7 +707,7 @@ SCM
 Stem::print (SCM smob) 
 {
   Grob*me = unsmob_grob (smob);
-  Molecule mol;
+  Stencil mol;
   Direction d = get_direction (me);
      
   /*
@@ -754,15 +754,15 @@ Stem::print (SCM smob)
   Box b = Box (Interval (-stem_width/2, stem_width/2),
               Interval (stem_y[DOWN]*dy, stem_y[UP]*dy));
 
-  Molecule ss = Lookup::round_filled_box (b, blot);
-  mol.add_molecule (ss);
+  Stencil ss = Lookup::round_filled_box (b, blot);
+  mol.add_stencil (ss);
 
   if (!get_beam (me) && abs (duration_log (me)) > 2)
     {
-      Molecule fl = flag (me);
+      Stencil fl = flag (me);
       fl.translate_axis (stem_y[d]*dy - d * blot/2, Y_AXIS);
       fl.translate_axis (stem_width/2, X_AXIS);
-      mol.add_molecule (fl);
+      mol.add_stencil (fl);
     }
 
   return mol.smobbed_copy ();
diff --git a/lily/stencil-scheme.cc b/lily/stencil-scheme.cc
new file mode 100644 (file)
index 0000000..9f2f065
--- /dev/null
@@ -0,0 +1,227 @@
+/*
+  stencil-scheme.cc -- implement Stencil
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "stencil.hh"
+#include "font-metric.hh"
+
+LY_DEFINE(ly_stencil_set_extent_x,"ly:stencil-set-extent!", 3 , 0, 0, 
+         (SCM mol, SCM axis, SCM np),
+         "Set the extent (@var{extent} must be a pair of numbers) of @var{mol} in \n"
+"@var{axis} direction (0 or 1 for x- and y-axis respectively).\n"
+"\n"
+"Note that an extent @code{(A . B)} is an interval and hence @code{A} is\n"
+"smaller than @code{B}, and is often negative.\n"
+)
+{
+  Stencil* m = unsmob_stencil (mol);
+  SCM_ASSERT_TYPE (m, mol, SCM_ARG1, __FUNCTION__, "stencil");
+  SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
+  SCM_ASSERT_TYPE (is_number_pair (np), np, SCM_ARG3, __FUNCTION__, "number pair");
+
+  Interval iv = ly_scm2interval (np);
+  m->dim_[Axis (gh_scm2int (axis))] = iv;
+
+  return SCM_UNDEFINED;
+}
+
+
+LY_DEFINE(ly_translate_stencil_axis,"ly:stencil-translate-axis", 3, 0, 0, 
+         (SCM mol, SCM amount, SCM axis),
+         "Return a @var{mol}, but translated by @var{amount} in @var{axis} direction")
+{
+  Stencil* m = unsmob_stencil (mol);
+  SCM_ASSERT_TYPE (m, mol, SCM_ARG1, __FUNCTION__, "stencil");
+  SCM_ASSERT_TYPE (gh_number_p (amount), amount, SCM_ARG2, __FUNCTION__, "number pair");
+  SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
+
+
+  Stencil q (*m);
+  q.translate_axis (gh_scm2double (amount), Axis (gh_scm2int (axis)));
+
+  return q.smobbed_copy();
+}
+
+LY_DEFINE(ly_translate_stencil,"ly:stencil-translate", 2, 0, 0, 
+         (SCM mol, SCM offset),
+         "Return a @var{mol}, but translated by @var{offset} (a pair of numbers).")
+{
+  Stencil* m = unsmob_stencil (mol);
+  SCM_ASSERT_TYPE (m, mol, SCM_ARG1, __FUNCTION__, "stencil");
+  SCM_ASSERT_TYPE (is_number_pair (offset), offset, SCM_ARG2, __FUNCTION__, "number pair");
+  Offset o = ly_scm2offset (offset);
+  
+  Stencil q (*m);
+  q.translate (o);
+  return q.smobbed_copy();
+}
+
+LY_DEFINE(ly_stencil_get_extent,
+         "ly:stencil-get-extent", 2 , 0, 0,  (SCM mol, SCM axis),
+         "Return a pair of numbers signifying the extent of @var{mol} in "
+"@var{axis} direction (0 or 1 for x and y axis respectively)."
+)
+{
+  Stencil *m = unsmob_stencil (mol);
+  SCM_ASSERT_TYPE (m, mol, SCM_ARG1, __FUNCTION__, "stencil");
+  SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
+  return ly_interval2scm (m->extent (Axis (gh_scm2int (axis))));
+}
+
+
+LY_DEFINE(ly_stencil_combined_at_edge,
+         "ly:stencil-combine-at-edge",
+         4, 2, 0,  (SCM first, SCM axis, SCM direction,
+                    SCM second,
+                    SCM padding,
+                    SCM minimum),
+         "Construct a stencil by putting @var{second} next to "
+"@var{first}. @var{axis} can be 0 (x-axis) or 1 (y-axis), @var{direction} can be "
+"-1 (left or down) or 1 (right or up). "
+"The stencils are juxtaposed with  @var{padding} as extra space. If "
+"this puts the reference points closer than @var{minimum}, they are moved "
+"by the latter amount.")
+
+{
+  Stencil * m1 = unsmob_stencil (first);
+  Stencil * m2 = unsmob_stencil (second);
+  Stencil result;
+
+
+  SCM_ASSERT_TYPE(is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
+  SCM_ASSERT_TYPE(is_direction (direction), direction, SCM_ARG4, __FUNCTION__, "dir");
+
+  Real p = 0.0;
+  if (padding != SCM_UNDEFINED)
+    {
+      SCM_ASSERT_TYPE(gh_number_p (padding), padding, SCM_ARG5, __FUNCTION__, "number");
+      p = gh_scm2double (padding);
+    }
+  Real m =0.0;
+  if (minimum != SCM_UNDEFINED)
+    {
+      SCM_ASSERT_TYPE(gh_number_p (minimum), minimum, SCM_ARG6, __FUNCTION__, "number");
+      m = gh_scm2double (minimum);
+    }
+  
+  if (m1)
+    result = *m1;
+  if (m2)
+    result.add_at_edge (Axis (gh_scm2int (axis)), Direction (gh_scm2int (direction)),
+                       *m2, p, m);
+
+  return result.smobbed_copy ();
+}
+
+/*
+  FIXME: support variable number of arguments. 
+  
+ */
+LY_DEFINE(ly_stencil_add , 
+         "ly:stencil-add", 0, 0, 1, (SCM args),
+         "Combine stencils. Takes any number of arguments."
+         )
+{
+#define FUNC_NAME __FUNCTION__
+  SCM_VALIDATE_REST_ARGUMENT (args);
+
+  Stencil result;
+
+  while (!SCM_NULLP (args))
+    {
+      Stencil * m = unsmob_stencil (gh_car (args));
+
+      if (!m)
+       SCM_ASSERT_TYPE(m, gh_car (args), SCM_ARGn, __FUNCTION__,
+                       "Stencil");
+
+      result.add_stencil (*m);
+
+      args = gh_cdr (args);
+    }
+  
+  return result.smobbed_copy ();
+}
+
+LY_DEFINE(ly_make_stencil,
+         "ly:make-stencil", 3, 0, 0,  (SCM expr, SCM xext, SCM yext),
+         " \n"
+"The objective of any typesetting system is to put ink on paper in the \n"
+"right places. For LilyPond, this final stage is left to the @TeX{} and \n"
+"the printer subsystem. For lily, the last stage in processing a score is \n"
+"outputting a description of what to put where.  This description roughly \n"
+"looks like \n"
+"@example \n"
+"        PUT glyph AT (x,y) \n"
+"        PUT glyph AT (x,y) \n"
+"        PUT glyph AT (x,y)  \n"
+"@end example \n"
+"you merely have to look at the tex output of lily to see this. \n"
+"Internally these instructions are encoded in Stencils.@footnote{At some \n"
+"point LilyPond also contained Atom-objects, but they have been replaced \n"
+"by Scheme expressions, making the name outdated.}  A stencil is \n"
+"what-to-print-where information that also contains dimension information \n"
+"(how large is this glyph?). \n"
+" \n"
+"Conceptually, Stencils can be constructed from Scheme code, by \n"
+"translating a Stencil and by combining two stencils. In BNF \n"
+"notation: \n"
+" \n"
+"@example \n"
+"Stencil  :: COMBINE Stencil Stencil \n"
+"           | TRANSLATE Offset Stencil \n"
+"           | GLYPH-DESCRIPTION \n"
+"           ; \n"
+"@end example \n"
+" \n"
+"If you are interested in seeing how this information is stored, you \n"
+"can run with the @code{-f scm} option. The scheme expressions are then \n"
+"dumped in the output file.")
+{
+  SCM_ASSERT_TYPE (is_number_pair (xext), xext, SCM_ARG2, __FUNCTION__, "number pair");
+  SCM_ASSERT_TYPE (is_number_pair (yext), yext, SCM_ARG3, __FUNCTION__, "number pair");  
+
+  Box b (ly_scm2interval (xext), ly_scm2interval(yext));
+  Stencil m (b, expr);
+  return m.smobbed_copy ();
+}
+
+
+SCM
+fontify_atom (Font_metric const * met, SCM f)
+{
+  if (f == SCM_EOL)
+    return f;
+  else
+    return  scm_list_n (ly_symbol2scm ("fontify"),
+                       ly_quote_scm (met->description_), f, SCM_UNDEFINED);
+}
+
+LY_DEFINE(ly_fontify_atom,"ly:fontify-atom", 2, 0, 0, 
+         (SCM met, SCM f),
+         "Add a font selection command for the font metric @var{met} to @var{f}.")
+{
+  SCM_ASSERT_TYPE(unsmob_metrics (met), met, SCM_ARG1, __FUNCTION__, "font metric");
+
+  return fontify_atom (unsmob_metrics (met), f);
+}
+LY_DEFINE(ly_align_to_x,"ly:stencil-align-to!", 3, 0, 0,  (SCM mol, SCM axis, SCM dir),
+
+         "Align @var{mol} using its own extents. @var{dir} is a number -1, 1 are "
+         " left and right respectively. Other values are interpolated (so 0 means "
+         " the center. ")
+{
+  SCM_ASSERT_TYPE(unsmob_stencil (mol), mol, SCM_ARG1, __FUNCTION__, "stencil");
+  SCM_ASSERT_TYPE(is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
+  SCM_ASSERT_TYPE(gh_number_p (dir), dir, SCM_ARG3, __FUNCTION__, "number");
+
+  unsmob_stencil (mol)->align_to ((Axis)gh_scm2int (axis),
+                                  gh_scm2double (dir));
+
+  return SCM_UNDEFINED;
+}
diff --git a/lily/stencil.cc b/lily/stencil.cc
new file mode 100644 (file)
index 0000000..ba2d24e
--- /dev/null
@@ -0,0 +1,192 @@
+/*
+  stencil.cc -- implement Stencil
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include <math.h>
+#include <libc-extension.hh>   // isinf
+
+#include "font-metric.hh" 
+#include "dimensions.hh"
+#include "interval.hh"
+#include "string.hh"
+#include "stencil.hh"
+#include "warn.hh"
+
+
+#include "ly-smobs.icc"
+
+
+SCM
+Stencil::smobbed_copy () const
+{
+  Stencil * m = new Stencil (*this);
+
+  return m->smobbed_self ();
+}
+
+Interval
+Stencil::extent (Axis a) const
+{
+  return dim_[a];
+}
+
+Stencil::Stencil (Box b, SCM func)
+{
+  expr_ = func;
+  dim_ = b;
+}
+
+Stencil::Stencil ()
+{
+  expr_ = SCM_EOL;
+  set_empty (true);
+}
+
+void
+Stencil::translate (Offset o)
+{
+  Axis a = X_AXIS;
+  while (a < NO_AXES)
+    {
+      if (abs (o[a]) > 100 CM
+         || isinf (o[a]) || isnan (o[a]))
+       {
+         programming_error ("Improbable offset for translation: setting to zero");
+         o[a] =  0.0;
+       }
+      incr (a);
+    }
+
+  expr_ = scm_list_n (ly_symbol2scm ("translate-stencil"),
+                  ly_offset2scm (o),
+                  expr_, SCM_UNDEFINED);
+  if (!is_empty ())
+    dim_.translate (o);
+}
+  
+
+void
+Stencil::translate_axis (Real x,Axis a)
+{
+  Offset o (0,0);
+  o[a] = x;
+  translate (o);
+}  
+
+
+
+void
+Stencil::add_stencil (Stencil const &m)
+{
+  expr_ = scm_list_n (ly_symbol2scm ("combine-stencil"),
+                  m.expr_,
+                  expr_, SCM_UNDEFINED);
+  dim_.unite (m.dim_);
+}
+
+void
+Stencil::set_empty (bool e)
+{
+  if (e)
+    {
+      dim_[X_AXIS].set_empty ();
+      dim_[Y_AXIS].set_empty ();
+    }
+  else
+    {
+      dim_[X_AXIS] = Interval (0,0);
+      dim_[Y_AXIS] = Interval (0,0);
+    }
+}
+
+
+void
+Stencil::align_to (Axis a, Real x)
+{
+  if (is_empty ())
+    return ;
+
+  Interval i (extent (a));
+  translate_axis (-i.linear_combination (x), a);
+}
+
+/*
+  See scheme Function.
+ */
+void
+Stencil::add_at_edge (Axis a, Direction d, Stencil const &m, Real padding,
+                      Real minimum)
+{
+  Real my_extent= is_empty () ? 0.0 : dim_[a][d];
+  Interval i (m.extent (a));
+  Real his_extent;
+  if (i.is_empty ())
+    {
+      programming_error ("Stencil::add_at_edge: adding empty stencil.");
+      his_extent = 0.0;
+    }
+  else
+    his_extent = i[-d];      
+
+  Real offset = (my_extent -  his_extent)  + d*padding;
+  if (minimum > 0  && fabs (offset) <  minimum)
+    offset = sign (offset) * minimum; 
+  
+  Stencil toadd (m);
+  toadd.translate_axis (offset, a);
+  add_stencil (toadd);
+}
+
+
+
+/*
+  Hmm... maybe this is not such a good idea ; stuff can be empty,
+  while expr_ == '()
+ */
+bool
+Stencil::is_empty () const
+{
+  return expr_ == SCM_EOL;
+}
+
+SCM
+Stencil::get_expr () const
+{
+  return expr_;
+}
+
+
+
+Box
+Stencil::extent_box () const
+{
+  return dim_;
+}
+IMPLEMENT_SIMPLE_SMOBS (Stencil);
+
+
+int
+Stencil::print_smob (SCM , SCM port, scm_print_state *)
+{
+  scm_puts ("#<Stencil ", port);
+  scm_puts (" >", port);
+  
+  return 1;
+}
+
+  
+SCM
+Stencil::mark_smob (SCM s)
+{
+  Stencil  *r = (Stencil *) ly_cdr (s);
+  
+  return r->expr_;
+}
+
+IMPLEMENT_TYPE_P (Stencil, "ly:stencil?");
+IMPLEMENT_DEFAULT_EQUAL_P (Stencil);
+
index 30658d7bf386c6d3d4bdc2bc0d048ca0a1ba9364..c2cad1be294fdb8d507960a84f2444addf925f1c 100644 (file)
@@ -7,7 +7,7 @@
   
  */
 #include "grob.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "font-interface.hh"
 #include "string.hh"
 
@@ -40,7 +40,7 @@ Sustain_pedal::print (SCM smob)
 {
   Grob * e = unsmob_grob (smob);
   
-  Molecule mol;
+  Stencil mol;
   SCM glyph = e->get_grob_property ("text");
   if (!gh_string_p (glyph))
     return mol.smobbed_copy ();
@@ -57,7 +57,7 @@ Sustain_pedal::print (SCM smob)
        }
       else
        idx += String (&text.to_bytes ()[i], 1);
-      Molecule m = Font_interface::get_default_font (e)->find_by_name (idx);
+      Stencil m = Font_interface::get_default_font (e)->find_by_name (idx);
       if (!m.is_empty ())
        mol.add_at_edge (X_AXIS, RIGHT, m, 0, 0);
     }
index d4784aa3c114057441407edaab231145f81517f8..e39b897cfc7cbea78ff9174c3f7917f361dbc808 100644 (file)
 #include "axis-group-interface.hh"
 #include "system-start-delimiter.hh"
 #include "paper-def.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "font-interface.hh"
 #include "all-font-metrics.hh"
 #include "grob.hh"
 #include "staff-symbol-referencer.hh"
 #include "lookup.hh"
 
-Molecule
+Stencil
 System_start_delimiter::staff_bracket (Grob*me,Real height)  
 {
   Real arc_height = gh_scm2double (me->get_grob_property ("arch-height")) ;
@@ -52,14 +52,14 @@ Will not fix it since I'm not sure.
 
   Real h = height + 2 * arc_height;
   Box b (Interval (0, 1.5), Interval (-h/2, h/2));
-  Molecule mol (b, at);
+  Stencil mol (b, at);
   mol.align_to (X_AXIS, CENTER);
   return mol;
 }
 
 
 
-Molecule
+Stencil
 System_start_delimiter::simple_bar (Grob*me,Real h) 
 {
   Real lt =me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")) ;
@@ -125,7 +125,7 @@ System_start_delimiter::print (SCM smob)
       return SCM_EOL;
     }
 
-  Molecule m;
+  Stencil m;
 
   if (gsym== ly_symbol2scm ("bracket"))
     m = staff_bracket (me,l);
@@ -138,7 +138,7 @@ System_start_delimiter::print (SCM smob)
   return m.smobbed_copy ();
 }
 
-Molecule
+Stencil
 System_start_delimiter::staff_brace (Grob*me, Real y)
 {
   Font_metric *fm = 0;
@@ -172,11 +172,11 @@ System_start_delimiter::staff_brace (Grob*me, Real y)
     }
   while (hi - lo > 1);
       
-  Molecule m (fm->get_indexed_char_molecule (lo)); // ugh.  ascii?
+  Stencil m (fm->get_indexed_char_stencil (lo)); // ugh.  ascii?
   b=m.extent_box();
   b[X_AXIS] = Interval (0,0);
 
-  return Molecule (b, m.get_expr());
+  return Stencil (b, m.get_expr());
 }
   
 
index 3a0f2dbaa339d0744f575778c0d31121370c6c25..5fce3e22998e8de4711b0ab3f9b5cb76af9e64f3 100644 (file)
@@ -18,7 +18,7 @@
 #include "string.hh"
 #include "warn.hh"
 #include "dimensions.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "all-font-metrics.hh"
 #include "spacing-interface.hh"
 #include "staff-symbol-referencer.hh"
@@ -336,7 +336,7 @@ System::break_into_pieces (Array<Column_x_positions> const &breaking)
 }
 
 void
-System::output_molecule (SCM expr, Offset o)
+System::output_stencil (SCM expr, Offset o)
 {
   while (1)
     {
@@ -360,14 +360,14 @@ System::output_molecule (SCM expr, Offset o)
          pscore_->outputter_->output_scheme (scm_list_n (head, SCM_UNDEFINED));
          expr = ly_cadr (expr);
        }
-      else if (head == ly_symbol2scm ("translate-molecule"))
+      else if (head == ly_symbol2scm ("translate-stencil"))
        {
          o += ly_scm2offset (ly_cadr (expr));
          expr = ly_caddr (expr);
        }
-      else if (head == ly_symbol2scm ("combine-molecule"))
+      else if (head == ly_symbol2scm ("combine-stencil"))
        {
-         output_molecule (ly_cadr (expr), o);
+         output_stencil (ly_cadr (expr), o);
          expr = ly_caddr (expr);
        }
       else
@@ -465,7 +465,7 @@ System::post_processing (bool last_line)
     }
 
   /*
-    generate all molecules  to trigger all font loads.
+    generate all stencils  to trigger all font loads.
 
     (ugh. This is not very memory efficient.)  */
 
@@ -475,14 +475,14 @@ System::post_processing (bool last_line)
   /*
     triger font loads first.
 
-    This might seem inefficient, but Molecules are cached per grob
+    This might seem inefficient, but Stencils are cached per grob
     anyway.
     */
-  this->get_molecule();
+  this->get_stencil();
   for (SCM s = all; gh_pair_p (s); s = ly_cdr (s))
     {
       Grob * g = unsmob_grob (ly_car (s));
-      g->get_molecule ();
+      g->get_stencil ();
     }
   
   /*
@@ -507,9 +507,9 @@ System::post_processing (bool last_line)
   /* Output elements in three layers, 0, 1, 2.
      The default layer is 1. */
   {
-    Molecule *m = this->get_molecule();
+    Stencil *m = this->get_stencil();
     if (m)
-      output_molecule (m->get_expr (), Offset(0,0));
+      output_stencil (m->get_expr (), Offset(0,0));
   }
   
   for (int i = 0; i < 3; i++)
@@ -517,7 +517,7 @@ System::post_processing (bool last_line)
         s = ly_cdr (s))
       {
        Grob *sc = unsmob_grob (ly_car (s));
-       Molecule *m = sc->get_molecule ();
+       Stencil *m = sc->get_stencil ();
        if (!m)
          continue;
        
@@ -538,7 +538,7 @@ System::post_processing (bool last_line)
            o += z;
          }
        
-       output_molecule (m->get_expr (), o);
+       output_stencil (m->get_expr (), o);
       }
 
   
index 33a3632a4d5a4fa698928479698b751e884b10b7..f45b66e068b14e2c229e8552530cf80692a7de65 100644 (file)
@@ -37,7 +37,7 @@ Text_item::interpret_markup (SCM paper, SCM props, SCM markup)
        list = fontify_atom (fm, list);
 
       Box b = fm->text_dimension (ly_scm2string (markup));
-      return Molecule (b, list).smobbed_copy();
+      return Stencil (b, list).smobbed_copy();
     }
   else if (gh_pair_p (markup))
     {
index f88df1098562ef7f10ec950398ea8a17069b3595..a6f54f22ac9405ccbe4067e7c34d2f8f752c68ad 100644 (file)
@@ -8,7 +8,7 @@
   Revised over good by Han-Wen. 
 */
 
-#include "molecule.hh"
+#include "stencil.hh"
 #include "text-item.hh"
 #include "text-spanner.hh"
 #include "line-spanner.hh"
@@ -79,7 +79,7 @@ Text_spanner::print (SCM smob)
 
   SCM properties = Font_interface::font_alist_chain (me);
   SCM edge_text = me->get_grob_property ("edge-text");
-  Drul_array<Molecule> edge;
+  Drul_array<Stencil> edge;
   if (gh_pair_p (edge_text))
     {
       Direction d = LEFT;
@@ -92,7 +92,7 @@ Text_spanner::print (SCM smob)
          SCM text = index_get_cell (edge_text, d);
 
          if (Text_item::markup_p (text)) 
-           edge[d] = *unsmob_molecule (Text_item::interpret_markup (paper->self_scm (), properties, text));
+           edge[d] = *unsmob_stencil (Text_item::interpret_markup (paper->self_scm (), properties, text));
          
          if (!edge[d].is_empty ())
            edge[d].align_to (Y_AXIS, CENTER);
@@ -102,7 +102,7 @@ Text_spanner::print (SCM smob)
   
   Drul_array<Real> edge_height = robust_scm2interval (me->get_grob_property ("edge-height"),
                                                      Interval (0.0, 0.0));
-  Drul_array<Molecule> edge_line;
+  Drul_array<Stencil> edge_line;
     {
       Direction d = LEFT;
       int dir = to_dir (me->get_grob_property ("direction"));
@@ -117,19 +117,19 @@ Text_spanner::print (SCM smob)
 
          Real dy = - dir * edge_height[d] ;
          if (dy)
-           edge_line[d] = Line_spanner::line_molecule (me, Offset(0,0), Offset (dx, dy));
+           edge_line[d] = Line_spanner::line_stencil (me, Offset(0,0), Offset (dx, dy));
        }
       while (flip (&d) != LEFT);
     }
   
-  Molecule m;
+  Stencil m;
   do
     {
       Interval ext = edge[d].extent (X_AXIS);
       if (!ext.is_empty ())
        {
          edge[d].translate_axis (span_points[d], X_AXIS);
-         m.add_molecule (edge[d]);
+         m.add_stencil (edge[d]);
          span_points[d] += -d *  ext[-d];
        }
     }
@@ -139,16 +139,16 @@ Text_spanner::print (SCM smob)
       if (d* span_points[d] > d * edge[-d].extent(X_AXIS)[d])
        {
          edge_line[d].translate_axis (span_points[d], X_AXIS);
-         m.add_molecule (edge_line[d]);
+         m.add_stencil (edge_line[d]);
        }
     }
   while (flip (&d) != LEFT);
 
   if (!span_points.is_empty ())
     {
-      Molecule l =Line_spanner::line_molecule (me, Offset (span_points[LEFT], 0),
+      Stencil l =Line_spanner::line_stencil (me, Offset (span_points[LEFT], 0),
                                               Offset (span_points[RIGHT], 0));
-      m.add_molecule (l);
+      m.add_stencil (l);
     }
   m.translate_axis (- me->relative_coordinate (common, X_AXIS), X_AXIS);
   return m.smobbed_copy ();
index 3440fd9aebd7c5b31b621cf940e29530fffa504a..afdfd0240aa64c7110aa5ceb43a2a4d564da9aef 100644 (file)
@@ -18,7 +18,7 @@
 #include "warn.hh"
 #include "staff-symbol-referencer.hh"
 #include "directional-element-interface.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "bezier-bow.hh"
 #include "stem.hh"
 #include "note-head.hh"
@@ -333,7 +333,7 @@ Tie::print (SCM smob)
     }
 
   if (!gh_pair_p (cp))
-    return Molecule ().smobbed_copy ();
+    return Stencil ().smobbed_copy ();
   
   Real thick
     = Staff_symbol_referencer::line_thickness (me)
@@ -347,7 +347,7 @@ Tie::print (SCM smob)
       i++;
     }
   
-   Molecule a = Lookup::slur (b, get_grob_direction (me) * thick, thick);
+   Stencil a = Lookup::slur (b, get_grob_direction (me) * thick, thick);
    
    return a.smobbed_copy ();
 }
index 2a4d380db34568b2450b654fe7a4b3525d08dbb7..f122d256e5f4211e3e01c486a8c28896d5dc883e 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 
-#include "molecule.hh"
+#include "stencil.hh"
 #include "text-item.hh"
 #include "time-signature.hh"
 #include "paper-def.hh"
@@ -40,7 +40,7 @@ Time_signature::print (SCM smob)
       d = gh_scm2int (ly_cdr (frac));
     }
 
-  Molecule m;
+  Stencil m;
   if (gh_symbol_p (st))
     {
       String style (ly_scm2string (scm_symbol_to_string (st)));
@@ -62,7 +62,7 @@ Time_signature::print (SCM smob)
   return m.smobbed_copy ();
 }
 
-Molecule
+Stencil
 Time_signature::special_time_signature (Grob *me, SCM scm_style, int n, int d)
 {
   String style = ly_scm2string (scm_symbol_to_string (scm_style));
@@ -85,7 +85,7 @@ Time_signature::special_time_signature (Grob *me, SCM scm_style, int n, int d)
 
   String char_name = style + to_string (n) + "/" + to_string (d);
   me->set_grob_property ("font-family", ly_symbol2scm ("music"));
-  Molecule out = Font_interface::get_default_font (me)
+  Stencil out = Font_interface::get_default_font (me)
     ->find_by_name ("timesig-" + char_name);
   if (!out.is_empty ())
     return out;
@@ -97,7 +97,7 @@ Time_signature::special_time_signature (Grob *me, SCM scm_style, int n, int d)
   return numbered_time_signature (me, n, d);
 }
 
-Molecule
+Stencil
 Time_signature::numbered_time_signature (Grob*me,int num, int den)
 {
   SCM chain = Font_interface::font_alist_chain (me);
@@ -110,12 +110,12 @@ SCM sd =
     Text_item::interpret_markup (me->get_paper ()->self_scm(), chain,
                                 scm_makfrom0str (to_string (den).to_str0 ()));
 
-  Molecule n = *unsmob_molecule (sn);
-  Molecule d = *unsmob_molecule (sd);
+  Stencil n = *unsmob_stencil (sn);
+  Stencil d = *unsmob_stencil (sd);
                              
   n.align_to (X_AXIS, CENTER);
   d.align_to (X_AXIS, CENTER);
-  Molecule m;
+  Stencil m;
   if (den)
     {
       m.add_at_edge (Y_AXIS, UP, n, 0.0, 0);
diff --git a/lily/translator-def.cc b/lily/translator-def.cc
deleted file mode 100644 (file)
index f48e78d..0000000
+++ /dev/null
@@ -1,319 +0,0 @@
-/*   
-  translator-def.cc --  implement Context_def
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 2000--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#include "lily-proto.hh"
-#include "context-def.hh"
-#include "translator-group.hh"
-#include "warn.hh"
-#include "music-output-def.hh"
-#include "ly-smobs.icc"
-
-int
-Context_def::print_smob (SCM smob, SCM port, scm_print_state*)
-{
-  Context_def* me = (Context_def*) SCM_CELL_WORD_1 (smob);
-
-  scm_puts ("#<Context_def ", port);
-  scm_display (me->context_name_, port);
-  scm_puts (">", port);
-  return 1;
-}
-
-
-SCM
-Context_def::mark_smob (SCM smob)
-{
-  Context_def* me = (Context_def*) SCM_CELL_WORD_1 (smob);
-
-  scm_gc_mark (me->description_);
-  scm_gc_mark (me->context_aliases_);
-  scm_gc_mark (me->accept_mods_);
-  scm_gc_mark (me->translator_mods_);
-  scm_gc_mark (me->property_ops_);  
-  scm_gc_mark (me->translator_group_type_);
-  return me->context_name_;
-}
-
-
-Context_def::Context_def ()
-{
-  context_aliases_ = SCM_EOL;
-  translator_group_type_ = SCM_EOL;
-  accept_mods_ = SCM_EOL;
-  translator_mods_ = SCM_EOL;
-  property_ops_ = SCM_EOL;
-  context_name_ = SCM_EOL;
-  description_ = SCM_EOL;
-
-  smobify_self();
-}
-
-Context_def::~Context_def ()
-{
-}
-
-Context_def::Context_def (Context_def const & s)
-  : Input (s)
-{
-  context_aliases_ = SCM_EOL;
-  translator_group_type_ = SCM_EOL;
-  accept_mods_ = SCM_EOL;   
-  translator_mods_ = SCM_EOL;
-  property_ops_ = SCM_EOL;
-  context_name_ = SCM_EOL;
-  description_ = SCM_EOL;
-  
-  smobify_self();
-  description_ = s.description_;
-
-  accept_mods_ = s.accept_mods_;
-  property_ops_ = s.property_ops_;
-  translator_mods_ = s.translator_mods_;
-  context_aliases_ = s.context_aliases_;
-  translator_group_type_ = s.translator_group_type_;
-  context_name_ = s.context_name_;
-}
-
-
-void
-Context_def::add_context_mod (SCM mod)
-{
-  SCM tag  = gh_car (mod);
-  if (ly_symbol2scm ("description")  == tag)
-    {
-      description_ = gh_cadr (mod);
-      return ;
-    }
-
-  SCM sym = gh_cadr (mod);
-  if (gh_string_p (sym))
-    sym = scm_string_to_symbol (sym);
-  
-  if (ly_symbol2scm ("consists") == tag
-      || ly_symbol2scm ("consists-end") == tag
-      || ly_symbol2scm ("remove") == tag)
-    {
-      if (!get_translator (sym))
-       error (_f ("Program has no such type: `%s'", ly_symbol2string (sym).to_str0 ()));
-      else
-       translator_mods_ = gh_cons (scm_list_2 (tag, sym), translator_mods_ );
-    }
-  else if (ly_symbol2scm ("accepts") == tag
-          || ly_symbol2scm ("denies") == tag)
-    {
-      accept_mods_ = gh_cons (scm_list_2 (tag, sym), accept_mods_); 
-    }
-  else if (ly_symbol2scm ("poppush") == tag
-          || ly_symbol2scm ("pop") == tag
-          || ly_symbol2scm ("push") == tag
-          || ly_symbol2scm ("assign") == tag
-          || ly_symbol2scm ("unset") == tag)
-    {
-      property_ops_ = gh_cons (mod, property_ops_);
-    }
-  else if (ly_symbol2scm ("alias") == tag)
-    {
-      context_aliases_ = gh_cons (sym, context_aliases_);
-    }
-  else if (ly_symbol2scm ("translator-type")  == tag)
-    {
-      translator_group_type_ = sym;
-    }
-  else if (ly_symbol2scm ("context-name")  == tag)
-    {
-      context_name_ = sym;
-    }
-  else
-    {
-      programming_error ("Unknown context mod tag.");
-    }
-}
-
-
-
-SCM
-Context_def::get_context_name () const
-{
-  return context_name_;
-}
-
-SCM
-Context_def::get_accepted (SCM user_mod) const
-{
-  SCM mods = scm_reverse_x (scm_list_copy (accept_mods_),
-                           user_mod);
-  SCM acc = SCM_EOL;
-  for (SCM s = mods; gh_pair_p (s); s = gh_cdr (s))
-    {
-      SCM tag = gh_caar (s);
-      SCM sym = gh_cadar (s);
-      if (tag == ly_symbol2scm ("accepts"))
-       acc = gh_cons (sym, acc);
-      else if (tag == ly_symbol2scm ("denies"))
-       acc = scm_delete_x (sym, acc);
-    }
-  return acc;
-}
-
-          
-Link_array<Context_def>
-Context_def::path_to_acceptable_translator (SCM type_sym, Music_output_def* odef) const
-{
-  assert (gh_symbol_p (type_sym));
-  
-  SCM accepted = get_accepted (SCM_EOL);
-
-  Link_array<Context_def> accepteds;
-  for (SCM s = accepted; gh_pair_p (s); s = ly_cdr (s))
-    {
-      Context_def *t = unsmob_context_def (odef->find_translator (ly_car (s)));
-      if (!t)
-       continue;
-      accepteds.push (t);
-    }
-
-  Link_array<Context_def> best_result;
-  for (int i=0; i < accepteds.size (); i++)
-    {
-      /*
-       don't check aliases, because \context Staff should not create RhythmicStaff.
-      */
-      if (gh_equal_p (accepteds[i]->get_context_name (), type_sym))
-       {
-         best_result.push (accepteds[i]);
-         return best_result;
-       }
-    }
-      
-  int best_depth= INT_MAX;
-  for (int i=0; i < accepteds.size (); i++)
-    {
-      Context_def * g = accepteds[i];
-
-      Link_array<Context_def> result
-       = g->path_to_acceptable_translator (type_sym, odef);
-      if (result.size () && result.size () < best_depth)
-       {
-         result.insert (g,0);
-         best_result = result;
-
-         /*
-           this following line was added in 1.9.3, but hsould've been
-           there all along... Let's hope it doesn't cause nightmares.
-          */
-         best_depth = result.size();
-       }
-    }
-
-  return best_result;
-}
-
-IMPLEMENT_SMOBS (Context_def);
-IMPLEMENT_DEFAULT_EQUAL_P (Context_def);
-
-
-
-
-SCM
-Context_def::get_translator_names (SCM user_mod) const
-{
-  SCM l1 = SCM_EOL;
-  SCM l2 = SCM_EOL;
-
-  SCM mods = scm_reverse_x (scm_list_copy (translator_mods_),
-                           user_mod);
-  
-  for (SCM s = mods; gh_pair_p (s); s = gh_cdr (s))
-    {
-      SCM tag = gh_caar (s);
-      SCM arg = gh_cadar (s);
-
-      if (gh_string_p (arg))
-       arg = scm_string_to_symbol (arg);
-      
-      if (ly_symbol2scm ("consists") == tag)
-       l1 = gh_cons (arg, l1);
-      else if (ly_symbol2scm ("consists-end") == tag)
-       l2 = gh_cons (arg, l2);
-      else if (ly_symbol2scm ("remove") == tag)
-       {
-         l1 = scm_delete_x (arg, l1);
-         l2 = scm_delete_x (arg, l2);
-       }
-    }
-
-  return scm_append_x (scm_list_2 (l1, l2));
-}
-
-
-Translator_group *
-Context_def::instantiate (SCM ops)
-{
-  Translator * g = get_translator (translator_group_type_);
-  g = g->clone (); 
-
-  Translator_group *tg = dynamic_cast<Translator_group*> (g);
-  tg->definition_ = self_scm ();
-
-  SCM trans_names = get_translator_names (ops); 
-  tg->simple_trans_list_ = names_to_translators (trans_names, tg);
-  tg->accepts_list_ = get_accepted  (ops);
-  return tg;
-}
-
-
-SCM
-Context_def::clone_scm () const
-{
-  Context_def * t = new Context_def (*this);
-  scm_gc_unprotect_object (t->self_scm());
-  return t->self_scm();
-}
-
-SCM
-Context_def::make_scm ()
-{
-  Context_def* t = new Context_def;
-  scm_gc_unprotect_object (t->self_scm());
-  return t->self_scm();
-}
-
-void
-Context_def::apply_default_property_operations (Translator_group *tg)
-{
-  apply_property_operations (tg , property_ops_);
-}
-
-SCM
-Context_def::to_alist () const
-{
-  SCM l = SCM_EOL;
-
-  l = gh_cons (gh_cons (ly_symbol2scm ("consists"),
-                       get_translator_names (SCM_EOL)), l);
-  l = gh_cons (gh_cons (ly_symbol2scm ("description"),  description_), l);
-  l = gh_cons (gh_cons (ly_symbol2scm ("aliases"),  context_aliases_), l);
-  l = gh_cons (gh_cons (ly_symbol2scm ("accepts"),  get_accepted (SCM_EOL)), l);
-  l = gh_cons (gh_cons (ly_symbol2scm ("property-ops"),  property_ops_), l);
-  l = gh_cons (gh_cons (ly_symbol2scm ("context-name"),  context_name_), l);
-  l = gh_cons (gh_cons (ly_symbol2scm ("group-type"),  translator_group_type_), l);    
-
-  return l;  
-}
-
-bool
-Context_def::is_alias (SCM sym) const
-{
-  bool b  = sym == context_name_;
-
-  for (SCM a = context_aliases_; !b && gh_pair_p (a); a = ly_cdr (a))
-    b = b || sym == ly_car (a);
-
-  return b;
-}
index c8a99998c55bc1e6424cdaebf8436c18c0d89d7f..c4ab9083ab94078c57e63c0cd50b55b886f85f4f 100644 (file)
@@ -48,11 +48,6 @@ Translator::Translator (Translator const &s)
   smobify_self ();
 }
 
-bool
-Translator::is_alias (SCM sym) const
-{
-  return unsmob_context_def (definition_)->is_alias (sym);
-}
 
 bool
 Translator::try_music (Music *)
index 5bc83b5e12287d0b49cf745e2a47a5fe3e3a2bb0..31914723bdd5e358389e05267f97f419abf049e3 100644 (file)
@@ -30,7 +30,7 @@
 #include "box.hh"
 #include "warn.hh"
 #include "font-interface.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "paper-def.hh"
 #include "text-item.hh"
 #include "tuplet-bracket.hh"
@@ -101,7 +101,7 @@ SCM
 Tuplet_bracket::print (SCM smob) 
 {
   Grob *me= unsmob_grob (smob);
-  Molecule  mol;
+  Stencil  mol;
   Link_array<Grob> columns=
     Pointer_group_interface__extract_grobs (me, (Grob*)0, "note-columns");
 
@@ -173,14 +173,14 @@ Tuplet_bracket::print (SCM smob)
     {
       SCM properties = Font_interface::font_alist_chain (me);
       SCM snum = Text_item::interpret_markup (pap->self_scm (), properties, number);
-      Molecule num = *unsmob_molecule (snum);
+      Stencil num = *unsmob_stencil (snum);
       num.align_to (X_AXIS, CENTER);
       num.translate_axis (w/2, X_AXIS);
       num.align_to (Y_AXIS, CENTER);
        
       num.translate_axis ((ry-ly)/2, Y_AXIS);
 
-      mol.add_molecule (num);
+      mol.add_stencil (num);
     }
 
 
@@ -218,11 +218,11 @@ Tuplet_bracket::print (SCM smob)
       }
       while (flip (&d) != LEFT);
       
-      Molecule brack = make_bracket (me, Y_AXIS,
+      Stencil brack = make_bracket (me, Y_AXIS,
                                     Offset (w, ry - ly), 
                                     height, gap,
                                     flare, shorten);
-      mol.add_molecule (brack);
+      mol.add_stencil (brack);
     }
   
   mol.translate_axis (ly, Y_AXIS);
@@ -236,7 +236,7 @@ Tuplet_bracket::print (SCM smob)
   TODO: this will fail for very short (shorter than the flare)
   brackets.
  */
-Molecule
+Stencil
 Tuplet_bracket::make_bracket (Grob *me,        // for line properties.
                              Axis protusion_axis,
                              Offset dz,
@@ -277,12 +277,12 @@ Tuplet_bracket::make_bracket (Grob *me,   // for line properties.
     straight_corners[d][bracket_axis] += - d * flare[d];
   } while (flip (&d) != LEFT);
 
-  Molecule m;
+  Stencil m;
   do {
-    m.add_molecule (Line_interface::line (me, straight_corners[d],
+    m.add_stencil (Line_interface::line (me, straight_corners[d],
                                                 gap_corners[d]));
     
-    m.add_molecule (Line_interface::line (me,  straight_corners[d],
+    m.add_stencil (Line_interface::line (me,  straight_corners[d],
                                                 flare_corners[d]));
   } while (flip (&d) != LEFT);
 
index ba3626d90ffb605acb504b0c92df031d84e9c53f..d683aec1cf5dc761fe2c96fda3e30c43a05d5f02 100644 (file)
@@ -10,7 +10,7 @@
 #include "item.hh"
 #include "vaticana-ligature.hh"
 #include "font-interface.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "lookup.hh"
 #include "staff-symbol-referencer.hh"
 #include "note-head.hh"
@@ -18,7 +18,7 @@
 #include "bezier.hh"
 #include "warn.hh"
 
-Molecule
+Stencil
 vaticana_brew_cauda (Grob *me,
                     int pos,
                     int delta_pitch,
@@ -65,13 +65,13 @@ vaticana_brew_cauda (Grob *me,
 /*
  * TODO: move this function to class Lookup?
  */
-Molecule
+Stencil
 vaticana_brew_flexa (Grob *me,
                     bool solid,
                     Real line_thickness)
 {
   Real staff_space = Staff_symbol_referencer::staff_space (me);
-  Molecule molecule = Molecule ();
+  Stencil stencil = Stencil ();
   Real right_height = 0.6 * staff_space;
 
   Real interval;
@@ -129,23 +129,23 @@ vaticana_brew_flexa (Grob *me,
 
   if (solid)
     {
-      Molecule solid_head =
+      Stencil solid_head =
        Lookup::bezier_sandwich (top_curve, bottom_curve);
-      molecule.add_molecule (solid_head);
+      stencil.add_stencil (solid_head);
     }
   else // outline
     {
       Bezier inner_top_curve = top_curve;
       inner_top_curve.translate (Offset (0.0, -line_thickness));
-      Molecule top_edge =
+      Stencil top_edge =
        Lookup::bezier_sandwich (top_curve, inner_top_curve);
-      molecule.add_molecule(top_edge);
+      stencil.add_stencil(top_edge);
 
       Bezier inner_bottom_curve = bottom_curve;
       inner_bottom_curve.translate (Offset (0.0, +line_thickness));
-      Molecule bottom_edge =
+      Stencil bottom_edge =
        Lookup::bezier_sandwich (bottom_curve, inner_bottom_curve);
-      molecule.add_molecule(bottom_edge);
+      stencil.add_stencil(bottom_edge);
 
       /*
        * TODO: Use horizontal slope with proper slope value rather
@@ -157,21 +157,21 @@ vaticana_brew_flexa (Grob *me,
        */
       Box left_edge_box (Interval (0, line_thickness),
                         Interval (-0.5*left_height, +0.5*left_height));
-      Molecule left_edge = Lookup::filled_box (left_edge_box);
-      molecule.add_molecule(left_edge);
+      Stencil left_edge = Lookup::filled_box (left_edge_box);
+      stencil.add_stencil(left_edge);
 
       Box right_edge_box (Interval (-line_thickness, 0),
                          Interval (-0.5*right_height, +0.5*right_height));
-      Molecule right_edge = Lookup::filled_box (right_edge_box);
+      Stencil right_edge = Lookup::filled_box (right_edge_box);
       right_edge.translate_axis (width, X_AXIS);
       right_edge.translate_axis (corrected_interval / 2.0, Y_AXIS);
-      molecule.add_molecule(right_edge);
+      stencil.add_stencil(right_edge);
     }
-  molecule.translate_axis (ypos_correction, Y_AXIS);
-  return molecule;
+  stencil.translate_axis (ypos_correction, Y_AXIS);
+  return stencil;
 }
 
-Molecule
+Stencil
 vaticana_brew_join (Grob *me, int delta_pitch,
                    Real join_thickness, Real blotdiameter)
 {
@@ -180,7 +180,7 @@ vaticana_brew_join (Grob *me, int delta_pitch,
     {
       me->programming_error (_f ("Vaticana_ligature: "
                                 "zero join (delta_pitch == 0)"));
-      return Molecule ();
+      return Stencil ();
     }
   Interval x_extent = Interval (0, join_thickness);
   Interval y_extent = (delta_pitch > 0) ?
@@ -191,7 +191,7 @@ vaticana_brew_join (Grob *me, int delta_pitch,
 }
 
 void
-vaticana_add_ledger_lines (Grob *me, Molecule *out, int pos, Real offs,
+vaticana_add_ledger_lines (Grob *me, Stencil *out, int pos, Real offs,
                           bool ledger_take_space)
 {
   int interspaces = Staff_symbol_referencer::line_count (me)-1;
@@ -203,16 +203,16 @@ vaticana_add_ledger_lines (Grob *me, Molecule *out, int pos, Real offs,
 
       Interval l_extents = Interval (hd[LEFT] - left_ledger_protusion,
                                     hd[RIGHT] + right_ledger_protusion);
-      Molecule ledger_lines =
+      Stencil ledger_lines =
        Note_head::brew_ledger_lines (me, pos, interspaces,
                                      l_extents, 0,
                                      ledger_take_space);
       ledger_lines.translate_axis (offs, Y_AXIS);
-      out->add_molecule (ledger_lines);
+      out->add_stencil (ledger_lines);
     }
 }
 
-Molecule
+Stencil
 vaticana_brew_primitive (Grob *me, bool ledger_take_space)
 {
   SCM glyph_name_scm = me->get_grob_property ("glyph-name");
@@ -220,12 +220,12 @@ vaticana_brew_primitive (Grob *me, bool ledger_take_space)
     {
       me->programming_error ("Vaticana_ligature: "
                             "undefined glyph-name -> ignoring grob");
-      return Molecule ();
+      return Stencil ();
     }
 
   String glyph_name = ly_scm2string (glyph_name_scm);
 
-  Molecule out;
+  Stencil out;
   int flexa_height = 0;
   Real thickness = robust_scm2double ( me->get_grob_property ("thickness"), 1);
 
@@ -279,27 +279,27 @@ vaticana_brew_primitive (Grob *me, bool ledger_take_space)
 
   if (add_cauda)
     {
-      Molecule cauda =
+      Stencil cauda =
        vaticana_brew_cauda (me, pos, delta_pitch,
                             line_thickness, blotdiameter);
-      out.add_molecule (cauda);
+      out.add_stencil (cauda);
     }
 
   if (add_stem)
     {
-      Molecule stem =
+      Stencil stem =
        vaticana_brew_cauda (me, pos, -1,
                             line_thickness, blotdiameter);
       stem.translate_axis (head_width - line_thickness, X_AXIS);
-      out.add_molecule (stem);
+      out.add_stencil (stem);
     }
 
   if (add_join)
     {
-      Molecule join =
+      Stencil join =
        vaticana_brew_join (me, delta_pitch, line_thickness, blotdiameter);
       join.translate_axis (head_width - line_thickness, X_AXIS);
-      out.add_molecule (join);
+      out.add_stencil (join);
     }
 
   vaticana_add_ledger_lines(me, &out, pos, 0, ledger_take_space);
index 24d7bcdd6af77225c08df5d0feacce64eba9ecec..744da20afdc7dabe594ab3a5c0680fe81bfd4c9a 100644 (file)
@@ -10,7 +10,7 @@ source file of the GNU LilyPond music typesetter
 #include "warn.hh"
 #include "virtual-font-metric.hh"
 #include "all-font-metrics.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "paper-def.hh"
 
 
@@ -50,10 +50,10 @@ Virtual_font_metric::count () const
   return k;
 }
 
-Molecule
+Stencil
 Virtual_font_metric::find_by_name (String glyph) const
 {
-  Molecule m;  
+  Stencil m;  
   for (SCM s = font_list_; m.is_empty () && gh_pair_p (s); s = gh_cdr (s))
     {
       m = unsmob_metrics (gh_car (s))->find_by_name (glyph);
@@ -71,11 +71,11 @@ Virtual_font_metric::get_ascii_char (int)  const
   return Box();
 }
 
-Molecule
-Virtual_font_metric::get_ascii_char_molecule (int )  const
+Stencil
+Virtual_font_metric::get_ascii_char_stencil (int )  const
 {
   programming_error ("Virtual font metric cannot be indexed by ASCII.");
-  return Molecule();
+  return Stencil();
 }
 
 
@@ -119,7 +119,7 @@ Virtual_font_metric::get_indexed_char (int code)  const
 int 
 Virtual_font_metric::name_to_index (String glyph) const
 {
-  Molecule m;
+  Stencil m;
   int total = 0; 
   for (SCM s = font_list_; m.is_empty () && gh_pair_p (s); s = gh_cdr (s))
     {
@@ -135,10 +135,10 @@ Virtual_font_metric::name_to_index (String glyph) const
 }
 
   
-Molecule
-Virtual_font_metric::get_indexed_char_molecule (int code)  const
+Stencil
+Virtual_font_metric::get_indexed_char_stencil (int code)  const
 {
-  Molecule  m ;  
+  Stencil  m ;  
   int total = 0;
   
   for (SCM s = font_list_; gh_pair_p (s); s = gh_cdr (s))
@@ -146,7 +146,7 @@ Virtual_font_metric::get_indexed_char_molecule (int code)  const
       Font_metric* fm = unsmob_metrics (gh_car (s));
       if (code < total + fm->count())
        {
-         m = fm->get_indexed_char_molecule (code - total); // ugh.
+         m = fm->get_indexed_char_stencil (code - total); // ugh.
          break; 
        }
       total += fm->count ();
index 813bc1162fd1a515ab3a55a0725e54a344426dbe..92184e301c0a7a92cf438eee965103795be37108 100644 (file)
@@ -12,7 +12,7 @@
 #include "warn.hh"
 #include "font-interface.hh"
 #include "line-interface.hh"
-#include "molecule.hh"
+#include "stencil.hh"
 #include "paper-column.hh"
 #include "paper-def.hh"
 #include "text-item.hh"
@@ -91,23 +91,23 @@ Volta_bracket_interface::print (SCM smob)
   Real w = dynamic_cast<Spanner*> (me)->spanner_length () - left - half_space;
   Real h =  robust_scm2double (me->get_grob_property ("height"), 1);
 
-  Molecule start,end ;
+  Stencil start,end ;
   if (!no_vertical_start)
     start = Line_interface::line (me, Offset (0,0), Offset (0, h)); 
   
   if (!no_vertical_end)
     end = Line_interface::line (me, Offset (w, 0), Offset (w,h));
 
-  Molecule mol = Line_interface::line (me, Offset (0, h), Offset (w,h));
-  mol.add_molecule (start);
-  mol.add_molecule (end);
+  Stencil mol = Line_interface::line (me, Offset (0, h), Offset (w,h));
+  mol.add_stencil (start);
+  mol.add_stencil (end);
 
   if (!orig_span || broken_first_bracket)
     {
       SCM text = me->get_grob_property ("text");
       SCM properties = me->get_property_alist_chain (SCM_EOL);
       SCM snum  = Text_item::interpret_markup (paper->self_scm (), properties, text);
-      Molecule num = *unsmob_molecule (snum);
+      Stencil num = *unsmob_stencil (snum);
 
       mol.add_at_edge (X_AXIS, LEFT, num, - num.extent (X_AXIS).length ()
                       - 1.0, 0);
index de751af0dfe86eca169e59df844188ee18fff39b..1444f5d788b9471fa5c3a4ea5dab5477f9895d89 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.9.8"
+\version "2.1.22"
 % a3-init.ly
 
 hsize = 296.9 \mm
index 1cbf7111ca44f5851306cec21d25512f3514da4a..f58c6acbeb5427f8e6b2f1319d6f76bd612c053b 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.9.8"
+\version "2.1.22"
 % a4.ly
 
 hsize = 210.0 \mm
index 32de5a4d0f56423198ad07dcb374bd631e250ec8..e4c493214fd297a5f6483a0cc26a3edabb015c09 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.9.8"
+\version "2.1.22"
 % Symbols needed to print accordion music
 % 
 %  2' = T
index 7ebb27bbe6519a6a91fbac872cc46d7d327f07b5..574e66871c9b4d260398fcf7b2d9f42f2a812aca 100644 (file)
@@ -1,6 +1,6 @@
 % Toplevel initialisation file. 
        
-\version "2.1.13"
+\version "2.1.22"
 
 
 \include "declarations-init.ly"
index cc93ae08f005776aed3d57987e22c5268aa03a6c..684a48f65c45cd2cb7ff857f7189099453202e18 100644 (file)
@@ -73,4 +73,4 @@ pitchnamesCatalan = #`(
 
 pitchnames = \pitchnamesCatalan
 
-\version "2.1.19"
+\version "2.1.22"
index ca066e96b404bf6c9d61332260c0f6290a00687f..822c878dd9203fc83dfd2e97f5198433e10702c9 100644 (file)
@@ -1,6 +1,6 @@
 % Toplevel initialisation file. 
        
-\version "2.1.13"
+\version "2.1.22"
 
 
 \include "declarations-init.ly"
index a74dfb5b499e6605a54c1cc7687678b434900a64..0978d5c938d2ccc982ef6745eb996428fa0b613f 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.19"
+\version "2.1.22"
 
 chordmodifiers = #default-chord-modifier-list
 
index a9247573c0046b83fb8182227c800e5647e32c6e..5805fdb7de45c14a7eb07f85a7867f7c5132f449 100644 (file)
@@ -1,6 +1,6 @@
 #(ly:set-option 'old-relative)
 
-\version "2.1.19"
+\version "2.1.22"
 breve = #(ly:make-duration -1 0)
 longa = #(ly:make-duration -2 0 )
 maxima = #(ly:make-duration -3 0)
@@ -32,8 +32,8 @@ noBreak =  #(make-event-chord (list (make-penalty-music 10001)))
 
 \include "scale-definitions-init.ly"
 
-melisma = \property Staff.melismaBusy = ##t
-melismaEnd = \property Staff.melismaBusy = ##f
+melisma = \set Staff.melismaBusy =  ##t
+melismaEnd = \set Staff.melismaBusy =  ##f
 
 
 \include "grace-init.ly"
index b4dec3933aee90da6bca048fd0a381d13be66fd8..d9ab259f5da39e00a643e31823ace4eed4ea8eba 100644 (file)
@@ -49,4 +49,4 @@ pitchnamesDeutsch =  #`(
 
 pitchnames = \pitchnamesDeutsch
 
-\version "2.1.19"
+\version "2.1.22"
index 004ef5823b59e7f5d4e0b28dcd9019deb0f372d8..37481bd59e8814ec7f2fd8be8645c64e2e8b164a 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.9.8"
+\version "2.1.22"
 
 %
 % declare the standard dynamic identifiers.
index 68dd5d07c4cebc4a401d61400da37fda6d2c4fc1..236877765e7bf89051be69b2f47d50e1cf1a3573 100644 (file)
@@ -87,5 +87,5 @@ pitchnamesEnglish = #`(
 
 pitchnames = \pitchnamesEnglish
 
-\version "2.1.19"
+\version "2.1.22"
 
index d15e164e6b4e793fabc053b641bcbe3765e52405..04c85316b37ba2875b5f3e7e28ea9c156e782b53 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.21"
+\version "2.1.22"
 
 
 %
@@ -565,7 +565,7 @@ OrchestralScoreContext = \translator {
 
 EasyNotation = \translator {
        \ScoreContext
-       NoteHead \override #'print-function = #Note_head::brew_ez_molecule
+       NoteHead \override #'print-function = #Note_head::brew_ez_stencil
        NoteHead \override #'Y-extent-callback = #'()
        NoteHead \override #'X-extent-callback = #'()
 }
index 595af54c4f47382f68b8020256cb0e7e8bdd8a4c..bcaee43026905026b7d39bf2911a27677216e4c9 100644 (file)
@@ -58,4 +58,4 @@ pitchnamesEspanol = #`(
 
 pitchnames = \pitchnamesEspanol
 
-\version "2.1.19"
+\version "2.1.22"
index 8f752ed0e67478795f01994861fad514385bd9f2..f96b5f9bef7b359bf466ab169b25bf8ff94c91ea 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.9.8"
+\version "2.1.22"
 
 %
 % Running LilyPond on this file generates the documentation
index b902e70cf9a607114cc05d3deae593c77366a4a6..d74ac7a02115e98b4a0f3de54598c0c1956a8ba5 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.9.8"
+\version "2.1.22"
 
 %
 % Running LilyPond on this file generates the short interface doc
index 4b1dc9b94b817e55986e01943759d24955ae1c12..6976b092d5e272347c775837252da26d7ef639c2 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.9.8"
+\version "2.1.22"
 
 
 startGraceMusic = \notes {
@@ -23,11 +23,11 @@ stopAppoggiaturaMusic = \notes {
 startAcciaccaturaMusic = \notes {
     \context Voice \applycontext #set-start-grace-properties
     s1*0(
-    \property Voice.Stem \override #'stroke-style = #"grace"
+    \override Stem  #'stroke-style = #"grace"
 }
 
 stopAcciaccaturaMusic = \notes {
-    \property Voice.Stem \revert #'stroke-style
+    \revert Stem #'stroke-style
     \context Voice \applycontext #set-stop-grace-properties
     s1*0)
 }
index 850392a80f10e195dfbbca4e8669954568730a7b..e94b69e1e7c15afb21b73e0a80741ea165ec4309 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.21"
+\version "2.1.22"
 
 %%%%%%%%
 %%%%%%%% shortcuts common for all styles of gregorian chant notation
@@ -8,85 +8,85 @@
 % declare head prefix shortcuts
 %
 virga =
-  \once \property Voice.NoteHead \override #'virga = ##t
+  \once \override NoteHead  #'virga = ##t
 stropha =
-  \once \property Voice.NoteHead \override #'stropha = ##t
+  \once \override NoteHead  #'stropha = ##t
 inclinatum =
-  \once \property Voice.NoteHead \override #'inclinatum = ##t
+  \once \override NoteHead  #'inclinatum = ##t
 auctum =
-  \once \property Voice.NoteHead \override #'auctum = ##t
+  \once \override NoteHead  #'auctum = ##t
 descendens =
-  \once \property Voice.NoteHead \override #'descendens = ##t
+  \once \override NoteHead  #'descendens = ##t
 ascendens =
-  \once \property Voice.NoteHead \override #'ascendens = ##t
+  \once \override NoteHead  #'ascendens = ##t
 pes =
-  \once \property Voice.NoteHead \override #'pes-or-flexa = ##t
+  \once \override NoteHead  #'pes-or-flexa = ##t
 flexa =
-  \once \property Voice.NoteHead \override #'pes-or-flexa = ##t
+  \once \override NoteHead  #'pes-or-flexa = ##t
 oriscus =
-  \once \property Voice.NoteHead \override #'oriscus = ##t
+  \once \override NoteHead  #'oriscus = ##t
 quilisma =
-  \once \property Voice.NoteHead \override #'quilisma = ##t
+  \once \override NoteHead  #'quilisma = ##t
 deminutum =
-  \once \property Voice.NoteHead \override #'deminutum = ##t
+  \once \override NoteHead  #'deminutum = ##t
 linea =
-  \once \property Voice.NoteHead \override #'linea = ##t
+  \once \override NoteHead  #'linea = ##t
 cavum =
-  \once \property Voice.NoteHead \override #'cavum = ##t
+  \once \override NoteHead  #'cavum = ##t
 
 %
 % declare divisiones shortcuts
 %
 virgula = {
-  \once \property Voice.BreathingSign \override #'text = #(make-musicglyph-markup "scripts-rcomma")
-  \once \property Voice.BreathingSign \override #'font-size = #-2
+  \once \override BreathingSign  #'text = #(make-musicglyph-markup "scripts-rcomma")
+  \once \override BreathingSign  #'font-size = #-2
 
   % Workaround: add padding.  Correct fix would be spacing engine handle this.
-  \once \property Voice.BreathingSign \override #'extra-X-extent = #'(-1.0 . 0)
+  \once \override BreathingSign  #'extra-X-extent = #'(-1.0 . 0)
 
   \breathe
 }
 caesura = {
-  \once \property Voice.BreathingSign \override #'text = #(make-musicglyph-markup "scripts-rvarcomma")
-  \once \property Voice.BreathingSign \override #'font-size = #-2
+  \once \override BreathingSign  #'text = #(make-musicglyph-markup "scripts-rvarcomma")
+  \once \override BreathingSign  #'font-size = #-2
 
   % Workaround: add padding.  Correct fix would be spacing engine handle this.
-  \once \property Voice.BreathingSign \override #'extra-X-extent = #'(-1.0 . 0)
+  \once \override BreathingSign  #'extra-X-extent = #'(-1.0 . 0)
 
   \breathe
 }
 divisioMinima = {
-  \once \property Voice.BreathingSign \override #'print-function = #Breathing_sign::divisio_minima
+  \once \override BreathingSign  #'print-function = #Breathing_sign::divisio_minima
 
   % Workaround: add padding.  Correct fix would be spacing engine handle this.
-  \once \property Voice.BreathingSign \override #'extra-X-extent = #'(-1.0 . 0)
+  \once \override BreathingSign  #'extra-X-extent = #'(-1.0 . 0)
 
   \breathe
 }
 divisioMaior = {
-  \once \property Voice.BreathingSign \override #'print-function = #Breathing_sign::divisio_maior
-  \once \property Voice.BreathingSign \override #'Y-offset-callbacks = #'()
+  \once \override BreathingSign  #'print-function = #Breathing_sign::divisio_maior
+  \once \override BreathingSign  #'Y-offset-callbacks = #'()
 
   % Workaround: add padding.  Correct fix would be spacing engine handle this.
-  \once \property Voice.BreathingSign \override #'extra-X-extent = #'(-1.0 . 0)
+  \once \override BreathingSign  #'extra-X-extent = #'(-1.0 . 0)
 
   \breathe
 }
 divisioMaxima = {
-  \once \property Voice.BreathingSign \override #'print-function = #Breathing_sign::divisio_maxima
-  \once \property Voice.BreathingSign \override #'Y-offset-callbacks = #'()
+  \once \override BreathingSign  #'print-function = #Breathing_sign::divisio_maxima
+  \once \override BreathingSign  #'Y-offset-callbacks = #'()
 
   % Workaround: add padding.  Correct fix would be spacing engine handle this.
-  \once \property Voice.BreathingSign \override #'extra-X-extent = #'(-1.0 . 0)
+  \once \override BreathingSign  #'extra-X-extent = #'(-1.0 . 0)
 
   \breathe
 }
 finalis = {
-  \once \property Voice.BreathingSign \override #'print-function = #Breathing_sign::finalis
-  \once \property Voice.BreathingSign \override #'Y-offset-callbacks = #'()
+  \once \override BreathingSign  #'print-function = #Breathing_sign::finalis
+  \once \override BreathingSign  #'Y-offset-callbacks = #'()
 
   % Workaround: add padding.  Correct fix would be spacing engine handle this.
-  \once \property Voice.BreathingSign \override #'extra-X-extent = #'(-1.0 . 0)
+  \once \override BreathingSign  #'extra-X-extent = #'(-1.0 . 0)
 
   \breathe
 }
index f0d780b267d62ee0a69fc75071178551756c9e57..bf9fc9f2e290d85ee5ed44ee5cdd81d1bcfaa57a 100644 (file)
@@ -4,7 +4,7 @@
 #(define-public midi-debug #f)
 
 
-\version "1.9.8"
+\version "2.1.22"
 
 \include "declarations-init.ly"
 
index 418b9491f385e943535785cae5bd0afbf1a05441..2284d26c279da86e5da15f88e69b09d18f7961c8 100644 (file)
@@ -86,4 +86,4 @@ pitchnamesItaliano = #`(
 
 pitchnames = \pitchnamesItaliano
 
-\version "2.1.19"
+\version "2.1.22"
index ee113f7cddac3e9369684880ee490e202c1ad75b..5333671442d79e86354ec275346a932046e5c01e 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.9.8"
+\version "2.1.22"
 % legal-init.ly
 
 hsize = 8.5 \in
index 6b2d7049973deea0e28e6d834404d50f25f93419..7e5186fee3a6358f180ea6121e34b81d219467f2 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.9.8"
+\version "2.1.22"
 % letter-init.ly
 
 hsize = 8.5 \in
index 31857ef63b53425f2b9124d888a58149d749a6c0..205b56c5795bb9297fe80c6ce089e70e2a71de5d 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.9.8"
+\version "2.1.22"
 \midi {
         \tempo 4=60
        \include "performer-init.ly"
index f0e1ad12be84e57d7f2eff3f274e6ddfb6fa2609..65c2f91aee4ca811d96cb9cea10687e5b00b1d0c 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.19"
+\version "2.1.22"
 %{
  common dutch names for notes. es means flat, is means sharp
 %}
index 1f1ec4fdc43a35c0ea220a675cbd64e3d26b69f2..4ede332e65f2b56f5eb9c9c1d57f2fffa135d2df 100644 (file)
@@ -105,4 +105,4 @@ pitchnamesNorsk = #`(
 
 pitchnames =\pitchnamesNorsk
 
-\version "2.1.19"
+\version "2.1.22"
index d8dd41d5567ea57e43e488fd8a95601f87c5a363..e053fe5065ec000f2bc2c5937d3ec793dd8c6c21 100644 (file)
@@ -1,2 +1,2 @@
-\version "2.1.1"
+\version "2.1.22"
 
index 0ecdebdfe5c566774a984bc83bdfd8f3e92edb07..c27098bfc04575debf0bd13dd46341fc66263a8e 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.9.8"
+\version "2.1.22"
 
 % JUNKME
 %part-paper-init.ly
index 279f1e0861de561d73c4eed603535cad32128b92..5a024a7d23c671404c8f12fc2d4632a2a5174850 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.21"
+\version "2.1.22"
 
                                %
                                % setup for Request->Element conversion. Guru-only
index 51fbb8bc449f268dc3720453d1f1d47d11a709a3..449ba700732360e245d1b3ddf5510093ddfdcbb4 100644 (file)
@@ -1,75 +1,75 @@
 % property-init.ly
 
-\version "2.1.21"
+\version "2.1.22"
 
-stemUp = \property Voice.Stem \set #'direction = #1
-stemDown = \property Voice.Stem \set #'direction = #-1 
-stemBoth= \property Voice.Stem \revert #'direction
+stemUp = \override Stem  #'direction = #1
+stemDown = \override Stem  #'direction = #-1 
+stemBoth= \revert Stem #'direction
 
-slurUp   = \property Voice.Slur \set #'direction = #1
-slurDown = \property Voice.Slur \set #'direction = #-1
-slurBoth = \property Voice.Slur \revert #'direction 
+slurUp   = \override Slur  #'direction = #1
+slurDown = \override Slur  #'direction = #-1
+slurBoth = \revert Slur #'direction 
 
 % There's also dash, but setting dash period/length should be fixed.
-slurDotted = \property Voice.Slur \set #'dashed = #1
-slurSolid = \property Voice.Slur \revert #'dashed
+slurDotted = \override Slur  #'dashed = #1
+slurSolid = \revert Slur #'dashed
 
 
-phrasingSlurUp   = \property Voice.PhrasingSlur \set #'direction = #1
-phrasingSlurDown = \property Voice.PhrasingSlur \set #'direction = #-1
-phrasingSlurBoth = \property Voice.PhrasingSlur \revert #'direction 
+phrasingSlurUp   = \override PhrasingSlur  #'direction = #1
+phrasingSlurDown = \override PhrasingSlur  #'direction = #-1
+phrasingSlurBoth = \revert PhrasingSlur #'direction 
 
-shiftOn  = \property Voice.NoteColumn \set #'horizontal-shift = #1
-shiftOnn  = \property Voice.NoteColumn \set #'horizontal-shift = #2
-shiftOnnn  = \property Voice.NoteColumn \set #'horizontal-shift = #3
-shiftOff  = \property Voice.NoteColumn \revert #'horizontal-shift 
+shiftOn  = \override NoteColumn  #'horizontal-shift = #1
+shiftOnn  = \override NoteColumn  #'horizontal-shift = #2
+shiftOnnn  = \override NoteColumn  #'horizontal-shift = #3
+shiftOff  = \revert NoteColumn #'horizontal-shift 
 
-tieUp = \property Voice.Tie \set #'direction = #1
-tieDown = \property Voice.Tie \set #'direction = #-1
-tieBoth = \property Voice.Tie \revert #'direction 
+tieUp = \override Tie  #'direction = #1
+tieDown = \override Tie  #'direction = #-1
+tieBoth = \revert Tie #'direction 
 
-tieDotted = \property Voice.Tie \set #'dashed = #1
-tieSolid = \property Voice.Tie \revert #'dashed
+tieDotted = \override Tie  #'dashed = #1
+tieSolid = \revert Tie #'dashed
 
 
 dynamicUp  = {
-  \property Voice.DynamicText \set #'direction = #1
-  \property Voice.DynamicLineSpanner \set #'direction = #1
+  \override DynamicText  #'direction = #1
+  \override DynamicLineSpanner  #'direction = #1
 }
 dynamicDown = {
-  \property Voice.DynamicText \set #'direction = #-1
-  \property Voice.DynamicLineSpanner \set #'direction = #-1
+  \override DynamicText  #'direction = #-1
+  \override DynamicLineSpanner  #'direction = #-1
 }
 dynamicBoth = {
-  \property Voice.DynamicText \revert #'direction
-  \property Voice.DynamicLineSpanner \revert #'direction
+  \revert DynamicText #'direction
+  \revert DynamicLineSpanner #'direction
 }
 
 scriptUp  = {
-  \property Voice.TextScript \set #'direction = #1
-  \property Voice.Script \set #'direction = #1
+  \override TextScript  #'direction = #1
+  \override Script  #'direction = #1
 }
 scriptDown = {
-  \property Voice.TextScript \set #'direction = #-1
-  \property Voice.Script \set #'direction = #-1
+  \override TextScript  #'direction = #-1
+  \override Script  #'direction = #-1
 }
 scriptBoth = {
-  \property Voice.TextScript \revert #'direction
-  \property Voice.Script \revert #'direction
+  \revert TextScript #'direction
+  \revert Script #'direction
 }
 
-dotsUp = \property Voice.Dots \set #'direction = #1
-dotsDown = \property Voice.Dots \set #'direction = #-1
-dotsBoth = \property Voice.Dots \revert #'direction 
+dotsUp = \override Dots  #'direction = #1
+dotsDown = \override Dots  #'direction = #-1
+dotsBoth = \revert Dots #'direction 
 
-tupletUp  =   \property Voice.TupletBracket \set #'direction = #1
-tupletDown =   \property Voice.TupletBracket \set #'direction = #-1
-tupletBoth =   \property Voice.TupletBracket \revert #'direction
+tupletUp  =   \override TupletBracket  #'direction = #1
+tupletDown =   \override TupletBracket  #'direction = #-1
+tupletBoth =   \revert TupletBracket #'direction
 
-cadenzaOn = \property Timing.timing = ##f
+cadenzaOn = \set Timing.timing =  ##f
 cadenzaOff = {
-  \property Timing.timing = ##t
-  \property Timing.measurePosition = #(ly:make-moment 0 1)
+  \set Timing.timing =  ##t
+  \set Timing.measurePosition =  #(ly:make-moment 0 1)
 }
 
 newpage = \notes
@@ -90,46 +90,46 @@ voiceFour = #(context-spec-music (make-voice-props-set 3) 'Voice)
 
        
 tiny  = 
-       \property Voice.fontSize= #-2
+       \set fontSize =  #-2
 
 small  = 
-       \property Voice.fontSize= #-1
+       \set fontSize =  #-1
 
 normalsize = {
-       \property Voice.fontSize= #0
+       \set fontSize =  #0
 }
 
 
 % End the incipit and print a ``normal line start''.
 endincipit = \notes \context Staff {
     \partial 16 s16  % Hack to handle e.g. \bar ".|" \endincipit
-    \once \property Staff.Clef \set #'full-size-change = ##t
-    \once \property Staff.Clef \set #'non-default = ##t
+    \once \override Staff.Clef  #'full-size-change = ##t
+    \once \override Staff.Clef  #'non-default = ##t
     \bar ""
 }
 
-autoBeamOff = \property Voice.autoBeaming = ##f
-autoBeamOn = \property Voice.autoBeaming = ##t
+autoBeamOff = \set autoBeaming =  ##f
+autoBeamOn = \set autoBeaming =  ##t
 
-fatText = \property Voice.TextScript \set #'no-spacing-rods = ##f
-emptyText = \property Voice.TextScript \set #'no-spacing-rods  = ##t
+fatText = \override TextScript  #'no-spacing-rods = ##f
+emptyText = \override TextScript  #'no-spacing-rods  = ##t
 
-showStaffSwitch = \property Voice.followVoice = ##t
-hideStaffSwitch = \property Voice.followVoice = ##f
+showStaffSwitch = \set followVoice =  ##t
+hideStaffSwitch = \set followVoice =  ##f
 
 % accidentals as they were common in the 18th century.
 defaultAccidentals = {
-  \property Current.extraNatural = ##t
-  \property Current.autoAccidentals = #'(Staff (same-octave . 0))
-  \property Current.autoCautionaries = #'()
+  \set Current.extraNatural =  ##t
+  \set Current.autoAccidentals =  #'(Staff (same-octave . 0))
+  \set Current.autoCautionaries =  #'()
 }
 
 % accidentals in voices instead of staves.
 % Notice that accidentals from one voice do NOT get cancelled in other voices
 voiceAccidentals = {
-  \property Current.extraNatural = ##t
-  \property Current.autoAccidentals = #'(Voice (same-octave . 0))
-  \property Current.autoCautionaries = #'()
+  \set Current.extraNatural =  ##t
+  \set Current.autoAccidentals =  #'(Voice (same-octave . 0))
+  \set Current.autoCautionaries =  #'()
   
 }
 
@@ -137,38 +137,38 @@ voiceAccidentals = {
 % This includes all the default accidentals, but accidentals also needs cancelling
 % in other octaves and in the next measure.
 modernAccidentals = {
-  \property Current.extraNatural = ##f
-  \property Current.autoAccidentals = #'(Staff (same-octave . 0) (any-octave . 0) (same-octave . 1))
-  \property Current.autoCautionaries = #'()  
+  \set Current.extraNatural =  ##f
+  \set Current.autoAccidentals =  #'(Staff (same-octave . 0) (any-octave . 0) (same-octave . 1))
+  \set Current.autoCautionaries =  #'()  
 }
 
 % the accidentals that Stone adds to the old standard as cautionaries
 modernCautionaries = {
-  \property Current.extraNatural = ##f
-  \property Current.autoAccidentals = #'(Staff (same-octave . 0))
-  \property Current.autoCautionaries = #'(Staff (any-octave . 0) (same-octave . 1))  
+  \set Current.extraNatural =  ##f
+  \set Current.autoAccidentals =  #'(Staff (same-octave . 0))
+  \set Current.autoCautionaries =  #'(Staff (any-octave . 0) (same-octave . 1))  
 }
 
 % Multivoice accidentals to be read both by musicians playing one voice
 % and musicians playing all voices.
 % Accidentals are typeset for each voice, but they ARE cancelled across voices.
 modernVoiceAccidentals = {
-  \property Current.extraNatural = ##f
-  \property Current.autoAccidentals = #'(
+  \set Current.extraNatural =  ##f
+  \set Current.autoAccidentals =  #'(
     Voice (same-octave . 0) (any-octave . 0) (same-octave . 1)
     Staff (same-octave . 0) (any-octave . 0) (same-octave . 1)
   )
-  \property Current.autoCautionaries = #'()  
+  \set Current.autoCautionaries =  #'()  
 }
 
 % same as modernVoiceAccidental eccept that all special accidentals are typeset
 % as cautionaries
 modernVoiceCautionaries = {
-  \property Current.extraNatural = ##f
-  \property Current.autoAccidentals = #'(
+  \set Current.extraNatural =  ##f
+  \set Current.autoAccidentals =  #'(
     Voice (same-octave . 0) 
   )
-  \property Current.autoCautionaries = #'(
+  \set Current.autoCautionaries =  #'(
     Voice (any-octave . 0) (same-octave . 1)
     Staff (same-octave . 0) (any-octave . 0) (same-octave . 1)
   )  
@@ -177,18 +177,18 @@ modernVoiceCautionaries = {
 % stone's suggestions for accidentals on grand staff.
 % Accidentals are cancelled across the staves in the same grand staff as well
 pianoAccidentals = {
-  \property Current.autoAccidentals = #'(
+  \set Current.autoAccidentals =  #'(
     Staff (same-octave . 0) (any-octave . 0) (same-octave . 1)
     GrandStaff (any-octave . 0) (same-octave . 1)
   )
-  \property Current.autoCautionaries = #'()  
+  \set Current.autoCautionaries =  #'()  
 }
 
 pianoCautionaries = {
-  \property Current.autoAccidentals = #'(
+  \set Current.autoAccidentals =  #'(
     Staff (same-octave . 0)
   )
-  \property Current.autoCautionaries = #'(
+  \set Current.autoCautionaries =  #'(
     Staff (any-octave . 0) (same-octave . 1)
     GrandStaff (any-octave . 0) (same-octave . 1)
   )  
@@ -199,8 +199,8 @@ pianoCautionaries = {
 % printed only once and are in effect until overridden, possibly many
 % measures later.
 noResetKey = {
-  \property Current.autoAccidentals = #'(Staff (same-octave . #t))
-  \property Current.autoCautionaries = #'()
+  \set Current.autoAccidentals =  #'(Staff (same-octave . #t))
+  \set Current.autoCautionaries =  #'()
 }
 
 % do not set localKeySignature when a note alterated differently from
@@ -209,13 +209,13 @@ noResetKey = {
 % remembered for the duration of a measure.
 % accidentals not being remembered, causing accidentals always to be typeset relative to the time signature
 forgetAccidentals = {
-  \property Current.autoAccidentals = #'(Staff (same-octave . -1))
-  \property Current.autoCautionaries = #'()  
+  \set Current.autoAccidentals =  #'(Staff (same-octave . -1))
+  \set Current.autoCautionaries =  #'()  
 }
 
 
 % To remove a Volta bracket or some other graphical object,
-% set it to turnOff. Example: \property Staff.VoltaBracket = \turnOff
+% set it to turnOff. Example: \set Staff.VoltaBracket =  \turnOff
 
 %%
 %% DO NOT USE THIS. IT CAN LEAD TO CRASHES.
@@ -233,33 +233,33 @@ glissando = #(make-music-by-name 'GlissandoEvent)
 fermataMarkup = \markup { \musicglyph #"scripts-ufermata" } 
 
 setMmRestFermata =
-  \once \property Voice.MultiMeasureRestNumber \override #'text =
+  \once \override MultiMeasureRestNumber  #'text =
     #fermataMarkup 
 
 
 hideNotes =\sequential {
                                % hide notes, accidentals, etc.
-    \property Voice.Dots \override #'transparent = ##t
-    \property Voice.NoteHead \override #'transparent = ##t
-    \property Voice.Stem \override #'transparent = ##t
-    \property Voice.Beam \override #'transparent = ##t
-    \property Staff.Accidental \override #'transparent = ##t
+    \override Dots  #'transparent = ##t
+    \override NoteHead  #'transparent = ##t
+    \override Stem  #'transparent = ##t
+    \override Beam  #'transparent = ##t
+    \override Staff.Accidental  #'transparent = ##t
 }
 
 
 unHideNotes =  \sequential {
-  \property Staff.Accidental \revert #'transparent
-  \property Voice.Beam \revert #'transparent
-  \property Voice.Stem \revert #'transparent
-  \property Voice.NoteHead \revert #'transparent
-  \property Voice.Dots \revert #'transparent 
+  \revert Staff.Accidental #'transparent
+  \revert Beam #'transparent
+  \revert Stem #'transparent
+  \revert NoteHead #'transparent
+  \revert Dots #'transparent 
 }
 
 germanChords = {
-    \property ChordNames. chordRootNamer = #(chord-name->german-markup #t)
-    \property ChordNames. chordNoteNamer = #note-name->german-markup
+    \set chordRootNamer =  #(chord-name->german-markup #t)
+    \set chordNoteNamer =  #note-name->german-markup
 }
 semiGermanChords = {
-    \property ChordNames. chordRootNamer = #(chord-name->german-markup #f)
-    \property ChordNames. chordNoteNamer = #note-name->german-markup
+    \set chordRootNamer =  #(chord-name->german-markup #f)
+    \set chordNoteNamer =  #note-name->german-markup
 }
index c32b0e2db12e0d27bcdaba956cfa9dd1ccfb1aba..4d0d42e483ceb3ad89ad94593e071a22ff1f1a55 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.9.8"
+\version "2.1.22"
 
 
 major = #`(
index 35fd6e86eeec7ac506d040e3977ade673e51e173..051071a760030fb78801ea6e88021fb4bf3a46f5 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.9.8"
+\version "2.1.22"
 
 
 dashHat= "marcato"
index 5d655b730c0b19af28f82d2ce44d1944bf2029c5..464a54689ce99a5daf8b267d3c3d11cb646045a5 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.9.8"
+\version "2.1.22"
 
 startGroup = #(make-span-event 'NoteGroupingEvent START)
 stopGroup = #(make-span-event 'NoteGroupingEvent STOP)
@@ -18,29 +18,29 @@ stopTextSpan = #(make-span-event 'TextSpanEvent STOP)
 
 cresc = \notes {
   #(ly:export (make-event-chord (list cr)))
-  \property Voice.crescendoText = \markup { \italic "cresc." }
-  \property Voice.crescendoSpanner = #'dashed-line
+  \set crescendoText =  \markup { \italic "cresc." }
+  \set crescendoSpanner =  #'dashed-line
 }
 
 % ah, this is handy: maybe drop resetting of properties in
 % dynamic-engraver ?
 endcresc = \notes {
   #(ly:export (make-event-chord (list rc)))
-  \property Voice.crescendoText \unset
-  \property Voice.crescendoSpanner \unset
+  \unset crescendoText 
+  \unset crescendoSpanner 
 }
 
 dim = \notes {
   #(ly:export (make-event-chord (list decr)))
 
-  \property Voice.decrescendoText = \markup { \italic "dim." }
-  \property Voice.decrescendoSpanner = #'dashed-line
+  \set decrescendoText =  \markup { \italic "dim." }
+  \set decrescendoSpanner =  #'dashed-line
 }
 
 enddim = \notes {
   #(ly:export (make-event-chord (list rced)))
-   \property Voice.decrescendoText \unset
- \property Voice.decrescendoSpanner \unset
+   \unset decrescendoText 
+ \unset decrescendoSpanner 
 }
 
 %{
@@ -60,6 +60,6 @@ treCorde = #(make-span-event 'UnaCordaEvent STOP)
 sostenutoDown = #(make-span-event 'SostenutoEvent START)
 sostenutoUp = #(make-span-event 'SostenutoEvent STOP)
 
-%crescpoco = \property Voice.crescendoText = "cresc. poco a poco"
-%decresc = \property Voice.crescendoText = "decr."
-%dim = \property Voice.crescendoText = "dim."
+%crescpoco = \set crescendoText =  "cresc. poco a poco"
+%decresc = \set crescendoText =  "decr."
+%dim = \set crescendoText =  "dim."
index 1a826871713194a95b12d6a5995de217722064da..7e0d10f3be5334816550aedbd89893751125e33f 100644 (file)
@@ -48,4 +48,4 @@ pitchnamesSuomi = #`(
 
 pitchnames = \pitchnamesSuomi
 
-\version "2.1.19"
+\version "2.1.22"
index d81d7f1467b80f1ba1dc2575db6f1bdc6c28f9a6..b9df19ba0dc477c1bc5eee154354f1bcf298de43 100644 (file)
@@ -42,4 +42,4 @@ pitchnamesSvenska = #`(
 )
 
 pitchnames =  \pitchnamesSvenska
-\version "2.1.19"
+\version "2.1.22"
index 41f0e88bc309acc09bc618140bcef22451f7852d..1bc151b7950a8f6d7f13c14787a5fe4c8c4ebc64 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.9.8"
+\version "2.1.22"
 
 % tabloid-init.ly
 
index 174dee86eb85889b90b596c6e8544ccc9d5b8500..1aed0614e27c96bf236e6804ced2ff6ea6b8782b 100644 (file)
@@ -51,7 +51,7 @@ $(outdir)/%-book.ps: $(outdir)/%.ps
        pstops '2:0L@.7(21cm,0)+1L@.7(21cm,14.85cm)' $<.tmp $@
 
 $(outdir)/%.pdf: $(outdir)/%.dvi
-       dvips -u +lilypond.map -o $@.pdfps -t $(DVIPS_PAPERSIZE)  -Ppdf $<
+       dvips $(DVIPS_FLAGS)  -o $@.pdfps -t $(DVIPS_PAPERSIZE)  $<
        ps2pdf -sPAPERSIZE=$(DVIPS_PAPERSIZE) $@.pdfps $@
 
 
index 3a844e20bb4400984105a283792099f9ec3100c2..08d608dfb215a04946fe567de179f2b0df04c4e9 100644 (file)
@@ -16,3 +16,4 @@ TEXINFO_SOURCES += $(TELY_FILES) $(ITELY_FILES) $(ITEXI_FILES)
 
 EXTRA_DIST_FILES += $(TELY_FILES) $(LY_FILES) $(ITEXI_FILES) $(ITELY_FILES) $(LYINC_FILES)
 
+DVIPS_FLAGS= -u +lilypond.map  -Ppdf
index 03cba6f2e9c8a6ca67a351b9e23284aa48522442..af73902b9719b4b0042c182038be6465894e9b4f 100644 (file)
@@ -31,7 +31,7 @@ $(outdir)/%.dvi: %.ly
 
 
 $(outdir)/%.pdf: $(outdir)/%.dvi
-       dvips -u +lilypond.map -t $(DVIPS_PAPERSIZE) -o $@.pdfps  -Ppdf $<
+       dvips $(DVIPS_FLAGS) -t $(DVIPS_PAPERSIZE) -o $@.pdfps $<
        ps2pdf -sPAPERSIZE=$(DVIPS_PAPERSIZE) $@.pdfps $@
 
 $(outdir)-$(PAPERSIZE)/%.dvi: %.ly
index 322ac184d084cca04cbd41339faef19c130c3084..2b520fb25d20c4948232dab5e9ccb8e5a22a9f42 100644 (file)
@@ -76,7 +76,7 @@ for balloon text.")
                          "Where to put text relative to balloon.")
      (balloon-padding ,ly:dimension? "Text to add to help balloon")
      (balloon-original-callback ,procedure? "The
-original molecule drawer to draw the balloon around.")
+original stencil drawer to draw the balloon around.")
 
 
      (bar-size ,ly:dimension? "size of a bar line.")
@@ -319,7 +319,7 @@ Also works as a scaling parameter for the length of hyphen. .")
      (print-function ,procedure? "Function taking grob as argument,
 returning a Molecule object.")
 
-     (molecule ,ly:molecule? "Cached output of the print-function.")
+     (stencil ,ly:stencil? "Cached output of the print-function.")
 
      (new-accidentals ,list? "list of (pitch, accidental) pairs.")
      (no-spacing-rods ,boolean? "read from grobs: boolean that makes Separation_item ignore this item (MOVE ME TO ITEM).")
@@ -549,7 +549,7 @@ columns.
 did it's job. This ensures that a positioning is only done once.")
 
 
-     (script-molecule ,pair? "Index code for script -- internal, see script.cc.")
+     (script-stencil ,pair? "Index code for script -- internal, see script.cc.")
 
 
      (flag-count ,number? "")
index 10ecd85d9ab1282b8588c8c6cbf29abe4de84b34..7a51b8af510e0f0a86d0173ae942f11977860ed1 100644 (file)
   "Put @var{args} in a horizontal line. The property @code{word-space} determines
 the space between each markup in @var{args}.
 "
-  (stack-molecule-line
+  (stack-stencil-line
    (cdr (chain-assoc 'word-space props))
    (map (lambda (m) (interpret-markup paper props m)) args)))
 
 (def-markup-command (combine paper props m1 m2) (markup? markup?)
   "Print two markups on top of each other."
-  (ly:molecule-add
+  (ly:stencil-add
    (interpret-markup paper props m1)
    (interpret-markup paper props m2)))
 
@@ -172,17 +172,17 @@ of the #'direction layout property."
 
 (def-markup-command (center paper props args) (markup-list?)
   (let* ((mols (map (lambda (x) (interpret-markup paper props x)) args))
-         (cmols (map (lambda (x) (ly:molecule-align-to! x X CENTER)) mols)))
+         (cmols (map (lambda (x) (ly:stencil-align-to! x X CENTER)) mols)))
     (stack-lines -1 0.0 (cdr (chain-assoc 'baseline-skip props)) mols)))
 
 (def-markup-command (right-align paper props arg) (markup?)
   (let* ((m (interpret-markup paper props arg)))
-    (ly:molecule-align-to! m X RIGHT)
+    (ly:stencil-align-to! m X RIGHT)
     m))
 
 (def-markup-command (left-align paper props arg) (markup?)
   (let* ((m (interpret-markup paper props arg)))
-    (ly:molecule-align-to! m X LEFT)
+    (ly:stencil-align-to! m X LEFT)
     m))
 
 (def-markup-command (halign paper props dir arg) (number? markup?)
@@ -191,7 +191,7 @@ right, values in between vary alignment accordingly."
 
   
   (let* ((m (interpret-markup paper props arg)))
-    (ly:molecule-align-to! m X dir)
+    (ly:stencil-align-to! m X dir)
     m))
 
 (def-markup-command (musicglyph paper props glyph-name) (string?)
@@ -237,7 +237,7 @@ positions it next to the staff cancels any shift made with
 and/or @code{extra-offset} properties. "
 
   
-  (ly:molecule-translate-axis (interpret-markup paper props arg)
+  (ly:stencil-translate-axis (interpret-markup paper props arg)
                               amount Y))
 
 (def-markup-command (fraction paper props arg1 arg2) (markup? markup?)
@@ -246,18 +246,18 @@ and/or @code{extra-offset} properties. "
 Syntax: \\fraction MARKUP1 MARKUP2."
   (let* ((m1 (interpret-markup paper props arg1))
          (m2 (interpret-markup paper props arg2)))
-    (ly:molecule-align-to! m1 X CENTER)
-    (ly:molecule-align-to! m2 X CENTER)    
-    (let* ((x1 (ly:molecule-get-extent m1 X))
-           (x2 (ly:molecule-get-extent m2 X))
+    (ly:stencil-align-to! m1 X CENTER)
+    (ly:stencil-align-to! m2 X CENTER)    
+    (let* ((x1 (ly:stencil-get-extent m1 X))
+           (x2 (ly:stencil-get-extent m2 X))
            (line (ly:round-filled-box (interval-union x1 x2) '(-0.05 . 0.05) 0.0))
            ;; should stack mols separately, to maintain LINE on baseline
            (stack (stack-lines -1 0.2 0.6 (list m1 line m2))))
-      (ly:molecule-align-to! stack Y CENTER)
-      (ly:molecule-align-to! stack X LEFT)
+      (ly:stencil-align-to! stack Y CENTER)
+      (ly:stencil-align-to! stack X LEFT)
       ;; should have EX dimension
       ;; empirical anyway
-      (ly:molecule-translate-axis stack 0.75 Y))))
+      (ly:stencil-translate-axis stack 0.75 Y))))
 
 
 ;; TODO: better syntax.
@@ -273,7 +273,7 @@ for DIR, you can obtain longer or shorter stems."
          (stemth 0.13)
          (stemy (* dir stemlen))
          (attachx (if (> dir 0)
-                      (- (cdr (ly:molecule-get-extent headgl X)) stemth)
+                      (- (cdr (ly:stencil-get-extent headgl X)) stemth)
                       0))
          (attachy (* dir 0.28))
          (stemgl (and (> log 0)
@@ -283,34 +283,34 @@ for DIR, you can obtain longer or shorter stems."
                              (max stemy attachy))
                        (/ stemth 3))))
          (dot (ly:find-glyph-by-name font "dots-dot"))
-         (dotwid (interval-length (ly:molecule-get-extent dot X)))
+         (dotwid (interval-length (ly:stencil-get-extent dot X)))
          (dots (and (> dot-count 0)
-                    (apply ly:molecule-add
+                    (apply ly:stencil-add
                            (map (lambda (x)
-                                  (ly:molecule-translate-axis
+                                  (ly:stencil-translate-axis
                                    dot  (* (+ 1 (* 2 x)) dotwid) X) )
                                 (iota dot-count 1)))))
          (flaggl (and (> log 2)
-                      (ly:molecule-translate
+                      (ly:stencil-translate
                        (ly:find-glyph-by-name font
                                               (string-append "flags-"
                                                              (if (> dir 0) "u" "d")
                                                              (number->string log)))
                        (cons (+ attachx (/ stemth 2)) stemy)))))
     (if flaggl
-        (set! stemgl (ly:molecule-add flaggl stemgl)))
-    (if (ly:molecule? stemgl)
-        (set! stemgl (ly:molecule-add stemgl headgl))
+        (set! stemgl (ly:stencil-add flaggl stemgl)))
+    (if (ly:stencil? stemgl)
+        (set! stemgl (ly:stencil-add stemgl headgl))
         (set! stemgl headgl))
-    (if (ly:molecule? dots)
+    (if (ly:stencil? dots)
         (set! stemgl
-              (ly:molecule-add
-               (ly:molecule-translate-axis dots
+              (ly:stencil-add
+               (ly:stencil-translate-axis dots
                                            (+ (if (and (> dir 0) (> log 2))
                                                   (* 1.5 dotwid)
                                                   0)
                                               ;; huh ? why not necessary?
-                                              ;;(cdr (ly:molecule-get-extent headgl X))
+                                              ;;(cdr (ly:stencil-get-extent headgl X))
                                               dotwid)
                                            X)
                stemgl)))
@@ -346,7 +346,7 @@ a shortened down stem."
 
 (def-markup-command (normal-size-super paper props arg) (markup?)
   "A superscript which does not use a smaller font."
-  (ly:molecule-translate-axis (interpret-markup
+  (ly:stencil-translate-axis (interpret-markup
                                paper
                                props arg)
                               (* 0.5 (cdr (chain-assoc 'baseline-skip props)))
@@ -371,7 +371,7 @@ Raising and lowering texts can be done with @code{\\super} and
 
 "
   
-  (ly:molecule-translate-axis
+  (ly:stencil-translate-axis
    (interpret-markup
     paper
     (cons `((font-size . ,(- (chain-assoc-get 'font-size props 0) 3))) props)
@@ -390,12 +390,12 @@ vertically, for the same reason that @code{\\raise} cannot be used for
 that.
 
 . "
-  (ly:molecule-translate (interpret-markup  paper props arg)
+  (ly:stencil-translate (interpret-markup  paper props arg)
                          offset))
 
 (def-markup-command (sub paper props arg) (markup?)
   "Syntax: \\sub MARKUP."
-  (ly:molecule-translate-axis
+  (ly:stencil-translate-axis
    (interpret-markup
     paper
     (cons `((font-size . ,(- (chain-assoc-get 'font-size props 0) 3))) props)
@@ -404,7 +404,7 @@ that.
    Y))
 
 (def-markup-command (normal-size-sub paper props arg) (markup?)
-  (ly:molecule-translate-axis
+  (ly:stencil-translate-axis
    (interpret-markup paper props arg)
    (* -0.5 (cdr (chain-assoc 'baseline-skip props)))
    Y))
@@ -413,13 +413,13 @@ that.
   "Horizontal brackets around @var{arg}."  
   (let ((th 0.1) ;; todo: take from GROB.
         (m (interpret-markup paper props arg)))
-    (bracketify-molecule m X th (* 2.5 th) th)))
+    (bracketify-stencil m X th (* 2.5 th) th)))
 
 (def-markup-command (bracket paper props arg) (markup?)
   "Vertical brackets around @var{arg}."  
   (let ((th 0.1) ;; todo: take from GROB.
         (m (interpret-markup paper props arg)))
-    (bracketify-molecule m Y th (* 2.5 th) th)))
+    (bracketify-stencil m Y th (* 2.5 th) th)))
 
 ;; todo: fix negative space
 (def-markup-command (hspace paper props amount) (number?)
@@ -431,8 +431,8 @@ will put extra space between A and B, on top of the space that is
 normally inserted before elements on a line.
 "
   (if (> amount 0)
-      (ly:make-molecule "" (cons 0 amount) '(-1 . 1) )
-      (ly:make-molecule "" (cons amount amount) '(-1 . 1))))
+      (ly:make-stencil "" (cons 0 amount) '(-1 . 1) )
+      (ly:make-stencil "" (cons amount amount) '(-1 . 1))))
 
 (def-markup-command (override paper props new-prop arg) (pair? markup?)
   "Add the first argument in to the property list.  Properties may be
@@ -468,7 +468,7 @@ any sort of property supported by @internalsref{font-interface} and
   (let ((th 0.1)
         (pad 0.2)
         (m (interpret-markup paper props arg)))
-    (box-molecule m th pad)))
+    (box-stencil m th pad)))
 
 (def-markup-command (strut paper props) ()
   
@@ -478,7 +478,7 @@ FIXME: is this working?
 "
   
   (let ((m (Text_item::interpret_markup paper props " ")))
-    (ly:molecule-set-extent! m X '(1000 . -1000))
+    (ly:stencil-set-extent! m X '(1000 . -1000))
     m))
 
 (define number->mark-letter-vector (make-vector 25 #\A))
index 31a24cd074cc9ab4edadc2f512cb28a5020c3ed6..bd268611b329f2a3164af726b3f4452dcacde656 100644 (file)
@@ -373,7 +373,7 @@ L1 is copied, L2 not.
   `(
     ("tex" . ("TeX output. The default output form." ,tex-output-expression))
     ("ps" . ("Direct postscript. Requires setting GS_LIB and GS_FONTPATH" ,ps-output-expression))
-    ("scm" . ("Scheme dump: debug scheme molecule expressions" ,write))
+    ("scm" . ("Scheme dump: debug scheme stencil expressions" ,write))
     ("sketch" . ("Bare bones Sketch output." ,sketch-output-expression))
     ("sodipodi" . ("Bare bones Sodipodi output." ,sodipodi-output-expression))
     ("pdftex" . ("PDFTeX output. Was last seen nonfunctioning." ,pdftex-output-expression))
@@ -407,7 +407,7 @@ L1 is copied, L2 not.
        "chord-ignatzek-names.scm"
        "chord-entry.scm"
        "chord-generic-names.scm"
-       "molecule.scm"
+       "stencil.scm"
        "new-markup.scm"
        "bass-figure.scm"
        "music-functions.scm"
diff --git a/scm/molecule.scm b/scm/molecule.scm
deleted file mode 100644 (file)
index 443f6e5..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-
-(define-public (stack-molecules axis dir padding mols)
-  "Stack molecules MOLS in direction AXIS,DIR, using PADDING."
-  (if (null? mols)
-      '()
-      (if (pair? mols)
-         (ly:molecule-combine-at-edge (car mols) axis dir 
-                                      (stack-molecules axis dir padding (cdr mols))
-                                      padding
-                                      )
-         )
-  ))
-
-
-(define-public (stack-lines dir padding baseline mols)
-  "Stack vertically with a baseline-skip."
-  (if (null? mols)
-      '()
-      (if (null? (cdr mols))
-         (car mols)
-         (ly:molecule-combine-at-edge (car mols) Y dir 
-                                      (stack-lines dir padding baseline (cdr mols))
-                                      padding baseline
-                                      )
-         )))
-
-(define-public (fontify-text font-metric text)
-  "Set TEXT with font FONT-METRIC, returning a molecule."
-  (let* ((b  (ly:text-dimension font-metric text)))
-    (ly:make-molecule
-     (ly:fontify-atom font-metric `(text ,text)) (car b) (cdr b))
-    ))
-
-(define-public (bracketify-molecule mol axis thick protusion padding)
-  "Add brackets around MOL, producing a new molecule."
-
-  (let* ((ext (ly:molecule-get-extent mol axis))
-        (lb (ly:bracket axis ext thick (- protusion)))
-        (rb (ly:bracket axis ext thick protusion)))
-    (set! mol (ly:molecule-combine-at-edge mol (other-axis  axis) 1 lb padding))
-    (set! mol (ly:molecule-combine-at-edge mol (other-axis  axis) -1 rb padding))
-    mol
-  ))
-
-(define-public (make-filled-box-molecule xext yext)
-  "Make a filled box."
-  
-  (ly:make-molecule
-      (list 'filledbox (- (car xext)) (cdr xext)
-                       (- (car yext)) (cdr yext))
-      xext yext)                      
-)
-
-
-(define-public (box-grob-molecule grob)
-  "Make a box of exactly the extents of the grob.  The box precisely
-encloses the contents.
-"
-  (let* ((xext (ly:get-extent grob grob 0))
-        (yext (ly:get-extent grob grob 1))
-        (thick 0.1))
-
-    (ly:molecule-add (make-filled-box-molecule xext (cons (- (car yext) thick) (car yext) ))
-                    (make-filled-box-molecule xext (cons  (cdr yext) (+ (cdr yext) thick) ))
-                    (make-filled-box-molecule (cons (cdr xext) (+ (cdr xext) thick)) yext)
-                    (make-filled-box-molecule (cons (- (car xext) thick) (car xext)) yext))))
-
-
-;; TODO merge this and prev function. 
-(define-public (box-molecule mol thick padding)
-  "Add a box around MOL, producing a new molecule."
-  (let* (
-        (x-ext (interval-widen (ly:molecule-get-extent mol 0) padding))
-        (y-ext (interval-widen (ly:molecule-get-extent mol 1) padding))
-        (y-rule (make-filled-box-molecule (cons 0 thick) y-ext))
-        (x-rule (make-filled-box-molecule (interval-widen x-ext thick)
-                                          (cons 0 thick)))
-        )
-    (set! mol (ly:molecule-combine-at-edge mol X 1 y-rule padding))
-    (set! mol (ly:molecule-combine-at-edge mol X -1 y-rule padding))
-    (set! mol (ly:molecule-combine-at-edge mol Y 1 x-rule 0.0))  
-    (set! mol (ly:molecule-combine-at-edge mol Y -1 x-rule 0.0))
-    
-    mol))
index e7a5d22ce3b9ce35354bca78099aa5c35eb59060..43f493d79e1a77a6198a6c784df1fb6aab26bdfa 100644 (file)
@@ -10,7 +10,7 @@ When the markup is formatted, then FUNCTION is called as follows
 GROB is the current grob, PROPS is a list of alists, and ARG1.. are
 the rest of the arguments.
 
-The function should return a molecule (i.e. a formatted, ready to
+The function should return a stencil (i.e. a formatted, ready to
 print object).
 
 
@@ -360,7 +360,7 @@ Also set markup-signature and markup-keyword object properties."
       (make-line-markup (list-insert-separator markups sep))
       empty-markup))
 
-(define-public brew-new-markup-molecule Text_item::print)
+(define-public brew-new-markup-stencil Text_item::print)
 (define-public interpret-markup Text_item::interpret_markup)
 (define-public (prepend-alist-chain key val chain)
   (cons (acons key val (car chain)) (cdr chain)))
@@ -368,15 +368,15 @@ Also set markup-signature and markup-keyword object properties."
 
 
 
-(define-public (stack-molecule-line space molecules)
-  (if (pair? molecules)
-      (if (pair? (cdr molecules))
-          (let* ((tail (stack-molecule-line  space (cdr molecules)))
-                 (head (car molecules))
-                 (xoff (+ space (cdr (ly:molecule-get-extent head X)))))
-            (ly:molecule-add head
-                             (ly:molecule-translate-axis tail xoff X)))
-          (car molecules))
+(define-public (stack-stencil-line space stencils)
+  (if (pair? stencils)
+      (if (pair? (cdr stencils))
+          (let* ((tail (stack-stencil-line  space (cdr stencils)))
+                 (head (car stencils))
+                 (xoff (+ space (cdr (ly:stencil-get-extent head X)))))
+            (ly:stencil-add head
+                             (ly:stencil-translate-axis tail xoff X)))
+          (car stencils))
       '()))
 
 
index 2809f56707914d382f252e983e36826271445464..bd839657dea9feed5890ccae96308b1bce8cc672 100644 (file)
 (define (tablature-stem-attachment-function style duration)
   (cons 0.0 0.5))
 
-; The TabNoteHead molecule callback.
-; Create a text molecule
+; The TabNoteHead stencil callback.
+; Create a text stencil
 (define-public (tablature-print-function grob)
-  (let ((molecule (fontify-text
+  (let ((stencil (fontify-text
                    (ly:get-default-font grob)
                    (ly:get-grob-property grob 'text)
                    )))
-    molecule ; return the molecule.
+    stencil ; return the stencil.
     ))
 
 ; The TabNoteHead tablatureFormat callback.
     (let ((slur (Slur::print grob))
           (text (fontify-text (ly:get-default-font grob) letter)))
     
-      (let ((x (/ (- (cdr (ly:molecule-get-extent slur 0)) 
-                     (/ (cdr (ly:molecule-get-extent text 0)) 2.0)
+      (let ((x (/ (- (cdr (ly:stencil-get-extent slur 0)) 
+                     (/ (cdr (ly:stencil-get-extent text 0)) 2.0)
                      )
                   -2.0)))
       
-        (ly:molecule-set-extent! text 0 (cons x x))
-        (ly:molecule-align-to! text 0 1)
+        (ly:stencil-set-extent! text 0 (cons x x))
+        (ly:stencil-align-to! text 0 1)
         )
 
-      (ly:molecule-combine-at-edge slur 1 1 text -0.6)
+      (ly:stencil-combine-at-edge slur 1 1 text -0.6)
       ) ) )
 
 
 ; end of tablature functions
 
 
-(define-public (make-molecule-boxer line-thick x-padding y-padding callback)
+(define-public (make-stencil-boxer line-thick x-padding y-padding callback)
    "Makes a routine that adds a box around the grob parsed as argument"
-  (define (molecule-boxer grob)
+  (define (stencil-boxer grob)
   (let*
    (
     (mol    (callback grob))
-    (x-ext (interval-widen (ly:molecule-get-extent mol 0) x-padding))
-    (y-ext (interval-widen (ly:molecule-get-extent mol 1) y-padding))
-    (x-rule (make-filled-box-molecule (interval-widen x-ext line-thick)
+    (x-ext (interval-widen (ly:stencil-get-extent mol 0) x-padding))
+    (y-ext (interval-widen (ly:stencil-get-extent mol 1) y-padding))
+    (x-rule (make-filled-box-stencil (interval-widen x-ext line-thick)
                               (cons 0 line-thick)))
-    (y-rule (make-filled-box-molecule (cons 0 line-thick) y-ext))
+    (y-rule (make-filled-box-stencil (cons 0 line-thick) y-ext))
     )
     
-    (set! mol (ly:molecule-combine-at-edge mol 0 1 y-rule x-padding))
-    (set! mol (ly:molecule-combine-at-edge mol 0 -1  y-rule x-padding))
-    (set! mol (ly:molecule-combine-at-edge mol 1 1  x-rule 0))  
-    (set! mol (ly:molecule-combine-at-edge mol 1 -1 x-rule 0))
+    (set! mol (ly:stencil-combine-at-edge mol 0 1 y-rule x-padding))
+    (set! mol (ly:stencil-combine-at-edge mol 0 -1  y-rule x-padding))
+    (set! mol (ly:stencil-combine-at-edge mol 1 1  x-rule 0))  
+    (set! mol (ly:stencil-combine-at-edge mol 1 -1 x-rule 0))
     
     mol
  ))
molecule-boxer
stencil-boxer
  )
 
 (define-public (arg->string arg)
index d8f1be5e356dfe232a99de8f780d819ec12f3ce9..d125b6c95adaa26fc115f049b0376b0df31d7dc4 100644 (file)
       (append 
        '(("thumb" .
          (
-          (script-molecule . (feta . ("thumb"  . "thumb")))
+          (script-stencil . (feta . ("thumb"  . "thumb")))
           (direction . 1)))
         ("accent" .
          (
-          (script-molecule . (feta . ("sforzato" .  "sforzato")))
+          (script-stencil . (feta . ("sforzato" .  "sforzato")))
           (side-relative-direction . -1))
          )      
         ("marcato" .
          (
-          (script-molecule . (feta . ("dmarcato" . "umarcato")))
+          (script-stencil . (feta . ("dmarcato" . "umarcato")))
           (side-relative-direction .  -1)))
         ("staccatissimo" .
          (
-          (script-molecule . (feta . ("dstaccatissimo" . "ustaccatissimo")))
+          (script-stencil . (feta . ("dstaccatissimo" . "ustaccatissimo")))
           (side-relative-direction .  -1)))
         
         ("portato" .
-         ((script-molecule . (feta . ("dportato" . "uportato")))
+         ((script-stencil . (feta . ("dportato" . "uportato")))
           (side-relative-direction . -1)))
 
         ("accentus" .
-         ((script-molecule . (feta . ("uaccentus" . "uaccentus")))
+         ((script-stencil . (feta . ("uaccentus" . "uaccentus")))
           (side-relative-direction .  -1)
           (follow-into-staff  . #t)
           (priority . -100)
           (direction  . 1)))
         ("ictus" .
-         ((script-molecule . (feta . ("ictus" . "ictus")))
+         ((script-stencil . (feta . ("ictus" . "ictus")))
           (side-relative-direction .  -1)
           (follow-into-staff  . #t)
           (priority . -100)
           (direction  . -1)))
         ("semicirculus" .
-         ((script-molecule . (feta . ("dsemicirculus" . "dsemicirculus")))
+         ((script-stencil . (feta . ("dsemicirculus" . "dsemicirculus")))
           (side-relative-direction .  -1)
           (follow-into-staff  . #t)
           (priority . -100)
           (direction  . 1)))
         ("circulus" .
-         ((script-molecule . (feta . ("circulus" . "circulus")))
+         ((script-stencil . (feta . ("circulus" . "circulus")))
           (side-relative-direction .  -1)
           (follow-into-staff  . #t)
           (priority . -100)
           (direction  . 1)))
 
         ("signumcongruentiae" .
-         ((script-molecule . (feta . ("dsignumcongruentiae" . "usignumcongruentiae")))
+         ((script-stencil . (feta . ("dsignumcongruentiae" . "usignumcongruentiae")))
           (direction .  1)))
         ("fermata" .
-         ((script-molecule . (feta . ("dfermata" . "ufermata")))
+         ((script-stencil . (feta . ("dfermata" . "ufermata")))
           (direction .  1)))
         ("shortfermata" .
-         ((script-molecule . (feta . ("dshortfermata" . "ushortfermata")))
+         ((script-stencil . (feta . ("dshortfermata" . "ushortfermata")))
           (direction .  1)))
         ("longfermata" .
-         ((script-molecule . (feta . ("dlongfermata" . "ulongfermata")))
+         ((script-stencil . (feta . ("dlongfermata" . "ulongfermata")))
           (direction .  1)))
         ("verylongfermata" .
-         ((script-molecule . (feta . ("dverylongfermata" . "uverylongfermata")))
+         ((script-stencil . (feta . ("dverylongfermata" . "uverylongfermata")))
           (direction .  1)))
         ("stopped" .
-         ((script-molecule . (feta . ("stopped" . "stopped")))
+         ((script-stencil . (feta . ("stopped" . "stopped")))
           (direction  . 1) ))
         ("staccato" .
-         ((script-molecule . (feta . ("staccato" . "staccato")))
+         ((script-stencil . (feta . ("staccato" . "staccato")))
           (side-relative-direction .  -1)
           (follow-into-staff  . #t)
           (priority . -100)))
         ("tenuto" .
-         ((script-molecule . (feta . ("tenuto" . "tenuto")))
+         ((script-stencil . (feta . ("tenuto" . "tenuto")))
           (follow-into-staff . #t)
           (side-relative-direction . -1)))
         ("comma" .
-         ((script-molecule . (feta . ("lcomma" . "rcomma")))
+         ((script-stencil . (feta . ("lcomma" . "rcomma")))
           (follow-into-staff . #t)
           (direction . 1)))
         ("varcomma" .
-         ((script-molecule . (feta . ("lvarcomma" . "rvarcomma")))
+         ((script-stencil . (feta . ("lvarcomma" . "rvarcomma")))
           (follow-into-staff . #t)
           (direction . 1)))
         ("upbow" .
-         ((script-molecule . (feta . ("upbow" . "upbow")))
+         ((script-stencil . (feta . ("upbow" . "upbow")))
           (direction  . 1) ))
         ("downbow" .
-         ((script-molecule . (feta . ("downbow" . "downbow")))
+         ((script-stencil . (feta . ("downbow" . "downbow")))
           (direction  . 1) ))
         ("lheel" .
-         ((script-molecule . (feta . ("upedalheel" . "upedalheel")))
+         ((script-stencil . (feta . ("upedalheel" . "upedalheel")))
           (direction .  -1))
          )
         ("rheel" .
-         ((script-molecule . (feta . ("dpedalheel" . "dpedalheel")))
+         ((script-stencil . (feta . ("dpedalheel" . "dpedalheel")))
           (direction  . 1) ))
         ("ltoe" .
-         ((script-molecule . (feta . ("upedaltoe" . "upedaltoe")))
+         ((script-stencil . (feta . ("upedaltoe" . "upedaltoe")))
           (direction  . -1) ))
         ("rtoe" .
-         ((script-molecule . (feta . ("dpedaltoe" . "dpedaltoe")))
+         ((script-stencil . (feta . ("dpedaltoe" . "dpedaltoe")))
           (direction  . 1) ))
         ("turn" .
-         ((script-molecule . (feta . ("turn" . "turn")))
+         ((script-stencil . (feta . ("turn" . "turn")))
           (direction  . 1) ))
         ("open" .
-         ((script-molecule . (feta . ("open" . "open")))
+         ((script-stencil . (feta . ("open" . "open")))
           (direction  . 1) ))
         ("flageolet" .
-         ((script-molecule . (feta . ("flageolet" . "flageolet")))
+         ((script-stencil . (feta . ("flageolet" . "flageolet")))
           (direction  . 1) ))
         ("reverseturn" .
-         ((script-molecule . (feta . ("reverseturn" . "reverseturn")))
+         ((script-stencil . (feta . ("reverseturn" . "reverseturn")))
           (direction  . 1) ))
         ("trill" .
-         ((script-molecule . (feta . ("trill" . "trill")))
+         ((script-stencil . (feta . ("trill" . "trill")))
           (direction . 1)
           (priority . 2000)))
         ("prall" .
-         ((script-molecule . (feta . ("prall" . "prall")))
+         ((script-stencil . (feta . ("prall" . "prall")))
           (direction  . 1) ))
         ("mordent" .
-         ((script-molecule . (feta . ("mordent" . "mordent")))
+         ((script-stencil . (feta . ("mordent" . "mordent")))
           (direction  . 1) ))
         ("prallprall" .
-         ((script-molecule . (feta . ("prallprall" . "prallprall")))
+         ((script-stencil . (feta . ("prallprall" . "prallprall")))
           (direction  . 1) ))
         ("prallmordent" .
-         ((script-molecule . (feta . ("prallmordent" . "prallmordent")))
+         ((script-stencil . (feta . ("prallmordent" . "prallmordent")))
           (direction  . 1) ))
         ("upprall" .
-         ((script-molecule . (feta . ("upprall" . "upprall")))
+         ((script-stencil . (feta . ("upprall" . "upprall")))
           (direction  . 1) ))
         ("downprall" .
-         ((script-molecule . (feta . ("downprall" . "downprall")))
+         ((script-stencil . (feta . ("downprall" . "downprall")))
           (direction  . 1) ))
         ("upmordent" .
-         ((script-molecule . (feta . ("upmordent" . "upmordent")))
+         ((script-stencil . (feta . ("upmordent" . "upmordent")))
           (direction  . 1) ))
         ("downmordent" .
-         ((script-molecule . (feta . ("downmordent" . "downmordent")))
+         ((script-stencil . (feta . ("downmordent" . "downmordent")))
           (direction  . 1) ))
         ("lineprall" .
-         ((script-molecule . (feta . ("lineprall" . "lineprall")))
+         ((script-stencil . (feta . ("lineprall" . "lineprall")))
           (direction  . 1) ))
         ("pralldown" .
-         ((script-molecule . (feta . ("pralldown" . "pralldown")))
+         ((script-stencil . (feta . ("pralldown" . "pralldown")))
           (direction  . 1) ))
         ("prallup" .
-         ((script-molecule . (feta . ("prallup" . "prallup")))
+         ((script-stencil . (feta . ("prallup" . "prallup")))
           (direction  . 1) ))
         ("segno" .
-         ((script-molecule . (feta . ("segno" . "segno")))
+         ((script-stencil . (feta . ("segno" . "segno")))
           (direction  . 1) ))
         ("coda" .
-         ((script-molecule . (feta . ("coda" . "coda")))
+         ((script-stencil . (feta . ("coda" . "coda")))
           (direction  . 1) ))
         ("varcoda" .
-         ((script-molecule . (feta . ("varcoda" . "varcoda")))
+         ((script-stencil . (feta . ("varcoda" . "varcoda")))
           (direction  . 1) )))
        default-script-alist)
       )
diff --git a/scm/stencil.scm b/scm/stencil.scm
new file mode 100644 (file)
index 0000000..81869ae
--- /dev/null
@@ -0,0 +1,84 @@
+
+(define-public (stack-stencils axis dir padding mols)
+  "Stack stencils MOLS in direction AXIS,DIR, using PADDING."
+  (if (null? mols)
+      '()
+      (if (pair? mols)
+         (ly:stencil-combine-at-edge (car mols) axis dir 
+                                      (stack-stencils axis dir padding (cdr mols))
+                                      padding
+                                      )
+         )
+  ))
+
+
+(define-public (stack-lines dir padding baseline mols)
+  "Stack vertically with a baseline-skip."
+  (if (null? mols)
+      '()
+      (if (null? (cdr mols))
+         (car mols)
+         (ly:stencil-combine-at-edge (car mols) Y dir 
+                                      (stack-lines dir padding baseline (cdr mols))
+                                      padding baseline
+                                      )
+         )))
+
+(define-public (fontify-text font-metric text)
+  "Set TEXT with font FONT-METRIC, returning a stencil."
+  (let* ((b  (ly:text-dimension font-metric text)))
+    (ly:make-stencil
+     (ly:fontify-atom font-metric `(text ,text)) (car b) (cdr b))
+    ))
+
+(define-public (bracketify-stencil mol axis thick protusion padding)
+  "Add brackets around MOL, producing a new stencil."
+
+  (let* ((ext (ly:stencil-get-extent mol axis))
+        (lb (ly:bracket axis ext thick (- protusion)))
+        (rb (ly:bracket axis ext thick protusion)))
+    (set! mol (ly:stencil-combine-at-edge mol (other-axis  axis) 1 lb padding))
+    (set! mol (ly:stencil-combine-at-edge mol (other-axis  axis) -1 rb padding))
+    mol
+  ))
+
+(define-public (make-filled-box-stencil xext yext)
+  "Make a filled box."
+  
+  (ly:make-stencil
+      (list 'filledbox (- (car xext)) (cdr xext)
+                       (- (car yext)) (cdr yext))
+      xext yext)                      
+)
+
+
+(define-public (box-grob-stencil grob)
+  "Make a box of exactly the extents of the grob.  The box precisely
+encloses the contents.
+"
+  (let* ((xext (ly:get-extent grob grob 0))
+        (yext (ly:get-extent grob grob 1))
+        (thick 0.1))
+
+    (ly:stencil-add (make-filled-box-stencil xext (cons (- (car yext) thick) (car yext) ))
+                    (make-filled-box-stencil xext (cons  (cdr yext) (+ (cdr yext) thick) ))
+                    (make-filled-box-stencil (cons (cdr xext) (+ (cdr xext) thick)) yext)
+                    (make-filled-box-stencil (cons (- (car xext) thick) (car xext)) yext))))
+
+
+;; TODO merge this and prev function. 
+(define-public (box-stencil mol thick padding)
+  "Add a box around MOL, producing a new stencil."
+  (let* (
+        (x-ext (interval-widen (ly:stencil-get-extent mol 0) padding))
+        (y-ext (interval-widen (ly:stencil-get-extent mol 1) padding))
+        (y-rule (make-filled-box-stencil (cons 0 thick) y-ext))
+        (x-rule (make-filled-box-stencil (interval-widen x-ext thick)
+                                          (cons 0 thick)))
+        )
+    (set! mol (ly:stencil-combine-at-edge mol X 1 y-rule padding))
+    (set! mol (ly:stencil-combine-at-edge mol X -1 y-rule padding))
+    (set! mol (ly:stencil-combine-at-edge mol Y 1 x-rule 0.0))  
+    (set! mol (ly:stencil-combine-at-edge mol Y -1 x-rule 0.0))
+    
+    mol))
index 712f4631323b4f4d2c76621cf6a10452d641c651..07f0a387b3189d8c56345cb50eab038d427f98db 100644 (file)
@@ -1845,6 +1845,33 @@ Grob::preset_extent removed.
 """ ))
 
 
+def conv (str):
+       str = re.sub (r'\\property\s+([^.]+)\s*\.\s*([^\\=]+)\s*\\(set|override)',
+                     r"\\overrid@ \1.\2 ", str)
+       str = re.sub (r'\\property\s+([^. ]+)\s*\.\s*([^\\= ]+)\s*=',
+                     r'\\s@t \1.\2 = ', str)
+       str = re.sub (r'\\property\s+([^. ]+)\s*\.\s*([^\\= ]+)\s*\\unset',
+                     r'\\uns@t \1.\2 ', str)
+       str = re.sub (r'\\property\s+([^. ]+)\s*\.\s*([^\\= ]+)\s*\\revert'
+                     + r"\s*#'([-a-z0-9_]+)",
+                     r"\\rev@rt \1.\2 #'\3", str)
+       str = re.sub (r'Voice\.', '', str)
+       str = re.sub (r'Lyrics\.', '', str)
+       str = re.sub (r'ChordNames\.', '', str)
+       
+       str = re.sub ('rev@rt', 'revert',str)
+       str = re.sub ('s@t', 'set',str)
+       str = re.sub ('overrid@', 'override',str)
+
+       str = re.sub ('molecule', 'stencil', str)
+       str = re.sub ('Molecule', 'Stencil', str)
+       return str
+
+conversions.append (((2,1,22), conv, """new syntax for property settings:
+       \set A.B = #C , \unset A.B
+       \override A.B #C = #D, \revert A.B #C
+
+"""))
 
 
 ################################
index 482957c5585f07011bc0423855feb639c058cb3b..e4fa7b301eaea9d947564298a01c8eadcbe08df3 100644 (file)
@@ -15,8 +15,8 @@ $(outdir)/%.dvi: $(outdir)/%.latex
 
 
 $(outdir)/%.ps: $(outdir)/%.dvi
-       cd $(outdir) && dvips -t $(DVIPS_PAPERSIZE) -o $(@F) $(<F)
+       cd $(outdir) && dvips $(DVIPS_FLAGS) -t $(DVIPS_PAPERSIZE) -o $(@F) $(<F)
 
 $(outdir)-$(PAPERSIZE)/%.ps: $(outdir)-$(PAPERSIZE)/%.dvi
-       cd $(outdir)-$(PAPERSIZE) && dvips -t$(PAPERSIZE) -o $(@F) $(<F)
+       cd $(outdir)-$(PAPERSIZE) && dvips $(DVIPS_FLAGS)  -t$(PAPERSIZE) -o $(@F) $(<F)