]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.1.35 release/1.1.35
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 15 Mar 1999 12:32:08 +0000 (13:32 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 15 Mar 1999 12:32:08 +0000 (13:32 +0100)
176 files changed:
ANNOUNCEMENT [deleted file]
ANNOUNCEMENT-1.0 [new file with mode: 0644]
Documentation/faq.yo
Documentation/topdocs/index.yo
NEWS
TODO
VERSION
flower/hash.cc
flower/include/unionfind.hh
flower/unionfind.cc
input/test/bar-number.ly [new file with mode: 0644]
input/test/number-staff-lines.fly [new file with mode: 0644]
input/test/staff-size.fly [new file with mode: 0644]
lib/template.cc
lily/abbrev.cc
lily/abbreviation-beam.cc
lily/align-element.cc
lily/audio-column.cc
lily/audio-staff.cc
lily/auto-beam-engraver.cc
lily/axis-group-element.cc
lily/axis-group-item.cc
lily/axis-group-spanner.cc
lily/bar-engraver.cc
lily/bar-script-engraver.cc
lily/bar.cc
lily/base-span-bar-engraver.cc
lily/beam.cc
lily/bezier.cc
lily/bow.cc
lily/break.cc
lily/clef-engraver.cc
lily/clef-item.cc
lily/collision.cc
lily/dimension-cache.cc
lily/dots.cc
lily/dynamic-engraver.cc
lily/encompass-info.cc
lily/engraver.cc
lily/extender-engraver.cc
lily/extender-spanner.cc
lily/font-size-engraver.cc
lily/g-staff-side.cc
lily/g-text-item.cc
lily/graphical-axis-group.cc
lily/graphical-element.cc
lily/hara-kiri-vertical-group-spanner.cc
lily/heads-engraver.cc
lily/include/align-element.hh
lily/include/audio-column.hh
lily/include/audio-staff.hh
lily/include/axis-group-element.hh
lily/include/bar.hh
lily/include/beam.hh
lily/include/clef-item.hh
lily/include/cons.hh
lily/include/dimension-cache.hh
lily/include/directional-spanner.hh
lily/include/dots.hh
lily/include/encompass-info.hh
lily/include/engraver-group.hh
lily/include/engraver.hh
lily/include/g-staff-side.hh
lily/include/graphical-element.hh
lily/include/item.hh
lily/include/key-item.hh
lily/include/killing-cons.tcc
lily/include/lily-guile.hh
lily/include/line-of-score.hh
lily/include/local-key-item.hh
lily/include/ly-symbols.hh [new file with mode: 0644]
lily/include/midi-walker.hh
lily/include/molecule.hh
lily/include/multi-measure-rest.hh
lily/include/music-iterator.hh
lily/include/music-list-iterator.hh
lily/include/music-list.hh
lily/include/music-output-def.hh
lily/include/note-column.hh
lily/include/note-head.hh
lily/include/p-col.hh
lily/include/paper-def.hh
lily/include/performance.hh
lily/include/performer-group-performer.hh
lily/include/rhythmic-head.hh
lily/include/score-element.hh
lily/include/score-priority-engraver.hh
lily/include/score.hh
lily/include/script.hh
lily/include/separating-group-spanner.hh
lily/include/sequential-music-iterator.hh
lily/include/spanner.hh
lily/include/staff-bar.hh [new file with mode: 0644]
lily/include/staff-info.hh
lily/include/staff-side.hh
lily/include/staff-sym-engraver.hh
lily/include/staff-sym.hh [deleted file]
lily/include/staff-symbol-referencer.hh [new file with mode: 0644]
lily/include/staff-symbol.hh [new file with mode: 0644]
lily/include/stem.hh
lily/include/symbols.hh [new file with mode: 0644]
lily/include/text-spanner.hh
lily/item.cc
lily/key-engraver.cc
lily/key-item.cc
lily/line-group-group-engraver.cc
lily/line-of-score.cc
lily/local-key-item.cc
lily/lookup.cc
lily/ly-symbols.cc [new file with mode: 0644]
lily/main.cc
lily/midi-item.cc
lily/midi-walker.cc
lily/multi-measure-rest-engraver.cc
lily/multi-measure-rest.cc
lily/music-list.cc
lily/music-output-def.cc
lily/music-sequence.cc
lily/note-column.cc
lily/note-head.cc
lily/p-col.cc
lily/p-score.cc
lily/paper-def.cc
lily/paper-outputter.cc
lily/parser.yy
lily/performance.cc
lily/priority-halign-engraver.cc [deleted file]
lily/repeat-engraver.cc
lily/request-iterator.cc
lily/rest-collision.cc
lily/rest.cc
lily/rhythmic-column-engraver.cc
lily/score-element.cc
lily/score-engraver.cc
lily/score-performer.cc
lily/score-priority-engraver.cc
lily/script-engraver.cc
lily/script.cc
lily/separating-group-spanner.cc
lily/separating-line-group-engraver.cc
lily/sequential-music-iterator.cc
lily/simultaneous-music-iterator.cc
lily/single-malt-grouping-item.cc
lily/slur.cc
lily/span-bar.cc
lily/span-score-bar-engraver.cc
lily/spanner.cc
lily/spring-spacer.cc
lily/staff-bar.cc [new file with mode: 0644]
lily/staff-info.cc
lily/staff-side.cc
lily/staff-sym-engraver.cc
lily/staff-sym.cc
lily/staff-symbol-referencer.cc [new file with mode: 0644]
lily/stem-engraver.cc
lily/stem-info.cc
lily/stem.cc
lily/template7.cc [deleted file]
lily/text-engraver.cc
lily/text-spanner.cc
lily/tie.cc
lily/time-signature-engraver.cc
lily/time-signature.cc
lily/timing-translator.cc
lily/tuplet-spanner.cc
lily/volta-spanner.cc
ly/engraver.ly
ly/performer.ly
make/out/lelievijver.lsm
make/out/lilypond.lsm
make/out/lilypond.spec
make/toplevel.make.in
mf/TODO
scm/lily.scm
scripts/ly2dvi.py
tex/lilyponddefs.tex

diff --git a/ANNOUNCEMENT b/ANNOUNCEMENT
deleted file mode 100644 (file)
index 33190c9..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-Keywords: midi notation music typesetting gnu font engraving 
-Subject: GNU LilyPond 1.0 released - The Music Typesetter
-
-GNU LilyPond - The Music Typesetter
-
-
-WHAT IS LilyPond?
-
-LilyPond is the GNU Project music typesetter.  This program can print
-beautiful sheet music from a music definition file.  It can also play
-performances to a MIDI file.
-
-
-WHAT'S NEW SINCE VERSION 0.1?
-
-* LilyPond now includes a completely new music font: the Feta font.  
-  We were quite disappointed with available music fonts, so we rolled
-  our own.  We did our best to copy the best symbol designs available,
-  and we think that we've succeeded in doing so.  We're proud of the
-  result, and we hope you agree, so go check it out!
-
-* More elegant output due to 
-
-       * more sophisticated beam/slur formatting
-       * better spacing
-       * better line breaking
-       * better font design
-       * PostScript output for variable symbols
-
-* Lots of bugfixes
-
-* More robust, flexible and tweakable design
-
-* Better MIDI file importing
-
-* Easier to use due to better shell scripts and input format
-enhancements
-
-* MusixTeX is not needed anymore
-
-* Faster
-
-
-
-FEATURES
-
-* Multiple staffs, polyphonic music (more voices on one staff),
-Polymetric music.
-
-* Support for full orchestral score: Hara_kiri systems (lines with
-only rests are automatically skipped), multi-measure rests, bar
-numbering, brackets at the left.
-
-* Optimal beam slopes, slur/notehead collision resolution, dashed
-slurs. Formatting parameters are runtime tunable
-
-* Very beautiful symbols.  Variable size symbols generated on the fly
-as embedded postscript.
-
-* MIDI output
-
-* Optimal linebreaking, manual intervention possible.  Linelength is
-settable per line.
-
-* Readable yet very fast to type input language.  With configurable
-note names and identifiers.  Comes with an emacs-mode
-
-* With lots of examples (among others a fragment of Van Beethoven's
-Coriolan, J.S.Bach Cello Suite II, F. Schubert "Leise flehen meine
-Lieder")
-
-* Runs on UNIX and Windows-32.
-
-* Easy generation of titling.
-
-* WWW browsable documentation.
-
-* Support for Urtext: separation of modern and original interpretation.
-
-* Polyphonic music (with automatic collision resolution)
-
-* Spacing and collision resolution of accidentals and syllables is
-done automatically
-
-* Internationalisation support (Italian, Dutch)
-
-* Multiple font sizes within one piece
-
-* Integration with LaTeX and YODL
-
-
-MORE INFO
-
-Sources for this project are on
-
-       ftp://pcnov095.win.tue.nl/pub/lilypond/ (Europe)
-       ftp://ftp.gnu.org/pub/gnu/
-
-More detailed info and examples can be found on the webpage at
-
-       http://www.cs.uu.nl/~hanwen/lilypond/index.html
-
diff --git a/ANNOUNCEMENT-1.0 b/ANNOUNCEMENT-1.0
new file mode 100644 (file)
index 0000000..33190c9
--- /dev/null
@@ -0,0 +1,102 @@
+Keywords: midi notation music typesetting gnu font engraving 
+Subject: GNU LilyPond 1.0 released - The Music Typesetter
+
+GNU LilyPond - The Music Typesetter
+
+
+WHAT IS LilyPond?
+
+LilyPond is the GNU Project music typesetter.  This program can print
+beautiful sheet music from a music definition file.  It can also play
+performances to a MIDI file.
+
+
+WHAT'S NEW SINCE VERSION 0.1?
+
+* LilyPond now includes a completely new music font: the Feta font.  
+  We were quite disappointed with available music fonts, so we rolled
+  our own.  We did our best to copy the best symbol designs available,
+  and we think that we've succeeded in doing so.  We're proud of the
+  result, and we hope you agree, so go check it out!
+
+* More elegant output due to 
+
+       * more sophisticated beam/slur formatting
+       * better spacing
+       * better line breaking
+       * better font design
+       * PostScript output for variable symbols
+
+* Lots of bugfixes
+
+* More robust, flexible and tweakable design
+
+* Better MIDI file importing
+
+* Easier to use due to better shell scripts and input format
+enhancements
+
+* MusixTeX is not needed anymore
+
+* Faster
+
+
+
+FEATURES
+
+* Multiple staffs, polyphonic music (more voices on one staff),
+Polymetric music.
+
+* Support for full orchestral score: Hara_kiri systems (lines with
+only rests are automatically skipped), multi-measure rests, bar
+numbering, brackets at the left.
+
+* Optimal beam slopes, slur/notehead collision resolution, dashed
+slurs. Formatting parameters are runtime tunable
+
+* Very beautiful symbols.  Variable size symbols generated on the fly
+as embedded postscript.
+
+* MIDI output
+
+* Optimal linebreaking, manual intervention possible.  Linelength is
+settable per line.
+
+* Readable yet very fast to type input language.  With configurable
+note names and identifiers.  Comes with an emacs-mode
+
+* With lots of examples (among others a fragment of Van Beethoven's
+Coriolan, J.S.Bach Cello Suite II, F. Schubert "Leise flehen meine
+Lieder")
+
+* Runs on UNIX and Windows-32.
+
+* Easy generation of titling.
+
+* WWW browsable documentation.
+
+* Support for Urtext: separation of modern and original interpretation.
+
+* Polyphonic music (with automatic collision resolution)
+
+* Spacing and collision resolution of accidentals and syllables is
+done automatically
+
+* Internationalisation support (Italian, Dutch)
+
+* Multiple font sizes within one piece
+
+* Integration with LaTeX and YODL
+
+
+MORE INFO
+
+Sources for this project are on
+
+       ftp://pcnov095.win.tue.nl/pub/lilypond/ (Europe)
+       ftp://ftp.gnu.org/pub/gnu/
+
+More detailed info and examples can be found on the webpage at
+
+       http://www.cs.uu.nl/~hanwen/lilypond/index.html
+
index a7694846c98ee9d32c09e0541943fcb49a9b25de..b7278b52063cf49996b31937ec891a75ba2cae70 100644 (file)
@@ -22,6 +22,14 @@ It does em(not) work with windows 3.x; you need Windows-NT (95/98?).  This
 is not a recommendation, however.  We recommend you use Unix, in
 particular, use GNU/Linux.  For further information see file(README-W32).
 
+question(Where is guile-config)
+
+RedHat RPMS don't include guile-config.  You need guile-config as it
+was produced during the RPM build run.  Build the RPM from source
+(file(.src.rpm)), and use the guile-config that is in
+file(/usr/src/redhat/BUILD/guile-1.3/guile-config/).
+
+
 question(I get all kinds of errors while  compiling file(parser.cc))
 
 LilyPond uses features of bison version 1.25. Please confirm that
index 228b6685f55099c3b4652fd2c9f16db33ae807b0..e80cc7d9aed359311a8692b4bb0a8aaecc5bbd48 100644 (file)
@@ -83,8 +83,8 @@ description(
 dit(lurl(http://sca.uwaterloo.ca/lilypond/))
     Eric Praetzel was kind enough to provide a mirror of both the website
     and the ftp site.
-dit(lurl(ftp://ftp.lilypond.org/pub/lilypond/))
-       A mirror of the FTP site.  Updated at 12:00 MET daily. 
+dit(lurl(ftp://ftp.lilypond.org/pub/LilyPond/))
+       A mirror of the FTP site.  Updated at 0:00 MET daily. 
 )
 
 nsect(NEWS)
diff --git a/NEWS b/NEWS
index 8093954032649a254d94394d7fa8d5ec43d49eb6..c750a49d469f70a4e09b3e76898b7e66d3514bcb 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,47 @@
-pl 34.jcn1
-       - templates for windows
+pl 35
+
+pl 34.hwn2
+       - "Lily Was Here" is def'd as \mudelatagline, override with
+       \header { tagline = "... " ; }
+       - \property currentBarNumber: set
+       current bar number.
+       - \property postBreakPadding: tune extra
+       space padding after linebreaks.
+       - \property textEmptyDimension: disregard script text
+       dimensions (untested)
+       - \property staffLineLeading: set the staff space
+       - adjustable staff space size (per staff)
+       - Staff_symbol_referencer as base class for elements that use
+       info of the staff symbol.  \property numberOfStaffLines also works  OK
+       with ledger lines. (Is that useful? dunno.)
+       - warning  if someone does \translator with no name
+       - junk Item::breakable_b_
+       - junk PointerList<Music*>, use Killing_cons
+       - bf: Auto_beam_engraver.
+       - bf: mmrest engraver.
+       - use callbacks for Dimension_cache.
+       - lots of small cleanups. Junk various members of
+       Score_element & derived classes:
+         * Item::original_l_,
+         * Spanner::original_l_,
+         * Score_element::transparent_b_,
+         * Item::break_priority_i_,
+         * Item::break_status_dir_,
+       - merge Score_priority_engraver / Score_horizontal_align_engraver
+       - Use more generic element properties. 
+       - precompute SCM symbols. 
+       - remove_elt_property (): Try to junk an element property, if not
+       needed anymore.
+
+
+
+pl 34.uu1
+       - more PointerList junkings.
+       - MIDI bugfix.
+       - be more conservative with Dicts/Hashes mem usage
+
+*********
+pl 34
 
 pl 33.uu2
        - some performance cleanups: junked PointerList instance, plugged some leaks.
diff --git a/TODO b/TODO
index 263c2cb57cd3dd609dda3c4431218dc4073552bd..3df133a7cd6214aa96f13eb0b6823a38b36213b3 100644 (file)
--- a/TODO
+++ b/TODO
@@ -9,11 +9,16 @@ Most of the items are marked in the code as well
 Grep for TODO and ugh/ugr/urg.  
 
 .* BUGS
+. * AFM for BlueSky AFM files.
+. * staff size for post/prebreaks
 . * .ly files
 .  * input/star-spangled-banner
 .  * mutopia/J.S.Bach/wtk1-fugue2.ly
 .  * input/test/grace
 .  * fix: text on rests: ridiculous dims
+. * \score { \notes { c8 c8 c8 c c c }
+\paper { \translator { \VoiceContext \remove "Auto_beam_engraver";}}
+}
 . * m=\notes\relative c'''{
   \time 2/4;
 
@@ -41,18 +46,15 @@ Grep for TODO and ugh/ugr/urg.
     }
   }
 }
-. * - Look at input/test/span-bars.ly. The staff lines extend too far
-  to the left on the note systems including the GrandStaff.
 . * midi key.
 . *P.P.S. It can be cool in mudela-book to distinguish in pre,postMudelaExample,
 whether MudelaExample is epsed or not: ( if this fragment is floating eps, than 1,
 otherwise 2). say preMudelaExample[eps]{}, and change it in document body sometimes.
 
 . * tetex: mfplain.mem
-. * fix midi output:
-.  * default duration?  d
-     duration must be not entered explicitely on first note.
 . * fix singleStaffBracket
+. * declare performers in \midi
+. * fix MIDI
 . * \shape 1st dim skipped? 
 . * turn slope-damping on/off
 . * tremolo stuff
@@ -72,35 +74,9 @@ present, they're not properly distinguished) but no distinct way to
 specify the third.  Should there be?
 
 .* TODO before 1.2
+. * break priority setting from SCM.
 . * Gade score
 .  * remove [] in favour of auto-beamer
-.  * In the score, the staff lines extend too far to the left. 
-  This is also illustrated in the second score of span-bars.ly
-  as I've pointed out earlier.
-.  *m=\notes\relative c''{
-  \property Staff.instr = "Instr   "
-    \key f;
-    f4 \p \< g a bes | 
-    c d e \f \! f |
-    f e d c |
-    bes \mf a g f \pp
-  }
-
-n=\notes\relative c'{
-  \property Staff.instr = "Instr   "
-    \key f;
-    f4 \mp g a \< bes | 
-    c d e \ff \! f |
-    f e d c |
-    bes \mp a g f \ppp
-  }
-
-\score{
-  \type StaffGroup <
-    \type Staff = a <{\stemup \property Voice.dynamicDir = \down \m}
-                     {\stemdown \property Voice.dynamicDir = \up \n}>
-  >
-}
 .  * The minimum distance between different staffs works only within 
   StaffGroups, not between StaffGroups. The Gade Score looks quite
   strange on the pages where the Timpani and/or Brass sections don't
@@ -109,18 +85,7 @@ n=\notes\relative c'{
        \OrchestralScoreContext
         minVerticalAlign = 2.5*\staffheight;
     }
-
- I sent a copy of the score to the conductor and his reaction was
-  that it would be easy to fix some "spacing problems" with Finale,
-  if we could convert the score to Finale. I'm not sure what he
-  meant, since we just have had mail conversations so far. Maybe
-  it's the staff distances I mentioned above.
-
-.  * For the trumpet and horn parts, I wrote two parts on the same
-  staff line in the score. I haven't managed to get different
-  directions of the dynamics for the two parts. 
-  Voice.dynamicDir seems to set the direction for the full staff.
-. *  hangOnClef with non-breakable clefs.
+. * hangOnClef with non-breakable clefs.
 . * Aha, the problem is the new TeX code generation for changing fonts.
 > (The explanation below is mostly intended for Han-Wen and Jan)
 > Before, the font was changed with macros declared separately for 
@@ -138,35 +103,27 @@ n=\notes\relative c'{
 > argument that's clearly irrelevant in our application. Yet we
 > see the problem for August.
 . * Check gcc 2.8.1 compatibility
-. * Document source code.
-. * limit memory usage; the full coriolan takes up too much resources.
-.  * Sort items after breaking in order of linenumber.  Then be more
-     eficient with finding 
-.  * Do Mark & sweep GC for Score_elems
-. * make "in-between" engraver (Tie, Extender)
-. * textWidthFatness property
+. * Abstraction for engravers:
+.  * make "in-between" engraver (Tie, Extender)
+.  * make wide_spanner_engraver (line_group_spanne,r staff_symbol)
+. * remove Interval dim_ from Dimension_cache and rename the struct.
+.  * merge align_element  and axis_element_group.
+. * do scaled fonts generally 
 . * The Lilypond accidental symbols are available through the TeX macros, 
 \textflat, \textsharp and \textnatural defined in the init file
 lilyponddefs.tex. All the symbols are defined in the files fetaXX.tex
 where XX corresponds to the size. I don't know where (or even if) they
 are installed but they are generated in the mf/out/ directory during the
 compilation.
-. * compulsory hshift
-. * 1. Can Lily be told where to start numbering?
-. * do scaled fonts.
-. * profile atom smobs
 . * make dependencies () a virtual function.
 . * fix Repeated_music design
 . * one big ly2dvi input that includes *all* tests.
-. * Don't use boolean properties (0,1), instead check existence
-of property.
 . * store req -> element, element -> element causes for warnings
 . * junk Text_def, use G_text_item in stead.
 . * junk Script_def
+. * include examples in RPM.
 . * fix partial measures in meaningful way.
-. * fix AFM for BlueSky AFM files.
 . * working notehead style.
-. * remove links to non-free SW.
 . * add scripts to bars eg.  |^"bla" 
 . * relative mode for mi2mu
 . * uniformise recent feta contributions.
@@ -176,8 +133,7 @@ of property.
 .  * --prefix option?
 .  * -I option per filetype?
 .  * kpathsea?
-. * todo doc left/rightbeamcount
-. * doc Single_malt_grouping_item
+
 . * ly2dvi/lilypond logfile.
 . * How can I specify a chord whose duration is longer than a whole note?
  \type ChordNames { \chord{ A1*2-min } }
@@ -191,48 +147,8 @@ length?
 
 
 
-Use of semicolons is still rather confusing.  They are obligatory
-after some types of assignments and illegal after others.  
-
-  \property foo=bar               illegal
-  foo = 3 at top level            illegal
-  foo = 3 inside \paper           obligatory               
-  foo = \notes{ ...} top level    illegal
-  foo = \translator{ } in \paper  obligatory
-
-As far as I can tell, the sole accomplishment of this syntactic
-irregularity is to keep the user as confused as possible.  
-
-
-I was trying to get interstaff beams to work and did this:
-
-\score{
-\type GrandStaff <
-\type Staff=one \notes\relative c'{
-  \stemup
-  [c8 c \translator Staff=two \stemup c c]
-  \translator Staff=one
-  \stemdown 
-  [ b8 \translator Staff=two a8]
-  \translator Staff=one 
-  c4 
-  }
-\type Staff=two \notes{ \clef bass; s1 }
->
-\paper{
-               \translator{
-                       \GrandStaffContext
-                       minVerticalAlign = 3.0*\staffheight;
-                       maxVerticalAlign = 3.0*\staffheight;
-               }
-  linewidth = -1.;
-}
-}
-
-The beams are at the right angle, but they aren't in the right place.
 . * fractional chord durs.
 . * hang Item on Spanner
-. * remove Interval dim_ from Dimension_cache and rename the struct.
 . * do --safe for PS output?
 . * convert-mudela --output
 . * Staff_margin (with a partial measure.)
@@ -250,24 +166,16 @@ The beams are at the right angle, but they aren't in the right place.
 . * sharp /flat on trills (in MIDI ??)
 . * scm-ify \property values.
 . * move class Lookup {} into scm
-. * collisions/voices \voiceone \voicetwo are broken; see 
 . * msgfmt -o check?
 . * \breathmark TeX macro 
-. * catch GUILE errors?
 . * add new glyphs to font.ly
 . * formatting of input stuff. 
 . * \notes{ a \< b \cr } vs \notes{ a \< b \! }
-. * if possible, it might be nice for a warning to appear if someone does
-       \translator with no name and without assigning it to an
-       identifier.  
 . * space after bars?
 . * 'hinterfleisch' before bar (e.g. wtk1-fugue2)?
-. * \type Voice \times 2/3 { [c8 c16 c16 c16 c16] }
-. * repeat bars: need distance after ":|" and before "|:"
 . * Summary of minor spelling irregularities:
 .  *  capitalization/use of underscores in property names
 .  * fix SkipBars  -> skipBars
-
 . * broken scripts:
        lbheel = \script { "bheel" 0 0 -1  0 0 }
        rbheel = \script { "bheel" 0 0 1 0 0 }
@@ -281,9 +189,9 @@ The beams are at the right angle, but they aren't in the right place.
        portato= \script { "portato" 0 -1 0 1 0 }
 . * ly2dvi
 .  * bottomnote for ly2dvi
-.  * cf'able ly2dvi  tagline.
 .  * deps for ly2dvi
 .* STUFF
+. * compulsory hshift
 . * arrows on slurs.
 . * Align_element::padding  ?
 . * uniformise property names...
@@ -297,27 +205,15 @@ The beams are at the right angle, but they aren't in the right place.
 . * strip EXEs before installing
 . * zip target for binary windows dist (JBR)
 . * junking \skip req in lyrics
-. * Language:
-.  * \type -> \context ?
-.  * \translator -> ?
-.  * fix \partial 
-.  * \bla {} vs \bla ; 
-.  * mix engraver hacking with music ?
-.  * \once\property  KEY = VAL
-.  * \addtranslator, \removetranslator
-.  * junk ^ and _ for scripts
-.  * junk _ for lyrics.
-.  * abstract grammar.
 . * percussion note heads
 . * mi2mu empty staffs.
 . * horizontal centering of dynamics 
-. * gzip RH manpage
-. * stable make/config stuff
 . * $DEPENDENCIES_OUTPUT support
 . * Xdvi zooming ?! Try to understand GS garbage collection.
-               gs: Error: /undefined in draw_beam
-               gs: Operand stack:
+gs: Error: /undefined in draw_beam
+gs: Operand stack:
 . * fix vertical alignment and stafflines
+. * declaring Performers
 . * GrandStaff needs more work -- I want a single word
        `harpsichord' to the left of the grandstaff, not one on each
        stave.  (Organ staff -- with separate pedal -- but common
@@ -326,8 +222,6 @@ The beams are at the right angle, but they aren't in the right place.
        through, so the \property Voice.Instrument would be a stop,
        and \property GrandStaff.instrument would be PipeOrgan...)
 . * revise the Score_priority_align_engraver concept.  It sucks. 
-. * make new VoiceOne, VoiceTwo, VoiceThree contexts with
-ydirection and hshift preset
 . * *.yo: fix pod manpage layout legacy
 . * text-items clash with stems/beams
 . * --include, -I option for ly2dvi (pass on to lily)
@@ -336,8 +230,7 @@ ydirection and hshift preset
        <{\voiceone cis4. cis8 cis4 | cis4 cis cis | r1 }
         {\voicetwo cis,4 r r | r2. | r1 }> |
        }
-. * try to use template<Type> iso MACRO(Type)
-.  * Musical_pitch (analogous to Duration and Rhythmic_req)
+. * Musical_pitch (analogous to Duration and Rhythmic_req)
          think about, analogous to pitch: 
           * { a4 a16 } c <-- duration of c?
           * < a4 b8 > c <-- duration of c?
@@ -348,7 +241,6 @@ ydirection and hshift preset
 . * split error/warning in error/warning/non_fatal_error
 . * add a Duration_convert member to Duration_iter to set parameters.
        Junk global duration settings. 
-. * minimum length second part broken tie
 . * en-,discouraged linebreaking: 
 .  * handle DISALLOW < penalty > FORCE
 .  * discourage breaking of slurs
@@ -357,7 +249,7 @@ ydirection and hshift preset
 . * <\voiceone c4. \voicetwo c4>
 . * add full cello suites to web site (kom op, Maarten!)
 . * Rethink Time_description
-         * \cadenza , \meter, \grouping should all be \properties
+\cadenza , \meter, \grouping should all be \properties
 . * rename
 .  * measure -> bar
 .  * abbrev -> tremolo
@@ -369,27 +261,52 @@ ydirection and hshift preset
 . * move paper vars into engraver properties
 . * check for groff / troff/ nroff et
 . * more intelligent file searching
-. * make LilyPond RPM fully relocatable
 . * disable spaces in TeX stuff
 . * handle ^C for tmp/file creation.
+. * make LilyPond RPM fully relocatable
 . * dots & rest collisions.
 . * documentation
+.  * remove links to non-free SW.
+.  * internal documentation
+.  * a general paper. 
+.  * \properties
+.   * left/rightbeamcount
+.   * various other new properties.
 .  * introduction?
 .  * info?
 .  * LaTeX?
 .  * more manpages?
-. * versioning for Feta
 . * the warning about the negative slur/tie length appears twice
-       which is irritating.
-. * The `3' in the meter key is a one or two pixels too thin (at 600dpi)
-       in the middle:
-. * the bracket is ugly (wings are too parabolic, should be more circular)
+which is irritating.
 . * better hshift (dots, distance, head dependent)
 . * clefs (AG): The "8" should appear closer to the actual clef,
 touching it.
 . * put errorlevel in Input class
 . * junk nesting slurs
 . * integrate midi-elts from mi2mu and lily?
+
+.* FONT
+. * the bracket is ugly (wings are too parabolic, should be more circular)
+. * versioning for Feta
+. * The `3' in the meter key is a one or two pixels too thin (at 600dpi)
+       in the middle:
+. * design macro for penstroke with rounded endings
+. * timesig C: fat yet less curved.  Check out relations. 
+. * design decent macro for bulbed endings
+. * printer dependencies.
+. * y-refpoint for rests should be the 4th staffline (gclef: b')
+. * clean-up eight+ rests
+. * versioning 
+. * lo-res fixes.
+. * work out sizes of character fonts.
+. * more symbols
+.  * piano pedals: Ped/*
+.  * maxima notehead
+.  * coda signs: Segno, O+
+.  * glissando, arpeggio
+.  * lengthened trill
+. * 128th flags
+. * include important spacing dims in fetalog 
 .* 3RD PARTY BUGS
 . * GNU diff 2.7: diff -rN does not see a new directory with empty file
 . * check out GCC signatures?
@@ -426,7 +343,6 @@ touching it.
 .  *  fontlock: \melodic \melodic
 
 . * use properties for:
-.  * Staff_sym size
 .  * default tempo.
 .  * cadenza mode? 
 
@@ -481,6 +397,72 @@ touching it.
 .  * slurs
 .  * accents
 .  * dynamics
+
+> Would it be hard to add support for proper dynamics in MIDI output?  I
+> would really like to have this feature...
+
+To answer this, I have to give a little background.  Please say so if
+I am being obtuse.
+
+Both audio and notation elements are created decentrally, when
+LilyPond says "Interpreting music ... [8][16] etc."  After all
+elements are created, they are processed again to calculate all
+parameters.  After that is done, they are dumped onto the output (the
+MIDI stream or the TeX file).
+
+The audio and notation elements are created by objects called
+performer and engraver respectively.  They work by taking a chunk of
+input (a so-called request), and using the request to create an audio
+or notation element.
+
+After some processing, the engraver sends the created elements to
+its enclosing notation/performance context.
+
+In the case of notation, engravers can also modify existing elements
+created by sibling engravers.  Eg. the beam-engraver will modify stems
+when it creates a beam over a couple of stems.  This is done in
+Engraver::do_acknowledge_element () and
+Engraver::do_process_acknowledged ().
+
+In the case of audio, there are no mechanisms to modify existing audio
+elements. After the audio elements are created, they are sent directly
+to the enclosing context (an instance of Performer_group_performer),
+through the method Performer::play ()
+
+Concretely spoken, for dynamics you have to write a performer
+(Dynamics_performer), that will take the input requests. If I
+understand correctly, every MIDI note played must have its dynamic
+strength set separately.  That means the the Dynamics_performer must
+set the strength of every Audio_note it finds.  This means that one
+has to modify existing Audio items.  The best way of doing this is
+with a broadcast/acknowledge process.
+
+So the best way of handling this, is
+
+* supporting dynamic settings in Audio_note
+
+* mimicking the broadcast/acknowledge mechanism of the Engravers in
+  the Performers
+
+* using that mechanism to write a Dynamics_performer that will modify
+  any notes it finds to set appropriate strengths.
+
+You could also kludge this by deriving from Performer_group_performer
+a performer that also sets dynamics within notes, but that is not the
+elegant way to do it.
+
+I'd say that the work involved is not hard, but you have to be fluent
+with C++ and need some insight into the working of Notation Contexts
+and friends.  I guess I could do it in a day or so, but if you are not
+so fluent with the inner workings of LilyPond, it could take you some
+more time (A few more days?).
+
+Please note, that I am *not* going to code this myself: my days are
+valuable, and I think I have more interesting things to do than fixing
+the MIDI output (I don't even have a soundcard).  But I *do* want to help
+you or other people with implementing this, so if you need help, don't
+hesitate to ask.
+
 .  * account for rhythmic position in measure
 .  * etc.
 
@@ -552,7 +534,18 @@ touching it.
 .  * specify number of lines
 
 .* INPUTLANGUAGE
-
+. * Language:
+.  * \type -> \context ?
+.  * \translator -> ?
+.  * fix \partial 
+.  * \bla {} vs \bla ; 
+.  * mix engraver hacking with music ?
+.  * \once\property  KEY = VAL
+.  * \addtranslator, \removetranslator
+.  * junk ^ and _ for scripts
+.  * junk _ for lyrics.
+.  * abstract grammar.
+. * Figure out semicolons.
 . * c4 4 4 4 for c4 c4 c4 c4?
 . * <c f a>4 ?
 . * Viola mode?
@@ -608,8 +601,6 @@ touching it.
 
 . * Text_crescendo
 
-. * clean solution for staffsize in items.
-
 . * revise calcideal
 
 .* IDEAS
@@ -625,19 +616,6 @@ touching it.
 .* SMOBS
 Han-Wen Nienhuys <hanwen@cs.uu.nl> writes:
 
-> mcmanus@IDT.NET writes:
-> > > I want different C++ objects (with scheme embedded) to be linked by
-> > > C++ pointers.  I want to access these other objects from the Scheme
-> > > code, and I want access to these pointers from C++.
-> > 
-> > You can do this with a  combination of smob's and primitive functions,
-> > though it may not be  be exactly what you wanted.   You would have one
-> > smob  for each class in  your application, and then  you would write a
-> > primitive function that would return the objects  that are linked to a
-> > base object.
-> 
-> And the smob and the C++ class are interlinked?  Like
-> 
 >      class Foo_class {
 >              Foo_smob *smob_ptr_;
 >      }
diff --git a/VERSION b/VERSION
index b211fe4d4f2a5f99f720b0f60947eb125421b154..487d616ca1f2bf5d23594fc7d396431357ade07a 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,8 +1,8 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=1
-PATCH_LEVEL=34
-MY_PATCH_LEVEL=jcn1
+PATCH_LEVEL=35
+MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index c2fd954a8fc0d6dea71e6c6c7289b3e14be72518..c33e7ed53d148c4275895f2edfd3c12289265ef0 100644 (file)
@@ -1,3 +1,11 @@
+/*   
+  hash.cc --  implement various functions for hash tables.
+  
+  source file of the Flower Library
+  
+  (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
 #include "string.hh"
 #include "array.hh"
 #include "dictionary.hh"
@@ -6,6 +14,7 @@
 // Note: assumes long is at least 32 bits.
 const unsigned long my_prime_list[] = 
 {
+  5, 11, 23,                   // be a bit careful for short lists: we want reasonable mem usage.
   53,         97,         193,       389,       769,
   1543,       3079,       6151,      12289,     24593,
   49157,      98317,      196613,    393241,    786433,
@@ -14,12 +23,14 @@ const unsigned long my_prime_list[] =
   1610612741u, 3221225473u, 4294967291u
 };
 
-unsigned long prime_list (int idx)
+unsigned long
+prime_list (int idx)
 {
   return my_prime_list [idx];
 }
 
-unsigned int string_hash (String s)
+unsigned int
+string_hash (String s)
 {
   const char* str = s.ch_C ();
   unsigned int result = 0;
@@ -32,14 +43,15 @@ unsigned int string_hash (String s)
 }
 
 
-unsigned int hash (unsigned int i)
+unsigned int
+hash (unsigned int i)
 {
   return i;
 }
 
-unsigned int int_hash (int i)
+unsigned int
+int_hash (int i)
 {
   return (unsigned) i;
 }
 
-unsigned int hash ( ); 
index 4f98d8801d157fd70faf6038a6eaaaf38c87655f..9f360be4008bbdab449cca205edcc51ad5d722dd 100644 (file)
@@ -2,7 +2,7 @@
 #define UNIONFIND_HH
 #include "array.hh"
 
-/*
+/**
     which points of a graph are connected?.
     Union find, a standard algorithm:
 
@@ -19,7 +19,9 @@ struct Union_find {
     Union_find (int sz);
 
 private:
-    Array<int> classes;
-
+  /**
+     This array provides the representing point for each node in the graph.
+   */
+  Array<int> classes_;
 };
 #endif
index 1bbf1f409ce279ce8e2b960136949848c4e6c687..cb5afce6e4f3470463bfe6c9c79242c304917961 100644 (file)
@@ -5,11 +5,11 @@
 
 Union_find::Union_find (int n)
 {
-  classes.set_size (n);
+  classes_.set_size (n);
 
   for (int i=0; i < n; i++) 
     {
-       classes[i] = i;
+      classes_[i] = i;
     }
 }
 
@@ -17,13 +17,13 @@ int
 Union_find::find (int i)
 {
   int rep = i;
-  while (classes[rep] != rep)
-       rep = classes[rep];
-  while (classes[i] != rep) 
+  while (classes_[rep] != rep)
+    rep = classes_[rep];
+  while (classes_[i] != rep) 
     {
-       int next =classes[i];
-       classes[i] = rep;
-       i = next;
+      int next =classes_[i];
+      classes_[i] = rep;
+      i = next;
     }
   return rep;
 }
@@ -33,5 +33,5 @@ Union_find::connect (int i, int j)
 {
   i = find (i);
   j = find (j);
-  classes[i] = j;    
+  classes_[i] = j;    
 }
diff --git a/input/test/bar-number.ly b/input/test/bar-number.ly
new file mode 100644 (file)
index 0000000..aa8dd84
--- /dev/null
@@ -0,0 +1,8 @@
+ \score { \notes {
+
+       c1 c1 c1 c1\break
+       c1 c1 c1 c1\break
+         \property Score.currentBarNumber = "25"
+       c1 c1 c1 c1
+}
+ \paper{ \translator {\BarNumberingStaffContext }}}
diff --git a/input/test/number-staff-lines.fly b/input/test/number-staff-lines.fly
new file mode 100644 (file)
index 0000000..50e188e
--- /dev/null
@@ -0,0 +1,2 @@
+
+c c c \property Staff . numberOfStaffLines = 3
diff --git a/input/test/staff-size.fly b/input/test/staff-size.fly
new file mode 100644 (file)
index 0000000..a9f063d
--- /dev/null
@@ -0,0 +1,10 @@
+< \type Staff = VA {
+       \property Staff.staffLineLeading = "4" \property Staff.fontsize = "-2"
+       \property Voice . dynamicDir = \up \stemdown
+\key gis;
+       c8 d [e f g a] b c \ff
+  }
+
+\type Staff = VB {  \property Voice . dynamicDir = \down c,,4 \ff} 
+
+>
index 6d91b480951e8acd47a2e2e8a6b07eaac8fd00d7..3f6b91c9d08dd275ac330aa2ed345d8df846cd79 100644 (file)
 #include "cursor.tcc"
 #include "list.tcc"
 
-#if defined NEED_EXPLICIT_INSTANTIATION || __CYGWIN__
-// huh?
-//LIST_INSTANTIATE (void *);
-template class List<void*>;
-template class Cursor<void*>;
+#ifdef NEED_EXPLICIT_INSTANTIATION
+LIST_INSTANTIATE (void *);
 #endif
 
 POINTERLIST_INSTANTIATE (Source_file);
index d476552f278e080f6792382c53ea4b89100297f6..b2ff4b8e75adf23cf46648180938457522c187dd 100644 (file)
@@ -30,13 +30,15 @@ Abbreviation::do_print () const
 Molecule*
 Abbreviation::do_brew_molecule_p () const
 {
-  Real interbeam_f = paper ()->interbeam_f (stem_l_->mult_i_);
+  Real interbeam_f = paper_l ()->interbeam_f (stem_l_->mult_i_);
   Real w = 1.5 * lookup_l ()->ball (2).dim_.x ().length ();
-  Real internote_f = paper ()->internote_f ();
-  Real beam_f = paper ()->beam_thickness_f ();
+  Real space = stem_l_->staff_line_leading_f ();
+  Real internote_f = space/2;
+  
+  Real beam_f = paper_l ()->beam_thickness_f ();
 
   int beams_i = 0;
-  Real slope_f = internote_f / 4 / internote_f;
+  Real slope_f = internote_f / 4 / internote_f;        // HUH?
 
   if (stem_l_ && stem_l_->beam_l_) {
     slope_f = stem_l_->beam_l_->slope_f_;
@@ -66,7 +68,6 @@ Abbreviation::do_brew_molecule_p () const
            stem_l_->beam_l_->dir_ * beams_i * interbeam_f));
        }
       else
-#if 1
        {  
          /*
            Beams should intersect one beamthickness below staff end
@@ -76,45 +77,14 @@ Abbreviation::do_brew_molecule_p () const
          dy += stem_l_->stem_end_f ();
          dy *= internote_f;
 // urg: can't: stem should be stetched first
-//       dy -= paper ()->beam_thickness_f () * stem_l_->dir_;
+//       dy -= paper_l ()->beam_thickness_f () * stem_l_->dir_;
          beams->translate (Offset(stem_l_->hpos_f () - hpos_f (), dy));
        }
-#else
-       {
-         /* 
-            urg: this is wrong, even if coded correctly
-
-            Try to be in the middle of the open part of the stem and
-            between on the staff.
-
-            (urgh)
-         */
-         Direction sd  = stem_l_->dir_;
-         // watch out: chord_start_f is (the only one) not in dim(internote)
-         Interval empty_stem (stem_l_->chord_start_f () / internote_f * sd
-           + interline_f, (stem_l_->stem_end_f ()* sd));
-         empty_stem *= sd;
-         
-         Interval instaff = empty_stem;
-         /*
-           huh? i don't understand, hw
-           what about:
-           .fly= \stemup d'''2:16
-           instaff.intersect (Interval (-4,4));
-           */
-         // hmm, let's try
-         if (stem_l_->get_default_dir () == stem_l_->dir_)
-           instaff.intersect (Interval (-4,4));
 
-         if (instaff.empty_b ())
-           instaff = empty_stem;
-
-         instaff.print (); 
-         instaff *= internote_f;
-         beams->translate (Offset(stem_l_->hpos_f () - hpos_f (),
-                             instaff.center ()));
-       }
-#endif
+      /*
+       there used to be half a page of code that was long commented out.
+       Removed in 1.1.35
+       */
     }
   
   return beams;
index df5e16be9964d197ab339c9dcf69b1a53f1e4bba..3bf92b841b0c5d6cd99e62c9bddd74974fb8da08 100644 (file)
@@ -32,30 +32,7 @@ Abbreviation_beam::Abbreviation_beam ()
 Molecule*
 Abbreviation_beam::do_brew_molecule_p () const 
 {
-  /* 
-   todo
-   */
   return Beam::do_brew_molecule_p ();
-#if 0
-  Molecule *mol_p = new Molecule;
-  // huh? inter-what
-  //    Real inter_f = paper ()->interbeam_f ();
-  Real inter_f = paper ()->internote_f ();
-  Real x0 = stems[0]->hpos_f ();
-  for (int j=0; j <stems.size (); j++) 
-    {
-      Stem *i = stems[j];
-      Stem * prev = (j > 0)? stems[j-1] : 0;
-      Stem * next = (j < stems.size ()-1) ? stems[j+1] :0;
-
-      Molecule sb = stem_beams (i, next, prev);
-      Real  x = i->hpos_f ()-x0;
-      sb.translate (Offset (x, (x * slope_f  + left_y)* inter_f));
-      mol_p->add (sb);
-    }
-  mol_p->translate_axis (x0 - spanned_drul_[LEFT]->absolute_coordinate (X_AXIS), X_AXIS);
-  return mol_p;
-#endif
 }
 
 void
index c10392cda4db8282e31d19ba144865d8f471f3ef..b637ebd5d0fab21dd7d5e8e39175928aeb3a0182 100644 (file)
@@ -9,7 +9,7 @@
 #include "align-element.hh"
 #include "interval.hh"
 #include "direction.hh"
-
+#include "debug.hh"
 
 struct Align_element_content {
   Score_element * elem_l_;
@@ -17,14 +17,14 @@ struct Align_element_content {
   
   static int compare (Align_element_content const &h1, 
                      Align_element_content const &h2) 
-  {
-    return h1.priority_i_ - h2.priority_i_;
-  }
+    {
+      return h1.priority_i_ - h2.priority_i_;
+    }
   Align_element_content (Score_element *elem_l, int p) 
-  {
-    priority_i_ = p;
-    elem_l_ = elem_l;
-  }
+    {
+      priority_i_ = p;
+      elem_l_ = elem_l;
+    }
   Align_element_content () {
     elem_l_ = 0;
     priority_i_ = 0;
@@ -51,7 +51,7 @@ Align_element::add_element_priority (Score_element *el, int p)
 
 void
 Align_element::do_substitute_element_pointer (Score_element*o,
-                                        Score_element*n)
+                                             Score_element*n)
 {
   int i;
   while ((i = elem_l_arr_.find_i (o))>=0) 
@@ -66,14 +66,6 @@ Align_element::do_substitute_element_pointer (Score_element*o,
     }
 }
 
-/**
-  Align elements top to bottom. 
-  The first element has its top at y = 0.0 afterwards
-
-  TODO configurable, like Horizontal_align_item
-
-  TODO should parametrise in direction and coordinate.
- */
 void
 Align_element::do_post_processing()
 {
@@ -124,8 +116,6 @@ Align_element::do_side_processing ()
        center_f = where_f;
 
       where_f += stacking_dir_ * dy;
-
-            
       elem_l_arr_[i]->translate_axis (where_f, axis_);
     }
 
@@ -140,7 +130,7 @@ Align_element::do_side_processing ()
 Align_element::Align_element()
 {
   threshold_interval_ = Interval (0, Interval::infinity ());
-  transparent_b_ = true;
+  set_elt_property (transparent_scm_sym, SCM_BOOL_T);
   set_empty (true);
   stacking_dir_ = DOWN;
   align_dir_ = LEFT;
@@ -155,9 +145,6 @@ Align_element::contains_b (Score_element const *e) const
   return elem_l_arr_.find_l (e);
 }
 
-
-
-
 void
 Align_element::sort_elements ()
 {
@@ -179,9 +166,20 @@ Align_element::sort_elements ()
 void
 Align_element::do_print () const
 {
-#if 0
+#ifndef NPRINT
   DOUT << "contains: ";
-  for (int i=0 ;  i < item_l_arr_.size(); i++) 
-    DOUT << classname (item_l_arr_[i]) << ", ";
+  for (int i=0 ;  i < elem_l_arr_.size(); i++) 
+    DOUT << classname (elem_l_arr_[i]) << ", ";
 #endif
 }
+
+Score_element*
+Align_element::get_elt_by_priority (int p) const
+{
+  for (int i=0; i < priority_i_arr_.size (); i++)
+    {
+      if (priority_i_arr_[i] == p)
+       return elem_l_arr_[i];
+    }
+  return 0;
+}
index 85f88c84f9a916a9f8dc4b463484536434c3fd8a..7a90fa256244897ecfc9431e6d34ee854e6d1d9c 100644 (file)
@@ -21,7 +21,7 @@ Audio_column::Audio_column (Moment at_mom)
 void
 Audio_column::add_audio_item (Audio_item* l)
 {
-  audio_item_l_list_.bottom().add (l);
+  audio_item_l_arr_.push (l);
   l->audio_column_l_ = this; 
 }
 
@@ -37,8 +37,8 @@ Audio_column::print() const
 #ifndef NPRINT
   DOUT << "Audio_column {";
   DOUT << "at: " << at_mom_ << ". Contains:";
-  for (PCursor<Audio_item*> i (audio_item_l_list_.top ()); i.ok (); i++)
-    DOUT << classname (i.ptr ()) << ", ";
+  for (int i =0; i < audio_item_l_arr_.size (); i++)
+    DOUT << classname (audio_item_l_arr_[i]) << ", ";
   DOUT << "\n}\n";
 #endif 
 }
index ae2afceaf410ec2b417379f81d41c7324d6794d2..a8d7682ce904261934e83db0d31d4efc3a1aef08 100644 (file)
 void
 Audio_staff::add_audio_item (Audio_item* l)
 {
-  audio_item_l_list_.bottom().add (l);
+  audio_item_l_arr_.push (l);
 }
 
+
 void
 Audio_staff::output (Midi_stream& midi_stream_r, int track_i)
 {
index 8055b73a52ad39107999c63ff19936d04cffbb2b..1fd4be94400790128ef2e0c732cac49f97da6ecc 100644 (file)
@@ -326,7 +326,9 @@ Auto_beam_engraver::acknowledge_element (Score_element_info info)
              consider_end_and_begin ();
            }
          grouping_p_->add_child (start, rhythmic_req->length_mom ());
-         stem_l->flag_i_ = rhythmic_req->duration_.durlog_i_;
+
+         //stem_l->flag_i_ = rhythmic_req->duration_.durlog_i_;
+         
          stem_l_arr_p_->push (stem_l);
          Moment now = now_mom ();
          last_add_mom_ = now;
@@ -339,8 +341,9 @@ void
 Auto_beam_engraver::junk_beam () 
 {
   assert (stem_l_arr_p_);
-  for (int i = 0; i < stem_l_arr_p_->size (); i++)
-    (*stem_l_arr_p_)[i]->flag_i_ = 0;
+  /*  for (int i = 0; i < stem_l_arr_p_->size (); i++)
+      (*stem_l_arr_p_)[i]->flag_i_ = 0;*/
+  
   delete stem_l_arr_p_;
   stem_l_arr_p_ = 0;
   delete grouping_p_;
index 5b42c70e8af3e11c102de639f9c236c96cf4d7fc..0bce567acaaaf952045d94141c0d6f69903ef693 100644 (file)
@@ -56,13 +56,13 @@ Axis_group_element::do_print() const
 Axis_group_element::Axis_group_element(Axis a1, Axis a2)
   : Graphical_axis_group (a1,a2)
 {
-  transparent_b_ = true;
+  set_elt_property (transparent_scm_sym, SCM_BOOL_T);
 }
 
 Axis_group_element::Axis_group_element ()
   : Graphical_axis_group (X_AXIS, Y_AXIS)
 {
-  transparent_b_ = true;
+  set_elt_property (transparent_scm_sym, SCM_BOOL_T);
 }
 
 
index 1559e5dda352f1d796fc3bd737c3f9c0d60c37c8..65570d0623698ec725ef0583e423da70dd5a7315 100644 (file)
@@ -38,9 +38,10 @@ Axis_group_item::do_breakable_col_processing()
       Direction  j=LEFT;
       do 
        {
-         Item *new_l = 
-           it_l->find_prebroken_piece (broken_to_drul_[j]->break_status_dir_);
-         (dynamic_cast<Axis_group_item*> (broken_to_drul_[j]))->add_element (new_l);
+         Axis_group_item * my_brok
+           = dynamic_cast<Axis_group_item*> (find_prebroken_piece(j));
+         Item *new_l = it_l->find_prebroken_piece (j);
+         my_brok->add_element (new_l);
        }
       while (flip(&j)!=LEFT);
     }
index b78887ef6ca30c0f5485681ac5777ad515bd07a7..c78cac0e118c7d7772e842c06d7245652a1d3e65 100644 (file)
@@ -26,7 +26,7 @@ Axis_group_spanner::do_break_processing_if_unbroken()
        {
          Item * item_l = dynamic_cast<Item*> (elems[i]);
          if  (item_l
-              && item_l->breakable_b
+              && item_l->breakable_b ()
               && item_l->break_status_dir() == 0) 
            {
              // last two checks are paranoia
@@ -83,25 +83,25 @@ Axis_group_spanner::do_break_processing()
                    my_broken_l->add_element (broken_span_l);
                }
            }
-         else if (it && it->breakable_b_ && it->break_status_dir () == 0) 
+         else if (it && it->broken_original_b ())
            {
              // broken items
              Direction  j=LEFT;
              do 
                {
-                 Item * my_item = it->broken_to_drul_[j];
-                 Line_of_score * item_line_l = my_item->line_l() ;
+                 Item * broken_item = it->find_prebroken_piece (j);
+                 Line_of_score * item_line_l = broken_item->line_l() ;
                  if (! item_line_l) 
                    continue;
                    
                  Axis_group_spanner * v
                    = dynamic_cast<Axis_group_spanner*>(find_broken_piece (item_line_l));
                  if (v)
-                   v->add_element (my_item);
+                   v->add_element (broken_item);
                  else
                    {
-                     my_item->transparent_b_ = true;
-                     my_item->set_empty (true);
+                     broken_item->set_elt_property (transparent_scm_sym, SCM_BOOL_T);
+                     broken_item->set_empty (true);
                    }
 
                }
index e7bdb019ac596ecea219ee8252c3a6f646eb7c8b..71655de8e16ebe774472356c3de2ffebeee836f2 100644 (file)
@@ -8,7 +8,7 @@
 */
 
 #include "bar-engraver.hh"
-#include "bar.hh"
+#include "staff-bar.hh"
 #include "musical-request.hh"
 #include "multi-measure-rest.hh"
 #include "command-request.hh"
@@ -53,14 +53,19 @@ Bar_engraver::create_bar ()
 {
   if (!bar_p_)
     {
-      bar_p_ = new Bar;
-      bar_p_->break_priority_i_  = 0;
+      bar_p_ = new Staff_bar;
+      bar_p_->set_elt_property (break_priority_scm_sym, gh_int2scm (0));
+
       // urg: "" != empty...
       String default_type = get_property ("defaultBarType", 0);
       if (default_type.length_i ())
        {
          bar_p_->type_str_ = default_type;
        }
+
+      /*
+       urg.  Why did I implement this?
+       */
       Scalar prop = get_property ("barAtLineStart", 0);
       if (prop.to_bool ())
        {
index 7262b1fc08c96a2d62021d26dc160601abbce84e..bf462f3e9d57e7795a4d5325ed9964342274e39e 100644 (file)
@@ -114,11 +114,11 @@ Bar_script_engraver::create_items (Request *rq)
   
   staff_side_p_ = new G_staff_side_item;
   staff_side_p_->axis_ = axis_;
-  staff_side_p_->breakable_b_ = true; // ugh
+  staff_side_p_->set_elt_property (breakable_scm_sym, SCM_BOOL_T); // ugh
 
   
   text_p_ = new G_text_item;
-  text_p_->breakable_b_ = true; // ugh
+  text_p_->set_elt_property (breakable_scm_sym, SCM_BOOL_T); // ugh
 
   Scalar prop = get_property (type_ + "Direction", 0);
   if (prop.isnum_b ())
@@ -139,9 +139,9 @@ Bar_script_engraver::create_items (Request *rq)
     }
 
   
-  staff_side_p_->set_elt_property (ly_symbol ("visibility_lambda"),
+  staff_side_p_->set_elt_property (visibility_lambda_scm_sym,
                                   visibility_lambda_);
-  text_p_->set_elt_property (ly_symbol ("visibility_lambda"),
+  text_p_->set_elt_property (visibility_lambda_scm_sym,
                             visibility_lambda_);
   
   announce_element (Score_element_info (text_p_, rq));
index 60941be60a153ee17b1d745ca8f70d4e08503176..7fb6d30530978244132d3eefa75bce3261c042e3 100644 (file)
@@ -16,7 +16,7 @@
 
 Bar::Bar ()
 {
-  breakable_b_ = true;
+  set_elt_property (breakable_scm_sym, SCM_BOOL_T);
   type_str_ = "|";
   at_line_start_b_ = false;
 }
@@ -29,18 +29,24 @@ Bar::do_print () const
 #endif
 }
 
+Real
+Bar::get_bar_size () const
+{
+  return paper_l ()->get_var ("barsize");
+}
+
+
 Molecule*
 Bar::do_brew_molecule_p () const
 {    
-  Paper_def *p = paper ();
-  Molecule *output = new Molecule (lookup_l ()->bar (type_str_, p->get_var ("barsize")));
+  Molecule *output = new Molecule (lookup_l ()->bar (type_str_, get_bar_size ()));
   
   return output;
 }
 
 /**
   Prescriptions for splitting bars.
-  TODO: parametrise this (input-settable)
+  TODO: put this in SCM.
  */
 static char const *bar_breaks[][3] ={
   {":|", ":|:", "|:"},
@@ -65,18 +71,11 @@ Bar::do_pre_processing ()
       if (bar_breaks[i][1] == type_str_)
        {
          type_str_ = bar_breaks[i][break_status_dir ()+1];
-         if (at_line_start_b_ && (break_status_dir_ == 1) && (type_str_ == ""))
+         if (at_line_start_b_ && (break_status_dir () == RIGHT) && (type_str_ == ""))
            {
              type_str_ = "|";
            }
        }
     }
-  
-  /*
-    span_score_bar needs dims, so don't do
-  
-    transparent_b_ = empty_b_ = (!type_str_);
-    
-    */
 }
   
index 92fe5ee248edd87cea8f6e1ed03669982ee9e29f..e0716f15f2179fe6b111b8519711b0df0c2d9bb6 100644 (file)
@@ -53,12 +53,13 @@ Base_span_bar_engraver::acknowledge_element (Score_element_info i)
          spanbar_p_ = get_span_bar_p();
          String visnam =  String(name()) + "_visibility";
          
-         spanbar_p_->set_elt_property (ly_symbol ("visibility_lambda"),
+         spanbar_p_->set_elt_property (visibility_lambda_scm_sym,
                                        gh_eval_str (visnam.ch_C()));
 
          if (use_priority_b_)
            {
-             spanbar_p_->break_priority_i_ = break_priority_i_;
+             spanbar_p_->set_elt_property (break_priority_scm_sym,
+                                           gh_int2scm (break_priority_i_));
            }
          else
            {
index be8f73b1e1db61d11a5ec6fca49ff2af40f2e7b0..752f23e10b44e265957158884d65218acad3a484 100644 (file)
@@ -62,8 +62,6 @@ Molecule*
 Beam::do_brew_molecule_p () const
 {
   Molecule *mol_p = new Molecule;
-  Real internote_f = paper ()->internote_f ();
-
   Real x0 = stems_[0]->hpos_f ();
   for (int j=0; j <stems_.size (); j++)
     {
@@ -73,7 +71,8 @@ Beam::do_brew_molecule_p () const
 
       Molecule sb = stem_beams (i, next, prev);
       Real  x = i->hpos_f ()-x0;
-      sb.translate (Offset (x, (x * slope_f_ + left_y_) * internote_f));
+      sb.translate (Offset (x, (x * slope_f_ + left_y_) *
+                           i->staff_line_leading_f ()/2 ));
       mol_p->add_molecule (sb);
     }
   mol_p->translate_axis (x0 
@@ -81,7 +80,9 @@ Beam::do_brew_molecule_p () const
 
   // correct if last note (and therefore reference point of beam)
   // is on different staff
-  mol_p->translate_axis (- sinfo_.top ().interstaff_f_ * internote_f, Y_AXIS);
+  Stem_info si =   sinfo_.top ();
+  mol_p->translate_axis (-si.interstaff_f_ * si.stem_l_->staff_line_leading_f ()/2,
+                        Y_AXIS);
 
   return mol_p;
 }
@@ -89,8 +90,11 @@ Beam::do_brew_molecule_p () const
 Offset
 Beam::center () const
 {
-  Real w= (paper ()->note_width () + extent (X_AXIS).length ())/2.0;
-  return Offset (w, (left_y_ + w* slope_f_)*paper ()->internote_f ());
+  Stem_info si = sinfo_[0];
+  
+  Real w= (si.stem_l_->note_delta_f () + extent (X_AXIS).length ())/2.0;
+  return Offset (w, (left_y_ + w* slope_f_) *
+                si.stem_l_->staff_line_leading_f ()/2);
 }
 
 void
@@ -115,7 +119,7 @@ Beam::do_post_processing ()
   if (stems_.size () < 2)
     {
       warning (_ ("beam with less than two stems"));
-      transparent_b_ = true;
+      set_elt_property (transparent_scm_sym, SCM_BOOL_T);
       return ;
     }
   calculate_slope ();
@@ -171,7 +175,7 @@ Beam::set_default_dir ()
      We have our doubts, so we simply provide all sensible alternatives.
   */
 
-  Dir_algorithm a = (Dir_algorithm)rint(paper ()->get_var ("beam_dir_algorithm"));
+  Dir_algorithm a = (Dir_algorithm)rint(paper_l ()->get_var ("beam_dir_algorithm"));
   switch (a)
     {
     case MAJORITY:
@@ -226,10 +230,10 @@ Beam::solve_slope ()
 Real
 Beam::check_stemlengths_f (bool set_b)
 {
-  Real interbeam_f = paper ()->interbeam_f (multiple_i_);
-  Real internote_f = paper ()->internote_f (); 
-  Real beam_f = paper ()->beam_thickness_f ();
-  Real staffline_f = paper ()->rule_thickness ();
+  Real interbeam_f = paper_l ()->interbeam_f (multiple_i_);
+
+  Real beam_f = paper_l ()->beam_thickness_f ();
+  Real staffline_f = paper_l ()->rule_thickness ();
   Real epsilon_f = staffline_f / 8;
   Real dy_f = 0.0;
   for (int i=0; i < sinfo_.size (); i++)
@@ -239,10 +243,11 @@ Beam::check_stemlengths_f (bool set_b)
       // correct for knee
       if (dir_ != sinfo_[i].dir_)
        {
+         Real internote_f = sinfo_[i].stem_l_->staff_line_leading_f ()/2;
          y -= dir_ * (beam_f / 2
                       + (sinfo_[i].mult_i_ - 1) * interbeam_f) / internote_f;
-         if (!i && sinfo_[i].stem_l_->staff_sym_l_ !=
-             sinfo_.top ().stem_l_->staff_sym_l_)
+         if (!i && sinfo_[i].stem_l_->staff_symbol_l () !=
+             sinfo_.top ().stem_l_->staff_symbol_l ())
            y += dir_ * (multiple_i_ - (sinfo_[i].stem_l_->flag_i_ - 2) >? 0)
              * interbeam_f / internote_f;
        }
@@ -267,6 +272,9 @@ Beam::check_stemlengths_f (bool set_b)
 void
 Beam::set_steminfo ()
 {
+  if(!stems_.size ())
+    return;
+  
   assert (multiple_i_);
   int total_count_i = 0;
   int forced_count_i = 0;
@@ -282,9 +290,9 @@ Beam::set_steminfo ()
       total_count_i++;
     }
 
-  Real internote_f = paper ()->internote_f ();
-  int stem_max = (int)rint(paper ()->get_var ("stem_max"));
-  Real shorten_f = paper ()->get_var (String ("forced_stem_shorten"
+  Real internote_f = stems_[0]->staff_line_leading_f ()/2;
+  int stem_max = (int)rint(paper_l ()->get_var ("stem_max"));
+  Real shorten_f = paper_l ()->get_var (String ("forced_stem_shorten"
                                              + to_str (multiple_i_ <? stem_max)))
     / internote_f;
     
@@ -333,9 +341,10 @@ Beam::calculate_slope ()
       Real dx_f = stems_.top ()->hpos_f () - stems_[0]->hpos_f ();
 
       // urg, these y internote-y-dimensions
-      Real internote_f = paper ()->internote_f ();
-      Real lengthened = paper ()->get_var ("beam_lengthened") / internote_f;
-      Real steep = paper ()->get_var ("beam_steep_slope") / internote_f;
+      Real internote_f = stems_[0]->staff_line_leading_f ()/2;
+
+      Real lengthened = paper_l ()->get_var ("beam_lengthened") / internote_f;
+      Real steep = paper_l ()->get_var ("beam_steep_slope") / internote_f;
       if (((left_y_ - sinfo_[0].idealy_f_ > lengthened)
           && (slope_f_ > steep))
          || ((left_y_ + slope_f_ * dx_f - sinfo_.top ().idealy_f_ > lengthened)
@@ -377,10 +386,10 @@ Beam::quantise_dy ()
   if (quantisation_ <= NONE)
     return;
 
-  Real interline_f = paper ()->interline_f ();
+  Real interline_f = stems_[0]->staff_line_leading_f ();
   Real internote_f = interline_f / 2;
-  Real staffline_f = paper ()->rule_thickness ();
-  Real beam_f = paper ()->beam_thickness_f ();
+  Real staffline_f = paper_l ()->rule_thickness ();
+  Real beam_f = paper_l ()->beam_thickness_f ();
 
   Real dx_f = stems_.top ()->hpos_f () - stems_[0]->hpos_f ();
 
@@ -435,10 +444,10 @@ Beam::quantise_left_y (bool extend_b)
        hang       straddle   sit        inter      hang
    */
 
-  Real interline_f = paper ()->interline_f ();
-  Real internote_f = paper ()->internote_f ();
-  Real staffline_f = paper ()->rule_thickness ();
-  Real beam_f = paper ()->beam_thickness_f ();
+  Real space = stems_[0]->staff_line_leading_f ();
+  Real internote_f = space /2;
+  Real staffline_f = paper_l ()->rule_thickness ();
+  Real beam_f = paper_l ()->beam_thickness_f ();
 
   /*
     [TODO]
@@ -448,8 +457,8 @@ Beam::quantise_left_y (bool extend_b)
 
   Real straddle = 0;
   Real sit = beam_f / 2 - staffline_f / 2;
-  Real inter = interline_f / 2;
-  Real hang = interline_f - beam_f / 2 + staffline_f / 2;
+  Real inter = space / 2;
+  Real hang = space - beam_f / 2 + staffline_f / 2;
 
   /*
     Put all allowed positions into an array.
@@ -512,7 +521,7 @@ Beam::quantise_left_y (bool extend_b)
        }
     }
 
-  Interval iv = quantise_iv (allowed_position, interline_f, dy_f);
+  Interval iv = quantise_iv (allowed_position, space, dy_f);
 
   Real quanty_f = dy_f - iv.min () <= iv.max () - dy_f ? iv.min () : iv.max ();
   if (extend_b)
@@ -525,7 +534,7 @@ Beam::quantise_left_y (bool extend_b)
 void
 Beam::set_stemlens ()
 {
-  Real staffline_f = paper ()->rule_thickness ();
+  Real staffline_f = paper_l ()->rule_thickness ();
   // enge floots
   Real epsilon_f = staffline_f / 8;
 
@@ -602,10 +611,11 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const
   assert (!next || next->hpos_f () > here->hpos_f ());
   assert (!prev || prev->hpos_f () < here->hpos_f ());
 
-  Real staffline_f = paper ()->rule_thickness ();
-  Real interbeam_f = paper ()->interbeam_f (multiple_i_);
-  Real internote_f = paper ()->internote_f (); 
-  Real beam_f = paper ()->beam_thickness_f ();
+  Real staffline_f = paper_l ()->rule_thickness ();
+  Real interbeam_f = paper_l ()->interbeam_f (multiple_i_);
+
+  Real internote_f = here->staff_line_leading_f ()/2;
+  Real beam_f = paper_l ()->beam_thickness_f ();
 
   Real dy = interbeam_f;
   Real stemdx = staffline_f;
@@ -616,7 +626,7 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const
   Molecule rightbeams;
 
   // UGH
-  Real nw_f = paper ()->note_width () * 0.8;
+  Real nw_f = paper_l ()->note_width () * 0.8;
 
   /* half beams extending to the left. */
   if (prev)
index d516ff1c8d28d35aa5744749fdf663f99f1b8f3b..69c172200a3f3d3d1559959b619dd1d6de3675e7 100644 (file)
@@ -157,7 +157,7 @@ Bezier_bow::blow_fit ()
     return;
 
 #ifndef STANDALONE
-  Real internote_f = paper_l_->internote_f ();
+  Real internote_f = paper_l_->get_realvar (interline_scm_sym)/2.0;
 #else
   Real internote_f = STAFFHEIGHT / 8;
 #endif
@@ -204,7 +204,7 @@ Bezier_bow::calc_bezier ()
   Real s = sqrt (control_[3].x () * control_[3].x () 
     + control_[1].y () * control_[2].y ());
 #ifndef STANDALONE
-  Real internote = paper_l_->internote_f ();
+  Real internote = paper_l_->get_realvar (interline_scm_sym)/2.0;
 #else
   Real internote = STAFFHEIGHT / 8;
 #endif
@@ -446,7 +446,7 @@ Bezier_bow::calc_tangent_controls ()
   // emperic computer science:
   //   * tangents somewhat steeper than minimal line
 #ifndef STANDALONE
-  Real internote = paper_l_->internote_f ();
+  Real internote = paper_l_->get_realvar (interline_scm_sym)/2.0;
   Real rc_correct = paper_l_->get_var ("slur_rc_factor");
 #else
   Real internote = STAFFHEIGHT / 8;
index db08356b32869e8de47400bea3b53bd4481e8f13..c634746b1f6cc2a7047485e166301ad6da6be32b 100644 (file)
@@ -30,7 +30,7 @@ Bow::Bow ()
 Molecule*
 Bow::do_brew_molecule_p () const
 {
-  Real thick = paper ()->get_var ("slur_thickness");
+  Real thick = paper_l ()->get_var ("slur_thickness");
   Array<Offset> c = get_controls ();
   Real dy = c[3].y () - c[0].y ();
   Molecule a;
@@ -93,7 +93,7 @@ Bow::do_height () const
 Array<Offset>
 Bow::get_controls () const
 {
-  Bezier_bow b (paper ());
+  Bezier_bow b (paper_l ());
   b.set (get_encompass_offset_arr (), dir_);
   b.calc ();
   Array<Offset> controls;
index a836d62da329bdf7dd56b6320113f8c118fe2400..131294f2007cd1d6cd5f8a7db08a84af3d26d309 100644 (file)
@@ -55,7 +55,7 @@ Break_algorithm::find_break_indices () const
   Array<int> retval;
 
   for (int i=0; i < all.size (); i++)
-    if (all[i]->breakable_b_)
+    if (all[i]->breakable_b ())
       retval.push (i);
 
   if (linelength <=0)
@@ -73,7 +73,7 @@ Break_algorithm::find_breaks () const
   Line_of_cols retval;
 
   for (int i=0; i < all.size (); i++)
-    if (all[i]->breakable_b_)
+    if (all[i]->breakable_b ())
       retval.push (all[i]);
 
 
@@ -152,15 +152,6 @@ Break_algorithm::problem_OK () const
 void
 Break_algorithm::OK () const
 {
-#ifndef NDEBUG
-  #if 0
-    iter_top (pscore_l_->col_p_list_,start);
-  PCursor<Paper_column *> end (pscore_l_->col_p_list_.bottom ());
-
-  assert (start->breakable_b_);
-  assert (end->breakable_b_);
-  #endif
-#endif
 }
 
 Array<Column_x_positions>
index 66aa91b58783bb33d94e1751e714074c6f0375d0..bdd816430c5e6ed57390afb9339c7b7d075a6b9e 100644 (file)
@@ -137,7 +137,7 @@ Clef_engraver::acknowledge_element (Score_element_info info)
       if (Note_head * h = dynamic_cast<Note_head*>(it_l))
        {
          //      h->position_i_ += c0_position_i_;
-         h->position_i_ = h->steps_i_ + c0_position_i_;
+         h->position_i_ += c0_position_i_;
        }
       else if (Local_key_item *i = dynamic_cast<Local_key_item*> (it_l))
        {
@@ -187,11 +187,10 @@ Clef_engraver::create_clef()
   if (!clef_p_)
     {
       Clef_item *c= new Clef_item;
-      c->break_priority_i_ = -2; // ugh
+      c->set_elt_property (break_priority_scm_sym, gh_int2scm (-2)); // ugh
       announce_element (Score_element_info (c, clef_req_l_));
       clef_p_ = c;
     }
-
   
   clef_p_->symbol_ = clef_type_str_;
   clef_p_->y_position_i_ = clef_position_i_;
index 08eb9ea4c4f94ecfaec3795179f1d95e6aa96781..f10fbb17b919f7d8ffcebda6f668ef09d184dbaa 100644 (file)
@@ -18,7 +18,7 @@
 void
 Clef_item::do_pre_processing()
 {
-  dim_cache_[Y_AXIS].translate (paper()->internote_f () * y_position_i_);
+  dim_cache_[Y_AXIS].translate (y_position_i_ * staff_line_leading_f () / 2.0);
   change_b_ = (break_status_dir() != RIGHT);
 }
 
@@ -27,7 +27,7 @@ Clef_item::do_pre_processing()
 */
 Clef_item::Clef_item()
 {
-  breakable_b_ =true;
+  set_elt_property (breakable_scm_sym, SCM_BOOL_T);
   default_b_ = false;
   change_b_ = true;
   octave_dir_ = CENTER;
@@ -38,7 +38,7 @@ Clef_item::Clef_item()
 void
 Clef_item::do_add_processing ()
 {
-  if (!break_status_dir_)      // broken stuff takes care of their own texts
+  if (!break_status_dir ())    // broken stuff takes care of their own texts
     {
       SCM defvis = gh_eval_str ("(lambda (d) (if (= d 1) '(#f . #f) '(#t . #t)))");
       G_text_item *g =0;
@@ -59,11 +59,11 @@ Clef_item::do_add_processing ()
       
       if (default_b_)
        {
-         set_elt_property (ly_symbol ("visibility_lambda"),
+         set_elt_property (visibility_lambda_scm_sym,
                            defvis);
 
          if (g)
-           g->set_elt_property (ly_symbol ("visibility_lambda"),
+           g->set_elt_property (visibility_lambda_scm_sym,
                                 defvis);
        }
     }
index 5da7436713829e8897336bbf45674dbda86ebecd..b995639eda8cac00f4a8757f2d8a8b0181e0cb66 100644 (file)
@@ -65,7 +65,9 @@ Collision::do_pre_processing()
        }
       int d = (c_l->dir_);
 
-      clash_group_arr_a[idx (d, c_l->h_shift_b_)].push (c_l);
+      SCM shift = c_l->remove_elt_property (horizontal_shift_scm_sym);
+      bool shift_b  = (shift != SCM_BOOL_F);
+      clash_group_arr_a[idx (d, shift_b)].push (c_l);
     }
 
 
@@ -92,7 +94,6 @@ Collision::do_pre_processing()
   Interval_t<int> y_extent[4];
   Note_column * col_l_a[4];
   Real x_off [4];
-  int y_off[4];
 
   for (int j =0 ; j < 4; j++)
     {
@@ -108,7 +109,6 @@ Collision::do_pre_processing()
 
 
       x_off [j] = 0.0;
-      y_off[j] = 0;
     }
 
   do
@@ -144,8 +144,8 @@ Collision::do_pre_processing()
       }
 
   }
-  Real inter_f = paper()->internote_f ();
-  Real wid_f = paper()->note_width ();
+
+  Real wid_f = paper_l ()->note_width ();
   for (int j=0; j < 4; j++)
     {
       if (col_l_a[j])
@@ -154,7 +154,7 @@ Collision::do_pre_processing()
 
             (shaddup)
             */
-         Offset o (x_off[j] * wid_f, y_off[j] * inter_f);
+         Offset o (x_off[j] * wid_f, 0);
          col_l_a[j]->translate (o);
          //      ((Score_element*)col_l_a[j])->translate (o);
        }
index 6fb7842dcf6325b4dbc88137f96b5d8dd78ed8e1..c78fe6e8e8bacf0937ca7fd08135941acd617c82 100644 (file)
@@ -12,6 +12,7 @@
 Dimension_cache::Dimension_cache (Dimension_cache const &d)
 {
   init();
+  callback_l_ = d.callback_l_;
   empty_b_ = d.empty_b_;
   offset_ = d.offset_; //let's hope others will copy  the refpoint appropriately. 
 }
@@ -24,6 +25,7 @@ Dimension_cache::Dimension_cache ()
 void
 Dimension_cache::init()
 {
+  callback_l_ =0;
   offset_ =0.0;
   elt_l_ = 0;
   dim_.set_empty ();
@@ -145,7 +147,12 @@ Dimension_cache::get_dim () const
       return r;
     }
       
-  assert (valid_b_);
+  if (!valid_b_)
+    {
+      Dimension_cache *nc = ((Dimension_cache*)this);
+      nc->dim_= (*callback_l_ ) (nc);
+      nc->valid_b_ = true;
+    }
 
   r=dim_;
   if (!r.empty_b()) // float exception on DEC Alpha
@@ -154,4 +161,8 @@ Dimension_cache::get_dim () const
   return r;
 }
 
-
+void
+Dimension_cache::set_callback (Dim_cache_callback c)
+{
+  callback_l_ =c;
+}
index c84e3d7ab09c73bfd25c3bbb71527b21d36da565..6d9af00dd2fe8ae1dc2b8788f73db1b4682aa71c 100644 (file)
@@ -24,7 +24,7 @@ Dots::do_post_processing ()
     position_i_ ++;
   if (!no_dots_i_)
     {
-      transparent_b_ = true;
+      set_elt_property (transparent_scm_sym, SCM_BOOL_T);
       set_empty (true);
     }
 }
@@ -46,8 +46,7 @@ Dots::do_brew_molecule_p () const
       d.translate_axis (2*dw,X_AXIS);
       out->add_molecule (d);
     }
-  Real inter_f = paper ()->internote_f ();
-  out->translate_axis (inter_f * position_i_, Y_AXIS);
+  out->translate_axis (staff_line_leading_f () * position_i_ /2., Y_AXIS);
   return out;
 }
 
index 45d73e7c3753a729621050b2753c5fc345352599..f3e72a2df31370eded624203e3c8332490d3a6eb 100644 (file)
@@ -12,7 +12,7 @@
 #include "lookup.hh"
 #include "paper-def.hh"
 #include "score-column.hh"
-#include "staff-sym.hh"
+#include "staff-symbol.hh"
 #include "note-column.hh"
 #include "g-text-item.hh"
 #include "g-staff-side.hh"
@@ -158,7 +158,7 @@ Dynamic_engraver::do_process_requests()
        }
       
       cresc_p_ = new_cresc_p;
-      cresc_p_->set_bounds(LEFT,get_staff_info().musical_l ());
+      cresc_p_->set_bounds(LEFT,get_staff_info().musical_pcol_l ());
       if (text_p_)
        {
          cresc_p_->dyn_b_drul_[LEFT] = true;
@@ -171,15 +171,6 @@ Dynamic_engraver::do_process_requests()
 void
 Dynamic_engraver::do_pre_move_processing()
 {
-  Staff_symbol* s_l = get_staff_info().staff_sym_l_;
-  if (to_end_cresc_p_)
-    to_end_cresc_p_->add_support (s_l);
-  if (staff_side_p_)
-    {
-      staff_side_p_->add_support (s_l);
-      //      staff_side_p_->dim_cache_[Y_AXIS].parent_l_ =  &s_l->dim_cache_[Y_AXIS];
-    }
-
   typeset_all ();
 }
 
@@ -205,7 +196,7 @@ Dynamic_engraver::typeset_all ()
 {  
   if (to_end_cresc_p_)
     {
-      to_end_cresc_p_->set_bounds(RIGHT,get_staff_info().musical_l ());
+      to_end_cresc_p_->set_bounds(RIGHT,get_staff_info().musical_pcol_l ());
       typeset_element (to_end_cresc_p_);
       to_end_cresc_p_ =0;
     }
index 99b9ccb8fc7d294b7b0c896c903ff9829baf8645..02f5b2868601e85913ab1ec1e376c626161c8050 100644 (file)
@@ -13,7 +13,7 @@
 #include "paper-def.hh"
 #include "encompass-info.hh"
 #include "slur.hh"
-#include "staff-sym.hh"
+#include "staff-symbol.hh"
 #include "note-head.hh"
 #include "debug.hh"
 
@@ -22,17 +22,19 @@ Encompass_info::Encompass_info ()
   assert (0);
 }
 
-Encompass_info::Encompass_info (Note_column const* note, Direction dir)
+Encompass_info::Encompass_info (Note_column const* note, Direction dir, Slur const* slur_l)
 {
   interstaff_f_ = 0;
   
-  Paper_def* paper = note->paper ();
-  Real interline = paper->interline_f ();
+  Paper_def* paper = note->paper_l ();
+  
   // UGH
   Real notewidth = paper->note_width () * 0.8;
-  Real internote = interline / 2;
+  
 
   Stem* stem_l = note->stem_l_;
+  Real internote = stem_l-> staff_line_leading_f ()/2.;
+
   /* 
     set o_.x () to middle of notehead or on the exact position of stem,
     according to slur direction
@@ -60,33 +62,21 @@ Encompass_info::Encompass_info (Note_column const* note, Direction dir)
   if (stem_l->dir_ != dir)
     o_.y () += 1.0 * internote * dir;
 
-  Slur* slur_l = stem_l->slur_l_;
   if (slur_l->encompass_arr_.size ()
-      && stem_l->staff_sym_l_ != slur_l->encompass_arr_[0]->stem_l_->staff_sym_l_)
+      && stem_l->staff_symbol_l () != slur_l->encompass_arr_[0]->stem_l_->staff_symbol_l ())
     {
-#if 0 // this is nonsense..., don't issue warning
-      if (stem_l->staff_sym_l_->dim_cache_[Y_AXIS].valid_b ())
-       {
-         interstaff_f_ = stem_l->staff_sym_l_->absolute_coordinate (Y_AXIS)
-           - slur_l->encompass_arr_[0]->stem_l_->staff_sym_l_->absolute_coordinate (Y_AXIS);
-       }
-      else
-#endif
-       {
-         //  warning (_ ("invalid dimension cache: guessing staff position"));
-         if (slur_l->vertical_align_drul_[MIN] != 
-             slur_l->vertical_align_drul_[MAX])
-           warning (_ ("minVerticalAlign != maxVerticalAlign: interstaff slurs may be broken"));
-         interstaff_f_ = slur_l->vertical_align_drul_[MIN];
-         /* urg, guess staff order */
-         int d = note->head_l_arr_.top ()->steps_i_
-           - slur_l->encompass_arr_[0]->head_l_arr_[0]->steps_i_;
-         if (abs (d > 3))
-           interstaff_f_ *= sign (d);
-         else if (stem_l->chord_start_f () >
-                  slur_l->encompass_arr_[0]->stem_l_->chord_start_f ())
-           interstaff_f_ *= -1;
-       }
+      if (slur_l->vertical_align_drul_[MIN] != 
+         slur_l->vertical_align_drul_[MAX])
+       warning (_ ("minVerticalAlign != maxVerticalAlign: interstaff slurs may be broken"));
+      interstaff_f_ = slur_l->vertical_align_drul_[MIN];
+      /* urg, guess staff order */
+      int d = note->head_l_arr_.top ()->position_i_
+       - slur_l->encompass_arr_[0]->head_l_arr_[0]->position_i_;
+      if (abs (d > 3))
+       interstaff_f_ *= sign (d);
+      else if (stem_l->chord_start_f () >
+              slur_l->encompass_arr_[0]->stem_l_->chord_start_f ())
+       interstaff_f_ *= -1;
       o_.y () += interstaff_f_;
     }
 }
index 6f2413ffdc5bf7e34aaeef7b9747cd084d5a1f5e..fde31b7593f54abe840fc86a04bf7a17c3120836 100644 (file)
@@ -35,7 +35,7 @@ Engraver::typeset_element (Score_element*p)
 
 
 Paper_def*
-Engraver::paper() const
+Engraver::paper_l () const
 {
   return dynamic_cast<Paper_def*>(output_def_l_);
 }
index 427faffcaab38d140ca70c5520cb1a51f7a490a7..f0478bebe2a7678b079543dddd1e07a83e85af63 100644 (file)
@@ -63,7 +63,7 @@ Extender_engraver::do_removal_processing ()
   if (extender_spanner_p_)
     {
       req_l_->warning (_ ("unterminated extender"));
-      extender_spanner_p_->set_bounds(RIGHT, get_staff_info ().command_l ());
+      extender_spanner_p_->set_bounds(RIGHT, get_staff_info ().command_pcol_l ());
     }
 }
 
index 764d42c77a0d747350ed383029def129ee62c854..3b97b29c65751ec0faa2c4f0b4791acb81df8300 100644 (file)
@@ -51,7 +51,7 @@ Extender_spanner::do_brew_molecule_p () const
   Real w = extent (X_AXIS).length ();
   
   w += (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]);
-  Real h = paper ()->get_realvar (ly_symbol ("extender_height"));
+  Real h = paper_l ()->get_realvar (extender_height_scm_sym);
   Molecule a = lookup_l ()->filledbox ( Box (Interval (0,w), Interval (0,h)));
   a.translate (Offset (dx_f_drul_[LEFT], dy_f_drul_[LEFT]));
 
@@ -84,7 +84,7 @@ Extender_spanner::do_post_processing ()
   assert (item_l_drul_[LEFT] || item_l_drul_[RIGHT]);
 
   // UGH
-  Real nw_f = paper ()->note_width () * 0.8;
+  Real nw_f = paper_l ()->note_width () * 0.8;
 
   Direction d = LEFT;
   do
index 22436f0aba28c5c775bfa0f2f07ab0484dea829b..cc4da24fece88b594f3f75da732b9fcde5c34f34 100644 (file)
@@ -30,7 +30,7 @@ Font_size_engraver::do_process_requests ()
 void
 Font_size_engraver::acknowledge_element (Score_element_info e)
 {
-  e.elem_l_->set_elt_property (ly_symbol ("fontsize"),
+  e.elem_l_->set_elt_property (fontsize_scm_sym,
                               gh_int2scm (size_i_));
 }
 
index 660e9fefc2dbf37fde07ae2c39c33421b9cfbeec..4c3920dca1afa9c6c6b324fc68b8c543ffc5691c 100644 (file)
@@ -8,12 +8,13 @@
  */
 
 #include "g-staff-side.hh"
+#include "staff-symbol.hh"
 
 G_staff_side_item::G_staff_side_item ()
 {
   dir_ = CENTER;
   to_position_l_ = 0;
-  transparent_b_ = true;
+  set_elt_property (transparent_scm_sym, SCM_BOOL_T);
   padding_f_ = 0;
   axis_ = Y_AXIS;
 }
@@ -55,6 +56,7 @@ G_staff_side_item::add_support (Score_element*e)
 void
 G_staff_side_item::do_substitute_element_pointer (Score_element*o, Score_element*n)
 {
+  Staff_symbol_referencer::do_substitute_element_pointer (o,n);
   if (o == to_position_l_)
     to_position_l_ = n;
   else
@@ -96,3 +98,12 @@ G_staff_side_item::do_post_processing ()
     position_self ();
 }
 
+
+void
+G_staff_side_item::do_add_processing ()
+{
+  if (axis_ == Y_AXIS && staff_symbol_l ())
+    {
+      add_support (staff_symbol_l ());
+    }
+}
index dc10b240f111193b30dd395df136a8f8fa0af7e7..1854e96c5b3de513f80cdfe5af6ffb8a6a86a8c3 100644 (file)
@@ -16,7 +16,8 @@
 Molecule*
 G_text_item::do_brew_molecule_p () const
 {
-  Molecule a= paper ()->lookup_l(0)->text (style_str_,text_str_); 
+  Molecule a= paper_l ()->lookup_l(0)->text (style_str_,text_str_); 
+
   return new Molecule (a);
 }
 
index b1497be9d50b3013ddb945664610d4c49c1c33bb..c6a6137d3c776a5c7c77ceca1429d1e8c9d1a630 100644 (file)
@@ -37,6 +37,8 @@ Graphical_axis_group::extent (Axis axis) const
 void
 Graphical_axis_group::add_element (Graphical_element*e)
 {
+  used_b_ =true;
+  e->used_b_ = true;
   for (int i = 0; i < 2; i++)
     {
       Axis a = axes_[i];
index 98c3c02b62eac6c2f1f7abc3bb734d60edc3825b..975b1ffe7a95c2ef5c422bd72ef0e92c739816fe 100644 (file)
 #include "graphical-axis-group.hh"
 #include "debug.hh"
 
-bool
-Graphical_element::empty_b () const
-{
-  return dim_cache_[X_AXIS].empty_b () && dim_cache_[Y_AXIS].empty_b ();
-}
-
 Graphical_element::Graphical_element ()
 {
+  used_b_ = false;
   init ();
 }
 
 Graphical_element::Graphical_element (Graphical_element const &s)
   : dim_cache_ (s.dim_cache_)
 {
+  used_b_ = true;
   init ();
 } 
 
@@ -89,10 +85,6 @@ Graphical_element::extent (Axis a) const
   if (d->empty_b ())
     return Interval ();
   
-  if (!d->valid_b ())
-    ((Dimension_cache*)d)->set_dim  ((a == X_AXIS)? do_width(): do_height ());
-  
-
   return d->get_dim ();
 }
 
index 70a7f57ccb290514352585c6934af9dafe102b38..84872173a41ed72cc2240b2c88fae88f387b2650 100644 (file)
@@ -32,7 +32,7 @@ Hara_kiri_vertical_group_spanner::do_post_processing ()
   Link_array<Score_element> childs = get_children ();
   for (int i = 0; i < childs.size (); i++)
     {
-      childs[i]->transparent_b_ = true;
+      childs[i]->set_elt_property (transparent_scm_sym, SCM_BOOL_T);
       childs[i]->set_empty (true);
     }
   set_empty (true);
index 8e554a84281dc45cc3664251d02eba2a23bb5be8..ee5c040c3c5b50c3fb6b08820ae1b67bdbf086ae 100644 (file)
@@ -50,8 +50,8 @@ Note_heads_engraver::do_process_requests()
          dot_p_arr_.push (d);
        }
 
-      note_p->steps_i_ = note_req_l->pitch_.steps ();
-      //      note_p->position_i_ = note_req_l->pitch_.steps ();
+      //      note_p->steps_i_ = note_req_l->pitch_.steps ();
+      note_p->position_i_ = note_req_l->pitch_.steps ();
 
       String noteheadstyle = get_property ("noteheadStyle", 0);
       if (noteheadstyle.length_i ())
index 0a9f1e6958715f4d18542c6c63b15f0fce317384..fbb84f77d71b2b4771bae27335cbbbaa630cf416 100644 (file)
@@ -16,9 +16,9 @@
 #include "axes.hh"
 
 /**
-  Order elements top to bottom.
+  Order elements top to bottom/left to right/right to left etc..
 
-  TODO: merge with Horizontal_align_item
+  TODO: implement padding.
  */
 class Align_element : virtual public Score_element {
   Link_array<Score_element> elem_l_arr_;
@@ -47,7 +47,8 @@ public:
   void add_element (Score_element*);
   void add_element_priority (Score_element*, int);
   bool contains_b (Score_element const*) const;
-  
+
+  Score_element *get_elt_by_priority (int) const;
 protected:
   virtual void do_print() const;
   virtual void do_substitute_element_pointer (Score_element*,Score_element*);
index 42836a54b4e6159f60f3c82fea1fae1fc2aab0fe..3cd36d94e8721169e3a6ea1b1ed646d16a0de908 100644 (file)
@@ -8,10 +8,9 @@
 #define AUDIO_COLUMN_HH
 
 #include "proto.hh"
-#include "plist.hh"
 #include "lily-proto.hh"
 #include "moment.hh"
-#include "pcursor.hh"
+#include "parray.hh"
 #include "audio-element.hh"
 
 /**
@@ -26,7 +25,7 @@ public:
     Moment at_mom() const;
     void print() const;
 
-    Link_list<Audio_item *> audio_item_l_list_;
+    Link_array<Audio_item> audio_item_l_arr_;
     Performance * performance_l_;
 
 private:
index 2bcaf94c979b9e7bf3bfc3051607a0841cf776ac..faf0eda84180db2a9a3b5c1aa063a6ed7f4391c5 100644 (file)
@@ -8,7 +8,7 @@
 #define AUDIO_STAFF_HH
 
 #include "proto.hh"
-#include "plist.hh"
+#include "parray.hh"
 #include "lily-proto.hh"
 #include "audio-element.hh"
 
@@ -16,8 +16,7 @@ struct Audio_staff : public Audio_element {
     void add_audio_item (Audio_item*  l);
     void output (Midi_stream& midi_stream_r, int track_i);
 
-    Link_list<Audio_item*> audio_item_l_list_;
-    
+    Link_array<Audio_item> audio_item_l_arr_;
 };
 
 #endif // AUDIO_STAFF_HH
index e272ffca0db23dbde6d3190033fa3daffa34a925..ed80677fae0bd5acd93fde85955400e8e23f62af 100644 (file)
@@ -28,8 +28,6 @@ public:
   Axis_group_element(Axis,Axis);
   Axis_group_element();  
   virtual Link_array<Score_element> get_children ();
-
-  
 };
 
 #endif // AXIS_GROUP_ELEMENT_HH
index ee3ae12af8a89732f75157074b7e15e8503951bd..08e48d2f6e31a48340d4bc767bbdeb08fa931868 100644 (file)
@@ -7,6 +7,7 @@
 #ifndef BAR_HH
 #define BAR_HH
 #include "item.hh"
+
 /**
   A vertical bar.
  */
@@ -22,7 +23,7 @@ public:
 protected:
   virtual void do_pre_processing ();
   virtual Molecule* do_brew_molecule_p () const;
-
+  virtual Real get_bar_size () const;
 private:
   void do_print () const;
 };
index f30098a427a1fc3a33bf19982015b555cc0ef1a4..a8b6ca286a3d8c2de56290a7cdae7d11096b8689 100644 (file)
 #include "lily-proto.hh"
 #include "directional-spanner.hh"
 #include "stem-info.hh"
-#include "plist.hh"
+
 
 /** a beam connects multiple stems.
 
   Beam adjusts the stems its owns to make sure that they reach the
   beam and that point in the correct direction */
-class Beam:  public Directional_spanner {
+class Beam : public Directional_spanner  {
 public:
   /** 
     The beams should be prevented to conflict with the stafflines, 
index b1f454b83626ea4e6f1d293c4c0481261f45ef5c..232b57ef729cd870df18d96addc7998782443feb 100644 (file)
 #include "text-def.hh"
 #include "direction.hh"
 #include "pointer.hh"
-
+#include "staff-symbol-referencer.hh"
 /**
   Set a clef in a staff.
  */
-class Clef_item : public Item {
+class Clef_item : public Item, public Staff_symbol_referencer {
 protected:
   virtual void do_pre_processing();
   virtual Molecule* do_brew_molecule_p() const;
index d0ba58d9cf0e79882bf4bfd8034d0d7758b0532c..7e2a995450a0a48fceb4dcca6c197fb2330fa927 100644 (file)
@@ -62,7 +62,8 @@ class Cons_list
 public:
   Cons<T> * head_;
   Cons<T> ** tail_;
-  Cons_list () { head_ =0; tail_ = &head_; }
+  Cons_list () { init_list (); }
+  void init_list () {head_ =0; tail_ = &head_; }
   void append (Cons<T> *c)
     {
       assert (!c->next_);
@@ -92,6 +93,19 @@ template<class T>
 void
 clone_killing_cons_list (Cons_list<T>&, Cons<T> *src);
 
+template<class T> int cons_list_size_i (Cons<T> *l)
+{
+  int i=0;
+  while  (l)
+    {
+      l = l->next_;
+       i++;
+    }
+  return i;
+}
+
+
+
 
 #endif /* CONS_HH */
 
index 806ec2704eddf9f3e3d659e075a272621821e807..b55d1c65a9a786ff42280ee814f486df6531cc6f 100644 (file)
@@ -15,6 +15,8 @@
 #include "lily-proto.hh"
 #include "parray.hh"
 
+class Dimension_cache;
+typedef Interval (*Dim_cache_callback)(Dimension_cache *);
 
 /**
   Adminstration of offset  dimension info. 
@@ -32,10 +34,12 @@ class Dimension_cache
    */
   Real offset_;
   Graphical_element *elt_l_;
+  Dim_cache_callback callback_l_;
   friend class Graphical_element;
 
   void init ();
 public:
+  void set_callback (Dim_cache_callback);
   /** The #offset_# is defined with regard to this graphical_element/
     dimension_cache.  */
   
index b93d830f32124102c1565bcf4a031f0f51eace6f..c96676cbc7c2bc87de38c51644752836af2609ce 100644 (file)
@@ -9,19 +9,22 @@
 
 #include "spanner.hh"
 
-/// a spanner which can be pointing "up" or "down"
+/** a spanner which can be pointing "up" or "down".
+
+    JUNKME?
+ */
 class Directional_spanner : public Spanner{
 public:
     
-    /// -1 below heads, +1 above heads.
-    Direction dir_;
-    Directional_spanner();
+  /// -1 below heads, +1 above heads.
+  Direction dir_;
+  Directional_spanner();
     
-    /// offset of "center" relative to left-column/0-pos of staff
-    virtual Offset center() const;
-    virtual void set_default_dir();
+  /// offset of "center" relative to left-column/0-pos of staff
+  virtual Offset center() const;
+  virtual void set_default_dir();
 protected:
-    virtual void do_pre_processing();
+  virtual void do_pre_processing();
 };
 
 #endif // DIRECTIONALSPANNER_HH
index 8c6a32ca25d7a73f60b66fda594b5ac45f2f2cb8..2ff6f061700a4619248ee19dd7669434bd6c95ac 100644 (file)
 #define DOTS_HH
 
 #include "item.hh"
-
+#include "staff-symbol-referencer.hh"
 /**
   The dots to go with a notehead/rest.  A separate class, since they
   are a party in collision resolution.
   */
-class Dots : public Item
+class Dots : public Item, public Staff_symbol_referencer
 {
 protected:
   virtual Molecule * do_brew_molecule_p () const;
index a6156e8f5d50c8ce0f06454abe5cda4a83b39262..91aab595696cada21437ab406fcb7884bb258590 100644 (file)
@@ -17,7 +17,7 @@
 struct Encompass_info
 {
   Encompass_info ();
-  Encompass_info (Note_column const*, Direction);
+  Encompass_info (Note_column const*, Direction, Slur const *);
 
   Offset o_;
   Real interstaff_f_;
index e1f34ccfde77ae640a7c63605daeaae0bd022343..ec326848317d39092bbe82ef9b89b3c9310fb14d 100644 (file)
@@ -12,7 +12,6 @@
 
 #include "lily-proto.hh"
 #include "parray.hh"
-#include "plist.hh"
 #include "score-element-info.hh"
 #include "engraver.hh"
 #include "translator-group.hh"
@@ -32,8 +31,6 @@ public:
   Engraver_group_engraver();
   ~Engraver_group_engraver();
     
-  
-    
   virtual Staff_info get_staff_info() const;
   virtual void do_announces();
   virtual void announce_element (Score_element_info);
index 60716cba532ef1748a4fd8aea6a9fa0fcfa3ead0..a073d808ac5fa300ee018ab3ded0bac738a5940f 100644 (file)
@@ -31,7 +31,7 @@ protected:
     
 
   /// utility
-  Paper_def * paper() const;
+  Paper_def * paper_l() const;
   /**
     Invoke walker method to typeset element. Default: pass on to daddy.
     */
index b489844e8f4371fbedd0362b5572f385e2af7b3a..6334233f1158f8e9f341b6a7a067be321df8c65a 100644 (file)
@@ -11,8 +11,9 @@
 #define G_STAFF_SIDE_HH
 
 #include "item.hh"
+#include "staff-symbol-referencer.hh"
 
-class G_staff_side_item : public Item
+class G_staff_side_item : public Item, public Staff_symbol_referencer
 {
   void position_self ();
 public:
@@ -29,6 +30,7 @@ public:
   virtual void set_default_direction ();
   VIRTUAL_COPY_CONS(Score_element);
 protected:
+  virtual void do_add_processing ();
   virtual void do_substitute_element_pointer (Score_element*,Score_element*);
   virtual void do_pre_processing ();
   virtual void do_post_processing ();
index 70e0ea9c2f17cfa264e80e70760b27d065b056b8..bc60c0b41af158b4e9a511d13b3c869ee5618a71 100644 (file)
@@ -27,10 +27,13 @@ class Graphical_element
 public:
   Dimension_cache dim_cache_[NO_AXES];
 
+  /**
+     Set this if anyone points to me, or if I point to anyone.
+   */
+  bool used_b_;
+  
   char const * name () const;
   void set_empty (bool);
-  bool empty_b () const;
-  
   Graphical_element ();
   Graphical_element (Graphical_element const&);
   virtual ~Graphical_element ();
@@ -60,9 +63,6 @@ public:
   Graphical_element *parent_l (Axis a) const;
   
   virtual void do_print () const;
-protected:
-  virtual Interval do_height () const=0;
-  virtual Interval do_width () const=0;
 };
 
 #endif // GRAPHICAL_ELEMENT_HH
index db8e5c4cf9c26855ed26a450298407160afd2725..ce08eb0b3f1ea1f9e0b80749aabd4bde4284ddf4 100644 (file)
 class Item : public virtual Score_element {
   void do_break ();
   void try_visibility_lambda ();
-
-public:
-  Link_array<Spanner> attached_span_l_arr_;
   Drul_array<Item*> broken_to_drul_;
-  Item *unbroken_original_l_;
 
-  /// should be put in a breakable col.
-  bool breakable_b_;
+
+public:
 
   /// I am really to be broken?
-  virtual bool breakable_b () const;
+  bool breakable_b () const;
+  bool broken_original_b () const;
   
-  Direction break_status_dir_;
-  int break_priority_i_;
+  Direction break_status_dir () const;
   
-  /// nobreak = 0, pre = -1, post = 1
-  Direction break_status_dir() const;
   Item * find_prebroken_piece (Direction) const;
   Item * find_prebroken_piece (Line_of_score*) const;    
 
@@ -72,8 +66,6 @@ protected:
   virtual void do_breakable_col_processing();
   virtual void handle_prebroken_dependencies();
   virtual void do_print() const;
-  virtual bool linked_b() const;
-
   virtual void handle_prebroken_dependents ();
 
   void copy_breakable_items();
index 38fafe97ee36663a4a1075c480175f98c69c6c76..0833aca9612cc90e0b9fc11f9e7cc341bb612fa9 100644 (file)
@@ -9,10 +9,12 @@
 
 #include "item.hh"
 #include "array.hh"
-
+#include "staff-symbol-referencer.hh"
 
 /// An item which places accidentals at the start of the line
-struct Key_item : Item {
+class Key_item :public  Item, public Staff_symbol_referencer {
+public:
+  
   Array<int> pitch_arr_;
   Array<int> acc_arr_;
   Array<int> old_pitch_arr_;
@@ -32,7 +34,7 @@ struct Key_item : Item {
   void add (int pitch, int acc);
   void add_old (int pitch, int acc);
   void set_c_position (int);
-  int Key_item::calculate_position(int p, int a) const;
+  int calculate_position(int p, int a) const;
 
 protected:
   virtual void do_pre_processing();
index 9135aae3d8d9207453fb1087f3826ce23d23dc0f..f6fcff7bd1946959e820a066b97ab2b5cb01cdd9 100644 (file)
@@ -40,6 +40,5 @@ clone_killing_cons_list (Cons_list<T> & dest, Cons<T> *src)
     }
 }
 
-
 #endif /* KILLING_CONS_TCC */
 
index 512590c275b87d13a5271e8336c3af90962cf3e5..097a77af143ab8b1fe8266c2d651d94d270439e9 100644 (file)
@@ -31,5 +31,7 @@ void ly_display_scm (SCM s);
 
 
 void read_lily_scm_file (String);
+void init_symbols ();
+#include "ly-symbols.hh"
 
 #endif // LILY_GUILE_HH
index c98ae4dd50faf6678b6aac54d32c96d570eadb9a..187947afec79931870a1b8dd9486f7abb061bb16 100644 (file)
 #include "super-element.hh"
 
 /// the columns of a score that form one line.
-class Line_of_score : public Spanner , public Super_element
+class Line_of_score : public Spanner, public Super_element
 {
 public:
   Link_array<Paper_column> cols_;
-  bool error_mark_b_;
-
-  
   Line_of_score();
     
   void add_element (Score_element *);
@@ -31,8 +28,6 @@ public:
 
 protected:
   virtual Link_array<Score_element> get_extra_dependencies () const;
-
-
   virtual Interval do_width() const;
   virtual void do_print() const;
   VIRTUAL_COPY_CONS(Score_element);
index 7bc71c2333614dedc7d7f375a32e99b0a4a00b6a..edba5ec7ca2c37ae79e7e5f67b72352ac7239173 100644 (file)
@@ -9,6 +9,7 @@
 #include "item.hh"
 #include "array.hh"
 #include "musical-pitch.hh"
+#include "staff-symbol-referencer.hh"
 
 struct Local_key_cautionary_tuple
 {
@@ -36,7 +37,7 @@ struct Local_key_cautionary_tuple
   figure out private/public
   
  */
-class Local_key_item : public Item {
+class Local_key_item : public Item, public Staff_symbol_referencer {
   Array<Local_key_cautionary_tuple> accidental_arr_;
   Link_array<Item> support_items_;
 public:
diff --git a/lily/include/ly-symbols.hh b/lily/include/ly-symbols.hh
new file mode 100644 (file)
index 0000000..99ba650
--- /dev/null
@@ -0,0 +1,50 @@
+/*   
+  ly-symbols.hh -- declare SCM symbols.
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#ifndef LY_SYMBOLS_HH
+#define LY_SYMBOLS_HH
+
+#ifndef DECLARE_LY_SYMBOL
+#define DECLARE_LY_SYMBOL(a) extern SCM a ## _scm_sym
+#endif
+
+DECLARE_LY_SYMBOL(beam);
+DECLARE_LY_SYMBOL(beam_thickness);
+DECLARE_LY_SYMBOL(bracket);
+DECLARE_LY_SYMBOL(break_helper_only);
+DECLARE_LY_SYMBOL(break_priority);
+DECLARE_LY_SYMBOL(breakable);
+DECLARE_LY_SYMBOL(char);
+DECLARE_LY_SYMBOL(extender_height);
+DECLARE_LY_SYMBOL(filledbox);
+DECLARE_LY_SYMBOL(fontsize);
+DECLARE_LY_SYMBOL(header);
+DECLARE_LY_SYMBOL(horizontal_shift);
+DECLARE_LY_SYMBOL(interbeam);
+DECLARE_LY_SYMBOL(interbeam4);
+DECLARE_LY_SYMBOL(interline);
+DECLARE_LY_SYMBOL(linewidth);
+DECLARE_LY_SYMBOL(notewidth);
+DECLARE_LY_SYMBOL(output);
+DECLARE_LY_SYMBOL(pianobrace);
+DECLARE_LY_SYMBOL(placebox);
+DECLARE_LY_SYMBOL(rulesym);
+DECLARE_LY_SYMBOL(rulethickness);
+DECLARE_LY_SYMBOL(staffheight);
+DECLARE_LY_SYMBOL(text);
+DECLARE_LY_SYMBOL(transparent);
+DECLARE_LY_SYMBOL(tuplet);
+DECLARE_LY_SYMBOL(tuplet_thick);
+DECLARE_LY_SYMBOL(visibility_lambda);
+DECLARE_LY_SYMBOL(volta);
+DECLARE_LY_SYMBOL(volta_thick);
+
+
+#endif /* LY_SYMBOLS_HH */
+
index ad2d6db6fd8e3e8a9b667523f96d287e843b616f..30ec4764201bd9b126f4a626ba1d0cf4b5e488b4 100644 (file)
@@ -17,8 +17,8 @@
 
 struct Midi_note_event : PQueue_ent<Moment, Midi_note_off*>
 {
-    bool ignore_b_;
-    Midi_note_event();
+  bool ignore_b_;
+  Midi_note_event();
 };
 
 int compare (Midi_note_event const& left, Midi_note_event const& right);
@@ -26,22 +26,26 @@ int compare (Midi_note_event const& left, Midi_note_event const& right);
 /**
   walk audio and output midi
   */
-class Midi_walker : public PCursor<Audio_item*> 
+class Midi_walker// : public PCursor<Audio_item*> 
 {
 public:
-    Midi_walker (Audio_staff* audio_staff_l, Midi_track* midi_track_l);
-    ~Midi_walker();
-
-    void process();
+  Midi_walker (Audio_staff* audio_staff_l, Midi_track* midi_track_l);
+  ~Midi_walker();
 
+  void process();
+  void operator ++(int);
+  bool ok () const;
 private:
-    void do_start_note (Midi_note* note_p);
-    void do_stop_notes (Moment now_mom);
-    void output_event (Moment now_mom, Midi_item* l);
-
-    Midi_track* track_l_;
-    PQueue<Midi_note_event> stop_note_queue;
-    Moment last_mom_;
+  void do_start_note (Midi_note* note_p);
+  void do_stop_notes (Moment now_mom);
+  void output_event (Moment now_mom, Midi_item* l);
+
+  Midi_track* track_l_;
+  Audio_staff* staff_l_;
+  int index_;
+  Link_array<Audio_item> * item_l_arr_l_;
+  PQueue<Midi_note_event> stop_note_queue;
+  Moment last_mom_;
 };
 
 
index a95c3bff5c2b3b8983ccf831580dbf54ee5bfebb..8390326addf0247de84804eba089329b247309ca 100644 (file)
@@ -9,7 +9,6 @@
 #define MOLECULE_HH
 
 #include "lily-proto.hh"
-#include "plist.hh"
 #include "box.hh"
 #include "axes.hh"
 #include "direction.hh"
index 2682d500a07f76c1dd88c82c72a1dfd8b0e15148..45fc8dddce74e2697269a2ccca41f5de520a38bd 100644 (file)
@@ -11,8 +11,9 @@
 #define MULTI_MEASURE_REST_HH
 
 #include "spanner.hh"
+#include "staff-symbol-referencer.hh"
 
-class Multi_measure_rest : public Spanner
+class Multi_measure_rest : public Spanner, public Staff_symbol_referencer
 {
 public:
   Multi_measure_rest ();
index 7060c70576c0c67deff423f9507202af978f258b..7980affacf0649aaec7348748df51d9331935810 100644 (file)
@@ -11,7 +11,6 @@
 #define MUSIC_ITERATOR_HH
 
 #include "lily-proto.hh"
-#include "plist.hh"
 #include "array.hh"
 #include "moment.hh"
 #include "virtual-methods.hh"
index 24f3e59077ea7e12bab4cd35d301d6cf4c585c7b..341b103608ed833e7cbbd50556a059bc1fbe7d0c 100644 (file)
@@ -11,8 +11,7 @@
 #define MUSIC_LIST_ITERATOR_HH
 
 #include "music-iterator.hh"
-#include "pcursor.hh"
-#include "plist.hh"
+
 
 class Music_list_iterator : public Music_iterator
 {
index f9bcfb7880c4e8d5b86e75a7eb29981e6376f646..df6222af782079a7ff5af2c664fc40b5abed6a77 100644 (file)
 #define Music_sequence_HH
 
 #include "music.hh"
-#include "plist.hh"
+#include "cons.hh"
 
 
-class Music_list : public Pointer_list<Music*>
+class Music_list : public Cons_list<Music> 
 {
 public:
   Musical_pitch do_relative_octave (Musical_pitch, bool); 
index d770befd2c55b10f34494d12841f3ec1f8d02080..90079037149abefda213a2cae995123264391598 100644 (file)
@@ -13,7 +13,6 @@
 #include "string.hh"
 #include "lily-proto.hh"
 #include "virtual-methods.hh"
-#include "plist.hh"
 #include "dictionary.hh"
 
 /**
index 88417f162de652928e7cc08b7ffd3634313769ef..8fd5af02b115119ceb3aad9a9343cfca1aa53731 100644 (file)
@@ -23,10 +23,11 @@ protected:
 public:
   /** The relative position of the "voice" containing this
     chord. Normally this would be the same as the stem direction,
-    but rests do not have stems.  
+    but rests do not have stems.
+
+    JUNKME.v
     */
   Direction dir_;
-  bool h_shift_b_;
   Stem* stem_l_;
 
 
index d70be4d9d181f172d73bb9ad81ff27821710b551..a48792349d61e81c52d615801858f5a449ca41b0 100644 (file)
@@ -23,9 +23,6 @@ public:
   /// position of top line (5 linestaff: 8)
   int position_i_;
 
-  /// pitch in steps
-  int steps_i_;
-    
   /// -1 = lowest, 0 = inside, 1 = top
   int extremal_i_;
     
@@ -35,7 +32,6 @@ public:
     
   Note_head ();
   static int compare (Note_head * const &a, Note_head *const &b) ;
-
 protected:
   virtual Interval do_width () const;
   virtual void do_pre_processing();
index e618fdc26912367f78bf08be6b775efb4859a8cc..3f3f35e5177b2cf474f36ec3f2560221538c228c 100644 (file)
@@ -11,7 +11,6 @@
 #define P_COL_HH
 
 #include "horizontal-group-item.hh"
-#include "plist.hh"
 #include "rod.hh"
 
 
   */
 
 class Paper_column : public Horizontal_group_item { 
-protected:
-  virtual bool breakable_b () const;
 public:
-  
   VIRTUAL_COPY_CONS(Score_element);
-  Drul_array< Array<Column_rod> > minimal_dists_arr_drul_;
+  Drul_array<Array<Column_rod> > minimal_dists_arr_drul_;
 
   void preprocess ();
   /// set a minimum distance
@@ -54,17 +50,11 @@ public:
   Line_of_score *line_l_;
 
   virtual Line_of_score *line_l () const;
-  bool error_mark_b_;
-  bool used_b_ ;               // manual override.. 
-    
 
   /// which  one (left =0)
   int rank_i() const;
 
-  /// does this column have items
-  bool used_b() const;
   bool breakpoint_b() const;
-    
   void add_item (Item *i);
 
   Paper_column();
index c3fa18053811c855d36066174c9a4ae204cf153a..77942e8027992eceb0fcc8571272a4517a48d23a 100644 (file)
   
   add support for multiple fontsizes 
 
+
+  
+
   add support for other len->wid conversions.
 
   Input_engraver should be in here.
+
+
+  Interesting variables:
+  
+  /// The distance between lines
+  interline
+  
  */
 class Paper_def : public Music_output_def 
 {
@@ -49,6 +59,9 @@ public:
   Array<Interval> shape_int_a_;
   Real get_realvar (SCM symbol) const;
   Real get_var (String id) const;
+
+  SCM get_scm_var (SCM sym) const;
+  
   void reinit ();
   Paper_def ();
   void set_lookup (int, Lookup*);
@@ -60,11 +73,6 @@ public:
   /// The thickness of a beam
   Real beam_thickness_f () const;
 
-  /// The distance between lines
-  Real interline_f () const;
-  /// half the distance between lines
-  Real internote_f () const;
-
   /// thickness of the standard line 
   Real rule_thickness () const;
 
index 3e34dc7cf595d9b48e68363aa49489724339459d..55e9b44052d3bc846c58d552822e27a51a215d6e 100644 (file)
@@ -21,10 +21,7 @@ public:
   Performance ();
   ~Performance ();
 
-  void add_column (Audio_column*);
-  void add_staff (Audio_staff* l);
   void add_element (Audio_element*p);
-
     
   void output (Midi_stream& midi_stream_r);
   void output_header_track (Midi_stream& midi_stream_r);
index b98f2cd61afa8cee7e7e7aadc34ae18bb9f0be7c..b8c03cccefa42f2fcf5c8d2a42db989e4e269820 100644 (file)
@@ -10,7 +10,6 @@
 
 #include "lily-proto.hh"
 #include "parray.hh"
-#include "plist.hh"
 #include "performer.hh"
 #include "translator-group.hh"
 
index 6187a2f645762527b36736dbefa6902ec2a7c0e7..a9cfca3355bc2cb2aebf7b5ee159a68dc34ee480 100644 (file)
@@ -11,8 +11,9 @@
 #define RHYTHMIC_HEAD_HH
 
 #include "item.hh"
+#include "staff-symbol-referencer.hh"
 
-class Rhythmic_head : public Item
+class Rhythmic_head : public Item, public Staff_symbol_referencer
 {
 public:
   
index a3cfd50f69a76304bc285ff7f62c71bb9c709e27..eaaaf1482bb48a54f99e75bf3ccf7be15d7c07be 100644 (file)
@@ -12,6 +12,7 @@
 #include "directed-graph.hh"
 #include "graphical-element.hh"
 #include "protected-scm.hh"
+#include "lily-guile.hh"
 
 
 typedef void (Score_element::*Score_element_method_pointer) (void);
@@ -23,24 +24,52 @@ typedef void (Score_element::*Score_element_method_pointer) (void);
   which are implemented in the Directed_graph_node class: all elements
   form an acyclic graph.
 
-  (elem) */
+  (elem)
+
+
+Element Properties:
+
+Boolean (true iff defined)
+
+ break_helper_only -- if defined try to junk this after calcing breakpoints.
+
+ transparent -- do not calc. output
+
+*/
 class Score_element : public virtual Graphical_element {
   Protected_scm element_property_alist_;
   Link_array<Score_element> dependency_arr_;
-  
+  Lookup * lookup_l_;
 public:
-  /// delete after linebreak calculation.
-  bool break_helper_only_b_;
-  Paper_score *pscore_l_;    
+  Score_element *original_l_;
+
+  /**
+    Administration: Where are we?. This is mainly used by Super_element and
+    Score_element::calcalute_dependencies ()
+
+    0 means ORPHAN,
+    -1 means deleted
+    
+   */
+  int status_i_;
+
+  Paper_score *pscore_l_;
   Molecule * output_p_;
   Score_element ();
   Score_element (Score_element const&);
   virtual void print () const;
 
-  SCM get_elt_property (SCM sym);
+  /*
+    properties
+   */
+  SCM get_elt_property (SCM sym) const;
   void set_elt_property (SCM sym, SCM val);
-  
-  Paper_def *paper () const;
+  SCM remove_elt_property (SCM key);
+
+  /*
+    related classes.
+   */
+  Paper_def *paper_l () const;
   Lookup const *lookup_l () const;
 
   virtual ~Score_element ();
@@ -52,28 +81,13 @@ public:
     add a dependency. It may be the 0 pointer, in which case, it is ignored.
     */
   void add_dependency (Score_element*);    
-
   virtual Line_of_score * line_l () const;
-  virtual bool linked_b () const;
+  bool linked_b () const;
   VIRTUAL_COPY_CONS(Score_element);
  
-  /// do not print anything black
-  bool transparent_b_;
-
   // ugh: no protection. Denk na, Vrij Veilig
   void calculate_dependencies (int final, int busy, Score_element_method_pointer funcptr);
 
-public:
-  /**
-    Administration: Where are we?. This is mainly used by Super_element and
-    Score_element::calcalute_dependencies ()
-
-    0 means ORPHAN,
-    -1 means deleted
-    
-   */
-  int status_i_;
-
 protected:
   Score_element* dependency (int) const;
   int dependency_size () const;
@@ -104,6 +118,8 @@ protected:
   virtual void handle_prebroken_dependencies ();
   virtual void handle_prebroken_dependents ();
   virtual Link_array<Score_element> get_extra_dependencies () const;
+
+  static Interval dim_cache_callback (Dimension_cache*);
 };
 
 
index 66faa1edb9e69671bb24542208c98b8a6ddc935d..b84174780b6ffe0efe10dd4ea16c82d34a2d3be7 100644 (file)
 #include "engraver.hh"
 
 /**
-  Group  a number of items across staffs
- */
+  Group a number of items across staffs:
+
+  Acknowledge items, put each priority in a separate column.  Put all
+  columns in a horizontal align engraver.  We manufacture two types of
+  elements: the alignment element and the columns.  This is probably
+  more convenient, and I question the use having one without the
+  other.
+*/
 class Score_priority_engraver : public Engraver
 {
-  Hash_table<int, Horizontal_group_item  *> align_p_tab_;
+  Break_align_item * halign_p_;
+  Link_array<Item> column_p_arr_;
+
+  void add_horizontal_group (Item* , int p);
 public:
   VIRTUAL_COPY_CONS(Translator);
   Score_priority_engraver ();
index e7c0f80647c816feefd37e5542257816b0d79270..bc89e7ae8a8a127ebdb95195a6aaebf32829bf67 100644 (file)
@@ -12,7 +12,6 @@
 
 #include "array.hh"
 #include "lily-proto.hh"
-#include "plist.hh"
 #include "string.hh"
 #include "input.hh"
 #include "lily-proto.hh"
index 3f596c963a72c6a9f22c64826b2fe21c90b4fa01..a09eb7b0f3528761f167e5bb5f05daaf91d66adf 100644 (file)
@@ -29,15 +29,13 @@ private:
   void set_default_dir();
 public:
   General_script_def *specs_p_;
-  bool postbreak_only_b_;
-    
+
   static int compare (Script  *const&, Script *const&) ;
   Script();
   ~Script ();
   Script (Script const&);
    
   void set_stem (Stem*);
-  
 };
 
 
index cb644e0729523e17aea12dcefdf5b0ac2f098c5b..5f4f7e9d020d7c9f4eeeeaaf38040280fa994089 100644 (file)
@@ -17,6 +17,10 @@ class Separating_group_spanner : public Spanner
 {
   Link_array<Single_malt_grouping_item> spacing_unit_l_arr_;
 public:
+  /**
+     extra space to add after  postbreak. (FIXME).
+   */
+  Real padding_f_ ;
   Separating_group_spanner ();
   void add_spacing_unit (Single_malt_grouping_item*);
 protected:
index eb473c354dfd82779ad0d068f2ae82c1f4d54b6f..a027ad2fe5a6c23a000e152c24b4208871ecf6cd 100644 (file)
@@ -31,7 +31,7 @@ protected:
 
 private:
   Moment here_mom_;
-  PCursor<Music*> *cursor_p_;
+  Cons<Music> *cursor_;
   Music_iterator * iter_p_;
 
   /*
index 0c7bf2a5f5b03eb89f324baa98d968e2cd30b257..91c75a7aca2b6e3081f508299e129029482f21ff 100644 (file)
@@ -69,8 +69,6 @@ protected:
   Array<Breaking_information> broken_info_;
   friend Axis_group_spanner; // UGH
 
-  Spanner * unbroken_original_l_;
-
   virtual void output_processing ();
   virtual void do_space_processing ();
   virtual void do_break_processing ();
diff --git a/lily/include/staff-bar.hh b/lily/include/staff-bar.hh
new file mode 100644 (file)
index 0000000..4f604ad
--- /dev/null
@@ -0,0 +1,28 @@
+/*   
+  staff-bar.hh -- declare Staff_bar
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#ifndef STAFF_BAR_HH
+#define STAFF_BAR_HH
+
+#include "bar.hh"
+#include "staff-symbol-referencer.hh"
+
+/**
+   A bar that is on a staff.
+   Ugh. Entita non multiplicandum  ... 
+ */
+class Staff_bar : public Bar , public Staff_symbol_referencer
+{
+public:
+  VIRTUAL_COPY_CONS(Score_element);
+  virtual Real get_bar_size () const;
+};
+
+#endif /* STAFF_BAR_HH */
+
index d4d755547b03a8cd3bbfb48854931713236931f0..cbedf848edb0458057428af6a1c84801db673b7e 100644 (file)
 
 #include "lily-proto.hh"
 
-/// struct to pass staff info along a Engraver hierarchy.
+/** struct to pass staff info along a Engraver hierarchy.
+
+    JUNKME.
+ */
 struct Staff_info {
-    Staff_symbol*staff_sym_l_;
-    
     Time_description const *time_C_;
     Rhythmic_grouping const *rhythmic_C_;
     Score_column *musical_l_;
     Score_column *command_l_;
 
-    Score * score_l_;
-    Score *score_l();
     Paper_column * command_pcol_l();
-    Score_column* musical_l();
-    Score_column *command_l();
     Paper_column * musical_pcol_l();
     Staff_info();
 };
index d8ec57bd05185f95f971e94aba3bb518541d839f..da73a3c84caf8a9dc60b537509a77d5a8b85f161 100644 (file)
@@ -13,6 +13,7 @@
 #include "score-element.hh"
 #include "interval.hh"
 #include "direction.hh"
+#include "staff-symbol-referencer.hh"
 
 /**
 
@@ -20,7 +21,7 @@
    staff).
 
 */
-class Staff_side : virtual Score_element
+class Staff_side : public  Staff_symbol_referencer 
 {
 public:
 
@@ -49,8 +50,8 @@ protected:
   virtual void do_substitute_element_pointer (Score_element *, Score_element*);
   virtual void do_pre_processing ();
   virtual void do_post_processing ();
+  virtual void do_add_processing ();
   Interval support_extent () const;
-
 private:
   void do_side_processing ();
   Link_array<Score_element> support_l_arr_;
index 58877137ef9e7a21febfaaa2d785126d74a1f69f..3c016b07df97a9a869650d92a34c6a331464ebf0 100644 (file)
@@ -23,7 +23,8 @@ public:
   
 protected:
   virtual ~Staff_symbol_engraver();
-  virtual void fill_staff_info (Staff_info&);
+
+  virtual void acknowledge_element (Score_element_info);
   virtual void do_removal_processing();
   virtual void do_creation_processing();
        
diff --git a/lily/include/staff-sym.hh b/lily/include/staff-sym.hh
deleted file mode 100644 (file)
index eeafd6d..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-  staffsym.hh -- declare Staff_symbol
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef STAFFSYM_HH
-#define STAFFSYM_HH
-#include "spanner.hh"
-
-/**
-  This spanner draws the lines of a pstaff.
-  The bottom line is position 0.
-  */
-class Staff_symbol : public Spanner
-{
-public:
-  /// this many lines.
-  int no_lines_i_;
-  Real interline_f_;
-
-  
-  Staff_symbol ();
-  Real inter_note_f() const;
-  int steps_i() const;
-protected:
-  VIRTUAL_COPY_CONS(Score_element);
-  virtual Interval do_height () const;
-  virtual Molecule* do_brew_molecule_p() const;
-  virtual void do_print() const;
-};
-#endif // STAFFSYM_HH
diff --git a/lily/include/staff-symbol-referencer.hh b/lily/include/staff-symbol-referencer.hh
new file mode 100644 (file)
index 0000000..8203954
--- /dev/null
@@ -0,0 +1,35 @@
+/*   
+  staff-sym-referencer.hh -- declare Staff_sym_referencer
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#ifndef STAFF_SYM_REFERENCER_HH
+#define STAFF_SYM_REFERENCER_HH
+
+#include "score-element.hh"
+
+/**
+   A notation object that needs access to variables of the staff (no
+   lines, leading).
+   
+ */
+class Staff_symbol_referencer : public virtual Score_element
+{
+protected:
+  Staff_symbol * staff_sym_l_;
+
+public:
+  Staff_symbol_referencer ();
+  void set_staff_symbol (Staff_symbol*);
+  Real staff_line_leading_f () const;
+  Staff_symbol * staff_symbol_l () const;
+  int lines_i () const;
+  virtual void do_substitute_element_pointer (Score_element*,Score_element*);
+};
+
+#endif /* STAFF_SYM_REFERENCER_HH */
+
diff --git a/lily/include/staff-symbol.hh b/lily/include/staff-symbol.hh
new file mode 100644 (file)
index 0000000..c15a1df
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+  staffsym.hh -- declare Staff_symbol
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef STAFFSYM_HH
+#define STAFFSYM_HH
+#include "spanner.hh"
+
+/**
+  This spanner draws the lines of a pstaff.
+  The bottom line is position 0.
+  */
+class Staff_symbol : public Spanner
+{
+public:
+  /// this many lines.
+  int no_lines_i_;
+  Real staff_line_leading_f_;
+  
+  Staff_symbol ();
+  int steps_i() const;
+protected:
+  VIRTUAL_COPY_CONS(Score_element);
+  virtual Interval do_height () const;
+  virtual Molecule* do_brew_molecule_p() const;
+  virtual void do_print() const;
+};
+#endif // STAFFSYM_HH
index eb31f3a9f2b6d92178419aadcff0ebdcc43a56cf..a3f0921a45bbe2828a4b1e687401ae7b728fd20c 100644 (file)
@@ -10,7 +10,7 @@
 #include "array.hh"
 #include "moment.hh"
 #include "molecule.hh"
-
+#include "staff-symbol-referencer.hh"
 
 /**the rule attached to the ball.
   takes care of:
   
   Stem size depends on flag.
   */
-class Stem : public Item {
+class Stem : public Item, public Staff_symbol_referencer {
   Drul_array<Real> yextent_drul_;
-    
-  /// needed for determining direction/length
-  int staff_size_i_;
 
   /**extent of the stem (positions).
     fractional, since Beam has to adapt them.
@@ -60,9 +57,6 @@ public:
    */
   Beam* beam_l_;
 
-  /// our slur (urg)
-  Slur* slur_l_;
-
   Drul_array<int> beams_i_drul_;
 
   /// maximum number of beams
@@ -76,10 +70,6 @@ public:
 
   /// direction of the beam
   Direction beam_dir_;
-
-  /// what staff am i on?
-  Staff_symbol* staff_sym_l_;    
-
   Stem ();
     
   /// ensure that this Stem also encompasses the Notehead #n#
diff --git a/lily/include/symbols.hh b/lily/include/symbols.hh
new file mode 100644 (file)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
index b63dc5a52dad04082bfc94f706aae163b4c48203..0cc7b4f9e44b16c0d858e0db14cfbacd2ffd30ea 100644 (file)
 #include "text-def.hh"
 
 /** a spanner which puts texts on top of other spanners.  Use for
-  triplets, volta, ottava, etc.  */
+  triplets, volta, ottava, etc.
+
+  (does anyone use  this? Junkme?)
+*/
 class Text_spanner : public Spanner {
 public:
   Directional_spanner * support_span_l_;
index 9a8d10aea41a3f0efe6084e36db531c006d75801..c1a8812ce83a35fecb6f8a69af9ee27c1898fb88 100644 (file)
 
 Item::Item ()
 {
-  unbroken_original_l_ =0;
-  break_priority_i_ = 0;
-  breakable_b_ = false;
-  break_status_dir_ = CENTER;
   broken_to_drul_[LEFT] = broken_to_drul_[RIGHT]=0;
 }
 
 bool
 Item::breakable_b () const
 {
-  return !unbroken_original_l_ 
-    && dynamic_cast<Item*> (parent_l (X_AXIS))->breakable_b ();
+  if (original_l_ )
+    return false;
+  
+  Item * i  =dynamic_cast<Item*> (parent_l (X_AXIS));
+  return (i) ?  i->breakable_b () : get_elt_property( breakable_scm_sym) != SCM_BOOL_F;
 }
 
 void
 Item::do_print() const
 {
-#ifndef NPRINT
-  DOUT << "breakable_b_: " << breakable_b_ << 
-    " break_status_dir_: " << break_status_dir_;
-#endif
 }
 
 
@@ -54,11 +49,6 @@ Item::line_l() const
   return dynamic_cast<Score_element *> (g)-> line_l ();
 }
 
-Direction
-Item::break_status_dir() const
-{
-  return break_status_dir_;
-}
 
 void
 Item::copy_breakable_items()
@@ -73,8 +63,6 @@ Item::copy_breakable_items()
     {
       Score_element * dolly = clone();
       Item * item_p = dynamic_cast<Item*>(dolly);
-      item_p->unbroken_original_l_ = this;
-      item_p->break_status_dir_ =  i;
       pscore_l_->typeset_element (item_p);
       new_copies[i] =item_p;
     }
@@ -93,10 +81,10 @@ Item::copy_breakable_items()
 void
 Item::try_visibility_lambda ()
 {
-  SCM vis = get_elt_property (ly_symbol ("visibility_lambda"));
+  SCM vis = remove_elt_property (visibility_lambda_scm_sym);
   if (vis != SCM_BOOL_F)
     {
-      SCM args = scm_listify (gh_int2scm (break_status_dir_), SCM_UNDEFINED);
+      SCM args = scm_listify (gh_int2scm (break_status_dir ()), SCM_UNDEFINED);
       SCM result = gh_apply ( SCM_CDR(vis), args);
       int trans = gh_scm2bool (gh_car (result));
       int empty = gh_scm2bool (gh_cdr (result));
@@ -104,7 +92,7 @@ Item::try_visibility_lambda ()
       if (empty)
        set_empty (true);
       if (trans)
-       transparent_b_ = true;
+       set_elt_property (transparent_scm_sym, SCM_BOOL_T);
     }
 }
 
@@ -153,10 +141,16 @@ Item::find_prebroken_piece (Direction d) const
 void
 Item::handle_prebroken_dependencies()
 {
-  if (breakable_b_)
+  if (original_l_)
     Score_element::handle_prebroken_dependencies();
 }
 
+bool
+Item::broken_original_b () const
+{
+  return broken_to_drul_[LEFT] || broken_to_drul_[RIGHT];
+}
+
 int
 Item::left_right_compare(Item const *l, Item const *r)
 {
@@ -165,15 +159,6 @@ Item::left_right_compare(Item const *l, Item const *r)
   return p1->rank_i () - p2->rank_i ();
 }
 
-
-bool
-Item::linked_b() const
-{
-  return Score_element::linked_b() || attached_span_l_arr_.size();
-}
-
-
-
 Paper_column *
 Item::column_l () const
 {
@@ -183,12 +168,7 @@ Item::column_l () const
 Item::Item (Item const &s)
   : Score_element (s)
 {
-  unbroken_original_l_ = 0;
-  /* do not copy attached_span_l_arr_ */
-  breakable_b_ = s.breakable_b_;
   broken_to_drul_[LEFT] = broken_to_drul_[RIGHT] =0;
-  break_status_dir_ = s.break_status_dir_;
-  break_priority_i_ = s.break_priority_i_;
 }
 
 
@@ -204,11 +184,25 @@ Item::handle_prebroken_dependents ()
       Direction d = LEFT;
       do
        {
-         broken_to_drul_[d]->dim_cache_[X_AXIS].parent_l_ =
-           &parent->broken_to_drul_[d]->dim_cache_[X_AXIS];
-         parent->broken_to_drul_[d]->add_dependency (broken_to_drul_[d]);
+         Item * broken_self = find_prebroken_piece (d);
+         Item * broken_parent = parent->find_prebroken_piece (d);
+
+         broken_self->dim_cache_[X_AXIS].parent_l_ =
+           &broken_parent->dim_cache_[X_AXIS];
        }
       while ((flip (&d))!=LEFT);
     }
 }
 
+Direction
+Item::break_status_dir () const
+{
+  if (original_l_)
+    {
+      Item * i = dynamic_cast<Item*> (original_l_);
+
+      return (i->broken_to_drul_[LEFT] == this) ? LEFT : RIGHT;
+    }
+  else
+    return CENTER;
+}
index d64e90e812d5d432a78d0fb4002fe92d44467e33..248dca07c5679a21cc78a8acab166ac302c4a004 100644 (file)
@@ -27,7 +27,7 @@ Key_engraver::create_key ()
   if (!kit_p_) 
     {
       kit_p_ = new Key_item;
-      kit_p_->break_priority_i_ = -1; // ugh
+      kit_p_->set_elt_property (break_priority_scm_sym, gh_int2scm(-1)); // ugh
       kit_p_->multi_octave_b_ = key_.multi_octave_b_;
       announce_element (Score_element_info (kit_p_,keyreq_l_));
       
index 695de425afac40ecb11872423276f6812c518e5d..34061b63838439f593fe3e024705e07af4281ef1 100644 (file)
@@ -22,7 +22,7 @@ const int SHARP_TOP_PITCH=4; /*  ais and bis typeset in lower octave */
 Key_item::Key_item ()
 {
   multi_octave_b_ = false;
-  breakable_b_ =true;
+  set_elt_property (breakable_scm_sym, SCM_BOOL_T);
   default_b_ = false;
   set_c_position (0);
 }
@@ -81,10 +81,10 @@ Molecule*
 Key_item::do_brew_molecule_p() const
 {
   Molecule*output = new Molecule;
-  Real inter = paper()->internote_f ();
+  Real inter = staff_line_leading_f ()/2.0;
   
   int j;
-  if ((break_status_dir_ == LEFT || break_status_dir_ == CENTER)
+  if ((break_status_dir () == LEFT || break_status_dir () == CENTER)
       || old_pitch_arr_.size ())
     {
       for (int i =0; i < old_pitch_arr_.size(); i++) 
@@ -123,7 +123,7 @@ Key_item::do_brew_molecule_p() const
   if (pitch_arr_.size()) 
     {
       Molecule m (lookup_l ()->fill (Box (
-                                         Interval (0, paper()->note_width ()),
+                                         Interval (0, paper_l ()->note_width ()),
                                          Interval (0,0))));
       
       output->add_at_edge (X_AXIS, RIGHT, m,0 );
@@ -138,7 +138,10 @@ Key_item::do_pre_processing()
 {
   if (default_b_) 
     {
-      transparent_b_ = (break_status_dir() != RIGHT);
-      set_empty (transparent_b_);
+      bool transparent = (break_status_dir() != RIGHT);
+      set_empty (transparent);
+
+      if (transparent)
+       set_elt_property (transparent_scm_sym, SCM_BOOL_T);
     }
 }
index ef82282d553068f55d47bbfd7ba55358b2caa85b..4779cbfa13f171517c8b10d960791c72fbc7e81f 100644 (file)
@@ -6,7 +6,7 @@
   (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-#include "staff-sym.hh"
+#include "staff-symbol.hh"
 #include "vertical-group-spanner.hh"
 #include "command-request.hh"
 #include "bar.hh"
index ac6c0a10bbf67b98c13fd25910e461dd9a1befe0..d7fdfed7b6abb377e98759f694d7088f39c80f30 100644 (file)
 #include "p-col.hh"
 #include "p-score.hh"
 
-
 Line_of_score::Line_of_score()
 {
-  error_mark_b_ = 0;
 }
 
-
-
-
 void
 Line_of_score::add_element (Score_element*e)
 {
@@ -40,12 +35,9 @@ Line_of_score*
 Line_of_score::set_breaking (Array<Column_x_positions> const &breaking, int j) const
 {
   const Link_array<Paper_column> &curline (breaking[j].cols);
-  const Link_array<Paper_column> &errors (breaking[j].error_col_l_arr_);
+
   const Array<Real> &config (breaking[j].config);
        
-  for (int i=0; i < errors.size(); i++)
-    errors[i]->error_mark_b_ = true;
-
   Line_of_score *line_l=0;
        
   if (breaking.size() >1) 
index d035e5aa4d21563183356eba3df268af37175c19..4f6488648937c11686c3716bc2b64ac427454b17 100644 (file)
@@ -51,9 +51,10 @@ Molecule*
 Local_key_item::do_brew_molecule_p() const
 {
   Molecule*output = new Molecule;
-
+  Real note_distance = staff_line_leading_f ()/2;
   Molecule *octave_mol_p = 0;
   int lastoct = -100;
+  
   for  (int i = 0; i <  accidental_arr_.size(); i++) 
     {
       Musical_pitch p (accidental_arr_[i].pitch_);
@@ -62,7 +63,7 @@ Local_key_item::do_brew_molecule_p() const
        {
          if (octave_mol_p)
            {
-             Real dy =lastoct*7*paper()->internote_f ();
+             Real dy =lastoct*7* note_distance;
              octave_mol_p->translate_axis (dy, Y_AXIS);
              output->add_molecule (*octave_mol_p);
              delete octave_mol_p;
@@ -73,7 +74,7 @@ Local_key_item::do_brew_molecule_p() const
       lastoct = p.octave_i_;
       Real dy =
        (c0_position_i_ + p.notename_i_)
-       * paper()->internote_f ();
+       * note_distance;
       Molecule m (lookup_l ()->accidental (p.accidental_i_, 
                                           accidental_arr_[i].cautionary_b_));
 
@@ -83,7 +84,7 @@ Local_key_item::do_brew_molecule_p() const
 
   if (octave_mol_p)
     {
-      Real dy =lastoct*7*paper()->internote_f ();
+      Real dy =lastoct*7*note_distance;
       octave_mol_p->translate_axis (dy, Y_AXIS);
       output->add_molecule (*octave_mol_p);
       delete octave_mol_p;
@@ -91,7 +92,7 @@ Local_key_item::do_brew_molecule_p() const
   
  if (accidental_arr_.size()) 
     {
-      Box b(Interval (0, paper()->internote_f ()), Interval (0,0));
+      Box b(Interval (0, note_distance), Interval (0,0));
       Molecule m (lookup_l ()->fill (b));
       output->add_at_edge (X_AXIS, RIGHT, m, 0);
     }
index 07b57f0b9bd114b909f9280c6be98e3bb7908645..5bffa992cfc0354b178ccbeaa45b9bc1f8823b0b 100644 (file)
@@ -110,7 +110,7 @@ Lookup::afm_find (String s, bool warn) const
   if (cm.code () < 0)
     return m;
     
-  Atom at (gh_list (ly_symbol ("char"),
+  Atom at (gh_list (char_scm_sym,
                    gh_int2scm (cm.code ()),
                    SCM_UNDEFINED));
   at.font_ = ly_symbol (font_name_.ch_C());
@@ -219,7 +219,7 @@ Lookup::beam (Real slope, Real width, Real thick) const
   
   Molecule m;
   Atom at
-     (gh_list (ly_symbol ("beam"),
+     (gh_list (beam_scm_sym,
                                gh_double2scm (width),
                                gh_double2scm (slope),
                                gh_double2scm (thick),
@@ -309,7 +309,7 @@ Lookup::rest (int j, bool o) const
 Molecule
 Lookup::rule_symbol (Real height, Real width) const
 {
-  Atom at  (gh_list (ly_symbol ("rulesym"),
+  Atom at  (gh_list (rulesym_scm_sym,
                                         gh_double2scm (height),
                                         gh_double2scm (width),
                                         SCM_UNDEFINED));
@@ -353,7 +353,7 @@ Lookup::filledbox (Box b ) const
 {
   Molecule m;
   
-  Atom at  (gh_list (ly_symbol ("filledbox"),
+  Atom at  (gh_list (filledbox_scm_sym,
                                         gh_double2scm (-b[X_AXIS][LEFT]),
                                         gh_double2scm (b[X_AXIS][RIGHT]),                     
                                         gh_double2scm (-b[Y_AXIS][DOWN]),
@@ -447,7 +447,7 @@ Lookup::text (String style, String text) const
   m.dim_.y () = ydims;
 
   
-  Atom at  (gh_list (ly_symbol ("text"),
+  Atom at  (gh_list (text_scm_sym,
                     gh_str02scm (text.ch_C()),
                     SCM_UNDEFINED));
   at.font_ = ly_symbol (style);
@@ -486,7 +486,7 @@ Lookup::staff_brace (Real y) const
 {
   Molecule m;
   
-  Atom at  (gh_list (ly_symbol ("pianobrace"),
+  Atom at  (gh_list (pianobrace_scm_sym,
                       gh_double2scm (y),
                       SCM_UNDEFINED
                       ));
@@ -520,14 +520,14 @@ Molecule
 Lookup::plet (Real dy , Real dx, Direction dir) const
 {
   Molecule m;
-  SCM thick = ly_symbol ("tuplet_thick");
+  SCM thick = tuplet_thick_scm_sym;
   Real t = 0.1 PT;
   if (paper_l_->scope_p_->elem_b (thick))
     {
       t = paper_l_->get_realvar (thick);
     }
   
-  Atom at  (gh_list(ly_symbol ("tuplet"),
+  Atom at  (gh_list(tuplet_scm_sym,
                      gh_double2scm (dx),
                      gh_double2scm (dy),
                      gh_double2scm (t),
@@ -568,7 +568,7 @@ Molecule
 Lookup::staff_bracket (Real y) const
 {
   Molecule m; 
-  Atom at  ( gh_list (ly_symbol ("bracket"),
+  Atom at  ( gh_list (bracket_scm_sym,
                        gh_double2scm (y),
                        SCM_UNDEFINED));
   m.add_atom (&at);                             
@@ -583,19 +583,19 @@ Molecule
 Lookup::volta (Real w, bool last_b) const
 {
   Molecule m; 
-  SCM thick = ly_symbol ("volta_thick");
+  SCM thick = volta_thick_scm_sym;
   Real t = 0.1 PT;
   if (paper_l_->scope_p_->elem_b (thick))
     {
       t = paper_l_->get_realvar (thick);
     }
-  Atom at  (gh_list (ly_symbol ("volta"),
+  Atom at  (gh_list (volta_scm_sym,
                       gh_double2scm (w),
                       gh_double2scm (t),
                       gh_int2scm (last_b),
                       SCM_UNDEFINED));
 
-  Real interline_f = paper_l_->interline_f ();
+  Real interline_f = paper_l_->get_realvar (interline_scm_sym);
 
   m.dim_[Y_AXIS] = Interval (-interline_f, interline_f);
   m.dim_[X_AXIS] = Interval (0, w);
diff --git a/lily/ly-symbols.cc b/lily/ly-symbols.cc
new file mode 100644 (file)
index 0000000..719bf6d
--- /dev/null
@@ -0,0 +1,31 @@
+/*   
+  ly-symbols.cc --  implement scheme symbols
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+#include "lily-guile.hh"
+
+/*
+  storage
+ */
+#undef LY_SYMBOLS_HH
+#define extern
+#include "ly-symbols.hh"
+
+#undef DECLARE_LY_SYMBOL
+#undef LY_SYMBOLS_HH
+#define DECLARE_LY_SYMBOL(a) a ## _scm_sym = ly_symbol (#a); scm_permanent_object(a ## _scm_sym)
+
+/*
+  initialisations.
+ */
+void
+init_symbols ()
+{
+#include "ly-symbols.hh"
+}
+
+
index 763c5e15b2c67c31ee32b35a2a9051f5ba18d322..80dddad0d73499411d88503d343aa684b1172ae8 100644 (file)
@@ -70,7 +70,7 @@ Long_option_init theopts[] = {
   {1, "include", 'I'},
   {0, "no-paper", 'M'},
   {0, "dependencies", 'd'},
-  {0, "no-timestamps", 'T'},
+  {0, "no-timestamps", 'T'},   // why do we have this option?
   {0, "find-old-relative", 'Q'},
   {0, "ignore-version", 'V'},
   {1, "output-format", 'f'},
@@ -251,6 +251,7 @@ main_prog (int argc, char **argv)
   /*
     need to do this first. Engravers use lily.scm contents.
    */
+  init_symbols ();
   read_lily_scm_file ( "lily.scm");
   cout << endl;
 
index a753b7cc9f4317e9134ff5410c3b31ba2fad4735..9d09226f7e1826071e56559a44ce32af298b3e8a 100644 (file)
@@ -425,11 +425,7 @@ Midi_note::str () const
   String str = to_str ((char)status_byte);
   str += to_str ((char) (pitch_i () + c0_pitch_i_c_));
 
-#if 0
-  // poor man's staff dynamics:
-  str += to_str ((char) (dynamic_byte_ - 0x10 * channel_i_));
-#endif
-  
+  str += to_str ((char)dynamic_byte_);
   return str;
 }
 
index 3eb33c4e94dd965f3e127a011664273c6ebc1160..acbde20646c9bde827d12fc86b6d5b15ed1cbd62 100644 (file)
@@ -27,9 +27,10 @@ compare (Midi_note_event const& left, Midi_note_event const& right)
 }
 
 Midi_walker::Midi_walker (Audio_staff* audio_staff_l, Midi_track* track_l)
-  : PCursor<Audio_item*>(audio_staff_l->audio_item_l_list_)
 {
   track_l_ = track_l;
+  index_= 0;
+  item_l_arr_l_ = &audio_staff_l->audio_item_l_arr_;
   last_mom_ = 0;
 }
 
@@ -45,7 +46,8 @@ Midi_walker::~Midi_walker()
 void 
 Midi_walker::do_start_note (Midi_note* note_p)
 {
-  Moment stop_mom = note_p->length_mom () + ptr ()->audio_column_l_->at_mom ();
+  Audio_item* ptr = (*item_l_arr_l_)[index_];
+  Moment stop_mom = note_p->length_mom () + ptr->audio_column_l_->at_mom ();
   for (int i=0; i < stop_note_queue.size(); i++) 
     {
       if (stop_note_queue[i].val->pitch_i() == note_p->pitch_i ()) 
@@ -65,7 +67,7 @@ Midi_walker::do_start_note (Midi_note* note_p)
   e.key = stop_mom;
   stop_note_queue.insert (e);
   
-  output_event (ptr()->audio_column_l_->at_mom (), note_p);
+  output_event (ptr->audio_column_l_->at_mom (), note_p);
 }
 
 /**
@@ -104,9 +106,10 @@ Midi_walker::output_event (Moment now_mom, Midi_item* l)
 void
 Midi_walker::process()
 {
-  do_stop_notes (ptr()->audio_column_l_->at_mom ());
+  Audio_item* ptr = (*item_l_arr_l_)[index_];
+  do_stop_notes (ptr->audio_column_l_->at_mom ());
 
-  Midi_item* p = ptr()->midi_item_p ();
+  Midi_item* p = ptr->midi_item_p ();
   if (!p)
     return;
   p->channel_i_ = track_l_->number_i_;
@@ -114,6 +117,16 @@ Midi_walker::process()
   if (Midi_note *mi = dynamic_cast<Midi_note*>(p))
     do_start_note (mi);
   else
-    output_event (ptr()->audio_column_l_->at_mom (), p);
+    output_event (ptr->audio_column_l_->at_mom (), p);
+}
+bool
+Midi_walker::ok () const
+{
+  return index_ <item_l_arr_l_->size ();
+}
+void
+Midi_walker::operator ++(int)
+{
+  assert (ok());
+  index_++;
 }
-
index 132f7f2b9b1566c59927d5f4f9d8ee0b7c770237..37e3baa7ac9137f263629ad329952f0fc68db521 100644 (file)
@@ -22,6 +22,8 @@ Multi_measure_rest_engraver::Multi_measure_rest_engraver ()
   rest_moments_[START] =
     rest_moments_[STOP] =0;
   multi_measure_req_l_ = 0;
+
+  lastrest_p_ =0;
   mmrest_p_ = 0;
 }
 
index 4c23334b7d2b8f8a0ca58df0c960ed402f74f599..d161819a542ddaa6b2c392bda588792e95a13fd1 100644 (file)
@@ -55,7 +55,7 @@ Multi_measure_rest::do_brew_molecule_p () const
       s = (lookup_l ()->rest (-4, 0));
     }
   mol_p->add_molecule (s);
-  Real interline_f = paper ()->interline_f ();
+  Real interline_f = staff_line_leading_f ();
   if (measures_i_ == 1)
     {
       mol_p->translate_axis (interline_f, Y_AXIS);
@@ -67,7 +67,7 @@ Multi_measure_rest::do_brew_molecule_p () const
       text.text_str_ = to_str (measures_i_);
       text.style_str_ = "number";
       text.align_dir_ = CENTER;
-      Molecule s = text.get_molecule (paper (), UP);
+      Molecule s = text.get_molecule (paper_l (), UP);
       s.translate_axis (3.0 * interline_f, Y_AXIS);
       mol_p->add_molecule (s);
     }
@@ -95,6 +95,7 @@ Multi_measure_rest::do_post_processing ()
 void
 Multi_measure_rest::do_substitute_element_pointer (Score_element* o, Score_element* n)
 {
+  Staff_symbol_referencer::do_substitute_element_pointer (o,n);
   if (Item* c = dynamic_cast <Item*> (o))
     column_arr_.substitute (c, dynamic_cast<Item*> (n));
 }
@@ -113,7 +114,7 @@ Multi_measure_rest::get_rods () const
   Array<Rod> a;
   Rod r;
   r.item_l_drul_ = spanned_drul_;
-  r.distance_f_ = paper ()->get_var ("mmrest_x_minimum");
+  r.distance_f_ = paper_l ()->get_var ("mmrest_x_minimum");
   a.push (r);
   return a;
 }
index f836fb4485e23133594b8c78ca9cb32b08690f5c..0324d8af6c5207acef113262841365fe03c9bd63 100644 (file)
 #include "request.hh"
 #include "musical-request.hh"
 #include "main.hh"
+#include "killing-cons.tcc"
 
 Moment
 Simultaneous_music::length_mom () const
 {
   Moment dur = 0;
-  for (iter (music_p_list_p_->top(), i); i.ok (); i++)
-    dur = dur >? i->length_mom ();
+  for (Cons<Music> *i = music_p_list_p_->head_; i;  i = i->next_)
+    dur = dur >? i->car_->length_mom ();
 
   return dur;
 }
@@ -25,8 +26,9 @@ Simultaneous_music::length_mom () const
 void
 Music_sequence::compress (Moment m)
 {
-  for (PCursor<Music*>  i(music_p_list_p_->top()); i.ok (); i++)
-    i->compress (m);
+  
+  for (Cons<Music> *i = music_p_list_p_->head_; i;  i = i->next_)
+    i->car_->compress (m);
 }
 
 Simultaneous_music::Simultaneous_music(Music_list *p)
@@ -44,9 +46,9 @@ Moment
 Sequential_music::length_mom () const
 {
   Moment last=0;
-  for (iter (music_p_list_p_->top(), i); i.ok (); i++) 
+  for (Cons<Music> *i = music_p_list_p_->head_; i;  i = i->next_)
     {
-      last += i->length_mom ();
+      last += i->car_->length_mom ();
     }
   return  last;
 }
@@ -74,30 +76,13 @@ Music_list::do_relative_octave (Musical_pitch last, bool ret_first)
 {
   Musical_pitch retval;
   int count=0;
-  for (PCursor<Music*> i (top ()); i.ok (); i++)
+  for (Cons<Music> *i = head_; i ; i = i->next_)
     {
-      last = i->to_relative_octave (last);
+      last = i->car_->to_relative_octave (last);
       if (!count ++ )
        retval = last;
     }
 
-  // hmmm
-#if 0  
-  if (!ret_first && find_old_relative_b)
-    {
-      PCursor<Music*> b (bottom ());
-
-      if (b.ok ())
-       {
-         String w = _("\\relative mode changed here, old value: ");
-         w +=  last.str ();
-
-         b->warning (w);
-         retval = last;
-       }
-    }
-  
-#endif
   if (!ret_first)
     retval = last;
   
@@ -106,25 +91,22 @@ Music_list::do_relative_octave (Musical_pitch last, bool ret_first)
 
 
 Music_list::Music_list (Music_list const &s)
-  : Pointer_list<Music*> ()
+  : Cons_list<Music> (s)
 {
-  for (PCursor<Music*> i(s.top()); i.ok (); i++)
-    add_music (i->clone());
+  init_list ();
+  clone_killing_cons_list (*this, s.head_);
 }
 
+
 void
 Music_list::add_music (Music*m_p)
 {
   if (!m_p)
     return;
 
-  bottom().add (m_p);
+  append (new Killing_cons<Music> (m_p, 0));
 }
 
-
-
-
-
 Request_chord::Request_chord()
   : Simultaneous_music (new Music_list)
 {
@@ -134,9 +116,9 @@ Request_chord::Request_chord()
 Musical_pitch
 Request_chord::to_relative_octave (Musical_pitch last)
 {
-  for (iter (music_p_list_p_->top(),i); i.ok (); i++)
+  for (Cons<Music> *i = music_p_list_p_->head_; i ; i = i->next_)
     {
-      if (Melodic_req *m= dynamic_cast <Melodic_req *> (i.ptr ()))
+      if (Melodic_req *m= dynamic_cast <Melodic_req *> (i->car_))
        {
          Musical_pitch &pit = m->pitch_;
          pit.to_relative_octave (last);
@@ -148,6 +130,5 @@ Request_chord::to_relative_octave (Musical_pitch last)
 
 
 Music_list::Music_list ()
-  : Pointer_list<Music*> ()
 {
 }
index b4a63d39f45e21a2d8a7c18d3c89582c7b236fe1..394ca287b375e26bc3865580b761b2f755cf8fca 100644 (file)
@@ -51,6 +51,10 @@ void
 Music_output_def::assign_translator (Translator*tp)
 {
   String s =tp->type_str_;
+  if (s.empty_b ())
+    {
+      tp->warning (_("Interpretation context with empty type"));
+    }
   if (translator_p_dict_p_->elem_b (s))
     delete translator_p_dict_p_->elem (s);
   
@@ -98,7 +102,7 @@ Music_output_def::get_default_output () const
 {
   static SCM output_sym;
   if (!output_sym)
-    output_sym = scm_protect_object (ly_symbol ("output"));
+    output_sym = scm_protect_object (output_scm_sym);
   if (safe_global_b || !scope_p_->elem_b (output_sym))
     return "";
   Identifier * id = scope_p_->elem (output_sym);
index 56f456723b5dd86ac3ed9c755624f6efd2a9cea7..6f50bd56b7471dcb02d0fc5294be996a14c78e3f 100644 (file)
@@ -26,16 +26,16 @@ Music_sequence::Music_sequence(Music_list *mlist_p)
 void
 Music_sequence::transpose (Musical_pitch rq)
 {
-  for (iter (music_p_list_p_->top(),i); i.ok (); i++)
-    i->transpose (rq);    
+  for (Cons<Music> *i = music_p_list_p_->head_; i;  i = i->next_)
+    i->car_->transpose (rq);    
 }
 
 void
 Music_sequence::do_print() const
 {
 #ifndef NPRINT
-  for (iter (music_p_list_p_->top(),i); i.ok (); i++)
-    i->print();
+  for (Cons<Music> *i = music_p_list_p_->head_; i;  i = i->next_)  
+    i->car_->print();
 #endif 
 }
 
index 770157d0738b4f2c369474758763b5734e4008e2..28e4c011af07968d7ff67b0a56d7bc38c93dcb47 100644 (file)
@@ -22,7 +22,6 @@ Note_column::rest_b () const
 Note_column::Note_column()
 {
   stem_l_ = 0;
-  h_shift_b_ = false;
   dir_ =CENTER;
 }
 
index b779d0e8a651562d10d0699195e968efe7a5fafd..9b53dc498ea13d68b30e0752affdff1b0eeedc55 100644 (file)
@@ -19,8 +19,6 @@
 Note_head::Note_head ()
 {
   x_dir_ = CENTER;
-  staff_size_i_= 8;            // UGH
-  steps_i_ = 0;
   position_i_ = 0;
   extremal_i_ = 0;
 }
@@ -35,9 +33,6 @@ Note_head::do_pre_processing ()
     dots_l_->position_i_ = position_i_;
 }
 
-
-
-
 int
 Note_head::compare (Note_head *const  &a, Note_head * const &b)
 {
@@ -57,13 +52,13 @@ Molecule*
 Note_head::do_brew_molecule_p() const 
 {
   Molecule*out = 0;
-  Paper_def *p = paper();
-  Real inter_f = p->internote_f ();
-
+  Paper_def *p = paper_l ();
+  Real inter_f = staff_line_leading_f ()/2;
+  int sz = lines_i ()-1;
   // ugh
-  int streepjes_i = abs (position_i_) < staff_size_i_/2 
+  int streepjes_i = abs (position_i_) < sz 
     ? 0
-    : (abs(position_i_) - staff_size_i_/2) /2;
+    : (abs(position_i_) - sz) /2;
   
   Molecule head; 
 
index 8edb8d4c91917b38acb6091bec880064b196bb80..4981cac3424c7cfc7d5a5a75565dd2c413f49109 100644 (file)
@@ -59,9 +59,9 @@ Paper_column::do_print() const
       DOUT << "post: ";
       postbreak_l()->print();
     } 
-  if (break_status_dir_)
+  if (break_status_dir ())
     {
-      DOUT << '\n' << ((break_status_dir_ == LEFT) ? "prebreak" : "postbreak");
+      DOUT << '\n' << ((break_status_dir () == LEFT) ? "prebreak" : "postbreak");
       DOUT << '\n';
     }
 
@@ -87,14 +87,15 @@ Paper_column::compare (Paper_column const &c1, Paper_column const &c2)
 Paper_column*
 Paper_column::prebreak_l() const
 {
-  return dynamic_cast<Paper_column*>(broken_to_drul_[LEFT]);
+  return dynamic_cast<Paper_column*>(find_prebroken_piece (LEFT));
 }
 
 Paper_column*
 Paper_column::postbreak_l() const
 {
-  return dynamic_cast<Paper_column*>( broken_to_drul_[RIGHT]);
+  return dynamic_cast<Paper_column*>( find_prebroken_piece (RIGHT));
 }
+
 bool
 Paper_column::breakpoint_b() const
 {
@@ -103,8 +104,6 @@ Paper_column::breakpoint_b() const
 
 Paper_column::Paper_column()
 {
-  used_b_ = false;
-  error_mark_b_ = false;
   line_l_=0;
   rank_i_ = -1;
 }
@@ -115,11 +114,6 @@ Paper_column::line_l() const
   return line_l_;
 }
 
-bool
-Paper_column::used_b() const
-{
-  return linked_b();
-}
 
 
 
@@ -136,9 +130,3 @@ Paper_column::preprocess ()
   minimal_dists_arr_drul_[LEFT].sort (Column_rod::compare);
   minimal_dists_arr_drul_[RIGHT].sort (Column_rod::compare);  
 }
-
-bool
-Paper_column::breakable_b () const
-{
-  return breakable_b_;
-}
index 3d25f617395877413c04735a95acbfb5642ce415..0e12201fc52f2155c8bec3840816fbdd69c9ff37 100644 (file)
@@ -153,10 +153,12 @@ Paper_score::remove_break_helpers ()
 {
   Link_array<Score_element> to_remove;
   Link_array<Score_element> keep;
+  SCM help_sym = break_helper_only_scm_sym;
   for (int i=0; i < elem_p_arr_.size (); i++)
     {
       Score_element*e = elem_p_arr_[i];
-      if (e->break_helper_only_b_)
+      SCM p =  e->get_elt_property (help_sym);
+      if (p != SCM_BOOL_F)
        to_remove.push (e);
       else
        keep.push (e);
@@ -168,7 +170,8 @@ Paper_score::remove_break_helpers ()
     {
       Spanner *s = span_p_arr_[i];
       Score_element *e = s;
-      if (e->break_helper_only_b_)
+      SCM p =  e->get_elt_property (break_helper_only_scm_sym);
+      if (p != SCM_BOOL_F)
        to_remove.push (e);
       else
        keeps.push (s);
@@ -305,7 +308,7 @@ Paper_score::broken_col_range (Item const*l, Item const*r) const
   while (start < stop)
     {
       Paper_column *c = col_l_arr_[start];
-      if (c->breakable_b_ && !c->line_l_)
+      if (c->breakable_b () && !c->line_l_)
        ret.push (c);
       start++;
     }
index 68d95c238b778cdb4f18be538be3f063bf8d52e5..1b6c36fecd8de66ccd09fc311a56f5df15130d33 100644 (file)
 #include "paper-stream.hh"
 
 
-#define SCMVAR(s)  { static SCM sym; \
-       if (!sym)\
-               sym = scm_protect_object (ly_symbol (#s));\
-       return get_realvar (sym); }
-
-
 Paper_def::Paper_def ()
 {
   lookup_p_tab_p_ = new Hash_table<int, Lookup*>;
@@ -60,6 +54,34 @@ Paper_def::Paper_def (Paper_def const&s)
     }
 }
 
+SCM
+Paper_def::get_scm_var (SCM s) const
+{
+  if (!scope_p_->elem_b (s))
+    return SCM_BOOL_F;
+
+  Identifier * id = scope_p_->elem (s);
+  
+  SCM z;
+  SCM_NEWCELL (z);
+  SCM_SETCAR(z, s);
+
+  SCM val;
+  
+  if (dynamic_cast<Real_identifier*> (id))
+    {
+      Real r = *id->access_content_Real (false);
+      val = gh_double2scm (r);
+    }
+  else
+    {
+      return SCM_BOOL_F;
+    }
+  
+  SCM_SETCDR(z,val);
+  return z;
+}
+
 Real
 Paper_def::get_var (String s) const
 {
@@ -99,13 +121,13 @@ Paper_def::line_dimensions_int (int n) const
 Real
 Paper_def::beam_thickness_f () const
 {
-SCMVAR(beam_thickness);
+  return get_realvar (beam_thickness_scm_sym);
 }
 
 Real
 Paper_def::linewidth_f () const
 {
-SCMVAR(linewidth);
+  return get_realvar (linewidth_scm_sym);
 }
 
 Real
@@ -148,50 +170,38 @@ Paper_def::set_lookup (int i, Lookup*l)
 }
 
 
-Real
-Paper_def::interline_f () const
-{
-  SCMVAR(interline)
-}
-
 Real
 Paper_def::rule_thickness () const
 {
-  SCMVAR(rulethickness);
+  return get_realvar (rulethickness_scm_sym);
 }
 
 Real
 Paper_def::staffline_f () const
 {
-  SCMVAR(rulethickness)
-}
+  return get_realvar (rulethickness_scm_sym);
+    }
 
 Real
 Paper_def::staffheight_f () const
 {
-  SCMVAR(staffheight)
-}
+  return get_realvar (staffheight_scm_sym);
+    }
 
 Real
 Paper_def::interbeam_f (int multiplicity_i) const
 {
   if (multiplicity_i <= 3)
-    SCMVAR(interbeam)
-  else
-    SCMVAR(interbeam4)
-}
-
-Real
-Paper_def::internote_f () const
-{
-  return interline_f () /2.0 ;
-}
+    return get_realvar (interbeam_scm_sym);
+      else
+       return get_realvar (interbeam4_scm_sym);
+      }
 
 Real
 Paper_def::note_width () const
 {
-SCMVAR(notewidth)
-}
+  return get_realvar (notewidth_scm_sym);
+    }
 
 void
 Paper_def::print () const
@@ -248,12 +258,6 @@ Paper_def::paper_outputter_p (Paper_stream* os_p, Header* header_l, String origi
   if (scope_p_)
     p->output_scope (scope_p_, "mudelapaper");
   
-#if 0
-  if (output_global_ch == String("tex"))
-    {
-      *p->outstream_l_ << *scope_p_->elem ("texsetting")->access_content_String (false);
-    }
-#endif
 
   *p->outstream_l_  << *scope_p_->elem (String (output_global_ch) + "setting")->access_content_String (false);
 
index c221cbb2dd9b394fd67dcf2eeb27b07ac075d718..9e46701cebd4014d52451b933cca99c74b66dd5e 100644 (file)
@@ -41,18 +41,6 @@ Paper_outputter::~Paper_outputter ()
 void
 Paper_outputter::output_header ()
 {
-#if 0
-  int gobble = 10000;
-  {// alloc big chunk of memory.
-    SCM beg = SCM_EOL;
-    String bigstr = String_convert::char_str (' ', 50);
-    for (int i = gobble; i--; )
-      {
-       beg = gh_cons (gh_str02scm (bigstr.ch_C()), beg);
-      }
-  }
-#endif
-  
   if (safe_global_b)
     {
       ly_set_scm ("security-paranoia", SCM_BOOL_T);
@@ -90,7 +78,7 @@ Paper_outputter::output_header ()
     }
 #endif
 
-  SCM scm = gh_cons (ly_symbol ("header"), args_scm);
+  SCM scm = gh_cons (header_scm_sym, args_scm);
   output_scheme (scm);
 }
 
@@ -131,7 +119,7 @@ Paper_outputter::output_molecule (Molecule const*m, Offset o, char const *nm)
        }
 
       SCM box_scm
-       = gh_list (ly_symbol ("placebox"),
+       = gh_list (placebox_scm_sym,
                   gh_double2scm (a_off.x ()),
                   gh_double2scm (a_off.y ()),
                   SCM(i->func_),
@@ -223,7 +211,9 @@ Paper_outputter::output_version ()
     id_str += ".";
   else
     id_str += String (", ") + version_str ();
-  output_String_def ( "LilyIdString", id_str);
+
+  output_String_def ( "mudelatagline", id_str);
+  output_String_def ( "LilyPondVersion", version_str ());
 }
 
 void
index 0e94082cc212e9d5b82ba11135576f22fcaeb0d6..7e53b2ac00ee91b1604d74d4ceab9bfa54cf07d1 100644 (file)
@@ -444,7 +444,9 @@ identifier_init:
 
 translator_spec_block:
        TRANSLATOR '{' translator_spec_body '}'
-               { $$ = $3; }
+               {
+               $$ = $3;
+       }
        ;
 
 translator_spec_body:
@@ -1282,8 +1284,8 @@ mudela_script:
 
 script_dir:
        '_'     { $$ = DOWN; }
-       | '^'   { $$ = CENTER; }
-       | '-'   { $$ = UP; }
+       | '^'   { $$ = UP; }
+       | '-'   { $$ = CENTER; }
        ;
 
 pre_requests:
index e10a51c229e258d3595f534ce9518b0cee214463..130cd4a2ec5cd0f185c611682c200a38e5593f5e 100644 (file)
@@ -29,12 +29,6 @@ Performance::Performance ()
   audio_elem_p_list_ = 0;
 }
 
-void
-Performance::add_column (Audio_column* p)
-{
-  p->performance_l_ = this;
-  add_element (p);
-}
 
 Performance::~Performance()
 {
@@ -51,18 +45,19 @@ Performance::output (Midi_stream& midi_stream)
 
   midi_stream << Midi_header (1, tracks_i, clocks_per_4_i);
   output_header_track (midi_stream);
-  int n = 1;
+  int channel = 1;
   for (int i =0; i < audio_staff_l_arr_.size (); i++)
     {
       Audio_staff *s = audio_staff_l_arr_[i];
+
       /*
        Aargh, let's hear it for the MIDI standard.
        MIDI players tend to ignore instrument settings on
        channel 10, the percussion channel by default.
        */
-      if (n == 10)
-       n++;
-      s->output (midi_stream, n++);
+      if (channel == 10)
+       channel++;
+      s->output (midi_stream, channel++);
     }
 }
 
@@ -110,15 +105,17 @@ Performance::output_header_track (Midi_stream& midi_stream)
   midi_stream << midi_track;
 }
 
-void
-Performance::add_staff (Audio_staff* l)
-{
-  audio_staff_l_arr_.push (l);
-}
-
 void
 Performance::add_element (Audio_element *p)
 {
+  if (Audio_staff*s=dynamic_cast<Audio_staff *> (p)) 
+    {
+      audio_staff_l_arr_.push (s);
+    }
+  else if (Audio_column *c = dynamic_cast<Audio_column*>(p))
+    {
+      c->performance_l_ = this;
+    }
   audio_elem_p_list_ = new Killing_cons<Audio_element> (p, audio_elem_p_list_);
 }
 
diff --git a/lily/priority-halign-engraver.cc b/lily/priority-halign-engraver.cc
deleted file mode 100644 (file)
index 3f19e66..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-  score-halign-reg.cc -- implement Priority_horizontal_align_engraver
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "bar.hh"
-#include "break-align-item.hh"
-#include "priority-halign-engraver.hh"
-#include "score-priority-engraver.hh"
-
-Priority_horizontal_align_engraver::Priority_horizontal_align_engraver()
-{
-  halign_p_ =0;
-}
-
-void
-Priority_horizontal_align_engraver::do_pre_move_processing()
-{
-  if (halign_p_) 
-    {
-      typeset_element (halign_p_);
-      halign_p_ =0;
-    }
-}
-
-void
-Priority_horizontal_align_engraver::acknowledge_element (Score_element_info i)
-{
-  Engraver* reg = i.origin_grav_l_arr_[0];
-  if (dynamic_cast<Score_priority_engraver *> (reg))
-    {
-      if (!halign_p_) 
-       {
-         halign_p_ = new Break_align_item;
-         halign_p_->breakable_b_ = true;
-         announce_element (Score_element_info (halign_p_,0));
-       }
-      Item * it = dynamic_cast <Item *> (i.elem_l_);
-      if (it->break_priority_i_ == 0)
-       halign_p_->center_l_ = it;
-
-      halign_p_->add_item (it, it->break_priority_i_);
-    }
-}
-
-
-ADD_THIS_TRANSLATOR(Priority_horizontal_align_engraver);
index 774c2d353324834e26856c02868212d962694816..174737d34fe3f67ecfa6d9af77646a84703eb616 100644 (file)
 #include "note-column.hh"
 #include "paper-def.hh"
 
+
 ADD_THIS_TRANSLATOR (Repeat_engraver);
 
 Repeat_engraver::Repeat_engraver ()
 {
 }
 
+/*
+  urg. Way too complicated. needs redesign.
+ */
 bool
 Repeat_engraver::do_try_music (Music* m)
 {
@@ -41,9 +45,9 @@ Repeat_engraver::do_try_music (Music* m)
       Moment alt_mom = now_mom () + repeat_length_mom;
       if (repeat_length_mom)
        {
-         for (PCursor<Music*> i (alt->music_p_list_p_->top ()); i.ok () && (i != alt->music_p_list_p_->bottom ()); i++)
+         for (Cons<Music> *i (alt->music_p_list_p_->head_); i && i->next_; i = i->next_)
            {
-             stop_mom += i->length_mom ();
+             stop_mom += i->car_->length_mom ();
              if (dynamic_cast<Simultaneous_music *> (alt))
                break;
            }
@@ -66,23 +70,24 @@ Repeat_engraver::do_try_music (Music* m)
       Scalar prop = get_property ("voltaSpannerDuration", 0);
       if (prop.length_i ())
        span_mom = prop.to_rat ();
-      int alt_i = r->repeats_i_ + 1 - alt->music_p_list_p_->size () >? 1;
-      for (PCursor<Music*> i (alt->music_p_list_p_->top ()); i.ok (); i++)
+
+      int alt_i = r->repeats_i_ + 1 - cons_list_size_i (alt->music_p_list_p_->head_ ) >? 1;
+      for (Cons<Music> *i = alt->music_p_list_p_->head_; i ; i = i->next_)
         {
-         alternative_music_arr_.push (i.ptr ());
+         alternative_music_arr_.push (i->car_);
          alternative_start_mom_arr_.push (alt_mom);
          if (span_mom)
            alternative_stop_mom_arr_.push (alt_mom + span_mom);
          else
-           alternative_stop_mom_arr_.push (alt_mom + i->length_mom ());
+           alternative_stop_mom_arr_.push (alt_mom + i->car_->length_mom ());
          String str;
-         if ((alt_i != 1) && (alt_i != r->repeats_i_) && (i == alt->music_p_list_p_->top ()))
+         if ((alt_i != 1) && (alt_i != r->repeats_i_) && (i == alt->music_p_list_p_->head_))
            str = "1.-";
          str += to_str (alt_i) + ".";
          alt_i++;
          alternative_str_arr_.push (str);
          if (!dynamic_cast<Simultaneous_music *> (alt))
-           alt_mom += i->length_mom ();
+           alt_mom += i->car_->length_mom ();
        }
       return true;
     }
index d982503dfedc42d1e4dedeabebf184dc0229ec9a..ca103ee062132c131563a3ef012a7c02301d67a1 100644 (file)
@@ -63,17 +63,17 @@ Request_chord_iterator::do_process_and_next (Moment mom)
 {
   if (first_b_)
     {
-      for (PCursor<Music*> i (elt_l ()->music_p_list_p_->top ()); i.ok(); i++)
+      for (Cons<Music> *i = elt_l ()->music_p_list_p_->head_; i; i = i->next_)
        {
-         if (Request * req_l = dynamic_cast<Request*> (i.ptr()))
+         if (Request * req_l = dynamic_cast<Request*> (i->car_))
            {
              bool gotcha = report_to_l()->try_music (req_l);
              if (!gotcha)
                req_l->warning (_f ("junking request: `%s\'", classname( req_l)));
            }
          else
-           i.ptr ()->warning (_f ("Huh? Not a Request: `%s\'",
-                                  classname (i.ptr())));
+           i->car_->warning (_f ("Huh? Not a Request: `%s\'",
+                                  classname (i->car_)));
        }
       first_b_ = false;
     }
index 4db7d52d672a5d0d8c8165bcc1f1caed5eaf88c6..cd64e140c641b3dac4b37702b54883c970f2c17e 100644 (file)
@@ -77,7 +77,9 @@ Rest_collision::do_pre_processing()
       // UGH Should get dims from table!
       int size_i = 6;
        
-      Real internote_f = paper ()->internote_f ();
+
+      // staff ref'd?
+      Real internote_f = paper_l ()->get_realvar (interline_scm_sym)/2.0;
       int sep_i = 3 + size_i / 2;
       for (int i = 0; i < ncol_l_arr_.size(); i++) 
        {
@@ -116,6 +118,6 @@ Rest_collision::do_substitute_element_pointer (Score_element*o,Score_element*n)
 
 Rest_collision::Rest_collision()
 {
-  transparent_b_ = true;
+  set_elt_property (transparent_scm_sym, SCM_BOOL_T);
   set_empty (true);
 }
index 58ad47a062ebe89a475d3ea71fe0f2dc0e751251..50eed01303e2ee47fc2319e16092159c28f18b88 100644 (file)
@@ -37,13 +37,12 @@ Rest::Rest ()
 Molecule *
 Rest::do_brew_molecule_p () const
 {
-  int staff_size_i_ = 8;
-  bool streepjes_b = abs(position_i_) > staff_size_i_ /2 &&  
+  bool streepjes_b = abs(position_i_) > lines_i () / 2 &&  
     (balltype_i_ == 0 || balltype_i_ == 1);
   
   Molecule s(lookup_l ()->rest (balltype_i_, streepjes_b));
   Molecule * m = new Molecule ( Molecule (s));
-  m->translate_axis (position_i_ *  paper ()->internote_f (), Y_AXIS);
+  m->translate_axis (position_i_ *  staff_line_leading_f ()/2.0, Y_AXIS);
   return m;
 }
 
index 49acc59c388ed9e8af5ce4da99254c58b1cba894..ec90bcfdb41463571e42675227991db733793e95 100644 (file)
@@ -96,9 +96,12 @@ Rhythmic_column_engraver::do_pre_move_processing()
 {
   if (ncol_p_) 
     {
-      if (! ncol_p_->h_shift_b_)
-       // egcs
-       ncol_p_->h_shift_b_  = get_property ("hshift", 0).operator bool ();
+      // egcs
+      if (get_property ("hshift", 0).operator bool ())
+       {
+         ncol_p_->set_elt_property (horizontal_shift_scm_sym, SCM_BOOL_T);
+       }
+      
       if (! ncol_p_->dir_)
        ncol_p_->dir_ =(Direction) int(get_property ("ydirection", 0));
 
index 1cd16cdfbd45dd45c0e7e7baf871a2325a4a62ee..21989d59a344b4cc04dd2ce97019a9d8ff046085 100644 (file)
 #include "misc.hh"
 #include "paper-outputter.hh"
 
+Interval
+Score_element::dim_cache_callback (Dimension_cache*c)
+{
+  Score_element *  e =dynamic_cast<Score_element*>( c->element_l());
+  if(&e->dim_cache_[X_AXIS] == c)
+    return e->do_width ();
+  else
+    return e->do_height ();
+}
+
 Score_element::Score_element()
 {
   output_p_ =0;
-  break_helper_only_b_ = false;
-  transparent_b_ = false;
+  dim_cache_[X_AXIS].set_callback (dim_cache_callback);
+  dim_cache_[Y_AXIS].set_callback (dim_cache_callback); 
+  used_b_ = false;
   pscore_l_=0;
+  lookup_l_ =0;
   status_i_ = 0;
+  original_l_ = 0;
   element_property_alist_ = SCM_EOL;
 }
 
 Score_element::Score_element (Score_element const&s)
-  :   Graphical_element (s)
+  : Graphical_element (s)
 {
-  /* called from derived ctor, so most info points to the same deps
-     as (Directed_graph_node&)s. Nobody points to us, so don't copy
-     dependents.      
-   */
-  
-
-  // deep copy ?
-  element_property_alist_ = s.element_property_alist_;
+  used_b_ = true;
+  original_l_ =(Score_element*) &s;
+  element_property_alist_ = scm_list_copy (s.element_property_alist_);
   dependency_arr_ = s.dependency_arr_;
   output_p_ =0;
-  break_helper_only_b_ = s.break_helper_only_b_;
-  transparent_b_ = s.transparent_b_;
   status_i_ = s.status_i_;
+  lookup_l_ = s.lookup_l_;
   pscore_l_ = s.pscore_l_;
 }
 
@@ -74,10 +81,24 @@ Score_element::dependency_size () const
 
 
 SCM
-Score_element::get_elt_property (SCM s)
+Score_element::get_elt_property (SCM sym) const
 {
-  return scm_assq(s, element_property_alist_);
+  SCM s =  scm_assq(sym, element_property_alist_);
+  // is this a good idea?
+  if (s == SCM_BOOL_F && pscore_l_)
+    s = pscore_l_->paper_l_->get_scm_var (sym);
+
+  return s;
+}
+
+SCM
+Score_element::remove_elt_property (SCM key)
+{
+  SCM s = get_elt_property (key); 
+  element_property_alist_ =  scm_assq_remove_x (element_property_alist_, key);
+  return s;
 }
+
 void
 Score_element::set_elt_property (SCM s, SCM v)
 {
@@ -131,20 +152,27 @@ Score_element::print() const
 
 
 Paper_def*
-Score_element::paper()  const
+Score_element::paper_l ()  const
 {
 return pscore_l_->paper_l_;
+ return pscore_l_->paper_l_;
 }
 
 
 Lookup const *
 Score_element::lookup_l () const
 {
-  SCM sz = scm_assq (ly_symbol ("fontsize"), element_property_alist_);
-  if (sz != SCM_BOOL_F)
-    return pscore_l_->paper_l_->lookup_l (gh_scm2int (SCM_CDR (sz)));
-  else
-    return pscore_l_->paper_l_->lookup_l (0);
+  if (!lookup_l_)
+    {
+      Score_element * me = (Score_element*)this;
+      SCM sz = me->remove_elt_property (fontsize_scm_sym);
+      int i = (sz != SCM_BOOL_F)
+       ? gh_scm2int (SCM_CDR (sz))
+       : 0;
+
+
+      me->lookup_l_ =  pscore_l_->paper_l_->lookup_l (i);
+    }
+  return lookup_l_;
 }
 
 void
@@ -170,8 +198,8 @@ Score_element::calculate_dependencies (int final, int busy,
   assert (status_i_!= busy);
   status_i_= busy;
 
-  for (int i=0; i < dependency_size(); i++)
-    dependency (i)->calculate_dependencies (final, busy, funcptr);
+  for (int i=0; i < dependency_arr_.size(); i++)
+    dependency_arr_[i]->calculate_dependencies (final, busy, funcptr);
 
   Link_array<Score_element> extra (get_extra_dependencies());
   for (int i=0; i < extra.size(); i++)
@@ -186,8 +214,9 @@ Score_element::calculate_dependencies (int final, int busy,
 void
 Score_element::output_processing () 
 {
-  if (transparent_b_)
+  if (get_elt_property (transparent_scm_sym) != SCM_BOOL_F)
     return;
+
   if (output_p_)
     delete output_p_;
   
@@ -197,6 +226,7 @@ Score_element::output_processing ()
                                            classname(this));
 }
 
+
 /*
   
   VIRTUAL STUBS
@@ -275,7 +305,10 @@ void
 Score_element::add_dependency (Score_element*e)
 {
   if (e)
-    dependency_arr_.push (e);
+    {
+      dependency_arr_.push (e);
+      e->used_b_ = true;
+    }
   else
     warning("Null dependency added");
       
@@ -305,7 +338,8 @@ Score_element::handle_broken_dependencies()
              Spanner * broken = sp->find_broken_piece (line);
              substitute_dependency (sp, broken);
 
-             add_dependency (broken);
+             if (broken)
+               add_dependency (broken);
            }
          else if (Item *original = dynamic_cast <Item *> (elt))
            {
@@ -341,16 +375,20 @@ Score_element::handle_broken_dependencies()
 void
 Score_element::handle_prebroken_dependencies()
 {
+  /*  dynamic_cast<Item*> (this) && 
+  if (!break_status_dir ())
+    return;
+  */
   Link_array<Score_element> old_arr, new_arr;
   
   for (int i=0; i < dependency_size(); i++) 
     {
       Score_element * elt = dependency (i);
       Item *it_l = dynamic_cast <Item *> (elt);
-      if (it_l && it_l->breakable_b_)
+      if (it_l && it_l->broken_original_b ())
        if (Item *me = dynamic_cast<Item*> (this) )
          {
-           Score_element *new_l = it_l->find_prebroken_piece (me->break_status_dir_);
+           Score_element *new_l = it_l->find_prebroken_piece (me->break_status_dir ());
            if (new_l != elt) 
              {
                new_arr.push (new_l);
@@ -359,10 +397,11 @@ Score_element::handle_prebroken_dependencies()
          }
        else 
          {
-           new_arr.push (it_l->broken_to_drul_[LEFT]);
-           old_arr.push (0);
-           old_arr.push (0);           
-           new_arr.push (it_l->broken_to_drul_[RIGHT]);                
+           Direction d = LEFT;
+           do {
+             old_arr.push (0);
+             new_arr.push (it_l->find_prebroken_piece (d));
+           } while (flip(&d)!= LEFT);
          }
     }
   
@@ -388,9 +427,9 @@ Score_element::get_extra_dependencies() const
 bool
 Score_element::linked_b() const
 {
-  return get_extra_dependencies().size() || 
-    dependency_size();
+  return used_b_;
 }
+
 void
 Score_element::do_print () const
 {
index 6ea06ff8f23303ff2be7c8b7e2f6a5cd18d5c2a7..12f762e36a86eff1d7bc17b6e4f89916b6bfaf99 100644 (file)
@@ -53,8 +53,8 @@ void
 Score_engraver::do_creation_processing()
 {
   scoreline_l_ = pscore_p_->line_l_;
-  scoreline_l_->set_bounds(LEFT,get_staff_info().command_pcol_l ());
-  command_column_l_->breakable_b_ = true;
+  scoreline_l_->set_bounds(LEFT,command_column_l_);
+  command_column_l_->set_elt_property (breakable_scm_sym, SCM_BOOL_T);
   Engraver_group_engraver::do_creation_processing();
 }
 
@@ -62,8 +62,8 @@ void
 Score_engraver::do_removal_processing()
 {
   Engraver_group_engraver::do_removal_processing();
-  scoreline_l_->set_bounds(RIGHT,get_staff_info().command_pcol_l ());
-  command_column_l_->breakable_b_ = true;
+  scoreline_l_->set_bounds(RIGHT,command_column_l_);
+  command_column_l_->set_elt_property (breakable_scm_sym, SCM_BOOL_T);
 
   typeset_all ();
   set_columns (0,0);
@@ -150,7 +150,8 @@ Score_engraver::typeset_all()
          pscore_p_->typeset_element (item_p);
          if (!item_p->parent_l (X_AXIS))
            {
-             if (item_p->breakable_b_) 
+             bool br = (item_p->remove_elt_property (breakable_scm_sym) != SCM_BOOL_F);
+             if (br)
                command_column_l_->add_element(item_p);
              else
                musical_column_l_->add_element(item_p);
@@ -166,7 +167,7 @@ Score_engraver::do_pre_move_processing()
 {
   if (break_penalty_i_ > Break_req::DISALLOW)
     {
-      get_staff_info().command_pcol_l ()-> breakable_b_ = true;
+      command_column_l_->set_elt_property (breakable_scm_sym, SCM_BOOL_T);
       breaks_i_ ++;
       if (! (breaks_i_%8))
        *mlog << "[" << breaks_i_ << "]" << flush;
index b06e4286e2b7af7f9d9988058de3fa1e70b63f8a..4729fc302e5ffe57daf5c4f1151d54bb363e77db 100644 (file)
@@ -39,10 +39,6 @@ Score_performer::play (Audio_element * p)
     {
       audio_column_l_->add_audio_item (i);
     }
-  else if (Audio_staff*s=dynamic_cast<Audio_staff *> (p)) 
-    {
-      performance_p_->add_staff (s);
-    }
   performance_p_->add_element (p);
 }
 
@@ -51,7 +47,7 @@ Score_performer::prepare (Moment m)
 {
   Global_translator::prepare (m);
   audio_column_l_ = new Audio_column (m);
-  performance_p_->add_column (audio_column_l_);
+  play (audio_column_l_);
   post_move_processing ();
 }
 
index 8dccfb524befe8b0782e57cfc63adea51e4f39d3..0ed5caee1d0435859f5467f6ecdaf638d990cfb2 100644 (file)
 
 Score_priority_engraver::Score_priority_engraver()
 {
-  align_p_tab_.hash_func_ = int_hash;
+  halign_p_ = 0;
 }
 
 void
 Score_priority_engraver::do_pre_move_processing()
 {
-  for (Hash_table_iter<int, Horizontal_group_item*> i(align_p_tab_);
-       i.ok() ; i++)
+  for (int i=0; i < column_p_arr_.size ();i++)
+    typeset_element (column_p_arr_[i]);
+  column_p_arr_.clear ();
+
+  if (halign_p_)
     {
-      if (i.val ())
-       {
-         typeset_element (i.val ());
-         i.val_ref () = 0;
-       }
+      typeset_element (halign_p_);
+      halign_p_ =0;
     }
-  align_p_tab_.clear ();
+  
+}
+
+void
+Score_priority_engraver::add_horizontal_group (Item* it, int priority)
+{
+  if (!halign_p_)
+    {
+      halign_p_ = new Break_align_item;
+      halign_p_->set_elt_property (breakable_scm_sym, SCM_BOOL_T);
+      announce_element (Score_element_info (halign_p_,0));
+    }
+
+  if (priority == 0)
+    halign_p_->center_l_ = it;
+
+  halign_p_->add_item (it, priority);
+
+  column_p_arr_.push (it);
 }
 
 void
 Score_priority_engraver::acknowledge_element (Score_element_info inf)
 {
-  Item * item_l = dynamic_cast <Item *> (inf.elem_l_);
-  if (item_l && item_l->breakable_b_ && !item_l->empty_b ())
+  if (Item * item_l = dynamic_cast <Item *> (inf.elem_l_))
     {
+      Dimension_cache * c = &item_l->dim_cache_[X_AXIS];
+      if (c->empty_b () || c->parent_l_)
+       return;
+
+      SCM pr = item_l->remove_elt_property (break_priority_scm_sym); 
+
+      if (pr == SCM_BOOL_F)
+       return;
+
+      bool breakable = (item_l->remove_elt_property (breakable_scm_sym) != SCM_BOOL_F);
+      if (!breakable)
+       return ;
+      
+      int priority = SCM_CDR (pr);
       /*
        Don't try to eat up our (probable) parent.
       */
@@ -48,38 +79,25 @@ Score_priority_engraver::acknowledge_element (Score_element_info inf)
        return; 
 
       
-      int priority =item_l->break_priority_i_;
-      Horizontal_group_item * hg =0;
-      if (!align_p_tab_.elem_b(priority))
+      Score_element * column_l = 0;
+      if (halign_p_)
+       column_l = halign_p_->get_elt_by_priority (priority);
+      Horizontal_group_item * hg;
+      if (column_l)
        {
-         hg = new Horizontal_group_item;
-         announce_element (Score_element_info (hg,0));
-         align_p_tab_[priority] = hg;
-         hg->break_priority_i_ = priority;
-         hg->breakable_b_ = true;
+         hg = dynamic_cast<Horizontal_group_item*> (column_l);
        }
       else
-       hg = align_p_tab_[priority];
-      
-      Score_element * unbound_elem = inf.elem_l_;
-
-      /*
-       ugh
-       */
-      while (unbound_elem->parent_l (X_AXIS))
        {
-         /* We might have added inf.elem_l_ earlier because we added one
-            of its children.  We don't want to add ourselves to ourself
-         */
-         Graphical_element * e = unbound_elem->parent_l (X_AXIS);
-         if (e == hg)
-           return;
-         unbound_elem = dynamic_cast<Score_element*> (e);
+         hg = new Horizontal_group_item;
+         announce_element (Score_element_info (hg,0));
+         add_horizontal_group (hg, priority);
+         hg->set_elt_property (breakable_scm_sym, SCM_BOOL_T);
        }
+      
 
-      hg->add_element (unbound_elem);
+      hg->add_element (item_l);
     }
 }
 
-
 ADD_THIS_TRANSLATOR(Score_priority_engraver);
index 921b43c0e7b9b32dcade45c1fa0c06c546f56c64..247eea751608027520877b2617fa82912e5fefca 100644 (file)
@@ -8,7 +8,7 @@
 #include "script.hh"
 #include "musical-request.hh"
 #include "stem.hh"
-#include "staff-sym.hh"
+#include "staff-symbol.hh"
 #include "general-script-def.hh"
 #include "text-def.hh"
 
@@ -54,13 +54,17 @@ Script_engraver::do_process_requests()
 void
 Script_engraver::do_pre_move_processing()
 {
-  Staff_symbol* s_l = get_staff_info().staff_sym_l_;
   for (int i=0; i < script_p_arr_.size(); i++) 
     {
       Script*script_p = script_p_arr_[i];
+
+      /*
+       UGH. inside_b () for scripts broken for now.
+       
       if (!script_p->specs_p_->inside_b())
        script_p->add_support (s_l);
-
+      */
+      
       if (Text_def*td_l = dynamic_cast<Text_def *> (script_p->specs_p_)) // UGH
        {
          if (!td_l->style_str_.length_i ())
@@ -69,6 +73,7 @@ Script_engraver::do_pre_move_processing()
              if (style.to_bool ())
                td_l->style_str_= style;
            }
+
          // urg, what if this is already set? in-band signaling...
          Scalar alignment = get_property ("textalignment", 0);
          if (alignment.isnum_b())
index 82393d9ff4d69e4d2d0ac1f6ee2cb96b98b82ff0..576a9fdb9b90af120233af7b074b818fcad6dc9e 100644 (file)
@@ -44,7 +44,6 @@ Script::Script ()
   axis_ = Y_AXIS;
   specs_p_ = 0;
   stem_l_ = 0;
-  postbreak_only_b_ = true;
   dir_ =  CENTER;
 }
 
@@ -73,19 +72,13 @@ Script::set_default_dir ()
 Interval
 Script::do_width () const
 {
-  return specs_p_->get_molecule (paper (), dir_).extent ().x ();
+  return specs_p_->get_molecule (paper_l (), dir_).extent ().x ();
 }
 
 void
 Script::do_pre_processing ()
 {
   Staff_side::do_pre_processing ();
-  if (breakable_b_ && postbreak_only_b_ && (break_status_dir () != RIGHT))
-    {
-      transparent_b_ = true;
-      set_empty (true);
-    }
-  
   if (axis_ == Y_AXIS && !dir_)
     set_default_dir ();
 }
@@ -93,7 +86,7 @@ Script::do_pre_processing ()
 Interval
 Script::symbol_height () const
 {
-  return specs_p_->get_molecule (paper (), dir_).extent ().y ();
+  return specs_p_->get_molecule (paper_l (), dir_).extent ().y ();
 }
 
 
@@ -102,14 +95,14 @@ Script::do_brew_molecule_p () const
 {
   Real dx =0.;
 
-  Molecule*mol_p = new Molecule (specs_p_->get_molecule (paper (), dir_));
+  Molecule*mol_p = new Molecule (specs_p_->get_molecule (paper_l (), dir_));
   /*
     ugh, staccato dots are not centred between stafflines (how?)?
   */
   Real correct =0.0;
   if (axis_ == Y_AXIS){
-    dx =  paper ()->note_width ()/2;
-    correct = - (Real)dir_ * 2.0 * paper ()->rule_thickness ();
+    dx =  paper_l ()->note_width ()/2;
+    correct = - (Real)dir_ * 2.0 * paper_l ()->rule_thickness ();
     mol_p->translate_axis (dx, X_AXIS);        // FIXME! ugh
   }
   
@@ -137,6 +130,5 @@ Script::Script (Script const&s)
 {
   specs_p_ = s.specs_p_ ? s.specs_p_->clone (): 0;
   stem_l_ =s.stem_l_;
-  postbreak_only_b_ = s.postbreak_only_b_;
 }
   
index 185ba95e20f6ad3ba50075484cc5e8d7b8b450ef..ccd114f55f7993bbcfb6c4fd998db8c48aa19dfe 100644 (file)
@@ -30,7 +30,7 @@ Separating_group_spanner::get_rods () const
       if (lb)
        {
          Rod rod(lb, r);
-         rod.distance_f_ += paper ()->interline_f () *1.5;
+         rod.distance_f_ += padding_f_;
          a.push (rod);
        }
       
@@ -38,10 +38,11 @@ Separating_group_spanner::get_rods () const
        {
          a.push (Rod (l, rb));
        }
+      
       if (lb && rb)
        {
          Rod rod(lb, rb);
-         rod.distance_f_ += paper ()->interline_f () *1.5;
+         rod.distance_f_ += padding_f_;
          a.push (rod);
        }
     }
@@ -68,5 +69,6 @@ Separating_group_spanner::do_substitute_element_pointer (Score_element*o, Score_
 
 Separating_group_spanner::Separating_group_spanner()
 {
-  break_helper_only_b_ = true;
+  set_elt_property (break_helper_only_scm_sym, SCM_BOOL_T);
+  padding_f_ =0.0;
 }
index 86b5590e61f21a9e87db5202a51afbd55afde71b..be02dcf102a03f4de52ea595fadcc3dfbb7bbce2 100644 (file)
@@ -11,6 +11,7 @@
 #include "separating-group-spanner.hh"
 #include "single-malt-grouping-item.hh"
 #include "p-col.hh"
+#include "paper-def.hh"
 
 Separating_line_group_engraver::Separating_line_group_engraver ()
 {
@@ -30,6 +31,16 @@ Separating_line_group_engraver::do_creation_processing ()
 void
 Separating_line_group_engraver::do_removal_processing ()
 {
+  Scalar sz (get_property ("postBreakPadding", 0));
+  if (!sz.empty_b () && sz.isnum_b ())
+    {
+      sep_span_p_->padding_f_ = Real(sz);
+    }
+  else
+    {
+      sep_span_p_->padding_f_ = 1.5 * paper_l ()->get_realvar (interline_scm_sym);
+    }
+
   sep_span_p_->set_bounds (RIGHT, get_staff_info ().command_pcol_l ());
   typeset_element (sep_span_p_);
   sep_span_p_ =0;
@@ -41,13 +52,15 @@ Separating_line_group_engraver::acknowledge_element (Score_element_info i)
   Item * it = dynamic_cast <Item *> (i.elem_l_);
   if (it && !it->parent_l (X_AXIS))
     {
-      Single_malt_grouping_item *&p_ref_ (it->breakable_b_
-                                         ? break_malt_p_ : nobreak_malt_p_);
+      bool ib =it->breakable_b ();
+      Single_malt_grouping_item *&p_ref_ (ib ? break_malt_p_
+                                         : nobreak_malt_p_);
 
       if (!p_ref_)
        {
          p_ref_ = new Single_malt_grouping_item;
-         p_ref_->breakable_b_ = it->breakable_b_;
+         if (ib)
+           p_ref_->set_elt_property (breakable_scm_sym, SCM_BOOL_T);
          announce_element (Score_element_info (p_ref_, 0));
        }
       p_ref_->add_item (it);
index 093ab6cf0a9ef65df0ffb05bdb6a9c8c8dc3a470..b1a9ab61987cba7f4b72ee9b1a61f0f2a5f54277 100644 (file)
@@ -20,7 +20,7 @@ Sequential_music_iterator::do_print() const
 
 Sequential_music_iterator::Sequential_music_iterator ()
 {
-  cursor_p_ = 0;
+  cursor_ = 0;
   here_mom_ = 0;
   iter_p_ =0;
 }
@@ -28,9 +28,9 @@ Sequential_music_iterator::Sequential_music_iterator ()
 void
 Sequential_music_iterator::construct_children()
 {
-  cursor_p_ = new PCursor<Music*> (dynamic_cast<Sequential_music const*> (music_l_)->music_p_list_p_->top ());
+  cursor_ = dynamic_cast<Sequential_music const*> (music_l_)->music_p_list_p_->head_;
   
-  while (cursor_p_->ok()) 
+  while (cursor_)
     {
       start_next_element();
       if (!iter_p_->ok()) 
@@ -50,16 +50,16 @@ Sequential_music_iterator::leave_element()
 {
   delete iter_p_;
   iter_p_ =0;
-  Moment elt_time = cursor_p_->ptr()->length_mom ();
+  Moment elt_time = cursor_->car_->length_mom ();
   here_mom_ += elt_time;
-  cursor_p_->next();
+  cursor_ =cursor_->next_;
 }
 
 void
 Sequential_music_iterator::start_next_element()
 {
   assert (!iter_p_);
-  iter_p_ = get_iterator_p ( cursor_p_->ptr());
+  iter_p_ = get_iterator_p (cursor_->car_);
 }
 
 void
@@ -71,7 +71,6 @@ Sequential_music_iterator::set_Sequential_music_translator()
 
 Sequential_music_iterator::~Sequential_music_iterator()
 {
-  delete cursor_p_;
   assert (! iter_p_);
 }
 
@@ -97,7 +96,7 @@ Sequential_music_iterator::do_process_and_next (Moment until)
        {
          leave_element();
          
-         if (cursor_p_->ok()) 
+         if (cursor_)
            {
              start_next_element();
              set_Sequential_music_translator();
index 9da14dadb1a8f5a04b2d742d7c25757764a9f682..b83e5eaee85f38ecf78ef96af66a279baeeb732a 100644 (file)
@@ -26,10 +26,10 @@ Simultaneous_music_iterator::construct_children()
 {
   int j = 0;
   Simultaneous_music const *sim = dynamic_cast<Simultaneous_music const*> (music_l_);
-  for (PCursor<Music*> i (sim->music_p_list_p_->top());  
-       i.ok(); j++, i++) 
+
+  for (Cons<Music> *i = sim->music_p_list_p_->head_; i;  i = i->next_, j++)
     {
-      Music_iterator * mi = get_iterator_p (i.ptr());
+      Music_iterator * mi = get_iterator_p (i->car_);
       if (mi->ok()) 
        {
          if  (sim->translator_type_str_.empty_b ())
index d0396e9a9ae505a481be4c68244492fb70fb7d64..b11993efff6091c500e45d3ffd5a5415618f6024 100644 (file)
 
 Single_malt_grouping_item ::Single_malt_grouping_item()
 {
-  break_helper_only_b_ = true;
-  transparent_b_ = true;
+  set_elt_property (break_helper_only_scm_sym, SCM_BOOL_T);
+  set_elt_property (transparent_scm_sym, SCM_BOOL_T);
+
+  // this is weird! , but needed!
   set_empty (true);
 }
 
index dc9dc15406395d9788f53391d814ac18e27e0b37..f4d58d9b7545e62ce503032deb0b7b415362e75b 100644 (file)
@@ -40,7 +40,7 @@ Slur::add_column (Note_column*n)
   if (!n->head_l_arr_.size ())
     warning (_ ("Putting slur over rest."));
   encompass_arr_.push (n);
-  n->stem_l_->slur_l_ = this;
+  //  n->stem_l_->slur_l_ = this;
   add_dependency (n);
 }
 
@@ -100,10 +100,11 @@ broken_edge_b (Slur*s, Drul_array<Note_column*>& extrema, Direction dir)
 static bool
 normal_edge_b (Slur*s, Drul_array<Note_column*>& extrema, Direction dir)
 {
+  Note_column *n = extrema[dir];
   return !broken_edge_b (s, extrema, dir)
-    && extrema[dir]->stem_l_
-    && !extrema[dir]->stem_l_->transparent_b_ 
-    && extrema[dir]->head_l_arr_.size ();
+    && n->stem_l_
+    && n->stem_l_->get_elt_property (transparent_scm_sym) == SCM_BOOL_F
+    && n->head_l_arr_.size ();
 }
 
 void
@@ -113,10 +114,10 @@ Slur::do_post_processing ()
   if (!dir_)
     set_default_dir ();
 
-  Real interline_f = paper ()->interline_f ();
+  Real interline_f = paper_l ()->get_realvar (interline_scm_sym);
   Real internote_f = interline_f / 2;
   // URG
-  Real notewidth_f = paper ()->note_width () * 0.8;
+  Real notewidth_f = paper_l ()->note_width () * 0.8;
 
   /* 
    [OSU]: slur and tie placement
@@ -129,7 +130,7 @@ Slur::do_post_processing ()
      --> height <= 5 length ?? we use <= 3 length, now...
    */
   
-  Real gap_f = paper ()->get_var ("slur_x_gap");
+  Real gap_f = paper_l ()->get_var ("slur_x_gap");
 
   Drul_array<Note_column*> extrema;
   extrema[LEFT] = encompass_arr_[0];
@@ -218,7 +219,7 @@ Slur::do_post_processing ()
       */
       if (sign (dy) != sign (note_dy))
        {
-         Real damp_f = paper ()->get_var ("slur_slope_follow_music_factor");
+         Real damp_f = paper_l ()->get_var ("slur_slope_follow_music_factor");
          Real realdy = note_dy * damp_f;
          Direction adjust_dir = (Direction)(- dir_ * sign (realdy));
          if (!adjust_dir)
@@ -243,7 +244,7 @@ Slur::do_post_processing ()
   /*
     Avoid too steep slurs.
    */
-  Real damp_f = paper ()->get_var ("slur_slope_damping");
+  Real damp_f = paper_l ()->get_var ("slur_slope_damping");
   Offset d_off = Offset (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT],
     dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]);
   d_off[X_AXIS] += extent (X_AXIS).length ();
@@ -257,12 +258,12 @@ Slur::do_post_processing ()
 Array<Offset>
 Slur::get_encompass_offset_arr () const
 {
-  Real notewidth = paper ()->note_width () * 0.8;
-  Real gap = paper ()->get_var ("slur_x_gap");
-  Real internote = paper ()->internote_f ();
+  Real notewidth = paper_l ()->note_width () * 0.8;
+  Real gap = paper_l ()->get_var ("slur_x_gap");
 
   Offset left = Offset (dx_f_drul_[LEFT], dy_f_drul_[LEFT]);
   left[X_AXIS] += encompass_arr_[0]->stem_l_->hpos_f ();
+  Real internote = encompass_arr_[0]->stem_l_->staff_line_leading_f ()/2.0;
 
   /*
     <URG>
@@ -307,10 +308,10 @@ Slur::get_encompass_offset_arr () const
 
   for (int i = first; i < last; i++)
     {
-      Encompass_info info (encompass_arr_[i], dir_);
+      Encompass_info info (encompass_arr_[i], dir_, this);
       notes.push (info.o_ - left);
     }
-  Encompass_info info (encompass_arr_.top (), dir_);
+  Encompass_info info (encompass_arr_.top (), dir_, this);
   // [encompass_arr_.size () - 1]
   
   // urg:
@@ -322,7 +323,7 @@ Slur::get_encompass_offset_arr () const
   // prebreak
   if (interstaff_f_ && (encompass_arr_.top () != spanned_drul_[RIGHT]))
     {
-      Encompass_info info (encompass_arr_[encompass_arr_.size () - 1], dir_);
+      Encompass_info info (encompass_arr_[encompass_arr_.size () - 1], dir_, this);
       d[Y_AXIS] -= info.o_[Y_AXIS] - interstaff_f_;
     }
 
@@ -338,7 +339,7 @@ Slur::get_rods () const
   Array<Rod> a;
   Rod r;
   r.item_l_drul_ = spanned_drul_;
-  r.distance_f_ = paper ()->get_var ("slur_x_minimum");
+  r.distance_f_ = paper_l ()->get_var ("slur_x_minimum");
 
   a.push (r);
   return a;
index 67d1e2ea9230b02cf73390d5a16c579fcf2f4baf..73944e140cd35e8e4809069d479768d5fba88371 100644 (file)
@@ -63,12 +63,12 @@ Span_bar::evaluate_empty ()
 { 
   if (spanning_l_arr_.size () < 1) 
     {
-      transparent_b_ = true;
+      set_elt_property (transparent_scm_sym, SCM_BOOL_T);
       set_empty (true);   
     }
   if (type_str_.empty_b ()) 
     {
-      transparent_b_=true;
+      set_elt_property (transparent_scm_sym, SCM_BOOL_T);
       set_empty (true);
     }
   else if (type_str_ == "|:") 
index bcf62430b8f313eb3145538a8b85c47bdefa9937..4ed52a89247662a230cc4d27bbf24a0272acaab7 100644 (file)
@@ -52,7 +52,7 @@ Staff_group_bar_engraver::acknowledge_element (Score_element_info i)
   if (Span_bar * b = dynamic_cast<Span_bar *> (i.elem_l_))
     {
       if (b->type_str_ == "{")
-       b->extra_x_off_ -=  paper ()->interline_f (); // ugh
+       b->extra_x_off_ -=  paper_l ()->get_realvar (interline_scm_sym); // ugh
     }
 }
 
index f829026a6c4d4764fa9027b4fe022c793a1837a4..6428a80667b7971a48044b9fc297525b3fe12701 100644 (file)
@@ -93,13 +93,12 @@ Spanner::set_my_columns()
 void
 Spanner::set_bounds(Direction d, Item*i)
 {
-  if (spanned_drul_[d])
-    spanned_drul_[d]->attached_span_l_arr_.substitute(this,0);
-  
   spanned_drul_[d] =i;
   if (i)
-    i->attached_span_l_arr_.push(this);
-
+    {
+      i->used_b_ = true;
+    }
+  
   if  (spanned_drul_[Direction(-d)] == spanned_drul_[d]
        && i)
     warning (_f ("Spanner `%s\' with equal left and right spanpoints", classname (this)));
@@ -116,7 +115,6 @@ Spanner::do_break_processing()
 
 Spanner::Spanner ()
 {
-  unbroken_original_l_ =0;
   spanned_drul_[LEFT]=0;
   spanned_drul_[RIGHT]=0;
 }
@@ -125,14 +123,14 @@ Spanner::Spanner (Spanner const &s)
   :Score_element (s)
 {
   spanned_drul_[LEFT] = spanned_drul_[RIGHT] =0;
-  unbroken_original_l_ = 0;
 }
 
 void
 Spanner::output_processing () 
 {
-  if (transparent_b_)
-    return ;
+  if (get_elt_property (transparent_scm_sym) != SCM_BOOL_F)
+    return;
+
   output_p_ = do_brew_molecule_p ();
   Offset left_off (spanned_drul_[LEFT]->absolute_coordinate(X_AXIS), 0);
   Offset o = absolute_offset() + left_off;
@@ -174,7 +172,6 @@ Spanner::find_broken_piece (Line_of_score*l) const
          if (!info.broken_spanner_l_)
            {
              Spanner *span_p = dynamic_cast<Spanner*>(clone ());
-             span_p -> unbroken_original_l_ =(Spanner*)this;
              span_p->set_bounds(LEFT,info.bounds_[LEFT]);
              span_p->set_bounds(RIGHT,info.bounds_[RIGHT]);
              pscore_l_->typeset_element (span_p);
index b5cf85577fe6fe1b189e5758c61cbb1d4b47eb04..bd1247758226cd9974b2f9086b4bffd18957468b 100644 (file)
@@ -516,20 +516,21 @@ Spring_spacer::get_ruling_durations(Array<Moment> &shortest_playing_arr,
 
   for (int i=0; i < cols_.size(); i++)
     {
+      Score_column * sc = scol_l(i);
       Moment now = scol_l (i)->when();
       Moment shortest_playing;
       shortest_playing.set_infinite (1);
 
-      if (scol_l (i)->breakable_b_)
+      if (!sc->musical_b ())
        {
          for (int ji=i; ji >= start_context_i; ji--)
            context_shortest_arr[ji] = context_shortest;
          start_context_i = i;
          context_shortest.set_infinite (1);
        }
-      if (scol_l (i)->durations.size())
+      if (sc->durations.size())
        {
-         context_shortest = context_shortest <? scol_l(i)->durations[0];
+         context_shortest = context_shortest <? sc->durations[0];
        }
       
       // ji was j, but triggered ICE
@@ -588,8 +589,7 @@ Spring_spacer::calc_idealspacing()
   Array<Moment> context_shortest_arr;
   get_ruling_durations(shortest_playing_arr, context_shortest_arr);
 
-  Real interline_f = paper_l ()->interline_f ();
-
+  Real interline_f = paper_l ()->get_realvar (interline_scm_sym);
 
   Array<Real> ideal_arr;
   Array<Real> hooke_arr;
@@ -682,7 +682,7 @@ Spring_spacer::calc_idealspacing()
          /* 
             first musical column of bar
          */
-         if (i && scol_l (i - 1)->breakable_b_)
+         if (i && !scol_l (i - 1)->musical_b ())
            {
              // one interline minimum at start of bar
 
@@ -696,7 +696,7 @@ Spring_spacer::calc_idealspacing()
          /* 
             last musical column of bar
          */
-         if (i + 1 < cols_.size () && scol_l(i+1)->breakable_b_)
+         if (i + 1 < cols_.size () && !scol_l(i+1)->musical_b ())
            {
              // two interline minimum ok for last column?
              dist = dist >? 2 * interline_f;
diff --git a/lily/staff-bar.cc b/lily/staff-bar.cc
new file mode 100644 (file)
index 0000000..44be80a
--- /dev/null
@@ -0,0 +1,16 @@
+/*   
+  staff-bar.cc --  implement Staff_bar
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#include "staff-bar.hh"
+
+Real
+Staff_bar::get_bar_size () const
+{
+  return 4 * staff_line_leading_f ();
+}
index 7725cad81b72c55bb8581ac71c02c64e11957908..1331e96d2ec2bb3b437c3040a6e990e85a6ea0c0 100644 (file)
@@ -7,45 +7,26 @@
 */
 
 #include "proto.hh"
-#include "plist.hh"
+
 #include "staff-info.hh"
 #include "score-column.hh"
 
-Score*
-Staff_info::score_l()
-{
-  return score_l_;
-}
-
 Staff_info::Staff_info()
 {
-  score_l_ =0;
   time_C_ = 0;
   rhythmic_C_ =0;
-  staff_sym_l_=0;
 }
 
-Score_column*
-Staff_info::musical_l()
-{
-  return musical_l_;
-}
-
-Score_column*
-Staff_info::command_l()
-{
-  return command_l_;
-}
 
 Paper_column*
 Staff_info::command_pcol_l()
 {
-  return command_l();
+  return command_l_;
 }
 
 Paper_column*
 Staff_info::musical_pcol_l()
 {
-  return musical_l();
+  return musical_l_;
 }
 
index b98ca8aac203717e9e8b8d7e9d9a76ce30cffa9c..d223a7387f77256c5673aded67fcfbcafc824d81 100644 (file)
@@ -9,7 +9,7 @@
 #include "interval.hh"
 #include "paper-def.hh"
 #include "staff-side.hh"
-#include "staff-sym.hh"
+#include "staff-symbol.hh"
 #include "debug.hh"
 #include "dimensions.hh"
 
@@ -65,7 +65,7 @@ Staff_side::get_position_f () const
 
 
   Real y = 0;
-  Real inter_f = paper()-> internote_f ();
+  Real inter_f = staff_line_leading_f () /2;
 
   Interval v = support_extent();
 
@@ -73,8 +73,7 @@ Staff_side::get_position_f () const
   y = v[dir_] + 1 * dir_ * inter_f;
 
   int coordinate_offset_f_i = (int)rint (y / inter_f);
-  // ugh: 5 -> staff_lines
-  if (axis_ == Y_AXIS && abs (coordinate_offset_f_i) < 5)
+  if (axis_ == Y_AXIS && abs (coordinate_offset_f_i) < lines_i ())
     {
       if (!(abs (coordinate_offset_f_i) % 2))
        y += (Real)dir_ * inter_f;
@@ -131,8 +130,14 @@ Staff_side::do_post_processing()
 void
 Staff_side::do_substitute_element_pointer (Score_element*o, Score_element*n)
 {
+  Staff_symbol_referencer::do_substitute_element_pointer (o,n);
   support_l_arr_.unordered_substitute (o,n);
 }
 
-
+void
+Staff_side::do_add_processing ()
+{
+  if (axis_ == Y_AXIS && staff_symbol_l ())
+    add_support (staff_symbol_l ());
+}
 
index ebd56ebb233755a5a8411d70dd7d68806ec7c321..ba0431f4e36e108e2fb31a93da3bae2e1e38c02e 100644 (file)
@@ -7,16 +7,11 @@
 */
 
 #include "staff-sym-engraver.hh"
-#include "staff-sym.hh"
+#include "staff-symbol.hh"
 #include "score.hh"
 #include "p-col.hh"
-
-
-void
-Staff_symbol_engraver::fill_staff_info (Staff_info&i)
-{
-  i.staff_sym_l_ = span_p_;
-}
+#include "staff-symbol-referencer.hh"
+#include "paper-def.hh"
 
 Staff_symbol_engraver::~Staff_symbol_engraver()
 {
@@ -45,12 +40,28 @@ Staff_symbol_engraver::do_removal_processing()
       span_p_->no_lines_i_ = l;
     }
 
+  Scalar sz (get_property ("staffLineLeading", 0));
+  if (!sz.empty_b () && sz.isnum_b ())
+    {
+      span_p_->staff_line_leading_f_ = Real(sz);
+    }
+  else
+    {
+      span_p_->staff_line_leading_f_ = paper_l ()->get_realvar (interline_scm_sym);
+    }
   span_p_->set_bounds(RIGHT,get_staff_info().command_pcol_l ());
   typeset_element (span_p_);
   span_p_ =0;
 }
 
-
+void
+Staff_symbol_engraver::acknowledge_element (Score_element_info s)
+{
+  if (Staff_symbol_referencer * st = dynamic_cast<Staff_symbol_referencer*> (s.elem_l_))
+    {
+      st->set_staff_symbol (span_p_);      
+    }
+}
 
 
 ADD_THIS_TRANSLATOR(Staff_symbol_engraver);
index abd1addd33145f5f7d1109af4e73fc6bf0ddfe0c..351b747dee52cd72c669090efb59fe6604687f5d 100644 (file)
@@ -5,7 +5,7 @@
 
   (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
-#include "staff-sym.hh"
+#include "staff-symbol.hh"
 #include "lookup.hh"
 #include "dimensions.hh"
 #include "paper-def.hh"
 Staff_symbol::Staff_symbol ()
 {
   no_lines_i_ = 5;
-  interline_f_ =  0 PT;
+  staff_line_leading_f_ = 5.0 PT;
 }
 
-
-
-
 void
 Staff_symbol::do_print() const
 {
@@ -35,38 +32,30 @@ Staff_symbol::do_print() const
 Interval
 Staff_symbol::do_height() const
 {
-  int n = no_lines_i_ -1;
-//  return 2* inter_note_f () * Interval (-n, n);
-  return inter_note_f () * Interval (-n, n);
+  Interval i =Interval (0, staff_line_leading_f_ * (no_lines_i_-1));
+  i += - i.center ();
+  return i;
 }
 
 Molecule*
 Staff_symbol::do_brew_molecule_p() const
 {
   Real w = extent (X_AXIS).length ();
-  Paper_def * p = paper();
+  Paper_def * p = paper_l ();
   Molecule rule  = lookup_l ()->rule_symbol (p->get_var ("rulethickness"),
                                             w);
-  Real height = (no_lines_i_-1) * inter_note_f();
+  Real height = (no_lines_i_-1) * staff_line_leading_f_ /2;
   Molecule * m = new Molecule;
   for (int i=0; i < no_lines_i_; i++)
     {
       Molecule a (rule);
-      a.translate_axis (height - i * inter_note_f()*2, Y_AXIS);
+      a.translate_axis (height - i * staff_line_leading_f_, Y_AXIS);
       m->add_molecule (a);
     }
 
   return m;
 }
 
-Real
-Staff_symbol::inter_note_f() const
-{
-  if (interline_f_)
-    return interline_f_/2;
-
-  return paper()->internote_f ();
-}
 
 int
 Staff_symbol::steps_i() const
diff --git a/lily/staff-symbol-referencer.cc b/lily/staff-symbol-referencer.cc
new file mode 100644 (file)
index 0000000..2b07b49
--- /dev/null
@@ -0,0 +1,50 @@
+/*   
+  staff-symbol-referencer.cc -- implement Staff_symbol_referencer
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ */
+
+#include "staff-symbol-referencer.hh"
+#include "staff-symbol.hh"
+#include "paper-def.hh"
+
+Staff_symbol_referencer::Staff_symbol_referencer ()
+{
+  staff_sym_l_ =0;
+}
+
+void
+Staff_symbol_referencer::do_substitute_element_pointer (Score_element *o, Score_element*n)
+{
+  if (staff_sym_l_ == o)
+    {
+      staff_sym_l_ = dynamic_cast<Staff_symbol*> (n);
+    }
+}
+
+int
+Staff_symbol_referencer::lines_i () const
+{
+  return (staff_sym_l_) ?  staff_sym_l_->no_lines_i_ : 5;
+}
+
+void
+Staff_symbol_referencer::set_staff_symbol (Staff_symbol*s)
+{
+  staff_sym_l_ =s;
+  add_dependency (s);
+}
+
+Staff_symbol*
+Staff_symbol_referencer::staff_symbol_l () const
+{
+  return staff_sym_l_;
+}
+
+Real
+Staff_symbol_referencer::staff_line_leading_f () const
+{
+  return (staff_sym_l_) ? staff_sym_l_->staff_line_leading_f_ : paper_l ()->get_realvar (interline_scm_sym);
+}
index 13e9ea88d949d87ec78c0a2eb5d632ba17a2a326..8bc446ee8569251090abcf2956991c93deee5075 100644 (file)
@@ -47,13 +47,11 @@ Stem_engraver::acknowledge_element(Score_element_info i)
          int durlog_i = r->duration_.durlog_i_;
          stem_p_->flag_i_ = durlog_i;
 
-         stem_p_->staff_sym_l_ = get_staff_info ().staff_sym_l_;
-         
          if (abbrev_req_l_)
            {
              /*
                suggests typing of:
-                  c8:16 c: c: c:
+               c8:16 c: c: c:
                hmm, which isn't so bad?
              */
              int t = abbrev_req_l_->type_i_;
@@ -111,7 +109,6 @@ Stem_engraver::do_pre_move_processing()
          ((Translator_group*)which)->set_property ("stemRightBeamCount", "");
        }
 
-
       typeset_element(stem_p_);
       stem_p_ = 0;
     }
index e3dfdfba057ec475a6a33bde0e5dd94f7530cc0f..cd9be5dd1d192f8f7c47c5c6a82f680ba2fd608e 100644 (file)
@@ -16,7 +16,7 @@
 #include "lookup.hh"
 #include "stem-info.hh"
 #include "beam.hh"
-#include "staff-sym.hh"
+#include "staff-symbol.hh"
 
 Stem_info::Stem_info ()
 {
@@ -31,8 +31,8 @@ Stem_info::Stem_info (Stem*s)
   mult_i_ = stem_l_->mult_i_;
   interstaff_f_ = 0;
 
-  Paper_def* paper_l = stem_l_->paper ();
-  Real internote_f = paper_l->internote_f ();
+  Paper_def* paper_l = stem_l_->paper_l ();
+  Real internote_f = stem_l_->staff_line_leading_f ()/2;
   Real interbeam_f = paper_l->interbeam_f (mult_i_);
   Real beam_f = paper_l->beam_thickness_f ();
          
@@ -106,16 +106,8 @@ Stem_info::Stem_info (Stem*s)
   // interstaff beam
   Beam* beam_l_ = stem_l_->beam_l_;
   if (beam_l_->sinfo_.size ()
-      && stem_l_->staff_sym_l_ != beam_l_->sinfo_[0].stem_l_->staff_sym_l_)
+      && stem_l_->staff_symbol_l () != beam_l_->sinfo_[0].stem_l_->staff_symbol_l ())
     {
-#if 0 // this is nonsense..., don't issue warning
-      if (stem_l_->staff_sym_l_->dim_cache_[Y_AXIS].valid_b ())
-       {
-         interstaff_f_ = stem_l_->staff_sym_l_->absolute_coordinate (Y_AXIS)
-           - beam_l_->sinfo_[0].stem_l_->staff_sym_l_->absolute_coordinate (Y_AXIS) / internote_f;
-       }
-      else
-#endif
        {
          //      warning (_ ("invalid dimension cache: guessing staff position"));
          if (beam_l_->vertical_align_drul_[MIN] != 
index a0600e8636a1bef5f01c004660ebf67ad29989db..e88166ae58b2fd5de89fe8686aff065349595e70 100644 (file)
@@ -40,7 +40,6 @@ Stem::Stem ()
   beam_dir_ = CENTER;
   dir_forced_b_ = false;
   stem_xdir_ = LEFT;
-  staff_size_i_ = 8;
 
   beam_gap_i_ = 0;
   beam_l_ = 0;
@@ -94,7 +93,7 @@ Stem::stem_begin_f () const
 Real
 Stem::chord_start_f () const
 {
-  return head_positions()[dir_] * paper ()->internote_f ();
+  return head_positions()[dir_] * staff_line_leading_f ()/2.0;
 }
 
 Real
@@ -174,9 +173,9 @@ Stem::set_default_dir ()
 void
 Stem::set_default_stemlen ()
 {
-  Real internote_f = paper ()->internote_f ();
-  Real length_f = paper ()->get_var ("stem_length0") / internote_f;
-  Real shorten_f = paper ()->get_var ("forced_stem_shorten0") / internote_f;
+  Real internote_f = staff_line_leading_f ()/2.0;
+  Real length_f = paper_l ()->get_var ("stem_length0") / internote_f;
+  Real shorten_f = paper_l ()->get_var ("forced_stem_shorten0") / internote_f;
 
   if (!dir_)
     set_default_dir ();
@@ -256,7 +255,10 @@ Stem::do_pre_processing ()
     set_default_extents ();
   set_noteheads ();
   flag_i_ = flag_i_;
-  transparent_b_ = invisible_b ();
+  if (invisible_b ())
+    {
+      set_elt_property (transparent_scm_sym, SCM_BOOL_T);
+    }
   set_empty (invisible_b ());
 }
 
@@ -285,7 +287,7 @@ Stem::do_brew_molecule_p () const
 {
   Molecule *mol_p =new Molecule;
   Drul_array<Real> stem_y = yextent_drul_;
-  Real dy = paper ()->internote_f ();
+  Real dy = staff_line_leading_f ()/2.0;
 
   Real head_wid = 0;
   if (head_l_arr_.size ())
@@ -320,7 +322,7 @@ Stem::note_delta_f () const
   if (head_l_arr_.size())
     {
       Interval head_wid(0,  head_l_arr_[0]->extent (X_AXIS).length ());
-      Real rule_thick(paper ()->rule_thickness ());
+      Real rule_thick(paper_l ()->rule_thickness ());
       Interval stem_wid(-rule_thick/2, rule_thick/2);
       if (stem_xdir_ == CENTER)
        r = head_wid.center ();
@@ -359,4 +361,6 @@ Stem::do_substitute_element_pointer (Score_element*o,Score_element*n)
            }
        }
     }
+  Staff_symbol_referencer::do_substitute_element_pointer (o,n);
+      
 }
diff --git a/lily/template7.cc b/lily/template7.cc
deleted file mode 100644 (file)
index d7d5740..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#/*
-  template7.cc -- instantiate Request_column
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "proto.hh"
-#include "cursor.tcc"
-#include "pcursor.tcc"
-#include "plist.hh"
-#include "plist.tcc"
-
-#include "music-list.hh"
-
-POINTERLIST_INSTANTIATE(Music);
-
index d33a5d8fffb941940a663bdb1e2815958b0fa520..cf67bc47b26087fa921e88d5a6726cd9ed390726 100644 (file)
@@ -13,7 +13,7 @@
 #include "text-def.hh"
 #include "note-head.hh"
 #include "stem.hh"
-#include "staff-sym.hh"
+#include "staff-symbol.hh"
 
 class Text_engraver : public Engraver
 {
@@ -80,6 +80,7 @@ Text_engraver::do_process_requests ()
 
       G_text_item *text = new G_text_item;
       G_staff_side_item *ss = new G_staff_side_item;
+
       ss->set_victim (text);
       ss->dir_ = r->dir_;
       Scalar p (get_property ("textstyle", 0)); // textStyle?
@@ -93,6 +94,12 @@ Text_engraver::do_process_requests ()
          ss->padding_f_ = Real(padding);
        }
 
+      Scalar empty = get_property ("textEmptyDimension", 0);
+      if (empty.to_bool ())
+       {
+         text->dim_cache_[X_AXIS].set_empty (true);
+       }
+      
       announce_element (Score_element_info (text, r));
       announce_element (Score_element_info (ss, r));
 
@@ -104,14 +111,8 @@ Text_engraver::do_process_requests ()
 void
 Text_engraver::do_pre_move_processing ()
 {
-  Staff_symbol* s_l = get_staff_info().staff_sym_l_;
   for (int i=0; i < texts_.size (); i++)
     {
-      if (s_l != 0)
-       {
-         positionings_[i]->add_support (s_l);
-       }
-
       typeset_element (texts_[i]);
       typeset_element (positionings_[i]);
     }
index 8ad44ce683fe8235415c01c4528b7bf9acd8943d..18e91056141e6fb9ec95db2357ecce91fc82739a 100644 (file)
@@ -38,9 +38,6 @@ Text_spanner::Text_spanner()
   support_span_l_ = 0;
 }
 
-
-
-
 void
 Text_spanner::do_print() const
 {
@@ -51,13 +48,13 @@ void
 Text_spanner::do_post_processing()
 {
   text_off_ = support_span_l_->center() +
-       Offset (0,support_span_l_->dir_ * paper()->internote_f () * 4); // todo
+       Offset (0,support_span_l_->dir_ * paper_l ()->get_realvar(interline_scm_sym)*2.0); // todo
 }
 
 Molecule*
 Text_spanner::do_brew_molecule_p() const
 {
-  Molecule tsym (spec_p_->get_molecule (paper(),CENTER));
+  Molecule tsym (spec_p_->get_molecule (paper_l (),CENTER));
   tsym.translate (text_off_);
 
   Molecule*output = new Molecule;
index 5aa2d11446b627b306e170b4a596231ffe709f0c..83ba2c92b1b3d8fbe70f42d03f4da296ae1aec85 100644 (file)
@@ -65,8 +65,8 @@ Tie::do_post_processing()
   assert (head_l_drul_[LEFT] || head_l_drul_[RIGHT]);
 
   // URG
-  Real notewidth = paper ()->note_width () * 0.8;
-  Real interline_f = paper ()->interline_f ();
+  Real notewidth = paper_l ()->note_width () * 0.8;
+  Real interline_f = paper_l ()->get_realvar (interline_scm_sym);
 
   /* 
    [OSU]: slur and tie placement
@@ -79,7 +79,7 @@ Tie::do_post_processing()
      --> height <= 5 length ?? we use <= 3 length, now...
    */
 
-  Real gap_f = paper ()->get_var ("slur_x_gap");
+  Real gap_f = paper_l ()->get_var ("slur_x_gap");
 
   Direction d = LEFT;
   do
@@ -130,7 +130,7 @@ Tie::do_post_processing()
     Avoid too steep ties
       * slur from notehead to stemend: c''()b''
    */
-  Real damp_f = paper ()->get_var ("tie_slope_damping");
+  Real damp_f = paper_l ()->get_var ("tie_slope_damping");
   Offset d_off = Offset (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT],
     dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]);
   d_off.x () += extent (X_AXIS).length ();
@@ -151,15 +151,6 @@ Tie::do_substitute_element_pointer (Score_element*o, Score_element*n)
     head_l_drul_[RIGHT] = new_l;
 }
 
-#if 0
-Interval
-Tie::do_width () const
-{
-  Real min_f = 
-  Interval width_int = Bow::do_width ();
-  return width_int.length () < min_f ? Interval (0, min_f) : width_int;
-}
-#endif
 
 Array<Rod>
 Tie::get_rods () const
@@ -167,7 +158,7 @@ Tie::get_rods () const
   Array<Rod> a;
   Rod r;
   r.item_l_drul_ = spanned_drul_;
-  r.distance_f_ = paper ()->get_var ("tie_x_minimum");
+  r.distance_f_ = paper_l ()->get_var ("tie_x_minimum");
   a.push (r);
   return a;
 }
index fd74d44deab677742f68d68961b5cb05733ca5ea..54c6278e97c85bff7c068a43254fb0df081c7eba 100644 (file)
@@ -41,7 +41,7 @@ Time_signature_engraver::do_process_requests()
        
       time_signature_p_ = new Time_signature ();
       time_signature_p_->args_ = args;
-      time_signature_p_->break_priority_i_ = 1; // ugh
+      time_signature_p_->set_elt_property (break_priority_scm_sym, gh_int2scm (1)); // 1
     }
 
   
index b6190fa95aa0038d53b41398bde9e54645ac9390..d5a2b727d8ae644104ae912db86ccfa2db55ec55 100644 (file)
@@ -15,7 +15,7 @@
 
 Time_signature::Time_signature ()
 {
-  breakable_b_ = true;
+  set_elt_property (breakable_scm_sym, SCM_BOOL_T);
 }
 
 Molecule*
index 0d29fa5ce14e1085a5f8a2d11f89cba54f9c68c2..fa974f7bfa2a463aadb6e13875bc8de253f19544 100644 (file)
@@ -106,6 +106,17 @@ Timing_translator::do_process_requests()
 
        }
     }
+
+  Translator_group * tr=0;
+
+  Scalar barn = get_property ("currentBarNumber", &tr);
+  if (!barn.empty_b () && barn.isnum_b ())
+    {
+      time_.bars_i_ = int(barn);
+      tr->set_property ("currentBarNumber", "");
+    }
+  
+
 }
 
 
@@ -138,6 +149,8 @@ void
 Timing_translator::do_post_move_processing()
 {
   time_.add (now_mom ()  - time_.when_);
+
+
 }
 
 void
index 1e45ef97ec92b2aff4b57daea5b83180f0dc3091..f9fe68011259633ca7c98c8c62590f2abd58f9e5 100644 (file)
@@ -39,7 +39,7 @@ Tuplet_spanner::do_brew_molecule_p () const
 
   if (column_arr_.size ()){
     Real ncw = column_arr_.top ()->extent (X_AXIS).length ();
-    Molecule num (tdef_p_->get_molecule (paper (), CENTER));
+    Molecule num (tdef_p_->get_molecule (paper_l (), CENTER));
 
     if (beam_l_ && !bracket_visibility_b_)
       {
index f85a817ad4bf61d72b6e73eb35a2620adebf074b..77afc20378567b34349606855f65861e549f790b 100644 (file)
@@ -41,12 +41,13 @@ Volta_spanner::do_brew_molecule_p () const
   if (!visible_b_)
     return mol_p;
 
-  Real internote_f = paper ()->internote_f ();
+  Real internote_f = paper_l ()->get_realvar (interline_scm_sym)/2.0;
+
   Real dx = internote_f;
   Real w = extent (X_AXIS).length () - dx;
   Molecule volta (lookup_l ()->volta (w, last_b_));
   Real h = volta.dim_.y ().length ();
-  Molecule num (number_p_->get_molecule (paper (), LEFT));
+  Molecule num (number_p_->get_molecule (paper_l (), LEFT));
   Real dy = column_arr_.top ()->extent (Y_AXIS) [UP] > 
      column_arr_[0]->extent (Y_AXIS) [UP];
   dy += 2 * h;
@@ -61,7 +62,7 @@ Volta_spanner::do_brew_molecule_p () const
   Text_def two_text;
   two_text.text_str_ = "2";
   two_text.style_str_ = number_p_->style_str_;
-  Molecule two (two_text.get_molecule (paper (), LEFT));
+  Molecule two (two_text.get_molecule (paper_l (), LEFT));
   Real gap = two.dim_.x ().length () / 2;
   Offset off (num.dim_.x ().length () + gap, 
              h / internote_f - gap);
index 59946daa7244e11d437a5eb9101a67727e811053..7f6d4bc79652ca6c1d7a7f9ee8871b296fcb59a8 100644 (file)
@@ -138,7 +138,7 @@ GrandStaffContext=\translator{
        
 }
 
-\translator {
+StaffGroupContext= \translator {
        \type "Hara_kiri_line_group_engraver";
 %      \type "Line_group_engraver_group";
        \consists "Span_bar_engraver";
@@ -152,7 +152,8 @@ GrandStaffContext=\translator{
        
        \accepts "Lyrics";
        \accepts "ChordNames";
-}
+};
+\translator { \StaffGroupContext }
 
 \translator{
        \type "Line_group_engraver_group";
@@ -196,7 +197,7 @@ ScoreContext = \translator {
 
        \consists "Span_score_bar_engraver";
        \consists "Score_priority_engraver";
-       \consists "Priority_horizontal_align_engraver";
+%      \consists "Priority_horizontal_align_engraver";
        \consists "Vertical_align_engraver";
 
 
@@ -280,7 +281,7 @@ OrchestralScoreContext= \translator {
        \consists "Mark_engraver";
        \consists "Span_score_bar_engraver";
        \consists "Score_priority_engraver";
-       \consists "Priority_horizontal_align_engraver";
+
        \consists "Vertical_align_engraver";
 
        \accepts "ChoirStaff";
index 105243f5c52385410776b933dfa927b2ad39e46c..78f8b443a5674ded4b26821e794879f2ee967089 100644 (file)
@@ -4,6 +4,11 @@
 \translator {
        \type "Staff_performer";
        \accepts Voice;
+       \accepts VoiceOne;              % ugh.
+       \accepts VoiceTwo;
+       \accepts VoiceThree;
+       \accepts VoiceFour;
+
        \name Staff;
        \consists "Key_performer";
        \consists "Time_signature_performer";
 \translator
 {
        \type "Performer_group_performer";
-       \name Thread ;
        \consists "Note_performer";
+ \name VoiceFour;
+}
+
+\translator
+{
+       \type "Performer_group_performer";
+       \consists "Note_performer";
+\name VoiceThree;
+}
+\translator
+{
+       \type "Performer_group_performer";
+       \consists "Note_performer";
+ \name VoiceOne;
 }
 \translator
 {
        \type "Performer_group_performer";
-       \accepts Thread;
+       \consists "Note_performer";
 \name Voice;
 }
+\translator
+{
+       \type "Performer_group_performer";
+       \name VoiceTwo;\consists "Note_performer";
+
+}
+
 \translator
 {
        \type "Performer_group_performer";
        \accepts Staff;
+       \name GrandStaff;
+}
 
-\name GrandStaff;}
+\translator {\type "Performer_group_performer";
+       \accepts Staff; \name "PianoStaff";}
 
 \translator {
        \type "Performer_group_performer";
@@ -60,6 +88,7 @@
        instrument = piano;
        \accepts Staff;
        \accepts GrandStaff;
+       \accepts PianoStaff;
        \accepts Lyrics; 
        \accepts StaffGroup;
        \accepts ChoirStaff;
index 6568fc7b3c69adc8cc61dc03f3b0fa0356bc899f..c9d187ae58fb36906ab5555ce0c2c57c593be963 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Titel: LilyPond
-Versie: 1.1.34
-Inschrijf datum: 10MAR99
+Versie: 1.1.35
+Inschrijf datum: 15MAR99
 Beschrijving: @FLAPTEKST@
 Trefwoorden: muziek typezetten midi notatie
 Auteur: hanwen@stack.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Onderhouden door: hanwen@cs.ruu.nl (Han-Wen Nienhuys)
 Voornaamste plek: sunsite.unc.edu /pub/Linux/apps
-       770k lilypond-1.1.34.tar.gz 
+       770k lilypond-1.1.35.tar.gz 
 Oorspronkelijke plek: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       770k lilypond-1.1.34.tar.gz 
+       770k lilypond-1.1.35.tar.gz 
 Copi-eer voorwaarden: GPL
 End
index 1bf9cb3ac98a46c4802e3d8d5792c2edc6c923f6..1bae4f1cabaaad37f377b6777e10ae845c77ca25 100644 (file)
@@ -1,7 +1,7 @@
 Begin3
 Title: LilyPond
-Version: 1.1.34
-Entered-date: 10MAR99
+Version: 1.1.35
+Entered-date: 15MAR99
 Description: 
 LilyPond is the GNU Project music typesetter.  This program can print
 beautiful sheet music from a music definition file.  It can also play
@@ -14,8 +14,8 @@ Author: hanwen@cs.ruu.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
-       770k lilypond-1.1.34.tar.gz 
+       770k lilypond-1.1.35.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       770k lilypond-1.1.34.tar.gz 
+       770k lilypond-1.1.35.tar.gz 
 Copying-policy: GPL
 End
index 1e2a3b8617f2f7a578c7a31d974f1707c1de605b..a05db63f4910695147ff4e66ae7163ec187388b8 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 1.1.34
+Version: 1.1.35
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.1.34.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.1.35.tar.gz
 Summary: A program for printing sheet music.
 URL: http://www.cs.uu.nl/~hanwen/lilypond
 Packager: Han-Wen Nienhuys <hanwen@cs.uu.nl>
index acdbfffb978ee3b595d2c2216c5e3837a95a8626..cd3d50d71df04102b962c5b64b1975493af43946 100644 (file)
@@ -14,7 +14,7 @@ SUBDIRS = scripts buildscripts  flower lib lily mf mi2mu po debian \
 #
 
 SCRIPTS = configure aclocal.m4
-README_FILES = BUGS DEDICATION ANNOUNCE-0.1 ANNOUNCEMENT \
+README_FILES = BUGS DEDICATION ANNOUNCE-0.1 ANNOUNCEMENT-1.0 \
  COPYING NEWS-0.1 NEWS-1.0 NEWS-0.0 NEWS  TODO
 README_TXT_FILES = README.txt AUTHORS.txt INSTALL.txt PATCHES.txt
 IN_FILES := $(wildcard *.in)
diff --git a/mf/TODO b/mf/TODO
index 9ff64e0230cb6a0071718de7ef62fe7ebccf10c0..8b137891791fe96927ad78e64b0aad7bded08bdc 100644 (file)
--- a/mf/TODO
+++ b/mf/TODO
@@ -1,17 +1 @@
-       - design macro for penstroke with rounded endings
-       - timesig C: fat yet less curved.  Check out relations. 
-       - design decent macro for bulbed endings
-       - printer dependencies.
-       - y-refpoint for rests should be the 4th staffline (gclef: b')
-       - clean-up eight+ rests
-       - versioning    
-       - lo-res fixes.
-       - work out sizes of character fonts.
-       - more symbols
-         * piano pedals: Ped/*
-         * maxima notehead
-         * coda signs: Segno, O+
-         * glissando, arpeggio
-         * lengthened trill
-       - 128th flags
-       - include important spacing dims in fetalog 
+
index d473805efe96467e50336289a2e074841a2924c6..59af7371a9684af3417f994867446be8d1c639b2 100644 (file)
 
 ;; See documentation of Item::visibility_lambda_
 (define (postbreak_only_visibility d) (if (= d 1) '(#f . #f) '(#t . #t)))
-(define (non_postbreak_visibility d) (if (= d -1) '(#t . #t) '(#f . #f)))
 (define (spanbar_non_postbreak_visibility d) (if (= d -1) '(#t . #t) '(#f . #f)))
 
+(define (non_postbreak_visibility d) (if (= d 1) '(#t . #t) '(#f . #f)))
+
+
 ;; Score_span_bars are only visible at start of line
 ;; i.e. if break_dir == RIGHT == 1
-(define Span_score_bar_engraver_visibility postbreak_only_visibility)
 (define Span_bar_engraver_visibility non_postbreak_visibility)
+
+(define Span_score_bar_engraver_visibility postbreak_only_visibility)
 (define Piano_bar_engraver_visibility postbreak_only_visibility)
 (define Staff_group_bar_engraver_visibility postbreak_only_visibility)
 
index c0c07f6408fdebdc61d68e339c211690e5bc3929..78d3e0e833d479398180dc3b87a838bb93af474e 100644 (file)
@@ -319,7 +319,7 @@ class TeXOutput:
             outfile = os.path.join(Props.get('output'), outfile )
             
         this.write("""\
-\\vfill\\hfill{\\LilyIdString}
+\\vfill\\hfill{\\mudelatagline}
 \\end{document}
 """)
         this.__fd.close()
index b3ac3e42070af4e061c7910d099ed34ac220aecf..6ef9ca21b8a03735cc39446ab0b1ab570d115501 100644 (file)
@@ -19,8 +19,8 @@
 \ifundefined{mudelacopyright}
         \def\mudelacopyright{\copyright\ \number\year}
 \fi
-\ifundefined{LilyIdString}
-        \def\LilyIdString{Lily was here}
+\ifundefined{mudelatagline}
+        \def\mudelatagline{Lily was here}
 \fi
 \ifundefined{documentclass}
         \input lilypond-plaintex