]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.3.83 release/1.3.83
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 1 Sep 2000 12:13:25 +0000 (14:13 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 1 Sep 2000 12:13:25 +0000 (14:13 +0200)
======

* small doc updates.

* Cleanups related to barline handling:

  - Removed Translator_group::get_simple_translator (), and -

  - use properties to communicate about barlines and time sigs. (NOTE:
    by default a time-signature of 4/4 is printed.)

  - fix repeat bar behavior.

* cleaned up Directional_element_interface

* add name field to score-elements.

* comment in some unprotects for Music in parser. Should bring down
  cpu time and plug some leaks.

* robustness fixes for etf2ly, tuplets, grace notes.

1.3

62 files changed:
CHANGES
Documentation/bibliography/computer-notation.bib
Documentation/faq.texi
Documentation/topdocs/INSTALL.texi
Documentation/user/mudela-book.tely
INSTALL.txt
VERSION
buildscripts/pmx2ly.py
flower/include/cons.hh
lily/align-note-column-engraver.cc
lily/bar-engraver.cc
lily/bar.cc
lily/beam.cc
lily/breathing-sign.cc
lily/chord-tremolo-engraver.cc
lily/chord.cc
lily/command-request.cc
lily/directional-element-interface.cc
lily/dot-column.cc
lily/dots.cc
lily/dynamic-engraver.cc
lily/engraver.cc
lily/group-interface.cc
lily/include/bar-engraver.hh
lily/include/chord.hh
lily/include/command-request.hh
lily/include/directional-element-interface.hh
lily/include/group-interface.hh
lily/include/music.hh
lily/include/repeated-music.hh
lily/include/score-element.hh
lily/include/span-bar.hh
lily/include/timing-engraver.hh [deleted file]
lily/include/timing-translator.hh
lily/include/translator-group.hh
lily/key-engraver.cc
lily/my-lily-parser.cc
lily/parser.yy
lily/pointer-group-interface.cc
lily/repeat-engraver.cc
lily/repeated-music.cc
lily/score-element.cc
lily/score-engraver.cc
lily/separating-group-spanner.cc
lily/slur.cc
lily/span-bar-engraver.cc
lily/span-bar.cc
lily/spanner.cc
lily/stem-tremolo.cc
lily/stem.cc
lily/tie-column.cc
lily/tie.cc
lily/time-signature-engraver.cc
lily/timing-engraver.cc
lily/timing-translator.cc
lily/translator-group.cc
lily/tuplet-spanner.cc
lily/volta-spanner.cc
ly/engraver.ly
make/out/lilypond.lsm
make/out/lilypond.spec
scripts/etf2ly.py

diff --git a/CHANGES b/CHANGES
index ac2b7778ce9df8050ef9e31d158cace7a27f4340..1e2dd72443c7d1bdc2d928127d247b0986b17ed1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,22 @@
 
-1.3.82.hwn1
-===========
+1.3.83
+======
+
+* small doc updates.
+
+* Cleanups related to barline handling:
+
+  - Removed Translator_group::get_simple_translator (), and -
+
+  - use properties to communicate about barlines and time sigs. (NOTE:
+    by default a time-signature of 4/4 is printed.)
+
+  - fix repeat bar behavior.
+
+
+* cleaned up Directional_element_interface
+
+* add name field to score-elements.
 
 * comment in some unprotects for Music in parser. Should bring down
   cpu time and plug some leaks.
index 72ce9c38aa97f8b83c70a83cba29ad7e46a2a8ff..00a3e9cd8dae108f2822eb86d59b3b92caf20c22 100644 (file)
@@ -541,7 +541,8 @@ surprising that LilyPond is more mature.
   title = {how to read and write tab: a guide to tab notation},
   author = {Howard Wright},
   email={Howard.Wright@ed.ac.uk},
-  HTML={http://wabakimi.carleton.ca/~phacket2/guitar/tabfaq.html},
+  HTML={http://www.guitartabs.cc/tabfaq.shtml}
+%  HTML={http://wabakimi.carleton.ca/~phacket2/guitar/tabfaq.html},
 }
 
 
index ae39d2e12bf513a5b604efd68a0562f1b29d79fc..298e69af76abb68b43b4b4c0773932e50c2a3c06 100644 (file)
@@ -22,6 +22,8 @@
 @node Miscellaneous, ,,top
 @section Miscellaneous
 
+[FIXME: rewrite FAQ, include general questions] 
+
 @subsubsection HELP! I'm stuck!
 
 Please read this document carefully.  If you are still at loss, send
@@ -160,7 +162,7 @@ symbols (notably lyrics and @code{^"text"} commands).
 
 Yes, see the @file{twinkle-pop} example.
 
-@subsubsection Do you support guitar chord diagrams?
+@subsubsection Do you support guitar fret diagrams?
 
 No. We ourselves don't play guitar, and don't know the fine points of
 this notation.  We would welcome anyone who could give this a try.
@@ -169,7 +171,6 @@ this notation.  We would welcome anyone who could give this a try.
 
 No. The same as for the previous question goes.
 
-
 @subsubsection Do you support multiple staff-sizes?
 
 Yes.  At this time you can choose between 11, 13, 16, 19, 20, 23 and 20
@@ -249,7 +250,7 @@ staff/lyricline
  
 @end example 
 
-@subsubsection How do I put more than one marking on a note.
+@subsubsection How do I put more than one marking on a note?
 
 You can stack them 
 @example 
@@ -276,7 +277,7 @@ This also works for crescendi, eg,
  
 @end example 
 
-@subsubsection How do I combine multiple pieces into one document
+@subsubsection How do I combine multiple pieces into one document?
 
 There are several solutions:
 
@@ -308,10 +309,6 @@ in each individual piece from toplevel into the @code{\paper} block.
 
 There are several examples in the @file{mutopia} directory.
 
-@subsubsection How do I get bar numbers?
-
-See @file{input/test/bar-scripts.ly}.
-
 @subsubsection How do I change the tagline 'Lily was here'?
 
 In the @code{\header} field, add a @code{tagline} entry, e.g.
@@ -384,23 +381,16 @@ participate.
 
 @subsubsection Is there a GUI frontend?  Should I start building one?
 
-LilyPond currently has no graphical interface.  We (LilyPond authors)
-don't feel the need to write a GUI, but several others do:
-
-Matthew Hiller has extended Midiscore and Koobase to handle mudela.
-Check out @uref{http://zoo.cs.yale.edu/~meh25/}.  He is now working on
-`Denemo', a GTK based notation program (which is still being developed).
-
-Federico Mena-Quintero and Elliot Lee of RedHat Advanced Development
-labs have plans to write a GNOME based Music notation program. However,
-there is no code, only plans.
+Matthew Hiller has extended Midiscore and Koobase to handle mudela, He
+is now working on @uref{http://denemo.sourceforge.net/,Denemo}, a GTK
+based notation program. This is the most advanced LilyPond front-end
+currently available.
 
 Chris Cannam is working a rewrite of Rosegarden.  The new design should
 be more modular, and could conceivably be used to output
 mudela. However, the not much seems to have happened the past year. See
 @uref{http://www.all-day-breakfast.com/rosegarden/development.html}.
 
-
 @subsubsection I want to implement XXXX!  How should I do this?
 
 Your best bet of getting us to include code, is to present it as a
@@ -427,7 +417,7 @@ the file ~/.gdbinit.
 
 @example
 define printstr
-    print $arg0->strh_.data->data_byte_p_
+    print $arg0->ch_C()
 end
 
 define printscm
@@ -449,8 +439,8 @@ LilyPond uses a lot CPU time, and insane amounts of memory. The amount
 of memory it requires is proportional to the size of the score, in other
 words. For a moderately complex piano scores of 5 pages, the footprint
 can easily become 20 megs. (Our favorite test is the coriolan:
-approx. 100 megs for a 50 page  orchestral). If your system has not got
-enough memory, it can easily start swapping.
+approx. 100 megs for a 50 page orchestral score). If your system has not
+got enough memory, it can easily start swapping.
 
 A part of the memory is used as temporary storage, and is reclaimed
 through GUILE's garbage collection.  A way to trade in CPU time for
@@ -587,8 +577,8 @@ i.e. do something like:
 
 @end itemize
 
-Direct PS output is still experimental.  For creating nice looking ps 
-output, use TeX and @code{dvips}.
+Direct PS output is not used often, and therefore likely to exhibit
+bugs.  For creating nice looking ps output, use TeX and @code{dvips}.
 
   
 @subsubsection The beams and slurs are gone when using the XDvi magnifying glass!?
@@ -764,6 +754,21 @@ See @uref{http://www.geocities.com/Vienna/Studio/1714/harpsichord.html}
 for a summary of copyright relative to old music, also for the
 expert forum for such subsubsections.
 
+Benjy (benjy@@indiansprings.org)
+
+@quotation
+(In the UK, the typesetting of a piece of music goes out of copyright 25 year\s
+after it is published.  Maybe you can tell me what copyright law says in othe\r
+countries.)
+@end quotation
+
+The US has had several schemes over the last century meaning that
+anything published after January 1, 1923 and before 1964 requires that
+you put in some work to determine its status. However, anything
+published before 1923 is fair game in the US. See
+@uref{http://www.loc.gov/copyright/circs/circ22.html} for the whole
+twisted tale.
+
 
 @node Windows32,, ,top
 @section Windows32
index 3583f2a77242b99e9f5b1e084f910aebaa406efc..d06812d6e42879b0d3c6e4b8664feb6e851da2bb 100644 (file)
@@ -182,9 +182,6 @@ man2html can be had from @uref{http://askdonald.ask.uni-karlsruhe.de/hppd/hpux/N
 The website will build without this utility, but you will not see our
 hypertextified bibliography.
 
-@item @uref{http://www.zib.de/Visual/software/doc++/index.html,DOC++}
-    A documentation system for C++ sources, which is used for the
-    LilyPond sources.
 @end itemize
 
 @section Configuring and compiling
@@ -203,17 +200,20 @@ to install GNU LilyPond, simply type:
 This will install a number of files, something close to:
 
 @example 
-       /usr/local/man/man1/mi2mu.1
+       /usr/local/man/man1/midi2ly.1
+       /usr/local/man/man1/abc2ly.1
+       /usr/local/man/man1/etf2ly.1
        /usr/local/man/man1/convert-mudela.1
        /usr/local/man/man1/mudela-book.1
        /usr/local/man/man1/lilypond.1
        /usr/local/bin/lilypond
-       /usr/local/bin/mi2mu
+       /usr/local/bin/midi2ly
        /usr/local/bin/convert-mudela
        /usr/local/bin/mudela-book
        /usr/local/bin/abc2ly
+       /usr/local/bin/etf2ly
        /usr/local/share/lilypond/*
-       /usr/local/share/locale/@{it,nl@}/LC_MESSAGES/lilypond.mo
+       /usr/local/share/locale/@{....@}/LC_MESSAGES/lilypond.mo
 @end example 
 
 
@@ -339,8 +339,7 @@ You can make the rpm by issuing
 @end example 
 
 Precompiled i386 RedHat RPMS are available from
-@uref{ftp://freshmeat.net/pub/rpms/lilypond/,ftp://freshmeat.net/pub/rpms/lilypond/} and
-@uref{http://linux.umbc.edu/software/lilypond/rpms/,http://linux.umbc.edu/software/lilypond/rpms/}.
+@uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/RedHat/}.
 
 For compilation on a RedHat system you need these packages,
 in addition to the those needed for running:
@@ -374,10 +373,10 @@ mailing your problems.
 If you find bugs, please send bug reports to
 @email{bug-gnu-music@@gnu.org}.
 
-Known bugs that are LilyPond's fault are listed in @file{TODO}, or
-demonstrated in @file{input/bugs/}.
+Bugs that are LilyPond's fault are listed in our TODO list on the
+web, or demonstrated in @file{input/bugs/}.
 
-Known bugs that are not LilyPond's fault are documented here.
+Bugs that are not LilyPond's fault are documented here.
 
 
 @unnumbered LinuxPPC Bugs:
index 6c7bdacef20468bb03c3f8429e862e5be3de4def..65ef7fa7366c78baf7bd3a91a9e16d229ea096cf 100644 (file)
@@ -150,12 +150,12 @@ will set the @code{linewidth} variable to -1, so Lilypond
 will make the music as short as possible but without breaking the
 line. Here is a well know harmonic progression:
 @mudela[veryverbatim, intertext="produce a well known harmonic progression:"]
-  <c' e g> <b d g> <c2 e g>
+  \context Voice { <c' e g> <b d g> <c2 e g> }
 @end mudela
 
 If you want to place music examples in the text,
 @mudela[eps]
-  <c' e g> <b d g> <c2 e g>
+\context Voice {  <c' e g> <b d g> <c2 e g>}
 @end mudela
 , you can use the @code{eps} option. This will create the music as
 eps graphics and include it into the document with the 
@@ -164,7 +164,7 @@ eps graphics and include it into the document with the
 The code used look like this:
 @example
 @@mudela[eps]
-  <c' e g> <b d g> <c2 e g>
+ \context Voice { <c' e g> <b d g> <c2 e g> }
 @@end mudela
 @end example
 
index 378400dc449ef12e2db9fb6ddb23dfb99c39bf72..73a3a997dda2fa1c614d5f816eb10922d73c9df0 100644 (file)
@@ -170,9 +170,6 @@ additional conversion tools.
      The website will build without this utility, but you will not see
      our hypertextified bibliography.
 
-   * DOC++ (http://www.zib.de/Visual/software/doc++/index.html)     A
-     documentation system for C++ sources, which is used for the
-     LilyPond sources.
 
 Configuring and compiling
 =========================
@@ -187,17 +184,20 @@ Configuring and compiling
 
    This will install a number of files, something close to:
 
-       /usr/local/man/man1/mi2mu.1
+       /usr/local/man/man1/midi2ly.1
+       /usr/local/man/man1/abc2ly.1
+       /usr/local/man/man1/etf2ly.1
        /usr/local/man/man1/convert-mudela.1
        /usr/local/man/man1/mudela-book.1
        /usr/local/man/man1/lilypond.1
        /usr/local/bin/lilypond
-       /usr/local/bin/mi2mu
+       /usr/local/bin/midi2ly
        /usr/local/bin/convert-mudela
        /usr/local/bin/mudela-book
        /usr/local/bin/abc2ly
+       /usr/local/bin/etf2ly
        /usr/local/share/lilypond/*
-       /usr/local/share/locale/{it,nl}/LC_MESSAGES/lilypond.mo
+       /usr/local/share/locale/{....}/LC_MESSAGES/lilypond.mo
 
    The above assumes that you are root and have the GNU development
 tools, and your make is GNU make.  If this is not the case, you can
@@ -300,10 +300,7 @@ Redhat linux
        rpm -i /usr/src/redhat/RPMS/i386/lilypond-x.y.z
 
    Precompiled i386 RedHat RPMS are available from
-ftp://freshmeat.net/pub/rpms/lilypond/
-(ftp://freshmeat.net/pub/rpms/lilypond/) and
-http://linux.umbc.edu/software/lilypond/rpms/
-(http://linux.umbc.edu/software/lilypond/rpms/).
+`ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/RedHat/'.
 
    For compilation on a RedHat system you need these packages, in
 addition to the those needed for running:
@@ -343,10 +340,10 @@ your problems.
 
    If you find bugs, please send bug reports to <bug-gnu-music@gnu.org>.
 
-   Known bugs that are LilyPond's fault are listed in `TODO', or
-demonstrated in `input/bugs/'.
+   Bugs that are LilyPond's fault are listed in our TODO list on the
+web, or demonstrated in `input/bugs/'.
 
-   Known bugs that are not LilyPond's fault are documented here.
+   Bugs that are not LilyPond's fault are documented here.
 
 LinuxPPC Bugs:
 **************
diff --git a/VERSION b/VERSION
index f51aeee26b7db45c5451b87e93ab7497da8cf221..745ecaa54b98dd35ca73d1188ad3e5db6830866b 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,8 +1,8 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
-PATCH_LEVEL=82
-MY_PATCH_LEVEL=hwn1
+PATCH_LEVEL=83
+MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 58d32cb4bb6cda7c7664901f6aaa0c8904ceb58a..2f9155005e2ff413f40aab469852d5f34b2987c6 100644 (file)
 #!@PYTHON@
+
+# (urg! wat een pokkeformaat (pokkenformaat?))  
+
 import string
+import sys
+import re
+
+fn = sys.argv[1]
 
-ls = open ('barsant.pmx').readlines ()
+ls = open (fn).readlines ()
 def stripcomment (l):
-       return re.sub ('^%.*$', '', l)
+       return re.sub ('[ \t]*%.*$\n', '', l)
+       
+def stripwhite (l):
+       return re.sub ('[ \n\t]+', ' ', l)
+       
+def stripeols (l):
+       return re.sub ('^ ',  '', re.sub (' $', '', l))
        
 ls = map (stripcomment, ls)
+ls = map (stripwhite, ls)
+ls = map (stripeols, ls)
+
+
 ls = filter (lambda x: x <> '', ls)
 
 opening = ls[0]
 ls = ls[1:]
 
+
 opening = map (string.atoi, re.split ('[\t ]+', opening))
-(nv,noinst,mtrnuml,mtrdenl,mtrnump,mtrdenp,xmtrnum0,isig) = tuple (opening)
+
+(no_staffs, no_instruments, timesig_num,timesig_den, ptimesig_num,
+ ptimesig_den, pickup_beats,keysig_number) = tuple (opening)
 
 
 opening = ls[0]
 ls = ls[1:]
-opening = map (string.atoi, re.split ('[\t ]+', opening))
-(npages,nsyst,musicsize,fracindent) = tuple (opening)
 
-for l  in ls:
-       pass
+# ignore this.
+# opening = map (string.atoi, re.split ('[\t ]+', opening))
+# (no_pages,no_systems, musicsize, fracindent) = tuple (opening)
+
+instruments = []
+while len (instruments) < no_instruments:
+       instruments.append (ls[0])
+       ls = ls[1:]
+
+class Staff:
+       def __init__ (self): 
+               self.voices = ([],[])
+               self.clef = None
+               self.instrument = 0 
+l = ls[0]
+ls = ls[1:]
+
+staffs = map (lambda x: Staff (), range(0, no_staffs))
+staff_idx = 0
+
+for s in staffs:
+       s.clef = l[0]
+       l = l[1:]
+
+# dump path 
+ls = ls[1:] 
+
+# dump more ?
+ls = ls[2:]
+
+actab = {-2: 'eses', -1: 'es', 0 : '', 1: 'is', 2:'isis'}
+
+def pitch_to_lily_string (tup):
+       (o,n,a) = tup
+
+       nm = chr((n + 2) % 7 + ord ('a'))
+       nm = nm + actab[a]
+       if o > 0:
+               nm = nm + "'" * o
+       elif o < 0:
+               nm = nm + "," * -o
+       return nm
+
+class Chord:
+       def __init__ (self):
+               self.pitches = []
+               self.dots = 0
+               self.basic_duration = 0
+               
+       def dump (self):
+               str = ''
+
+               for p in self.pitches:
+                       if str:
+                               str = str + ' ' 
+                       str = str + pitch_to_lily_string (p)
+
+               if len (self.pitches) > 1:
+                       str = '<%s>' % str
+               elif len (self.pitches) == 0:
+                       str = 'r'
+               
+               
+               sd = ''
+               if self.basic_duration == 0.5:
+                       sd = '\\breve'
+               else:
+                       sd = '%d' % self.basic_duration
+
+               str = str + sd + '.' * self.dots 
+               return str
+               
+
+input_left = string.join (ls, ' ')
+
+
+input_left = re.sub ('[ \t\n]+',   ' ', input_left)
+
+SPACE=' \t\n'
+DIGITS ='0123456789'
+basicdur_table = {
+       9: 0.5,
+       0: 0 ,
+       2: 2 ,
+       4: 4 ,
+       8: 8 ,
+       1: 16,
+       3: 32,
+       6: 64
+       }
+
+class Parser:
+       def __init__ (self):
+               self.chords = []
+               self.forced_duration = None
+               self.last_octave = 4
+               
+       def parse_note (self, str):
+               ch = Chord ()
+
+               name = None
+               if str[0] <> 'r':
+                       name = (ord (str[0]) - ord('a') + 5) % 7
+               str = str[1:]
+               
+               forced_duration  = 0
+               alteration = 0
+               dots = 0
+               oct = None
+               durdigit = None
+               multibar = 0
+               while str[0] in 'dsfmnul0123456789.,':
+                       c = str[0]
+                       str = str[1:]
+                       if c == 'f':
+                               alteration = alteration -1
+                       elif c == 'n':
+                               alteration = 0
+                       elif c == 'm':
+                               multibar = 1
+                       elif c == 's':
+                               alteration = alteration +1
+                       elif c == 'd':
+                               dots = dots + 1
+                       elif c in DIGITS and durdigit == None:
+                               durdigit = string.atoi (c)
+                       elif c in DIGITS:
+                               oct = string.atoi (c) - 4
+                       elif c == '.':
+                               dots = dots+ 1
+                               forced_duration = 2
+                       elif c == ',':
+                               forced_duration = 2
+                       
+
+               if durdigit:
+                       ch.basic_duration = basicdur_table[durdigit]
+                       self.last_basic_duration = ch.basic_duration
+               else:
+                       ch.basic_duration = self.last_basic_duration
+
+               if name:
+                       if oct:
+                               self.last_octave =oct
+                       else:
+                               oct = self.last_octave
+
+               if name:
+                       ch.pitches.append ((oct, name,  alteration))
+                       
+               ch.dots = dots
+
+               
+               if forced_duration:
+                       self.forced_duration = ch.basic_duration / forced_duration
+
+
+               self.chords.append (ch)
+               while str[0] in SPACE:
+                       str = str [1:]
+               return str
+
+
+parser =  Parser()
+while input_left:
+       while input_left[0] in 'abcdefgr':
+               input_left = parser.parse_note (input_left)
+       print input_left[0]
+       
+       sys.stderr.write ("\nHuh? Unknown directive %s" %input_left[0:1])
+       input_left = input_left[1:]
+
+
+
+for c in parser.chords:
+       print c.dump ()
        
index 266b9ce51c7a5017181f42a8954abffb6e3409fd..a2ebc352d7b423db6ae89fb476b614639036d0f0 100644 (file)
@@ -75,7 +75,7 @@ template<class T> int cons_list_size_i (Cons<T> *l)
 template<class T>
 Cons<T> * last_cons (Cons<T> * head)
 {
-  while (head->next_)
+  while (head && head->next_)
     {
       head = head->next_;
     }
index 75fb5b94e310a4569ff68d822ed413a5cc3b7330..d29bc1d78cccba3919aef6299211a76d04730e34 100644 (file)
@@ -61,7 +61,7 @@ Align_note_column_engraver::do_removal_processing ()
   if (isdir_b (al))
     {
       Direction d = to_dir (al);
-      Directional_element_interface (align_item_p_).set (d);
+      Directional_element_interface::set (align_item_p_,d);
     }
   
   typeset_element (align_item_p_);
index bbb1af823809e0aef7203143358f96d9879621d2..c9d1466f6f25490fd472d9d3e3fb6ec1041f4bc6 100644 (file)
@@ -13,7 +13,7 @@
 #include "musical-request.hh"
 #include "multi-measure-rest.hh"
 #include "command-request.hh"
-#include "timing-engraver.hh"
+
 #include "engraver-group-engraver.hh"
 #include "warn.hh"
 #include "item.hh"
@@ -30,77 +30,54 @@ Bar_engraver::create_bar ()
   if (!bar_p_)
     {
       bar_p_ = new Item (get_property ("basicBarProperties"));
-      
-      SCM default_type = get_property ("defaultBarType");
-      if (gh_string_p (default_type))
-       {
-         bar_p_->set_elt_property ("glyph", default_type); // ugh
-       }
-
       announce_element (bar_p_, 0);
     }
 }
 
-/**
-   Make a barline.  If there are both |: and :| requested, merge them
-   to :|:.
-*/
-void
-Bar_engraver::request_bar (String requested_type)
+void 
+Bar_engraver::do_creation_processing ()
 {
-  if (!now_mom ())
-    {
-      SCM prop = get_property ("barAtLineStart");
-      if (!to_boolean (prop))
-       return;
-    }
-  bool  bar_existed = bar_p_;
-  create_bar ();
-  if (bar_existed && requested_type == "")
-    {
-      return;
-    }
-
-  String current = ly_scm2string (bar_p_->get_elt_property ("glyph"));
-  
-  if ((requested_type == "|:" && current== ":|")
-    || (requested_type == ":|" && current == "|:"))
-    requested_type = ":|:";
+}
 
-  
-  bar_p_->set_elt_property ("glyph",
-                           ly_str02scm (requested_type.ch_C ()));
+void
+Bar_engraver::do_removal_processing ()
+{
+  typeset_bar ();
 }
 
-void 
-Bar_engraver::do_creation_processing ()
+/*
+  Bar_engraver should come *after* any engravers that expect bars to
+  modify whichBar in do_process_music () be typeset
+*/
+void
+Bar_engraver::do_process_music()
 {
+  SCM b =get_property ("whichBar");
+  if (gh_string_p (b))
+    {
+      create_bar ();
+    }
 }
 
 void
-Bar_engraver::do_removal_processing ()
+Bar_engraver::typeset_bar ()
 {
   if (bar_p_) 
     {
+      SCM gl = get_property ("whichBar");
+      if (scm_equal_p (gl, bar_p_->get_elt_property ("glyph")) != SCM_BOOL_T)
+         bar_p_->set_elt_property ("glyph", gl);
       typeset_element (bar_p_);
       bar_p_ =0;
     }
 }
 
-void
-Bar_engraver::do_process_music()
-{  
-  Translator * t = daddy_grav_l  ()->get_simple_translator ("Timing_engraver");        // UGH.!
-
-  Timing_engraver * te = dynamic_cast<Timing_engraver*>(t);
-  String which = (te) ? te->which_bar () : "";
-
-  if (which.length_i ())
-    {
-      create_bar();
-      bar_p_->set_elt_property ("glyph",  ly_str02scm (which.ch_C ()));
-    }
-  
+/*
+  lines may only be broken if there is a barline in all staffs 
+*/
+void 
+Bar_engraver::do_pre_move_processing()
+{
   if (!bar_p_)
     {
       Score_engraver * e = 0;
@@ -109,23 +86,14 @@ Bar_engraver::do_process_music()
        {
          e = dynamic_cast<Score_engraver*> (t);
        }
-      
+
       if (!e)
        programming_error ("No score engraver!");
       else
-       e->forbid_breaks ();
-    }
-}
-
-
-void 
-Bar_engraver::do_pre_move_processing()
-{
-  if (bar_p_) 
-    {
-      typeset_element (bar_p_);
-      bar_p_ =0;
+       e->forbid_breaks ();    // guh. Use properties!
     }
+  else
+    typeset_bar ();
 }
 
 ADD_THIS_TRANSLATOR(Bar_engraver);
index 00625374feee98eaae8cad8a7cd328849f2715b8..5419f3fa4b37f22d27390d30ff29c8f54b8847b6 100644 (file)
@@ -158,9 +158,11 @@ Bar::before_line_breaking  (SCM smob)
     {
       me->set_elt_property ("molecule-callback", SCM_BOOL_T);
       me->set_extent_callback (0, X_AXIS);
+
       // leave y_extent for spanbar? 
     }
-  else if (! gh_equal_p  (g, orig))
+
+  if (! gh_equal_p  (g, orig))
     me->set_elt_property ("glyph", g);
 
 
index a9ba9b076ed8477317ba7149b8b5775a2fd192f6..ad90e51814c5b3a6e38d566eb55915d3b83bf938 100644 (file)
@@ -84,8 +84,8 @@ Beam::before_line_breaking (SCM smob)
       warning (_ ("beam has less than two stems"));
     }
 
-  if (!Directional_element_interface (me).get ())
-    Directional_element_interface (me).set (get_default_dir (me));
+  if (!Directional_element_interface::get (me))
+    Directional_element_interface::set (me, get_default_dir (me));
 
   auto_knees (me);
   set_stem_directions (me);
@@ -112,7 +112,7 @@ Beam::get_default_dir (Score_element*me)
   for (int i=0; i <stems.size (); i++)
     do { // HUH -- waar slaat dit op?
       Score_element *s = stems[i];
-      Direction sd = Directional_element_interface (s).get ();
+      Direction sd = Directional_element_interface::get (s);
       int current = sd ? (1 + d * sd)/2
        : Stem::get_center_distance (s, (Direction)-d);
 
@@ -152,14 +152,14 @@ Beam::set_stem_directions (Score_element*me)
 {
   Link_array<Item> stems
     =Pointer_group_interface__extract_elements (me,  (Item*) 0, "stems");
-  Direction d = Directional_element_interface (me).get ();
+  Direction d = Directional_element_interface::get (me);
   
   for (int i=0; i <stems.size (); i++)
     {
       Score_element *s = stems[i];
       SCM force = s->remove_elt_property ("dir-forced");
       if (!gh_boolean_p (force) || !gh_scm2bool (force))
-       Directional_element_interface (s).set (d);
+       Directional_element_interface ::set (s,d);
     }
 } 
 
@@ -183,8 +183,8 @@ Beam::auto_knee (Score_element*me, String gap_str, bool interstaff_b)
   bool knee_b = false;
   int knee_y = 0;
   SCM gap = me->get_elt_property (gap_str.ch_C());
-  
-  Direction d = Directional_element_interface (me).get ();
+
+  Direction d = Directional_element_interface::get (me);
       Link_array<Item> stems=
        Pointer_group_interface__extract_elements (me, (Item*)0, "stems");
   
@@ -218,7 +218,7 @@ Beam::auto_knee (Score_element*me, String gap_str, bool interstaff_b)
          int y = (int)(Stem::head_positions(s)[d])
            + (int)calc_interstaff_dist (s, dynamic_cast<Spanner*> (me));
 
-         Directional_element_interface (s).set (y < knee_y ? UP : DOWN);
+         Directional_element_interface::set (s,y < knee_y ? UP : DOWN);
          s->set_elt_property ("dir-forced", SCM_BOOL_T);
        }
     }
@@ -300,8 +300,8 @@ Beam::after_line_breaking (SCM smob)
   /*
     until here, we used only stem_info, which acts as if dir=up
    */
-  y *= Directional_element_interface (me).get ();
-  dy *= Directional_element_interface (me).get ();
+  y *= Directional_element_interface::get (me);
+  dy *= Directional_element_interface::get (me);
 
 
   Real half_space = Staff_symbol_referencer::staff_space (me) / 2;
@@ -343,7 +343,7 @@ Beam::after_line_breaking (SCM smob)
          */
          int quant_dir = 0;
          if (abs (y_shift) > half_space / 2)
-           quant_dir = sign (y_shift) * Directional_element_interface (me).get ();
+           quant_dir = sign (y_shift) * Directional_element_interface::get (me);
          y = quantise_y_f (me, y, dy, quant_dir);
        }
     }
@@ -459,8 +459,8 @@ Beam::calc_stem_y_f (Score_element*me,Item* s, Real y, Real dy)
   Real stem_y = (dy && dx ? (s->relative_coordinate (0, X_AXIS) - x0) / dx * dy : 0) + y;
 
   /* knee */
-   Direction dir  = Directional_element_interface(me).get ();
-   Direction sdir = Directional_element_interface (s).get ();
+   Direction dir  = Directional_element_interface::get (me);
+   Direction sdir = Directional_element_interface::get (s);
    
     /* knee */
    if (dir!= sdir)
@@ -473,7 +473,7 @@ Beam::calc_stem_y_f (Score_element*me,Item* s, Real y, Real dy)
       // huh, why not for first visible?
        if (Staff_symbol_referencer::staff_symbol_l (s)
           != Staff_symbol_referencer::staff_symbol_l (last_visible_stem (me)))
-        stem_y += Directional_element_interface (me).get ()
+        stem_y += Directional_element_interface::get (me)
           * (beam_multiplicity - stem_multiplicity) * interbeam_f;
       }
 
@@ -485,7 +485,7 @@ Beam::check_stem_length_f (Score_element*me,Real y, Real dy)
 {
   Real shorten = 0;
   Real lengthen = 0;
-  Direction dir = Directional_element_interface (me).get ();
+  Direction dir = Directional_element_interface::get (me);
 
   Link_array<Item> stems=
     Pointer_group_interface__extract_elements (me, (Item*)0, "stems");
@@ -596,7 +596,7 @@ Beam::quantise_y_f (Score_element*me,Real y, Real dy, int quant_dir)
   if (a.size () <= 1)
     return y;
 
-  Real up_y = Directional_element_interface (me).get () * y;
+  Real up_y = Directional_element_interface::get (me) * y;
   Interval iv = quantise_iv (a, up_y/staff_space) * staff_space;
 
   Real q = up_y - iv[SMALLER] <= iv[BIGGER] - up_y 
@@ -604,7 +604,7 @@ Beam::quantise_y_f (Score_element*me,Real y, Real dy, int quant_dir)
   if (quant_dir)
     q = iv[(Direction)quant_dir];
 
-  return q * Directional_element_interface (me).get ();
+  return q * Directional_element_interface::get (me);
 }
 
 void
@@ -674,7 +674,7 @@ Beam::stem_beams (Score_element*me,Item *here, Item *next, Item *prev)
     nw_f = me->paper_l ()->get_var ("quartwidth");
 
 
-  Direction dir = Directional_element_interface (me).get ();
+  Direction dir = Directional_element_interface::get (me);
   
   /* half beams extending to the left. */
   if (prev)
index 8dd2d4298d6903ff2e737bbf5a7576b71010fab5..f6225e51e17cc4e302a8764ed87e4734d957f283 100644 (file)
@@ -43,11 +43,11 @@ Breathing_sign::offset_callback (Score_element * b, Axis a)
   Score_element * me = (Score_element*)b;
   
   Real space = Staff_symbol_referencer::staff_space (b);
-  Direction d = Directional_element_interface (b). get ();
+  Direction d = Directional_element_interface::get (b);
   if (!d)
     {
       d = UP;
-      Directional_element_interface (me).set (d);
+      Directional_element_interface::set (me, d);
     }
 
   return 2.0 * space * d;
index 289ad00b2829a3d4277cb0744cc165bf283bec28..1891eea84474e040fbb49121e85aba150f398f76 100644 (file)
@@ -151,7 +151,7 @@ Chord_tremolo_engraver::acknowledge_element (Score_element_info info)
            It's amazing Mike:
            
              Stem:: type_i () ->first_head ()->get_direction () ->
-                     Directional_element_interface (me).set (d);
+                     Directional_element_interface::set (me, d);
 
 
              don't understand this comment.
index ef1c58a66f49cad4d7bcaa71967e3b5d5aa4d7e9..5cb2870461ee122a4a18c7c0a73470ca5b20a82a 100644 (file)
 #include "musical-request.hh"
 #include "warn.hh"
 #include "debug.hh"
-#include "molecule.hh"
-#include "paper-def.hh"
-#include "lookup.hh"
-#include "lookup.hh"
+#include "music-list.hh"
+#include "musical-request.hh"
 
 int
 compare (Chord* left, Chord* right)
@@ -516,3 +514,59 @@ Chord::rebuild_with_bass (Array<Musical_pitch>* pitch_arr_p, int bass_i)
   pitch_arr_p->insert (bass, 0);
 }
 
+
+// junk me
+Simultaneous_music *
+get_chord (Musical_pitch tonic,
+                          Array<Musical_pitch>* add_arr_p,
+                          Array<Musical_pitch>* sub_arr_p,
+                          Musical_pitch* inversion_p,
+                          Musical_pitch* bass_p,
+                          Duration d)
+{
+
+  /*
+    UARGAUGRAGRUAUGRUINAGRAUGIRNA
+
+    ugh
+   */
+  Chord chord = to_chord (tonic, add_arr_p, sub_arr_p, inversion_p, bass_p);
+  inversion_p = 0;
+  bass_p = 0;
+
+  Tonic_req* t = new Tonic_req;
+  t->pitch_ = tonic;
+  SCM l = gh_cons (t->self_scm (), SCM_EOL);
+
+  //urg
+  if (chord.inversion_b_
+      && Chord::find_notename_i (&chord.pitch_arr_, chord.inversion_pitch_) > 0)
+    {
+      Inversion_req* i = new Inversion_req;
+      i->pitch_ = chord.inversion_pitch_;
+      l = gh_cons (i->self_scm (), l);
+    }
+
+  if (chord.bass_b_)
+    {
+      Bass_req* b = new Bass_req;
+      b->pitch_ = chord.bass_pitch_;
+      l = gh_cons (b->self_scm (), l);      
+    }
+
+  Array<Musical_pitch> pitch_arr = chord.to_pitch_arr ();
+  for (int i = pitch_arr.size (); --i >= 0;)
+    {
+      Musical_pitch p = pitch_arr[i];
+      Note_req* n = new Note_req;
+      n->pitch_ = p;
+      n->duration_ = d;
+      l = gh_cons (n->self_scm (), l);
+    }
+
+  Simultaneous_music*v = new Request_chord (l);
+
+  return v;
+}
+
+
index bc919f63e75c489b421bcb9616990f801976ee63..1aaaea84eac453af8abe05465444adbe3ba44aac 100644 (file)
 #include "musical-request.hh"
 
 
-bool
-Bar_req::do_equal_b (Request const *r) const
-{
-  Bar_req  const* b = dynamic_cast <Bar_req const *> (r);
-  return b && type_str_ == b->type_str_;
-}
-
-void
-Bar_req::do_print () const
-{
-#ifndef NPRINT
-  DEBUG_OUT << type_str_;
-#endif
-}
-
 Bar_req::Bar_req (String s)
 {
-  type_str_ = s;
+  set_mus_property ("type", ly_str02scm (s.ch_C()));
 }
 
 bool
index 4a6a9e4d11c1b6de5c470b5706fea495f5503e07..9689529f434a3b4c44ed337067535ba9cbf768cc 100644 (file)
 #include "directional-element-interface.hh"
 
 
-Directional_element_interface::Directional_element_interface (Score_element const *s)
+static SCM Directional_element_interface::direction_sym;
+
+static void
+init_functions ()
 {
-  elt_l_ =  (Score_element*)s;
+  Directional_element_interface::direction_sym = scm_permanent_object (ly_symbol2scm ("direction"));
 }
+ADD_SCM_INIT_FUNC(Directional, init_functions);
+
 
 bool
-Directional_element_interface::has_interface () const
+Directional_element_interface::has_interface (Score_element*me) 
 {
-  return isdir_b (elt_l_->get_elt_property ("direction"));
+  return isdir_b (me->get_elt_property (direction_sym));
 }
 
-
-  
-
 Direction
-Directional_element_interface::get () const
+Directional_element_interface::get (Score_element*me) 
 {
   // return dir_;
-  SCM d= elt_l_->get_elt_property ("direction");
+  SCM d= me->get_elt_property (direction_sym);
   if (!isdir_b(d))
     return CENTER;
       
@@ -36,7 +38,10 @@ Directional_element_interface::get () const
 }
 
 void
-Directional_element_interface::set (Direction d) 
+Directional_element_interface::set (Score_element*me, Direction d) 
 {
-  elt_l_->set_elt_property ("direction", gh_int2scm (d));
+  SCM sd = gh_int2scm (d);
+
+  if (me->get_elt_property (direction_sym) != sd)
+    me->set_elt_property (direction_sym, sd);
 }
index 5557790b33915819b77c26dc6b0bfbf23129514c..38777cb5696fd811924f2f2690ff0efce6e90193 100644 (file)
@@ -40,7 +40,7 @@ void
 Dot_column::set_interface (Score_element* me)
 {
   me->set_elt_property  ("dots", SCM_EOL);
-  Directional_element_interface (me).set (RIGHT);
+  Directional_element_interface::set (me, RIGHT);
   
   Axis_group_interface::set_interface (me);
   Axis_group_interface::set_axes (me, X_AXIS,X_AXIS);
index 1b702e293207749c85219d95b329ccb046041931..c249d6a1cf969967cc4cfd360892e915df9e4278 100644 (file)
@@ -23,13 +23,13 @@ Dots::quantised_position_callback (Score_element * me, Axis a)
   SCM d= me->get_elt_property ("dot-count");
   if (gh_number_p (d) && gh_scm2int (d))
     {
-      if (!Directional_element_interface (me).get ())
-       Directional_element_interface (me).set (UP);
+      if (!Directional_element_interface::get (me))
+       Directional_element_interface::set (me, UP);
 
 
       int pos = int (Staff_symbol_referencer::position_f (me));
       if (!(pos % 2))
-       return Staff_symbol_referencer::staff_space (me) / 2.0 * Directional_element_interface (me).get ();
+       return Staff_symbol_referencer::staff_space (me) / 2.0 * Directional_element_interface::get (me);
     }
 
   return  0.0;
index c399d36f639befba1e1a1dd24576052a23b98970..9093c2aa66d9ca5f3274e5bb37323e3d8bb95409 100644 (file)
@@ -167,7 +167,7 @@ Dynamic_engraver::do_process_music ()
       text_p_ = new Item (get_property ("basicDynamicTextProperties"));
       text_p_->set_elt_property ("text", ly_str02scm (loud.ch_C ()));
       if (Direction d=text_req_l_->get_direction ())
-       Directional_element_interface (line_spanner_).set (d);
+       Directional_element_interface::set (line_spanner_, d);
 
       Axis_group_interface::add_element (line_spanner_, text_p_);
 
@@ -199,8 +199,7 @@ Dynamic_engraver::do_process_music ()
        {
          accepted_spanreqs_drul_[START]->origin ()->warning
            (current_cresc_req_->span_dir_ == 1
-            ?
-            _ ("already have a crescendo")
+            ? _ ("already have a crescendo")
             : _ ("already have a decrescendo"));
        }
       else
index 896c206f1214c40494f22ce54ccdb830d3f58405..60a72fa594ff6a6dd7e6f484c290d9eac25d354f 100644 (file)
@@ -25,9 +25,6 @@ Engraver::announce_element (Score_element_info inf)
 void
 Engraver::announce_element (Score_element* e, Music *m)
 {
-  if (e->get_elt_property ("interfaces") == SCM_EOL)
-    Group_interface (e, "interfaces").add_thing (ly_symbol2scm (e->name()));
-
   if (m && m->origin ()->location_str ().length_i ())
     {
       e->set_elt_property ("origin", m->get_mus_property ("origin"));
index 7337f84c3bbe4c1d89067a45cd179540f7e66c04..ffbbf06c5d9d795af84f518d0e3d683c589e6274 100644 (file)
@@ -9,14 +9,17 @@
 #include "group-interface.hh"
 #include "score-element.hh"
 
-Group_interface::Group_interface (Score_element const* e)
+/*
+  ugh: clean me, junk elt_l_ field
+ */
+Group_interface::Group_interface (Score_element * e)
 {
   elt_l_ = (Score_element*)e;
   name_ = "elements";
 }
 
 
-Group_interface::Group_interface (Score_element const *e, String s)
+Group_interface::Group_interface (Score_element  *e, String s)
 {
   elt_l_ =(Score_element*)e;
   name_ = s;
index 89ad0898f7b5e84f44d2ce4f2ff082525aae344a..5d91c15b890030765dd7285dd95d3712607b38e6 100644 (file)
@@ -31,6 +31,7 @@ protected:
 
 
 private:
+  void typeset_bar ();
   void create_bar ();
 
   Item * bar_p_;
index ce00613275562e9ad270c4db6fa24093ed95a4b4..561032eefbe4c0f0b8c45e2a608737896db55333 100644 (file)
@@ -52,4 +52,13 @@ Chord to_chord (Array<Musical_pitch> pitch_arr, Tonic_req* tonic_req, Inversion_
 
 int compare (Chord*, Chord*);
 
+Simultaneous_music *get_chord (Musical_pitch tonic,
+                          Array<Musical_pitch>* add_arr_p,
+                          Array<Musical_pitch>* sub_arr_p,
+                          Musical_pitch* inversion_p,
+                          Musical_pitch* bass_p,
+                              Duration d);
+
+
+
 #endif // CHORD_HH
index 759332508114cde9805964bb9da768dee0caa67d..7ef86dda91242868b4776ea19ebd89fc7d372c27 100644 (file)
@@ -26,10 +26,8 @@ protected:
 
 class Mark_req : public Request {
 public:
-  SCM mark_label ();
-
-
   virtual bool do_equal_b (Request const*) const;
+  SCM mark_label ();
   VIRTUAL_COPY_CONS(Music);
 };
 
@@ -84,12 +82,9 @@ public:
   the latter should only happen at the start of a measure.  */
 class Bar_req  : public Request  {
 public:
-  String type_str_;
+
   Bar_req (String);
 protected:
-  virtual bool do_equal_b (Request const*) const;
-  virtual void do_print () const;
-
   VIRTUAL_COPY_CONS(Music);
 };
 
index 57e1e228dfb0c01442fd315afee8d154f28be252..92546cee4e9b00498e9aaee9d0fdac4ebc282bdf 100644 (file)
 
 struct Directional_element_interface 
 {
-  
 public:
-  Score_element *elt_l_;
-  
-  Directional_element_interface (Score_element const *);
-  void set  (Direction d);
-  Direction get () const;
-  bool has_interface () const;
-  // bool set_interface ();
+  static SCM direction_sym ;
+  static void set  (Score_element*,Direction d);
+  static Direction get (Score_element*) ;
+  static bool has_interface (Score_element*) ;
 };
 
 
index 9ae9cac612ae1433b17db97684e3526ba74b007d..66308caf4443c5d58c07356a56b4ffc38f8250e1 100644 (file)
@@ -28,8 +28,8 @@ struct Group_interface
   Score_element * elt_l_;
   String name_;
 public:
-  Group_interface (Score_element const*);
-  Group_interface (Score_element const*, String);
+  Group_interface (Score_element *);
+  Group_interface (Score_element *, String);
   int count ();
   void add_thing (SCM);
   bool has_interface ();
@@ -40,8 +40,8 @@ struct Pointer_group_interface {
   Score_element * elt_l_;
   String name_;
 public:
-  Pointer_group_interface (Score_element const*);
-  Pointer_group_interface (Score_element const*, String);
+  Pointer_group_interface (Score_element*);
+  Pointer_group_interface (Score_element*, String);
   int count ();
   void set_interface ();
   static bool has_interface (Score_element*);
index fc3d8ae05cf708487b983d8af9d94e8dfdd17608..9e50aa0998d47ef547b9d722efb9de174e59208b 100644 (file)
@@ -27,6 +27,8 @@
 
   @see Music_sequence
 
+
+  TODO: make a equalp function for general music. 
   */
 class Music {
 public:
index cb9b9b57604558839f5bc70dcb5b5420577dc1b9..3c70ae5a3058a1ff7c1a84f36f5ea9cff78721c6 100644 (file)
@@ -70,7 +70,6 @@ public:
   Moment body_length_mom () const;
   Moment alternatives_length_mom () const;
 
-  void print() const;
   /// Transpose, with the interval central C to #p#
   virtual void transpose (Musical_pitch p);
 
@@ -80,8 +79,6 @@ public:
 
   Repeated_music (Music*, int , Music_sequence*);
   Repeated_music (Repeated_music const&);
-protected:
-  virtual void do_print() const;
 };
 
 
index f1a86dee28288426efaac213634820b00f5a60e6..b867d2119e2b5d5d53af55b19e0098bfb167ef63 100644 (file)
@@ -72,7 +72,7 @@ public:
     0 means ORPHAN,
    */
   char status_i_;
-  char const * name () const;
+  String name () const;
 
   /*
     IDEA: make this a global variable. This is the same for all
index da2de1818868fe87e63c3a70f01d164f4189a531..b13a68364f2ad51cbdc8b178becee4cdb5b4c811 100644 (file)
@@ -29,6 +29,7 @@ public:
   static bool has_interface (Score_element*);  
   static Interval get_spanned_interval (Score_element*);
   static void add_bar (Score_element*,Score_element*);
+  static void evaluate_glyph (Score_element*);
   static void evaluate_empty (Score_element*);
   static Interval width_callback(Score_element *, Axis) ;
   static SCM get_bar_size (SCM);
diff --git a/lily/include/timing-engraver.hh b/lily/include/timing-engraver.hh
deleted file mode 100644 (file)
index 5ac4f8a..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-  timing-engraver.hh -- declare Timing_engraver
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef TIMING_GRAV_HH
-#define TIMING_GRAV_HH
-
-#include "timing-translator.hh"
-#include "engraver.hh"
-
-/**
-  Do time bookkeeping
- */
-class Timing_engraver : public Timing_translator, public Engraver
-{   
-
-  Bar_req * bar_req_l_;
-protected:
-  virtual bool do_try_music (Music * );
-  virtual void do_post_move_processing ();
-public:
-  String which_bar (); 
-  VIRTUAL_COPY_CONS(Translator);
-  
-};
-
-#endif // TIMING_GRAV_HH
index 7735562b3dae3e9aeb15761fbe33b2eab9dabf17..579b15848499188cc571036b73a7c6ba232f36f1 100644 (file)
@@ -19,7 +19,6 @@ class Timing_translator : public virtual Translator
 {
 public:
   VIRTUAL_COPY_CONS(Translator);
-  Time_signature_change_req * time_signature_req_l () const;
   Timing_translator ();
   Link_array<Timing_req> timing_req_l_arr_;
 
@@ -31,10 +30,8 @@ protected:
   virtual void do_post_move_processing();
 
 public:
-
   Moment measure_position () const;
   Moment measure_length () const;  
   void set_time_signature (int, int);
-
 };
 #endif // TIMING_TRANSLATOR_HH
index 126c232c8d6ed9991f59fb386046d7b37dd395e7..4701c48bbb29678b0d58a4b21b0d9cfc4b41726f 100644 (file)
@@ -63,7 +63,6 @@ public:
   VIRTUAL_COPY_CONS(Translator);
   Translator_group(Translator_group const &);
   Translator_group();
-  void add_simple_translator (Translator *trans_p);
   void add_group_translator (Translator *trans_p);
 
   
@@ -75,7 +74,7 @@ public:
   void terminate_translator (Translator*r_l);
   Translator *remove_translator_p (Translator*trans_l);
   void check_removal ();
-  Translator *get_simple_translator (String) const;
+  // Translator *get_simple_translator (String) const;
   Translator_group *find_existing_translator_l (String n, String id);
   Translator_group *find_create_translator_l (String n, String id);
   Link_array<Translator_group> path_to_acceptable_translator (String alias, Music_output_def*) const;
index 8fcae86fd28e78dbe8a839a5f97de08c09aaaa81..104687dbd5ef2046e18932904a97d9dc88fb28dd 100644 (file)
@@ -50,7 +50,7 @@ protected:
 void
 Key_engraver::do_removal_processing ()
 {
-  old_accs_ = SCM_EOL;         // unprotect can be called from dtor.
+  old_accs_ = SCM_EOL;         // unprotect can not  be called from dtor.
 }
 
 Key_engraver::Key_engraver ()
index b7bd385961322951010cbd9425bdfdf51b1047f9..faf2a68b862c8bd234881e70d3d5ef01a83233b5 100644 (file)
 #include "my-lily-lexer.hh"
 #include "debug.hh"
 #include "main.hh"
-#include "music-list.hh"
-#include "musical-request.hh"
-#include "command-request.hh"
-#include "lily-guile.hh"
 #include "parser.hh"
-#include "scope.hh"
 #include "file-results.hh"
-#include "midi-def.hh"
-#include "paper-def.hh"
-#include "identifier.hh"
-#include "chord.hh"
+#include "scope.hh"
 
 My_lily_parser::My_lily_parser (Sources * source_l)
 {
@@ -97,62 +89,6 @@ My_lily_parser::set_last_duration (Duration const *d)
   default_duration_ = *d;
 }
 
-// junk me
-Simultaneous_music *
-My_lily_parser::get_chord (Musical_pitch tonic,
-                          Array<Musical_pitch>* add_arr_p,
-                          Array<Musical_pitch>* sub_arr_p,
-                          Musical_pitch* inversion_p,
-                          Musical_pitch* bass_p,
-                          Duration d)
-{
-
-  /*
-    UARGAUGRAGRUAUGRUINAGRAUGIRNA
-
-    ugh
-   */
-  Chord chord = to_chord (tonic, add_arr_p, sub_arr_p, inversion_p, bass_p);
-  inversion_p = 0;
-  bass_p = 0;
-
-  Tonic_req* t = new Tonic_req;
-  t->pitch_ = tonic;
-  SCM l = gh_cons (t->self_scm (), SCM_EOL);
-
-  //urg
-  if (chord.inversion_b_
-      && Chord::find_notename_i (&chord.pitch_arr_, chord.inversion_pitch_) > 0)
-    {
-      Inversion_req* i = new Inversion_req;
-      i->pitch_ = chord.inversion_pitch_;
-      l = gh_cons (i->self_scm (), l);
-    }
-
-  if (chord.bass_b_)
-    {
-      Bass_req* b = new Bass_req;
-      b->pitch_ = chord.bass_pitch_;
-      l = gh_cons (b->self_scm (), l);      
-    }
-
-  Array<Musical_pitch> pitch_arr = chord.to_pitch_arr ();
-  for (int i = pitch_arr.size (); --i >= 0;)
-    {
-      Musical_pitch p = pitch_arr[i];
-      Note_req* n = new Note_req;
-      n->pitch_ = p;
-      n->duration_ = d;
-      l = gh_cons (n->self_scm (), l);
-    }
-
-  Simultaneous_music*v = new Request_chord (l);
-  v->set_spot (here_input ());
-
-  return v;
-}
-
-
 
 Input
 My_lily_parser::pop_spot()
index 3c4ff7b86787cebe7122644055f1e06aa4ff6d0e..8db7014cdfc9ac79c8c0b0c11cc60c4fd08ec698 100644 (file)
@@ -43,6 +43,7 @@
 #include "auto-change-music.hh"
 #include "part-combine-music.hh"
 #include "output-property.hh"
+#include "chord.hh"
 
 bool
 is_duration_b (int t)
@@ -90,12 +91,11 @@ print_mudela_versions (ostream &os)
     Music *music;
     Score *score;
     Scope *scope;
-    Interval *interval;
+
     Musical_req* musreq;
     Music_output_def * outputdef;
     Musical_pitch * pitch;
     Midi_def* midi;
-    Moment *moment;
     Real real;
     Request * request;
 
@@ -1394,7 +1394,8 @@ simple_element:
 
 chord:
        steno_tonic_pitch optional_notemode_duration chord_additions chord_subtractions chord_inversion chord_bass {
-                $$ = THIS->get_chord (*$1, $3, $4, $5, $6, *$2);
+                $$ = get_chord (*$1, $3, $4, $5, $6, *$2);
+               $$->set_spot (THIS->here_input ());
         };
 
 chord_additions: 
index f1a6ae4011d00daaf127246ca0c6f8df850a264b..aef7b46a4f447060ec7f5f9530b23b2a9d8f3fa5 100644 (file)
@@ -9,18 +9,25 @@
 #include "group-interface.hh"
 #include "score-element.hh"
 
-Pointer_group_interface::Pointer_group_interface (Score_element const* e)
+/*
+  UGH clean me . 
+ */
+Pointer_group_interface::Pointer_group_interface (Score_element * e)
 {
-  elt_l_ = (Score_element*)e;
+  elt_l_ = e;
   name_ = "elements";
 }
 
 
-Pointer_group_interface::Pointer_group_interface (Score_element const *e, String s)
+Pointer_group_interface::Pointer_group_interface (Score_element  *e, String s)
 {
   elt_l_ =(Score_element*)e;
   name_ = s;
 } 
+
+/*
+  duh.
+ */
 bool
 Pointer_group_interface::has_interface () 
 {
@@ -47,9 +54,5 @@ Pointer_group_interface::count ()
 void
 Pointer_group_interface::set_interface ()
 {
-  if (!has_interface ())
-    {
-      elt_l_->set_elt_property (name_.ch_C(), SCM_EOL);
-    }
 } 
 
index 2cae99cb0928efa7c90261d7decb198cc91bc921..96b11d5e1186f2a58eecaba95fb5d2ba32c07aa9 100644 (file)
@@ -136,10 +136,10 @@ Repeat_engraver::queue_events ()
        happens at the begin of the alt. The :| bar event at the ending.
       */
 
-  for (SCM s = repeated_music_l_->alternatives ()->music_list ();
-       gh_pair_p (s);  s = gh_cdr (s))
-    {
-      Music *mus =unsmob_music (gh_car (s));
+      for (SCM s = repeated_music_l_->alternatives ()->music_list ();
+          gh_pair_p (s);  s = gh_cdr (s))
+       {
+         Music *mus =unsmob_music (gh_car (s));
 
          /*
            some idiot might typeset a repeat not starting on a
@@ -164,8 +164,8 @@ Repeat_engraver::queue_events ()
              becel.append (c);
              last_number = volta_number;
              volta_number ++;
-              SCM l (get_property ("voltaSpannerDuration"));
-              if (unsmob_moment(l))
+             SCM l (get_property ("voltaSpannerDuration"));
+             if (unsmob_moment(l))
                {
                  Moment vSD_mom = *unsmob_moment (l);
                  if ( vSD_mom < mus->length_mom() ) // terminate volta early ?
@@ -185,11 +185,15 @@ Repeat_engraver::queue_events ()
        }
     }
 
-  Cons<Bar_create_event> *&tail = create_barmoments_queue_
-    ? last_cons (create_barmoments_queue_)->next_
-    : create_barmoments_queue_;
+  /*
+    ugh, should merge :| and |: here.
+   */
+  Cons<Bar_create_event> * last = last_cons (create_barmoments_queue_);
+  Cons<Bar_create_event> **tail = last?  & last->next_
+    : & create_barmoments_queue_;
 
-  tail = becel.head_ ;
+  *tail = becel.head_ ;
+  
   becel.head_ = 0;
 }
 
@@ -203,13 +207,10 @@ Repeat_engraver::do_process_music ()
     }
   
   
-  Cons<Bar_create_event> * head =   create_barmoments_queue_;
+  Cons<Bar_create_event> * head = create_barmoments_queue_;
   if (!head)
     return;
 
-  Bar_engraver* bar_engraver_l = dynamic_cast <Bar_engraver*>
-    (daddy_grav_l ()->get_simple_translator ("Bar_engraver")); // UGH
-
   /*
     Do all the events that need to be done now.
   */
@@ -217,41 +218,52 @@ Repeat_engraver::do_process_music ()
     {
       create_barmoments_queue_ = create_barmoments_queue_->next_;
       head->next_ =0;
-      if (bar_engraver_l)
+      String t = head->car_->type_;
+      if (head->car_->bar_b_)
        {
-         String t = head->car_->type_;
-         if (head->car_->bar_b_)
+         if (t == "stop" || t == ":|")
            {
-             if (t == "stop" || t == ":|")
-               {
-                 end_volta_span_p_ = volta_span_p_;
-                 volta_span_p_ =0;
-               }
-
-             if (t != "stop")
-               bar_engraver_l->request_bar (t);
-             else
-               bar_engraver_l->request_bar (""); 
+             end_volta_span_p_ = volta_span_p_;
+             volta_span_p_ =0;
            }
-         else
+
+         SCM whsym = ly_symbol2scm ("whichBar");
+         Translator_group* where = daddy_trans_l_->where_defined (whsym);
+         SCM which = where->get_property (whsym);
+
+         /*
+           Should use symbols for bar glyphs.
+         */
+         if (t == "stop" && which == SCM_UNDEFINED)
+           which = ly_str02scm ("");
+         else if (t != "stop")
            {
-             assert (!volta_span_p_);
-             volta_span_p_ = new Spanner (get_property ("basicVoltaSpannerProperties"));
-             Volta_spanner::set_interface (volta_span_p_);
-             announce_element (volta_span_p_,0);
-             volta_span_p_->set_elt_property ("text",
-                                              ly_str02scm (t.ch_C()));
-             volta_span_p_->set_elt_property ("last-volta",
-                                              gh_bool2scm (head->car_->last_b_));
-             // voltaSpannerDuration stuff here.
-             // other property stuff here.
+             SCM l = ly_str02scm (":|");
+             SCM r = ly_str02scm ("|:");                 
+                 
+             if ( (t == "|:" && scm_equal_p (which, l) == SCM_BOOL_T)
+                  || (t == ":|" && scm_equal_p (which, r)== SCM_BOOL_T))
+               t = ":|:";
+
+             if (t != "" || !gh_string_p (which))
+               which = ly_str02scm (t.ch_C());
            }
-         
+         where->set_property (whsym, which);
        }
       else
        {
-         warning (_ ("No bar engraver found.  Ignoring repeats."));
+         assert (!volta_span_p_);
+         volta_span_p_ = new Spanner (get_property ("basicVoltaSpannerProperties"));
+         Volta_spanner::set_interface (volta_span_p_);
+         announce_element (volta_span_p_,0);
+         volta_span_p_->set_elt_property ("text",
+                                          ly_str02scm (t.ch_C()));
+         volta_span_p_->set_elt_property ("last-volta",
+                                          gh_bool2scm (head->car_->last_b_));
+         // voltaSpannerDuration stuff here.
+         // other property stuff here.
        }
+         
 
       delete head->car_;
       delete head;
index f817ab0d3332d1f41871fa87b02af96c68c91d6d..baae892504bdaaeacae5a84de6dc5d593b004a85 100644 (file)
@@ -26,7 +26,11 @@ Repeated_music::alternatives ()const
 
 Repeated_music::Repeated_music(Music *beg, int times, Music_sequence * alts)
 {
-  set_mus_property ("body", beg->self_scm ());
+  if (beg)
+    {
+      set_mus_property ("body", beg->self_scm ());
+      scm_unprotect_object (beg->self_scm ());
+    }
   fold_b_ = false;
   repeats_i_ = times;
   volta_fold_b_ = true;
@@ -34,10 +38,8 @@ Repeated_music::Repeated_music(Music *beg, int times, Music_sequence * alts)
     {
       alts->truncate (times);
       set_mus_property ("alternatives", alts->self_scm ());
+      scm_unprotect_object (alts->self_scm ());  
     }
-
-  scm_unprotect_object (beg->self_scm ());
-  scm_unprotect_object (alts->self_scm ());  
 }
 
 Repeated_music::Repeated_music (Repeated_music const &s)
@@ -50,20 +52,6 @@ Repeated_music::Repeated_music (Repeated_music const &s)
 }
 
 
-void
-Repeated_music::do_print () const
-{
-#ifndef NPRINT
-  DEBUG_OUT << "Fold = " << fold_b_ << " reps: " << repeats_i_;
-
-  if (body ())
-    body ()->print();
-  
-  if (alternatives ())
-    alternatives ()->print();
-#endif
-}
-
 Musical_pitch
 Repeated_music::to_relative_octave (Musical_pitch p)
 {
index 26a62293fcec8cf03c43014bc331b8a6876d3323..06a9cf70fc012540aadb6d01d01570626e8b7c37 100644 (file)
@@ -629,10 +629,12 @@ Score_element::common_refpoint (SCM elist, Axis a) const
   return common;
 }
 
-char const *
+String
 Score_element::name () const
 {
-  return classname (this);
+  SCM nm = get_elt_property ("name");
+  
+  return  nm == SCM_EOL ? classname (this) :ly_scm2string (nm) ;  
 }
 
 void
@@ -749,7 +751,7 @@ Score_element::print_smob (SCM s, SCM port, scm_print_state *)
   Score_element *sc = (Score_element *) gh_cdr (s);
      
   scm_puts ("#<Score_element ", port);
-  scm_puts ((char *)sc->name (), port);
+  scm_puts ((char *)sc->name ().ch_C(), port);
 
   /*
     don't try to print properties, that is too much hassle.
index 80ad78157a8fea3c180ebaf92b7911a18b58faad..2cbeafd1eb7b9c89a265d00f008bb2ccf65b9137 100644 (file)
@@ -148,7 +148,7 @@ Score_engraver::typeset_all()
            if (!s->get_bound (d))
              {
                s->set_bound(d, command_column_l_);
-               ::warning (_f ("unbound spanner `%s'", classname(s)));
+               ::warning (_f ("unbound spanner `%s'", s->name().ch_C()));
              }
          } while (flip(&d) != LEFT);
        }
index e0082e84b0c971c702d3404388bc8863f7c6a293..628af83903ec87c95e267dad2692798f5cd35a4a 100644 (file)
@@ -106,5 +106,5 @@ Separating_group_spanner::add_spacing_unit (Score_element* me ,Item*i)
 void
 Separating_group_spanner::set_interface (Score_element*me)
 {
-  me->set_elt_property ("elements", SCM_EOL);
+
 }
index e59f5fdf0362bedc9272accfa81fcb674dd5bfb1..5be17a25d6bc12d845283bd18be40b4bb52cd8ab 100644 (file)
@@ -122,8 +122,8 @@ Slur::after_line_breaking (SCM smob)
 void
 Slur::set_extremities (Score_element*me)
 {
-  if (!Directional_element_interface (me).get ())
-    Directional_element_interface (me).set (get_default_dir (me));
+  if (!Directional_element_interface::get (me))
+    Directional_element_interface ::set (me,get_default_dir (me));
 
   Direction dir = LEFT;
   do 
@@ -234,12 +234,12 @@ Slur::get_attachment (Score_element*me,Direction dir,
          if (str == "head")
            {
              o = Offset (0, Stem::head_positions (stem)
-                         [Directional_element_interface (me).get ()] * hs);
+                         [Directional_element_interface::get (me)] * hs);
              /*
                Default position is centered in X, on outer side of head Y
               */
              o += Offset (0.5 * n->extent (X_AXIS).length (),
-                          0.5 * ss * Directional_element_interface (me).get ());
+                          0.5 * ss * Directional_element_interface::get (me));
            }
          else if (str == "alongside-stem")
            {
@@ -249,7 +249,7 @@ Slur::get_attachment (Score_element*me,Direction dir,
               */
              o += Offset (n->extent (X_AXIS).length ()
                           * (1 + Stem::get_direction (stem)),
-                          0.5 * ss * Directional_element_interface (me).get ());
+                          0.5 * ss * Directional_element_interface::get (me));
            }
          else if (str == "stem")
            {
@@ -287,7 +287,7 @@ Slur::get_attachment (Score_element*me,Direction dir,
   SCM l = scm_assoc
     (scm_listify (a,
                  gh_int2scm (stem ? Stem::get_direction (stem) : 1 * dir),
-                 gh_int2scm (Directional_element_interface (me).get () * dir),
+                 gh_int2scm (Directional_element_interface::get (me) * dir),
                  SCM_UNDEFINED),
      scm_eval2 (ly_symbol2scm ("slur-extremity-offset-alist"), SCM_EOL));
   
@@ -317,7 +317,7 @@ Slur::encompass_offset (Score_element*me,
   Offset o;
   Score_element* stem_l = unsmob_element (col->get_elt_property ("stem"));
   
-  Direction dir = Directional_element_interface (me).get ();
+  Direction dir = Directional_element_interface::get (me);
   
   if (!stem_l)
     {
@@ -326,7 +326,7 @@ Slur::encompass_offset (Score_element*me,
       o[Y_AXIS] = col->relative_coordinate (common[Y_AXIS], Y_AXIS);
       return o;  
     }
-  Direction stem_dir = Directional_element_interface (stem_l).get ();
+  Direction stem_dir = Directional_element_interface::get (stem_l);
   o[X_AXIS] = stem_l->relative_coordinate (0, X_AXIS);
 
   /*
@@ -467,7 +467,7 @@ Slur::brew_molecule (SCM smob)
   if (gh_number_p (d))
     a = me->lookup_l ()->dashed_slur (one, thick, thick * gh_scm2double (d));
   else
-    a = me->lookup_l ()->slur (one, Directional_element_interface (me).get () * thick, thick);
+    a = me->lookup_l ()->slur (one, Directional_element_interface::get (me) * thick, thick);
 
   return a.create_scheme();
 }
@@ -481,7 +481,7 @@ Slur::set_control_points (Score_element*me)
   Real r_0 = me->paper_l ()->get_var ("slur_ratio");
   
   Slur_bezier_bow bb (get_encompass_offset_arr (me),
-                     Directional_element_interface (me).get (),
+                     Directional_element_interface::get (me),
                      h_inf, r_0);
 
   if (bb.fit_factor () > 1.0)
@@ -530,7 +530,7 @@ Slur::get_curve (Score_element*me)
   Bezier b;
   int i = 0;
 
-  if (!Directional_element_interface (me).get ()
+  if (!Directional_element_interface::get (me)
       || ! gh_symbol_p (index_cell (me->get_elt_property ("attachment"), LEFT)))
     set_extremities (me);
   
@@ -544,7 +544,7 @@ Slur::get_curve (Score_element*me)
     }
 
   Array<Offset> enc (get_encompass_offset_arr (me));
-  Direction dir = Directional_element_interface (me).get ();
+  Direction dir = Directional_element_interface::get (me);
   
   Real x1 = enc[0][X_AXIS];
   Real x2 = enc.top ()[X_AXIS];
index a228a1b2980011069a2d17a9fae3cd657a5c1650..5fbd94f25498da4b713dd5311766099d14527d3a 100644 (file)
@@ -59,10 +59,7 @@ Span_bar_engraver::acknowledge_element (Score_element_info i)
        {
          spanbar_p_ = new Item (get_property ("basicSpanBarProperties"));
          Span_bar::set_interface (spanbar_p_);
-         spanbar_p_->set_elt_property ("glyph", bar_l_arr_[0]->get_elt_property ("glyph"));
-         spanbar_p_->set_elt_property ("visibility-lambda",
-                                       bar_l_arr_[0]->get_elt_property ("visibility-lambda"));   
-                                       
+               
          spanbar_p_->set_parent (bar_l_arr_[0], Y_AXIS);
          spanbar_p_->set_parent (bar_l_arr_[0], X_AXIS);
 
@@ -77,6 +74,12 @@ Span_bar_engraver::do_pre_move_processing()
     {
       for (int i=0; i < bar_l_arr_.size() ; i++)
        Span_bar::add_bar( spanbar_p_,bar_l_arr_[i]);
+
+      SCM vissym =ly_symbol2scm ("visibility-lambda");
+      SCM vis = bar_l_arr_[0]->get_elt_property (vissym);        
+      if (scm_equal_p (spanbar_p_->get_elt_property (vissym), vis) != SCM_BOOL_T)
+       spanbar_p_->set_elt_property (vissym, vis);
+
       typeset_element (spanbar_p_);
       spanbar_p_ =0;
     }
index 722dd45d77db41ddeb248d9bad560bb503347cbf..54b5ef953c8348ab85b31ae8dd3b206982a7f15c 100644 (file)
@@ -43,10 +43,13 @@ MAKE_SCHEME_CALLBACK(Span_bar,before_line_breaking);
 SCM
 Span_bar::before_line_breaking (SCM smob)
 {
-  Bar::before_line_breaking (smob);
-  
   evaluate_empty (unsmob_element (smob));
+  evaluate_glyph (unsmob_element (smob));
 
+  /*
+    no need to call   Bar::before_line_breaking (), because the info
+    in ELEMENTS already has been procced by Bar::before_line_breaking().
+   */
   return SCM_UNSPECIFIED;
 }
 
@@ -77,31 +80,39 @@ Span_bar::evaluate_empty (Score_element*me)
     {
       me->suicide ();
     }
-  
-  SCM gl = me->get_elt_property ("glyph");
+}
+
+void
+Span_bar::evaluate_glyph (Score_element*me)
+{
+  SCM elts = me->get_elt_property ("elements");
+  Score_element * b = unsmob_element (gh_car (elts));
+  SCM glsym =ly_symbol2scm ("glyph");
+  SCM gl =b ->get_elt_property (glsym);
   if (!gh_string_p (gl))
     {
       me->suicide ();
       return ; 
     }
-  else {
-    String type_str = ly_scm2string (gl);
-    String orig = type_str;
-    if (type_str == "|:") 
-      {
-       type_str= ".|";
-      }
-    else if (type_str== ":|")
-      {
-       type_str= "|.";
-      }
-    else if (type_str== ":|:")
-      {
-       type_str= ".|.";
-      }
-    if (orig != type_str)
-      me->set_elt_property ("glyph", ly_str02scm (type_str.ch_C()));
-  }
+
+  String type = ly_scm2string (gl);
+  
+  if (type == "|:") 
+    {
+      type = ".|";
+    }
+  else if (type== ":|")
+    {
+      type = "|.";
+    }
+  else if (type== ":|:")
+    {
+      type = ".|.";
+    }
+
+  gl = ly_str02scm (type.ch_C());
+  if (scm_equal_p (me->get_elt_property (glsym), gl) != SCM_BOOL_T)
+    me->set_elt_property (glsym, gl);
 }
 
 Interval
index 3328d266369c0eae3a688849a98d37d249d9ca5d..131f19e5afc1c4e7288fcd69c54b70f432c3d1c3 100644 (file)
@@ -41,8 +41,8 @@ Spanner::do_break_processing ()
          if (!parent->spanned_rank_iv ().contains_b (this->spanned_rank_iv ()))
            {
              programming_error (to_str ("Spanner `%s' is not fully contained in parent spanner `%s'.",
-                                        classname (this),
-                                        classname (parent)));
+                                        name().ch_C(),
+                                        parent->name ().ch_C ()));
            }
        }
     }
index fc0ed1023f31f51ff49c0c2eacfb60344a46e430..e52df9fd05dda4888bd0f73f0cbc1bfdb665f9f5 100644 (file)
@@ -95,7 +95,7 @@ Stem_tremolo::brew_molecule (SCM smob)
       int beams_i = Stem::beam_count(stem, RIGHT) >? Stem::beam_count (stem, LEFT);
       mol.translate (Offset(stem->relative_coordinate (0, X_AXIS) - me->relative_coordinate (0, X_AXIS),
                            Stem::stem_end_position (stem ) * ss / 2 - 
-                           Directional_element_interface (beam).get () * beams_i * interbeam_f));
+                           Directional_element_interface::get (beam) * beams_i * interbeam_f));
     }
   else
     {  
index 36f9c467933e0339f19de4f153b66890da4d50de..b64f89bafacbf81b40311789b1855ab428700ef2 100644 (file)
@@ -94,13 +94,13 @@ Stem::stem_end_position (Score_element*me)
 Direction
 Stem::get_direction (Score_element*me)
 {
-  Direction d = Directional_element_interface (me).get ();
+  Direction d = Directional_element_interface::get (me);
 
   if (!d)
     {
        d = get_default_dir (me);
        // urg, AAARGH!
-       Directional_element_interface (me).set (d);
+       Directional_element_interface::set (me, d);
     }
   return d ;
 }
@@ -289,7 +289,7 @@ Stem::get_default_stem_end_position (Score_element*me)
   if (!dir)
     {
       dir = get_default_dir (me);
-      Directional_element_interface (me).set (dir);
+      Directional_element_interface::set (me, dir);
     }
   
   /* 
@@ -522,7 +522,7 @@ Stem::calc_stem_info (Score_element*me)
 {
   Score_element * beam = beam_l (me);
 
-  Direction beam_dir = Directional_element_interface (beam).get ();
+  Direction beam_dir = Directional_element_interface::get (beam);
   if (!beam_dir)
     {
       programming_error ("Beam dir not set.");
@@ -565,7 +565,7 @@ Stem::calc_stem_info (Score_element*me)
 
   Real stem_length =  a[multiplicity <? (a.size () - 1)] * staff_space;
 
-  if (!beam_dir || (beam_dir == Directional_element_interface (me).get ()))
+  if (!beam_dir || (beam_dir == Directional_element_interface::get (me)))
     /* normal beamed stem */
     {
       if (multiplicity)
index 346fa9992e0af2d23d664a84686408729c8d0380..257885be9e9d59c8af1d599a7a38d9c4bdd64a1e 100644 (file)
@@ -68,14 +68,14 @@ Tie_column::set_directions (Score_element*me)
     Pointer_group_interface__extract_elements (me, (Score_element*)0, "ties");
 
 
-  Direction d = Directional_element_interface (me).get ();
+  Direction d = Directional_element_interface::get (me);
 
   if (d)
     {
       for (int i = ties.size (); i--;)
        {
          Score_element *  t = ties[i];
-         Directional_element_interface (t).set (d);
+         Directional_element_interface::set (t, d);
        }
       return;
     }
@@ -83,18 +83,15 @@ Tie_column::set_directions (Score_element*me)
   if (ties.size () == 1)
     {
       Score_element *  t = ties[0];      
-      Directional_element_interface (t).set (Tie::get_default_dir (t));
+      Directional_element_interface::set (t,Tie::get_default_dir (t));
       return;
     }
   
   ties.sort (tie_compare);
-  Directional_element_interface tie0(ties[0]);
-  tie0.set (DOWN);
+  Directional_element_interface::set( ties[0], DOWN);
   ties.del (0);
   
-  Directional_element_interface tietop(ties.pop ());
-  tietop.set (UP);
-
+  Directional_element_interface ::set(ties.pop (), UP);
   for (int i=ties.size(); i--; )
     {
       Score_element *  t = ties[i];
@@ -102,7 +99,7 @@ Tie_column::set_directions (Score_element*me)
       Direction d = (Direction) sign (p);
       if (!d)
        d = UP;
-      Directional_element_interface (t).set (d);
+      Directional_element_interface::set (t, d);
     }
   
 }
index 9c7b70ff33dc8aba2b19d3909e092f4b04a024d2..0ce6fbd98374ecf14e916c1e3080d8632ee37e64 100644 (file)
@@ -88,14 +88,14 @@ Tie::get_default_dir (Score_element*me)
 
   if (sl && sr)
     {
-      if (Directional_element_interface (sl).get () == UP
-         && Directional_element_interface (sr).get () == UP)
+      if (Directional_element_interface::get (sl) == UP
+         && Directional_element_interface::get (sr) == UP)
        return DOWN;
     }
   else if (sl || sr)
     {
       Item *s = sl ? sl : sr;
-      return - Directional_element_interface (s). get ();
+      return - Directional_element_interface::get (s);
     }
 
   
@@ -119,8 +119,8 @@ Tie::get_control_points (SCM smob)
       return SCM_UNSPECIFIED;
     }
   
-  if (!Directional_element_interface (me).get ())
-    Directional_element_interface (me).set (Tie::get_default_dir (me));
+  if (!Directional_element_interface::get (me))
+    Directional_element_interface::set (me, Tie::get_default_dir (me));
   
   Real staff_space = Staff_symbol_referencer::staff_space (me);
 
@@ -163,7 +163,7 @@ Tie::get_control_points (SCM smob)
          - 2 * x_gap_f;
     }
   
-  Direction dir = Directional_element_interface (me).get();
+  Direction dir = Directional_element_interface::get(me);
   
   Real h_inf = me->paper_l ()->get_var ("tie_height_limit_factor") * staff_space;
   Real r_0 = me->paper_l ()->get_var ("tie_ratio");
@@ -290,7 +290,7 @@ Tie::brew_molecule (SCM smob)
       i++;
     }
   
-   Molecule a = me->lookup_l ()->slur (b, Directional_element_interface (me).get () * thick, thick);
+   Molecule a = me->lookup_l ()->slur (b, Directional_element_interface::get (me) * thick, thick);
    
    return a.create_scheme ();
 }
index 99f7898328d9edc056864ba051f3bb03ae834e81..8eeb7e3109cf91529865ed8e6b65bdfdbaa46490 100644 (file)
@@ -10,7 +10,7 @@
 #include "command-request.hh"
 #include "engraver.hh"
 
-#include "timing-engraver.hh"
+
 #include "engraver-group-engraver.hh"
 
 
@@ -24,7 +24,7 @@ protected:
 public:
   VIRTUAL_COPY_CONS(Translator);
   Item * time_signature_p_;
-
+  SCM last_time_fraction_;
   Time_signature_engraver();
 };
 
@@ -32,39 +32,25 @@ public:
 Time_signature_engraver::Time_signature_engraver()
 { 
   time_signature_p_ =0;
+  last_time_fraction_ = SCM_EOL;
 }
 
 void
 Time_signature_engraver::do_process_music()
 {
   /*
-    UGH.
-    this should use properties.
-   */
-  Translator * result =
-    daddy_grav_l()->get_simple_translator ("Timing_engraver"); // ugh
-
-  if (!result)
-    {
-      warning (_ ("lost in time:"));
-      warning (_f ("can't find: `%s'", " Timing_translator"));
-      return ;
-    }
-  
-  Timing_engraver * timing_grav_l= dynamic_cast<Timing_engraver *> (result);
-  
-  Time_signature_change_req *req = timing_grav_l->time_signature_req_l();
-  if (req)
+    not rigorously safe, since the value might get GC'd and
+    reallocated in the same spot */
+  SCM fr= get_property ("timeSignatureFraction");
+  if (last_time_fraction_ != fr)
     {
+      last_time_fraction_ = fr; 
       time_signature_p_ = new Item (get_property ("basicTimeSignatureProperties"));
-      time_signature_p_->set_elt_property ("fraction",
-                                          gh_cons (gh_int2scm (req->beats_i_),
-                                                   gh_int2scm (req->one_beat_i_))); 
+      time_signature_p_->set_elt_property ("fraction",fr);
     }
-
   
   if (time_signature_p_)
-    announce_element (time_signature_p_, req);
+    announce_element (time_signature_p_, 0);
 }
 
 void
index 68c34aeff62d8ff416a98a32263da37e73c752e6..95b68d0369885b807299b9e71a9d65699bc5ae36 100644 (file)
@@ -6,11 +6,27 @@
   (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-#include "score-engraver.hh"
-#include "timing-engraver.hh"
+#include "translator-group.hh"
 #include "command-request.hh"
 #include "score-element-info.hh"
 #include "multi-measure-rest.hh"
+#include "timing-translator.hh"
+#include "engraver.hh"
+
+/**
+  Do time bookkeeping
+ */
+class Timing_engraver : public Timing_translator, public Engraver
+{   
+  Bar_req * bar_req_l_;
+protected:
+  virtual bool do_try_music (Music * );
+  virtual void do_post_move_processing ();
+  virtual void do_process_music ();
+public:
+  String which_bar (); 
+  VIRTUAL_COPY_CONS(Translator);
+};
 
 ADD_THIS_TRANSLATOR(Timing_engraver);
 
@@ -19,7 +35,21 @@ Timing_engraver::do_post_move_processing( )
 {
   bar_req_l_ = 0;
   Timing_translator::do_post_move_processing ();
+
+  SCM nonauto = get_property ("barNonAuto");
+  SCM which = now_mom () ? SCM_UNDEFINED : ly_str02scm ("|");
   
+  if (which == SCM_UNDEFINED && !to_boolean (nonauto))
+    {
+      SCM always = get_property ("barAlways");
+      if (!measure_position ()
+         || (to_boolean (always)))
+       {
+         which=get_property ("defaultBarType" );
+       }
+    }
+
+  daddy_trans_l_->set_property ("whichBar", which);
 }
 
 bool
@@ -27,7 +57,7 @@ Timing_engraver::do_try_music (Music*m)
 {
   if (Bar_req  * b= dynamic_cast <Bar_req *> (m))
     {
-      if (bar_req_l_ && !bar_req_l_->equal_b (b)) // huh?
+      if (bar_req_l_ && !bar_req_l_->equal_b (b)) 
        return false;
       
       bar_req_l_ = b;
@@ -37,32 +67,10 @@ Timing_engraver::do_try_music (Music*m)
   return Timing_translator::do_try_music (m);
 }
 
-/*
-  TODO make properties of this.
- */
-String
-Timing_engraver::which_bar ()
+void
+Timing_engraver::do_process_music ()
 {
-  if (!bar_req_l_)
-    {
-      if (!now_mom ())
-       return "|";
-
-      SCM nonauto = get_property ("barNonAuto");
-      if (!to_boolean (nonauto))
-       {
-         SCM always = get_property ("barAlways");
-         if (!measure_position ()
-             || (to_boolean (always)))
-           {
-             SCM def=get_property ("defaultBarType" );
-             return (gh_string_p (def))? ly_scm2string (def) : "";
-           }
-       }
-      return "";
-    }
-  else
-    {
-      return bar_req_l_->type_str_;
-    }
+  if (bar_req_l_)
+    daddy_trans_l_->set_property ("whichBar", bar_req_l_->get_mus_property ("type"));
 }
+
index ab453e5a45d3fa0bf34009d9e84fafd237955e6c..430a9939bc06ce60475a7c59cb10be0f27619d48 100644 (file)
@@ -44,20 +44,6 @@ Timing_translator::do_try_music (Music*r)
     }
   return false;
 }
-
-/*ugh.
- */
-Time_signature_change_req*
-Timing_translator::time_signature_req_l() const
-{
-  Time_signature_change_req *m_l=0;
-  for (int i=0; !m_l && i < timing_req_l_arr_.size (); i++)
-    {
-      m_l=dynamic_cast<Time_signature_change_req*> (timing_req_l_arr_[i]);
-    }
-  return m_l;
-}
-
 void
 Timing_translator::do_process_music()
 {
@@ -127,6 +113,8 @@ Timing_translator::do_creation_processing()
   daddy_trans_l_->set_property ("measurePosition", m.make_scm ());
   daddy_trans_l_->set_property ("beatLength", Moment (1,4).make_scm ());
   daddy_trans_l_->set_property ("measureLength",  Moment (1).make_scm());
+  daddy_trans_l_->set_property ("timeSignatureFraction",
+                               gh_cons (gh_int2scm (4), gh_int2scm (4)));
 }
 
 Moment
@@ -147,6 +135,8 @@ Timing_translator::set_time_signature (int l, int o)
   Moment len = Moment (l) * one_beat;
   daddy_trans_l_->set_property ("measureLength", len.make_scm ());
   daddy_trans_l_->set_property ("beatLength", one_beat.make_scm ());
+  daddy_trans_l_->set_property ("timeSignatureFraction",
+                               gh_cons (gh_int2scm (l), gh_int2scm (o)));
 }
 
 Timing_translator::Timing_translator()
index d2b7c83a04dbcd637bdf31ac8ab7759d81a9ed23..74cee77b61d95d1368b12c81c0b095da68ac915e 100644 (file)
@@ -73,11 +73,6 @@ Translator_group::add_translator (SCM list, Translator *t)
   return list;
 }
 void
-Translator_group::add_simple_translator (Translator*t)
-{
-  simple_trans_list_ = add_translator (simple_trans_list_, t);
-}
-void
 Translator_group::add_group_translator (Translator *t)
 {
   trans_group_list_ = add_translator (trans_group_list_,t);
@@ -247,7 +242,10 @@ Translator_group::remove_translator_p (Translator*trans_l)
   return trans_l;
 }
 
-
+#if 0
+/*
+  should not use, instead: use properties to communicate between engravers.
+ */
 Translator*
 Translator_group::get_simple_translator (String type) const
 {
@@ -260,7 +258,7 @@ Translator_group::get_simple_translator (String type) const
     return daddy_trans_l_->get_simple_translator (type);
   return 0;
 }
-
+#endif 
 
 bool
 Translator_group::is_bottom_translator_b () const
index a86a222c8488f2ab4b79e73287f3b716b23482e8..a74e155f0f05d7921e97188453c0598502ce32e3 100644 (file)
@@ -73,7 +73,7 @@ Tuplet_spanner::brew_molecule (SCM smob)
       Real w = dynamic_cast<Spanner*>(me)->spanner_length () + ncw;
 
       Real staff_space = me->paper_l ()->get_var ("interline");
-      Direction dir = Directional_element_interface (me).get ();
+      Direction dir = Directional_element_interface::get (me);
       Real dy = gh_scm2double (me->get_elt_property ("delta-y"));
       SCM number = me->get_elt_property ("text");
       if (gh_string_p (number) && number_visibility)
@@ -131,7 +131,7 @@ Tuplet_spanner::calc_position_and_height (Score_element*me,Real *offset, Real *
   Score_element * commony = me->common_refpoint (me->get_elt_property ("columns"), Y_AXIS);
   Score_element * commonx = me->common_refpoint (me->get_elt_property ("columns"), X_AXIS);  
   
-  Direction d = Directional_element_interface (me).get ();
+  Direction d = Directional_element_interface::get (me);
 
   /*
     Use outer non-rest columns to determine slope
@@ -186,7 +186,7 @@ Tuplet_spanner::calc_dy (Score_element*me,Real * dy)
   Link_array<Score_element> column_arr=
     Pointer_group_interface__extract_elements (me, (Score_element*)0, "columns");
  
-  Direction d = Directional_element_interface (me).get ();
+  Direction d = Directional_element_interface::get (me);
   *dy = column_arr.top ()->extent (Y_AXIS) [d]
     - column_arr[0]->extent (Y_AXIS) [d];
 }
@@ -207,11 +207,11 @@ Tuplet_spanner::after_line_breaking (SCM smob)
       return SCM_UNSPECIFIED;
     }
 
-  Direction d = Directional_element_interface (me).get ();
+  Direction d = Directional_element_interface::get (me);
   if (!d)
     {
       d = Tuplet_spanner::get_default_dir (me);
-      Directional_element_interface (me).set (d);
+      Directional_element_interface::set (me, d);
 
     }
   Real dy, offset;
index 295e1665aed78cf0749f8295a43936c5af02e4a6..7e738429893b004adaa029ba74fc6f6d2933bcfe 100644 (file)
@@ -24,7 +24,7 @@ Volta_spanner::set_interface (Score_element*me)
 {
   me->set_elt_property ("bars", SCM_EOL);
   Side_position::set_axis (me, Y_AXIS);
-  Directional_element_interface (me).set (UP);
+  Directional_element_interface::set (me, UP);
 }
 
 
index 3671d3c46c09050396ba52e29047b721324f848c..8b6a2f63ebc0007796a4601f0c9e6222a5e28ea8 100644 (file)
@@ -16,6 +16,7 @@ StaffContext=\translator {
 
 
        \consists "Repeat_engraver";
+       \consists "Separating_line_group_engraver";     
 
 
 
@@ -424,7 +425,9 @@ ScoreContext = \translator {
        % staffspace (distances)
        %
        basicBarProperties = #`(
+               (interfaces . (bar-interface staff-bar-interface))
                (break-align-symbol . Staff_bar)
+               (glyph . "|")
                (barsize-procedure . ,Bar::get_staff_bar_size)
                (molecule-callback . ,Bar::brew_molecule)          
                (visibility-lambda . ,all-visible)
@@ -437,14 +440,14 @@ ScoreContext = \translator {
                (thin-kern . 3.0)
                (hair-thickness . 1.6)
                (thick-thickness . 6.0)
-
-               (interfaces . (bar-interface staff-bar-interface))              
+               (name . "barline")
        )
 
        basicBarNumberProperties = #`(
                (molecule-callback . ,Text_item::brew_molecule)
                (breakable . #t)
                (visibility-lambda . ,begin-of-line-visible)
+               (name . "barnumber")
        )
 
        basicBeamProperties = #`(
@@ -455,6 +458,7 @@ ScoreContext = \translator {
                (default-neutral-direction . 1)
                (interfaces . (beam-interface))
                (damping . 1)
+               (name . "beam")         
        )
 
        basicBreakAlignProperties = #`(
@@ -462,54 +466,64 @@ ScoreContext = \translator {
                (interfaces . (break-align-interface))
                (stacking-dir . 1)
                (axes 0)
+               (name . "break alignment")              
        )
        basicBreakAlignGroupProperties = #`(
                (interfaces . (axis-group-interface))
                (axes  . (0))
+               (name . "break alignment group")
        )
        basicBreathingSignProperties = #`(
+               (interfaces . (breathing-sign-interface))
                (break-align-symbol . Breathing_sign)
                (breakable . #t )
                (molecule-callback . ,Breathing_sign::brew_molecule)
                (visibility-lambda . ,begin-of-line-invisible)
-               (interfaces . (breathing-sign-interface))
+               (name . "breathing sign")
        )
         basicClefItemProperties = #`(
+          (interfaces .  (clef-interface))
           (molecule-callback . ,Score_element::brew_molecule)
           (before-line-breaking-callback . ,Clef::before_line_breaking)
           (breakable . #t)
           (break-align-symbol . Clef_item)
           (visibility-lambda . ,begin-of-line-visible)
-          (interfaces .  (clef-interface))
+          (name . "clef")
         )
        basicChordNameProperties = #`(
                (molecule-callback . ,Chord_name::brew_molecule)
                (interfaces . (chord-name-interface))
-               (after-line-breaking-callback . ,Chord_name::after_line_breaking) 
+               (after-line-breaking-callback . ,Chord_name::after_line_breaking)
+               (name . "chord name")  
        )
        basicCollisionProperties = #`(
                (axes 0 1)
                (interfaces . (collision-interface))
+               (name . "note collision")
        )
        basicCrescendoProperties = #`(
                (molecule-callback . ,Crescendo::brew_molecule)
                (interfaces . (crescendo-interface dynamic-interface))
+               (name . "crescendo")
        )
        basicDotColumnProperties = #`(
                (interfaces . (dot-column-interface axis-group-interface ))
                (axes 0 )
+               (name . "dot column")
        )
        basicDotsProperties = #`(
+               (interfaces . (dot-interface))
                (molecule-callback . ,Dots::brew_molecule)
                (dot-count . 1)
-               (interfaces . (dot-interface))
+               (name . "augmentation dot")             
        )
-       basicDynamicTextProperties = # `(
+       basicDynamicTextProperties = #`(
                (style . "dynamic")
                (interfaces . (dynamic-interface))
                (molecule-callback . ,Text_item::brew_molecule)
                (script-priority . 100)
                (self-alignment-Y . 0)
+               (name . "dynamic text")
        )
        
        basicDynamicLineSpannerProperties = #`(
@@ -517,25 +531,31 @@ ScoreContext = \translator {
                (axes . ( 1))
                (padding . 3)
                (minimum-space . 6)
+               (name . "dynamic alignment")
        )
+       
        leftEdgeBasicProperties = #`(
                (break-align-symbol . Left_edge_item)
                (breakable . #t)
+               (name . "left edge")
        )
        basicGraceAlignItemProperties = #`(
                (axes . (0))
                (interfaces . (axis-group-interface align-interface))
                (before-line-breaking-callback . ,Grace_align_item::before_line_breaking)
+               (name . "grace alignment")
        )
        basicHaraKiriVerticalGroupspannerProperties = #`(
                (interfaces . (hara-kiri-interface))
                (axes 1)
+               (name . "hara kiri")
        )
        basicHyphenSpannerProperties = #`(
                (thickness . 1.0)
                (height . 0.4)
                (minimum-length .  0.5) 
                (molecule-callback . ,Hyphen_spanner::brew_molecule)
+               (name . "hyphen")               
        )
        
        basicInstrumentNameProperties = #`(
@@ -543,6 +563,7 @@ ScoreContext = \translator {
                (molecule-callback . ,Text_item::brew_molecule)         
                (break-align-symbol . Instrument_name)
                (visibility-lambda . ,begin-of-line-visible)
+               (name . "instrument name")
        )
        basicKeyProperties = #`(
          (molecule-callback . ,Key_item::brew_molecule)
@@ -550,51 +571,61 @@ ScoreContext = \translator {
          (break-align-symbol . Key_item)
          (visibility-lambda . ,begin-of-line-visible)
          (breakable . #t)
+         (name . "key signature")
          )     
        basicLocalKeyProperties = #`(
                (molecule-callback . ,Local_key_item::brew_molecule)
                (left-padding . 0.2)
                (right-padding . 0.4)
                (interfaces . (accidentals-interface))
+               (name .  "accidentals")
        )
        basicLineOfScoreProperties = #`(
                (axes . (0 1))
                (interfaces . (axis-group-interface))
+               (name .  "godzilla")
        )
        basicLyricExtenderProperties = #`(
+               (interfaces . (lyric-extender-interface))
                (molecule-callback . ,Lyric_extender::brew_molecule)
                (right-trim-amount . 0.5)
-               (interfaces . (lyric-extender-interface))
+               (name . "extender line")
        )
        basicLyricTextProperties = #`(
+               (interfaces .  (lyric-syllable-interface text-item-interface))
                (molecule-callback . ,Text_item::brew_molecule)
                (self-alignment-X . 0)
                (non-rhythmic . #t)
                (word-space . 0.6)
-               (interfaces .  (lyric-syllable-interface text-item-interface))
+               (name . "lyric syllable") 
        )
        basicMarkProperties = #`(
+         (interfaces . (mark-interface))
          (molecule-callback . ,Text_item::brew_molecule)       
          (breakable . #t)
-         (interfaces . (mark-interface))
          (visibility-lambda . ,end-of-line-invisible)
          (padding . 4.0)
+         (name . "rehearsal mark")
        )
        basicMultiMeasureRestProperties = #`(
                (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)             
                (molecule-callback . ,Multi_measure_rest::brew_molecule)
                (staff-position . 0)
+               (name . "multi-measure rest")
        )
        basicNoteColumnProperties = #`(
-               (axes 0 1)
                (interfaces . (axis-group-interface note-column-interface))
+               (axes 0 1)
+               (name . "note column")
        )
        basicNoteHeadProperties = #`(
                (interfaces . (note-head-interface rhythmic-head-interface))
                (molecule-callback . ,Note_head::brew_molecule)
+               (name . "note head")
        )
        basicNoteNameProperties = #`(
                (molecule-callback . ,Text_item::brew_molecule)
+               (name . "note name")
        )
        basicOctavateEightProperties  = #`(
                (self-alignment-X . 0)
@@ -614,40 +645,48 @@ ScoreContext = \translator {
                (after-line-breaking-callback . ,Rest::after_line_breaking)
                (molecule-callback . ,Rest::brew_molecule)
                (minimum-beam-collision-distance . 1.5)
+               (name . "rest")
        )
        
        basicRestCollisionProperties = #`(
-               (minimum-distance . 0.75)
                (interfaces . (rest-collision-interface))
+               (minimum-distance . 0.75)
+               (name . "rest collision")               
        )
-       basicScriptProperties    = #`(
+       basicScriptProperties = #`(
                (molecule-callback . ,Script::brew_molecule)
                (interfaces . (script-interface))
+               (name . "script")
        )
        basicScriptColumnProperties = #`(
                (before-line-breaking-callback . ,Script_column::before_line_breaking)
+               (name . "script column")
        )
        basicSlurProperties = #`(
+               (interfaces . (slur-interface))
                (molecule-callback . ,Slur::brew_molecule)
                (thickness . 1.2)               
-               (spacing-procedure . ,Slur::set_spacing_rods)           e
+               (spacing-procedure . ,Slur::set_spacing_rods)           
                (minimum-length . 1.5)
-               (after-line-breaking-callback . ,Slur::after_line_breaking) 
+               (after-line-breaking-callback . ,Slur::after_line_breaking)
+               (name . "slur")
        )
        basicSpacingSpannerProperties =#`(
                (spacing-procedure . ,Spacing_spanner::set_springs)
 
                ;; assume that notes at least this long are present.
                (maximum-duration-for-spacing . ,(make-moment 1 8))
+               (name . "spacing spanner")
        )
        basicSpanBarProperties = #`(
+               (interfaces . (bar-interface span-bar-interface))
                (break-align-symbol . Staff_bar)
                (barsize-procedure . ,Span_bar::get_bar_size) 
                (molecule-callback . ,Bar::brew_molecule)
                (visibility-lambda . ,begin-of-line-invisible)
                (breakable . #t)
+               (glyph . "|")
                (before-line-breaking-callback . ,Span_bar::before_line_breaking)
-
                ;; ugh duplication! 
                
                ;;
@@ -657,19 +696,21 @@ ScoreContext = \translator {
                (thin-kern . 3.0)
                (hair-thickness . 1.6)
                (thick-thickness . 6.0)
-               (interfaces . (bar-interface span-bar-interface))
+               (name . "cross staff bar-line")
        )
        basicStanzaNumberProperties = #`(
                (breakable . #t)
                (molecule-callback . ,Text_item::brew_molecule)         
                (break-align-symbol . Clef_item)
                (visibility-lambda . ,begin-of-line-visible)
+               (name . "stanza number")
        )
        staffSymbolBasicProperties = #`(
+               (interfaces . (staff-symbol-interface ))
                (molecule-callback . ,Staff_symbol::brew_molecule)
                (staff-space . 1.0)
                (line-count . 5 )
-               (interfaces . (staff-symbol-interface ))
+               (name . "staff symbol")
        )
        basicSystemStartDelimiterProperties = #`(
                (molecule-callback . ,System_start_delimiter::brew_molecule)
@@ -682,30 +723,35 @@ ScoreContext = \translator {
                (arch-width . 1.5)
                (bracket-thick . 0.25)
                (bracket-width . 2.0)
+               (name . "system start bracket")
        )
        basicTextScriptProperties = #`(
                (molecule-callback . ,Text_item::brew_molecule)
                (no-spacing-rods . #t)
                (interfaces . (text-script-interface text-item-interface))
-               (padding .      3.0)            
+               (padding .      3.0)
+               (name . "text script") 
        )
        basicTieProperties = #`(
+               (interfaces . (tie-interface))
                (molecule-callback . ,Tie::brew_molecule)
                (spacing-procedure . ,Tie::set_spacing_rods)
                (thickness . 1.2)
                (minimum-length  . 2.5)
-               (interfaces . (tie-interface))
+               (name . "tie")
        )
        basicTieColumnProperties = #`(
                (after-line-breaking-callback . ,Tie_column::after_line_breaking)
                (interfaces . (tie-column-interface))
+               (name . "tie column")           
        )
        basicTimeSignatureProperties = #`(
+               (interfaces . (time-signature-interface))
                (molecule-callback . ,Time_signature::brew_molecule)
                (break-align-symbol . Time_signature)
                (visibility-lambda . ,all-visible)
                (breakable . #t)
-               (interfaces . (time-signature-interface))
+               (name . "time signature")
        )
        basicTupletSpannerProperties = #`(
                (number-gap . 2.0)   
@@ -720,50 +766,60 @@ ScoreContext = \translator {
                (style . "italic")
                (no-spacing-rods . #t)
                (self-alignment-X . 0)
+               (name  . "sostenuto pedal")
                                
        )
        basicStemTremoloProperties = #`(
                (molecule-callback . ,Stem_tremolo::brew_molecule)
                (beam-width . 2.0) ; staff-space
                (beam-thickness . 0.42) ; staff-space
+               (name . "stem tremolo")
        )
        basicStemProperties = #`(
+               (interfaces . (stem-interface))
                (before-line-breaking-callback . ,Stem::before_line_breaking)
                (molecule-callback . ,Stem::brew_molecule)
 
                ; if stem is on middle line, choose this direction.
                (default-neutral-direction . 1)
-               (interfaces . (stem-interface))
+               (name . "stem")
        )
        basicSeparationItemProperties = #`(
                (interfaces . (separation-item-interface))
+               (name . "separation item")
        )
        basicSeparatingGroupSpannerProperties = #`(
                (interfaces . (separation-spanner-interface))
                (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
+               (name . "separation spanner")
        )
        basicSustainPedalProperties = #`(
+               (interfaces . (sustain-pedal-interface))
                (no-spacing-rods . #t)
                (molecule-callback . ,Sustain_pedal::brew_molecule)
                (self-alignment-X . 0)
-               (interfaces . (sustain-pedal-interface))
+               (name . "sustain pedal")                
        )       
        basicUnaChordaPdealProperties = #`(
                (molecule-callback . ,Text_item::brew_molecule)
                (style . "italic")
                (no-spacing-rods . #t)
                (self-alignment-X . 0)
+               (name . "una chorda pedal")
        )
        
        basicVoltaSpannerProperties = #`(
                (molecule-callback . ,Volta_spanner::brew_molecule)
-               (interfaces . (volta-spanner-interface))
+               (interfaces . (volta-spanner-interface side-position-interface))
+               (direction . 1)
                (padding . 5)
                (minimum-space . 25)
+               (name . "volta brace")
        )       
        basicVerticalAxisGroupProperties = #`(
                (axes 1)
                (interfaces . (axis-group-interface))
+               (name . "Y-axis group")
        )
 };
 
index 951fe62c358089cbea4cd91e33b3b57859a5e59c..38d3df23ec1be8292c53ead1749acb4845f5389b 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Title: LilyPond
-Version: 1.3.82
-Entered-date: 31AUG00
+Version: 1.3.83
+Entered-date: 01SEP00
 Description: 
 Keywords: music notation typesetting midi fonts engraving
 Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
-       1000k lilypond-1.3.82.tar.gz 
+       1000k lilypond-1.3.83.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       1000k lilypond-1.3.82.tar.gz 
+       1000k lilypond-1.3.83.tar.gz 
 Copying-policy: GPL
 End
index d6ee4e016145a62a97e5bc0b2796b326b197b207..71d33beb679785048c5cca7280d247aa240fc2e6 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 1.3.82
+Version: 1.3.83
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.82.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.83.tar.gz
 Summary: A program for printing sheet music.
 URL: http://www.cs.uu.nl/~hanwen/lilypond
 # Icon: lilypond-icon.gif
index 3363872a4252fbce580b679f1ce4d4fa8c93dbb8..1835fd340be29a25cf771c6152ff2c5ec6cf7c0c 100644 (file)
@@ -239,6 +239,8 @@ articulation_dict ={
        12: '\\mordent',
        8: '\\fermata',
        4: '^',
+       1: '.',
+       3: '>',
        18: '"arp"' , # arpeggio
 };
 
@@ -252,7 +254,7 @@ class Articulation:
                try:
                        a = articulation_dict[self.type]
                except KeyError:
-                       sys.stderr.write ("\nUnknown articulation %d" % self.type)
+                       sys.stderr.write ("\nUnknown articulation no. %d on note no. %d" % (self.type, self.notenumber))
                        a = '"art"'
                        
                c.note_suffix = '-' + a + c.note_suffix