From 5175fb07679b964a62202f6c900451e88d120f69 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 13 Sep 2000 00:24:41 +0200 Subject: [PATCH] release: 1.3.86 =========== * Added side-position-interface as an interface identifier, in stead of checking side-support-elements. This fixes a problem with stacked text scripts. * Removed spurious set_elt_property ("XX", SCM_EOL) calls. * Added \property squashedPosition for Pitch_squash_engraver: the staff-position number to squash noteheads to. * Added FAQ entry for script on bar, updated description of mailing lists. * Fixed bug with \translator { basicXXXProperties \push ... } * Updated and revised call for help in hacking.texi. * Bugfix: don't remember accidental if it is tied from the previous note. 1.3 --- AUTHORS.txt | 3 + CHANGES | 23 +- Documentation/faq.texi | 49 +++- Documentation/hacking.texi | 62 +++-- Documentation/topdocs/index.tely | 38 ++-- Documentation/user/properties.itely | 2 +- Documentation/user/refman.itely | 3 + VERSION | 4 +- input/bugs/broken-cresc.ly | 5 + input/test/script-column.ly | 10 - input/test/stacked-scripts.ly | 7 + input/test/tab-staff.ly | 35 +++ lily/dot-column.cc | 2 +- lily/group-interface.cc | 2 +- lily/hara-kiri-group-spanner.cc | 1 - lily/include/auto-change-iterator.hh | 13 +- lily/include/change-iterator.hh | 12 +- lily/include/chord-tremolo-iterator.hh | 8 +- lily/include/folded-repeat-iterator.hh | 11 +- lily/include/grace-iterator.hh | 1 - lily/include/interpretation-context-handle.hh | 9 +- lily/include/lyric-combine-music-iterator.hh | 13 +- lily/include/molecule.hh | 1 + lily/include/multi-measure-rest.hh | 4 + lily/include/music-iterator.hh | 88 ++++---- lily/include/music-wrapper-iterator.hh | 4 - lily/include/part-combine-music-iterator.hh | 4 +- lily/include/property-iterator.hh | 5 - lily/include/request-chord-iterator.hh | 8 +- lily/include/request-iterator.hh | 23 ++ lily/include/rest-collision.hh | 7 + lily/include/sequential-music-iterator.hh | 4 - lily/include/simple-music-iterator.hh | 26 --- lily/include/simultaneous-music-iterator.hh | 1 - lily/include/spaceable-element.hh | 8 + lily/include/stem-tremolo.hh | 3 + lily/include/tie.hh | 4 + lily/include/time-scaled-music-iterator.hh | 1 - lily/include/translator-def.hh | 16 +- lily/include/tuplet-spanner.hh | 7 + lily/include/unfolded-repeat-iterator.hh | 1 - lily/include/volta-spanner.hh | 8 +- lily/interpretation-context-handle.cc | 43 ++-- lily/local-key-engraver.cc | 31 +-- lily/molecule.cc | 6 + lily/multi-measure-rest-engraver.cc | 2 - lily/multi-measure-rest.cc | 10 +- lily/music-iterator.cc | 44 +--- lily/music-wrapper-iterator.cc | 26 +-- lily/note-head.cc | 3 +- lily/part-combine-music-iterator.cc | 213 +++++++++--------- lily/pitch-squash-engraver.cc | 3 +- lily/request-chord-iterator.cc | 40 +--- lily/request-iterator.cc | 25 ++ lily/rest-collision.cc | 1 - lily/score-element.cc | 19 +- lily/script-column-engraver.cc | 11 +- lily/script-column.cc | 2 +- lily/separation-item.cc | 1 - lily/sequential-music-iterator.cc | 110 +++------ lily/side-position-interface.cc | 9 +- lily/simple-music-iterator.cc | 36 --- lily/spaceable-element.cc | 3 - lily/stem-tremolo.cc | 1 - lily/text-engraver.cc | 4 +- lily/translator-def.cc | 38 +++- lily/translator-group.cc | 11 +- lily/tuplet-spanner.cc | 2 - lily/volta-spanner.cc | 1 - ly/engraver.ly | 13 +- ly/legal.ly | 4 + make/lilypond.spec.in | 3 +- make/out/lilypond.lsm | 8 +- make/out/lilypond.spec | 7 +- scripts/ly2dvi.py | 9 +- 75 files changed, 646 insertions(+), 629 deletions(-) create mode 100644 input/bugs/broken-cresc.ly delete mode 100644 input/test/script-column.ly create mode 100644 input/test/stacked-scripts.ly create mode 100644 input/test/tab-staff.ly delete mode 100644 lily/include/simple-music-iterator.hh delete mode 100644 lily/simple-music-iterator.cc create mode 100644 ly/legal.ly diff --git a/AUTHORS.txt b/AUTHORS.txt index 7ec65fe642..c5653944af 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -22,6 +22,9 @@ list is alphabetically ordered. * Anthony Fok , debian package: debian/* + * James Hammons , american chord names, + gnu-windows testing + * Bjoern Jacke german glossary stuff. * Neil Jerram . parts of diff --git a/CHANGES b/CHANGES index 39df550cb1..974339d20f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,18 +1,23 @@ -1.3.85.jcn5 +1.3.85.hwn2 =========== -* Modified part-combiner to use new get_music ()/next () music iterator - functionality. +* Added side-position-interface as an interface identifier, in stead +of checking side-support-elements. This fixes a problem with stacked +text scripts. -1.3.85.jcn4 -=========== +* Removed spurious set_elt_property ("XX", SCM_EOL) calls. -* Added clone () to music iterators, so that we can do next () on a copy. +* Added \property squashedPosition for Pitch_squash_engraver: the +staff-position number to squash noteheads to. -1.3.85.jcn3 -=========== +* Added FAQ entry for script on bar, updated description of mailing +lists. + +* Fixed bug with \translator { basicXXXProperties \push ... } + +* Updated and revised call for help in hacking.texi. -* Added get_music () and next () to music iterators. +* Bugfix: don't remember accidental if it is tied from the previous note. 1.3.85 ====== diff --git a/Documentation/faq.texi b/Documentation/faq.texi index 298e69af76..ad43f36b35 100644 --- a/Documentation/faq.texi +++ b/Documentation/faq.texi @@ -34,11 +34,31 @@ Note: relative paths are meant to be relative to the source directory @subsubsection I've got a simple question, but this FAQ doesn't help! -Please have a look in the searchable mail achives of -@uref{http://www.mail-archive.com/gnu-music-discuss@@gnu.org/, -gnu-music-discuss} and -@uref{http://www.mail-archive.com/help-gnu-music@@gnu.org/, help-gnu-music}. -Your question may well have been answered before. +Please have a look in the searchable mail archives of gnu-music-discuss +and help-gnu-music (see next FAQ entry). Your question may well have +been answered before. + +@subsubsection Are there archives of the mailing list? + +Yes. Currently, all information on the mailing lists is available at +gnu.org: + +@itemize +@item @uref{http://mail.gnu.org/mailman/listinfo/gnu-music-discuss} +@item @uref{http://mail.gnu.org/mailman/listinfo/info-gnu-music} +@item @uref{http://mail.gnu.org/mailman/listinfo/bug-gnu-music} +@item @uref{http://mail.gnu.org/mailman/listinfo/help-gnu-music} +@end itemize + +Archives of mail before September 12, 2000 are at +@code{mail-archive.com}: + +@itemize +@item @uref{http://www.mail-archive.com/info-gnu-music@@gnu.org} +@item @uref{http://www.mail-archive.com/help-gnu-music@@gnu.org} +@item @uref{http://www.mail-archive.com/bug-gnu-music@@gnu.org}) +@item @uref{http://www.mail-archive.com/gnu-music-discuss@@gnu.org} +@end itemize @node Installing,, ,top @section Installing @@ -277,6 +297,25 @@ This also works for crescendi, eg, @end example +@subsubsection How do I get a fermata on a barline + +The trick is to specify the fermata as a \mark. Use the following macro +before the bar line where you want the fermata: + +@example +barFermata = \mark "\\font\\fetafont=feta20\\fetafont\\char40"; +@end example + +The problem is that marks that occur at a line break are typeset only at +the beginning of the next line, opposite to what you want for the +fermata. This can be corrected by the following code + +@example + \property basicMarkProperties \push #'visibility-lambda = #begin-of-line-i\nvisible +@end example + +You can use a similar trick to put coda signs and comma's on barline. + @subsubsection How do I combine multiple pieces into one document? There are several solutions: diff --git a/Documentation/hacking.texi b/Documentation/hacking.texi index c6c0ede9ae..f5116d400e 100644 --- a/Documentation/hacking.texi +++ b/Documentation/hacking.texi @@ -37,30 +37,64 @@ full source code. You can write to the mailing list @unnumberedsubsec Users Mutopia needs your help. The mutopia project is a collection of public -domain sheet music. You can help the project by entering music and -submitting. Point your browser to the -@uref{http://sca.uwaterloo.ca/Mutopia, Mutopia webpage} +domain sheet music. You can help the project by entering music (either +by hand, or by converting from scans or MIDI) and submitting it. Point +your browser to the @uref{http://sca.uwaterloo.ca/Mutopia, Mutopia +webpage}. @unnumberedsubsec Font designers -Our set of glyphs (the Feta font) is far from complete. If you know a -little MetaFont you can contribute a glyph +Our set of glyphs (the Feta font) is far from complete. We need the +following glyphs: segno, coda. The fonts have been coded in MetaFont, +so you will need to know MetaFont if you want to contribute a glyph. @unnumberedsubsec Writers -The documentation of LilyPond and related utilities needs a lot of work. +The documentation of LilyPond and related utilities needs a lot of +work. The documentation is written in +@uref{http://www.gnu.org/software/texinfo,texinfo}. The documentation of +LilyPond is sorely lacking in terms of completeness, depth and +organisation. + +Write if you know how to write english documentation in texinfo, and +know about music and music notation. You must also know how to use +LilyPond (or be prepared to learn using it). The task is not especially +hard, but it is a lot of work, and you must be familiar with LilyPond. @unnumberedsubsec Translators LilyPond is completely ready for internationalized messages, but there -are only three translations so far. +are only a few translations so far (dutch, italian, german, japanese, +french, russian). Translation involves writing a .po file, which is +relatively easy, and does not even require running LilyPond. @unnumberedsubsec Hackers -There are lots of possibilities of improving the program itself. There are -both small projects and big ones. Most of them are listed in the TODO -file. A interesting and very big project is writing a GUI frontend to -LilyPond. +There are lots of possibilities of improving the program itself. There +are both small projects and big ones. Most of them are listed in our +TODO file, listed on the homepage of Jan and +@uref{http://www.cs.uu.nl/~hanwen/lily-devel,Han-Wen}. Modifying +LilyPond almost always requires patches to the C++ part. + +There are also numerous other interesting projects that are more or less +related to LilyPond + +@itemize @bullet +@item Writing convertors, eg. from NIFF and MIDI (we tried writing one with +limited success: midi2ly, included with lilypond.) + +We found that writing them in Python is the easiest. + +@item Writing a GUI frontend to +LilyPond. At the moment @uref{denemo,denemo.sourceforge.net} is the most +advanced. + +@item Helping write @uref{ http://solfege.sourceforge.net/,solfege +tools} + +@item Helping @uref{primrose.sourceforge.net,primrose}, a tool for +scanning sheet music. +@end itemize @chapter LilyPond internals @@ -68,9 +102,9 @@ LilyPond. This documents some aspects of the internals of GNU LilyPond. Some of this stuff comes from e-mail I wrote, some from e-mail others wrote, -some are large comments taken away from the headers. This page may be -a little incoherent. Unfortunately, it is also quite outdated. A -more thorough and understandable document is in the works. +some are large comments taken away from the headers. This page may be a +little incoherent. Unfortunately, it is also quite outdated. A more +thorough and understandable document is in the works. You should use @code{doc++} to take a peek at the sources. diff --git a/Documentation/topdocs/index.tely b/Documentation/topdocs/index.tely index ea61df02b0..91e850230a 100644 --- a/Documentation/topdocs/index.tely +++ b/Documentation/topdocs/index.tely @@ -39,9 +39,10 @@ inspired by engraved music, so you can expect that same clear and elegant look from your LilyPond output. And if you don't like the looks, you can tweak almost everything. -The program also has limited MIDI functionality: you can write MIDI -files with lilypond, and we have a simple MIDI to lilypond conversion -tool, @file{midi2ly}. +The program also has limited MIDI functionality: you can write MIDI files with +lilypond, and we have a simple MIDI to lilypond conversion tool, +@file{midi2ly}. Conversion tools for PMX, MUP, ABC, Finale and Musedata are +also included. LilyPond is free software. It is licensed under GNU General Public License, so you can use, modify and redistribute the program with @@ -137,26 +138,17 @@ Frequently Asked Questions} first.) @itemize @bullet -@item @samp{info-gnu-music@@gnu.org} (@uref{http://www.mail-archive.com/info-gnu-music@@gnu.org,archive}) - is a moderated list for information on the GNU Music project, to - subscribe: send mail with subject "subscribe" to - info-gnu-music-request@@gnu.org. +@item @uref{http://mail.gnu.org/mailman/listinfo/info-gnu-music,info-gnu-music@@gnu.org} +is a low-volume list for information on the GNU Music project. This list is moderated; ask @email{drl@@gnu.org, David R. Linn} or - @email{hanwen@@cs.uu.nl, Han-Wen} to send announcements for this -list. + @email{hanwen@@cs.uu.nl, Han-Wen} to send announcements for this list. +@item @uref{http://mail.gnu.org/mailman/listinfo/help-gnu-music,@samp{help-gnu-music@@gnu.org}} + For help with using LilyPond. +@item @uref{http://mail.gnu.org/mailman/listinfo/bug-gnu-music,bug-gnu-music@@gnu.org} +If you have bugreports, you should send them to this list. -@item @samp{help-gnu-music@@gnu.org} (@uref{http://www.mail-archive.com/help-gnu-music@@gnu.org,archive}). - For help with LilyPond music project. To subscribe: send - mail with subject "subscribe" to - @email{help-gnu-music-request@@gnu.org} - -@item @samp{bug-gnu-music@@gnu.org} (@uref{http://www.mail-archive.com/bug-gnu-music@@gnu.org,archive}) - If you have bugreports, you should send them to this list. If you -want to know about bugs, subscribe: send mail with subject "subscribe" -to @email{bug-gnu-music-request@@gnu.org}. - Please include in your bugreport the version of LilyPond that you experience the problem with, a description of your system and sample @@ -164,12 +156,8 @@ input to reproduce the problem. Do not send output files over the list, they tend to be very big and don't help with describing the problem. -@item @samp{gnu-music-discuss@@gnu.org} (@uref{http://www.mail-archive.com/gnu-music-discuss@@gnu.org,archive}) - For discussions concerning LilyPond, to subscribe: send - mail with subject "subscribe" to - @email{gnu-music-discuss-request@@gnu.org}. - - +@item @uref{http://mail.gnu.org/mailman/listinfo/gnu-music-discuss,gnu-music-discuss@@gnu.org} + For discussions concerning LilyPond. @end itemize If you want to unsubscribe use the same procedure as subscribing, but diff --git a/Documentation/user/properties.itely b/Documentation/user/properties.itely index 670b0add03..63b40860eb 100644 --- a/Documentation/user/properties.itely +++ b/Documentation/user/properties.itely @@ -102,7 +102,7 @@ c'8 \property Voice.flagStyle = "grace" c'8 @cindex properties!Voice -@table @samp +@table @samp @item @code{abbrev}@indexcode{abbrev} @propertytype{integer} Set length for tremolo to be used if no length is explicitly specified. diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index c606b6cb5b..71f569c6fa 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -2732,6 +2732,9 @@ The engravers for paper output are: Note that the notes move, but the locations of accidentals stay the same. + Vertical position of squashing can be controlled through +@indexcode{squashedPosition}. + @item @code{Priority_horizontal_align_engraver} @indexcode{Priority_horizontal_align_engraver} diff --git a/VERSION b/VERSION index 988cb0b614..42a4121ff5 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 -PATCH_LEVEL=85 -MY_PATCH_LEVEL=jcn5 +PATCH_LEVEL=86 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/input/bugs/broken-cresc.ly b/input/bugs/broken-cresc.ly new file mode 100644 index 0000000000..3580a230ff --- /dev/null +++ b/input/bugs/broken-cresc.ly @@ -0,0 +1,5 @@ +\score { + \notes \context Thread { + c1 \< c1 \break c1 c1 \! c1 + } +} diff --git a/input/test/script-column.ly b/input/test/script-column.ly deleted file mode 100644 index 13f8b4207b..0000000000 --- a/input/test/script-column.ly +++ /dev/null @@ -1,10 +0,0 @@ -\score { - \context Voice \notes\relative c { - %c''4^|^.^"foo"^"klap" - c''4^|^.^"foo"^"klap"^"puk"^\fermata^\stopped - c4_|_._"foo"_"klap"_"puk"_\fermata_\stopped - - } - \paper { } - \midi { } -} \ No newline at end of file diff --git a/input/test/stacked-scripts.ly b/input/test/stacked-scripts.ly new file mode 100644 index 0000000000..fa21ad8328 --- /dev/null +++ b/input/test/stacked-scripts.ly @@ -0,0 +1,7 @@ +\score { + \notes { + c2_"geen gedonder"_"jij gaat onder" + c2^^^.^|^"down"^"up" + } + \paper { linewidth = -1. ; } +} diff --git a/input/test/tab-staff.ly b/input/test/tab-staff.ly new file mode 100644 index 0000000000..d7751a88bf --- /dev/null +++ b/input/test/tab-staff.ly @@ -0,0 +1,35 @@ +%{ + +Kludge for half-assed tab notation (you need to fill the numbers +yourself.) + +%} + +bla = \notes \relative c' { } + +\score { \notes +< + \context Voice = BLA \bla + \context TabStaff \context Thread \bla +> + +\paper { + \translator { + \StaffContext + \name TabStaff; + basicStaffSymbolProperties \push #'line-count = #6 + \remove "Clef_engraver"; + \remove "Time_signature_engraver"; + \consists "Pitch_squash_engraver"; + basicNoteHeadProperties \push #'transparent = ##t + basicNoteHeadProperties \push #'staff-position = #-6 + basicDotsProperties \push #'transparent = ##t + squashedPosition = #-4 + basicStemProperties \push #'length = #12 +} +\translator { +\ScoreContext +\accepts TabStaff; +} +} +} diff --git a/lily/dot-column.cc b/lily/dot-column.cc index 38777cb569..738052d5a2 100644 --- a/lily/dot-column.cc +++ b/lily/dot-column.cc @@ -39,7 +39,7 @@ Dot_column::add_head (Score_element * me, Score_element *rh) void Dot_column::set_interface (Score_element* me) { - me->set_elt_property ("dots", SCM_EOL); + Directional_element_interface::set (me, RIGHT); Axis_group_interface::set_interface (me); diff --git a/lily/group-interface.cc b/lily/group-interface.cc index ffbbf06c5d..b82807d5b2 100644 --- a/lily/group-interface.cc +++ b/lily/group-interface.cc @@ -53,7 +53,7 @@ Group_interface::set_interface () { if (!has_interface ()) { - elt_l_->set_elt_property (name_.ch_C (), SCM_EOL); + } } diff --git a/lily/hara-kiri-group-spanner.cc b/lily/hara-kiri-group-spanner.cc index 25680db3ef..bbc6bfc643 100644 --- a/lily/hara-kiri-group-spanner.cc +++ b/lily/hara-kiri-group-spanner.cc @@ -16,7 +16,6 @@ void Hara_kiri_group_spanner::set_interface (Score_element*me) { - me->set_elt_property ("items-worth-living", SCM_EOL); me->add_offset_callback (force_hara_kiri_callback, Y_AXIS); me->set_interface (ly_symbol2scm ("hara-kiri-spanner-interface")); me->set_extent_callback (Hara_kiri_group_spanner::y_extent, Y_AXIS); diff --git a/lily/include/auto-change-iterator.hh b/lily/include/auto-change-iterator.hh index aa03806c27..ff55700bc1 100644 --- a/lily/include/auto-change-iterator.hh +++ b/lily/include/auto-change-iterator.hh @@ -13,18 +13,15 @@ #include "music-wrapper-iterator.hh" #include "direction.hh" -class Auto_change_iterator : public Music_wrapper_iterator +class Auto_change_iterator : public Music_wrapper_iterator { -public: - VIRTUAL_COPY_CONS (Music_iterator); - Auto_change_iterator (); + Direction where_dir_; + void change_to (Music_iterator* , String, String); protected: virtual void do_process_and_next (Moment); - -private: - Direction where_dir_; - void change_to (Music_iterator* , String, String); +public: + Auto_change_iterator (); }; #endif /* AUTO_CHANGE_ITERATOR_HH */ diff --git a/lily/include/change-iterator.hh b/lily/include/change-iterator.hh index a43c4da5f2..4ab9d99e4a 100644 --- a/lily/include/change-iterator.hh +++ b/lily/include/change-iterator.hh @@ -15,17 +15,15 @@ class Change_iterator : public Music_iterator { -public: - VIRTUAL_COPY_CONS (Music_iterator); - /* - CTOR is public - */ + void error (String); protected: virtual void do_process_and_next (Moment); -private: - void error (String); +public: + /* + CTOR is public + */ }; #endif diff --git a/lily/include/chord-tremolo-iterator.hh b/lily/include/chord-tremolo-iterator.hh index 6d25034d6d..9cd632985d 100644 --- a/lily/include/chord-tremolo-iterator.hh +++ b/lily/include/chord-tremolo-iterator.hh @@ -14,8 +14,10 @@ class Chord_tremolo_iterator : public Music_iterator { + Moment factor_; + Music_iterator * child_iter_p_; + public: - VIRTUAL_COPY_CONS (Music_iterator); Chord_tremolo_iterator (); protected: @@ -26,10 +28,6 @@ protected: virtual void do_print () const; virtual void do_process_and_next (Moment) ; virtual Music_iterator *try_music_in_children (Music *) const; - -private: - Moment factor_; - Music_iterator * child_iter_p_; }; diff --git a/lily/include/folded-repeat-iterator.hh b/lily/include/folded-repeat-iterator.hh index 1b36df304a..e26bac173e 100644 --- a/lily/include/folded-repeat-iterator.hh +++ b/lily/include/folded-repeat-iterator.hh @@ -18,8 +18,11 @@ */ class Folded_repeat_iterator : public Music_iterator { + Music_iterator * main_iter_p_; + Music_iterator * alternative_iter_p_; + int count_; + Moment main_length_mom_; public: - VIRTUAL_COPY_CONS (Music_iterator); Folded_repeat_iterator (); ~Folded_repeat_iterator (); @@ -33,12 +36,6 @@ protected: virtual void do_process_and_next (Moment); virtual Music_iterator *try_music_in_children (Music *) const; - -private: - Music_iterator * main_iter_p_; - Music_iterator * alternative_iter_p_; - int count_; - Moment main_length_mom_; }; #endif /* FOLDED_REPEAT_ITERATOR_HH */ diff --git a/lily/include/grace-iterator.hh b/lily/include/grace-iterator.hh index c253d078e8..9743d7ab90 100644 --- a/lily/include/grace-iterator.hh +++ b/lily/include/grace-iterator.hh @@ -15,7 +15,6 @@ class Grace_iterator : public Music_wrapper_iterator { public: - VIRTUAL_COPY_CONS (Music_iterator); ~Grace_iterator (); virtual void construct_children () ; virtual void do_process_and_next (Moment); diff --git a/lily/include/interpretation-context-handle.hh b/lily/include/interpretation-context-handle.hh index cb788f124a..a8adf33cb4 100644 --- a/lily/include/interpretation-context-handle.hh +++ b/lily/include/interpretation-context-handle.hh @@ -13,20 +13,17 @@ class Interpretation_context_handle { + Translator_group * report_to_l_; + void down (); + void up (Translator_group*); public: ~Interpretation_context_handle (); Interpretation_context_handle (); - Interpretation_context_handle* clone () const; void set_translator (Translator_group*); bool try_music (Music *); void operator =(Interpretation_context_handle const&); Interpretation_context_handle (Interpretation_context_handle const&); Translator_group * report_to_l () const; - -private: - Translator_group * report_to_l_; - void down (); - void up (Translator_group*); }; #endif /* INTERPRETATION_CONTEXT_HANDLE_HH */ diff --git a/lily/include/lyric-combine-music-iterator.hh b/lily/include/lyric-combine-music-iterator.hh index 31a47b4896..2264996110 100644 --- a/lily/include/lyric-combine-music-iterator.hh +++ b/lily/include/lyric-combine-music-iterator.hh @@ -15,10 +15,9 @@ class Lyric_combine_music_iterator : public Music_iterator { -public: - VIRTUAL_COPY_CONS (Music_iterator); - Lyric_combine_music_iterator (); - + Music_iterator * music_iter_p_; + Music_iterator * lyric_iter_p_; + protected: virtual void construct_children (); virtual Moment next_moment () const; @@ -28,10 +27,8 @@ protected: virtual bool ok () const; virtual void do_print () const; virtual ~Lyric_combine_music_iterator (); - -private: - Music_iterator * music_iter_p_; - Music_iterator * lyric_iter_p_; +public: + Lyric_combine_music_iterator (); }; #endif /* LYRIC_COMBINE_MUSIC_ITERATOR_HH */ diff --git a/lily/include/molecule.hh b/lily/include/molecule.hh index 898cb63732..e61a64c8b9 100644 --- a/lily/include/molecule.hh +++ b/lily/include/molecule.hh @@ -73,6 +73,7 @@ public: void translate_axis (Real,Axis); Interval extent (Axis) const; + Box extent_box () const; /** codify THIS into a Scheme expression. */ diff --git a/lily/include/multi-measure-rest.hh b/lily/include/multi-measure-rest.hh index 4b57a9662c..4803ce3437 100644 --- a/lily/include/multi-measure-rest.hh +++ b/lily/include/multi-measure-rest.hh @@ -13,7 +13,11 @@ #include "lily-proto.hh" #include "lily-guile.hh" #include "rod.hh" +/* + properties: + columns -- list of paper-columns + */ class Multi_measure_rest { public: diff --git a/lily/include/music-iterator.hh b/lily/include/music-iterator.hh index 87644b494f..561e9c11eb 100644 --- a/lily/include/music-iterator.hh +++ b/lily/include/music-iterator.hh @@ -24,14 +24,40 @@ The state of an iterator would be the intersection of the particular music construct with one point in musical time. */ -class Music_iterator -{ -public: - VIRTUAL_COPY_CONS (Music_iterator); +class Music_iterator { + Interpretation_context_handle handle_; + +protected: + Music * music_l_; + + /// ugh. JUNKME + bool first_b_; - Music_iterator (); - Music_iterator (Music_iterator const&); - virtual ~Music_iterator (); + /** + Do the actual printing. This should be overriden in derived classes. It + is called by #print#, in the public interface + */ + virtual void do_print() const; + + /** + Find a bottom notation context to deliver requests to. + */ + virtual Translator_group* get_req_translator_l(); + + /** + Get an iterator for MUS, inheriting the translation unit from THIS. + */ + Music_iterator* get_iterator_p (Music *mus) const; + + /** Do the actual move. This should be overriden in derived + classes. It is called by #process_and_next#, the public interface + */ + virtual void do_process_and_next (Moment until); + + + virtual Music_iterator* try_music_in_children (Music *) const; + +public: /** Do the reporting. Will try MUSIC_L_ in its own translator first, @@ -42,7 +68,7 @@ public: /** The translation unit that we this iterator is reporting to now. */ - Translator_group*report_to_l () const; + Translator_group*report_to_l() const; void set_translator (Translator_group*); @@ -52,15 +78,17 @@ public: static Music_iterator* static_get_iterator_p (Music * mus); void init_translator (Music *, Translator_group *); + Music_iterator(); + /// Find the next interesting point in time. - virtual Moment next_moment () const; + virtual Moment next_moment() const; ///Are we finished with this piece of music? - virtual bool ok () const; + virtual bool ok() const; + + virtual ~Music_iterator(); - virtual Music* get_music (); - virtual bool next (); ///Report all musical information that occurs between now and UNTIL void process_and_next (Moment until); @@ -69,40 +97,8 @@ public: Construct sub-iterators, and set the translator to report to. */ - virtual void construct_children (); - void print () const; - -protected: - Music * music_l_; - - /// ugh. JUNKME - bool first_b_; - - /** - Do the actual printing. This should be overriden in derived classes. It - is called by #print#, in the public interface - */ - virtual void do_print () const; - - /** - Find a bottom notation context to deliver requests to. - */ - virtual Translator_group* get_req_translator_l (); - - /** - Get an iterator for MUS, inheriting the translation unit from THIS. - */ - Music_iterator* get_iterator_p (Music *) const; - - /** Do the actual move. This should be overriden in derived - classes. It is called by #process_and_next#, the public interface - */ - virtual void do_process_and_next (Moment until); - - virtual Music_iterator* try_music_in_children (Music *) const; - -private: - Interpretation_context_handle handle_; + virtual void construct_children(); + void print() const; }; #endif // MUSIC_ITERATOR_HH diff --git a/lily/include/music-wrapper-iterator.hh b/lily/include/music-wrapper-iterator.hh index 1d97eb9067..8200709e52 100644 --- a/lily/include/music-wrapper-iterator.hh +++ b/lily/include/music-wrapper-iterator.hh @@ -21,16 +21,12 @@ class Music_wrapper_iterator : public Music_iterator { public: - VIRTUAL_COPY_CONS (Music_iterator); Music_wrapper_iterator (); - Music_wrapper_iterator (Music_wrapper_iterator const&); ~Music_wrapper_iterator (); virtual void construct_children () ; virtual Moment next_moment () const; virtual bool ok () const; - virtual Music* get_music (); - virtual bool next (); protected: virtual void do_print () const; diff --git a/lily/include/part-combine-music-iterator.hh b/lily/include/part-combine-music-iterator.hh index d43a00a72d..7b38e0f033 100644 --- a/lily/include/part-combine-music-iterator.hh +++ b/lily/include/part-combine-music-iterator.hh @@ -15,7 +15,6 @@ class Part_combine_music_iterator : public Music_iterator { public: - VIRTUAL_COPY_CONS (Music_iterator); Part_combine_music_iterator (); protected: @@ -33,8 +32,11 @@ private: Music_iterator * first_iter_p_; Music_iterator * second_iter_p_; + Moment now_; Moment first_until_; Moment second_until_; + + bool combined_b_; }; #endif /* PART_COMBINE_MUSIC_ITERATOR_HH */ diff --git a/lily/include/property-iterator.hh b/lily/include/property-iterator.hh index 66c7143656..7591fce277 100644 --- a/lily/include/property-iterator.hh +++ b/lily/include/property-iterator.hh @@ -21,7 +21,6 @@ class Property_iterator : public Music_iterator { public: - VIRTUAL_COPY_CONS (Music_iterator); // construction protected: virtual void do_process_and_next (Moment); @@ -29,16 +28,12 @@ protected: class Push_property_iterator : public Music_iterator { -public: - VIRTUAL_COPY_CONS (Music_iterator); protected: virtual void do_process_and_next (Moment); }; class Pop_property_iterator : public Music_iterator { -public: - VIRTUAL_COPY_CONS (Music_iterator); protected: virtual void do_process_and_next (Moment); }; diff --git a/lily/include/request-chord-iterator.hh b/lily/include/request-chord-iterator.hh index a4794f100b..bc09247992 100644 --- a/lily/include/request-chord-iterator.hh +++ b/lily/include/request-chord-iterator.hh @@ -15,8 +15,7 @@ /** Walk through a Request_chord */ -class Request_chord_iterator : public Music_iterator -{ +class Request_chord_iterator : public Music_iterator { Request_chord * elt_l () const; /** cache elt_l ()->length_mom (). @@ -25,17 +24,14 @@ class Request_chord_iterator : public Music_iterator bool last_b_; public: - VIRTUAL_COPY_CONS (Music_iterator); Request_chord_iterator (); - Request_chord_iterator (Request_chord_iterator const&); - virtual bool next (); - virtual bool ok () const; protected: virtual void do_process_and_next (Moment); virtual Moment next_moment() const; virtual void construct_children(); + virtual bool ok() const; virtual void do_print() const; }; diff --git a/lily/include/request-iterator.hh b/lily/include/request-iterator.hh index e69de29bb2..ea2b07b026 100644 --- a/lily/include/request-iterator.hh +++ b/lily/include/request-iterator.hh @@ -0,0 +1,23 @@ +/* + request-iterator.hh -- declare Request_iterator + + source file of the GNU LilyPond music typesetter + + (c) 2000 Han-Wen Nienhuys + + */ + +#ifndef REQUEST_ITERATOR_HH +#define REQUEST_ITERATOR_HH + +#include "music-iterator.hh" + +class Simple_music_iterator : public Music_iterator +{ +public: +protected: + virtual void do_process_and_next (Moment ); +}; + +#endif /* REQUEST_ITERATOR_HH */ + diff --git a/lily/include/rest-collision.hh b/lily/include/rest-collision.hh index 79b7b8aa72..f7a547a94b 100644 --- a/lily/include/rest-collision.hh +++ b/lily/include/rest-collision.hh @@ -12,6 +12,13 @@ #include "lily-proto.hh" #include "lily-guile.hh" +/* + properties: + + elements -- list of elts (both rests and notes) participating in the + collision. + +*/ class Rest_collision // interface { diff --git a/lily/include/sequential-music-iterator.hh b/lily/include/sequential-music-iterator.hh index 1a2dc730e7..79f493fa87 100644 --- a/lily/include/sequential-music-iterator.hh +++ b/lily/include/sequential-music-iterator.hh @@ -18,16 +18,12 @@ class Sequential_music_iterator : public Music_iterator { public: - VIRTUAL_COPY_CONS (Music_iterator); Sequential_music_iterator (); - Sequential_music_iterator (Sequential_music_iterator const&); virtual ~Sequential_music_iterator (); virtual void construct_children (); virtual Moment next_moment () const; virtual bool ok () const; - virtual Music* get_music (); - virtual bool next (); protected: virtual void do_print() const; diff --git a/lily/include/simple-music-iterator.hh b/lily/include/simple-music-iterator.hh deleted file mode 100644 index 324c9b952a..0000000000 --- a/lily/include/simple-music-iterator.hh +++ /dev/null @@ -1,26 +0,0 @@ -/* - simple-music-iterator.hh -- declare Simple_music_iterator - - source file of the GNU LilyPond music typesetter - - (c) 2000 Han-Wen Nienhuys - */ - -#ifndef SIMPLE_MUSIC_ITERATOR_HH -#define SIMPLE_MUSIC_ITERATOR_HH - -#include "music-iterator.hh" - -class Simple_music_iterator : public Music_iterator -{ -public: - VIRTUAL_COPY_CONS (Music_iterator); - Simple_music_iterator (); - Simple_music_iterator (Simple_music_iterator const &); - -protected: - virtual void do_process_and_next (Moment ); -}; - -#endif /* SIMPLE_MUSIC_ITERATOR_HH */ - diff --git a/lily/include/simultaneous-music-iterator.hh b/lily/include/simultaneous-music-iterator.hh index 7ab54be77c..6c4008a95b 100644 --- a/lily/include/simultaneous-music-iterator.hh +++ b/lily/include/simultaneous-music-iterator.hh @@ -15,7 +15,6 @@ class Simultaneous_music_iterator : public Music_iterator { public: - VIRTUAL_COPY_CONS (Music_iterator); /// make a new context for every child. bool separate_contexts_b_; diff --git a/lily/include/spaceable-element.hh b/lily/include/spaceable-element.hh index 72a713ed4c..9b71907707 100644 --- a/lily/include/spaceable-element.hh +++ b/lily/include/spaceable-element.hh @@ -12,7 +12,15 @@ #include "lily-guile.hh" #include "lily-proto.hh" +/* + properties : + minimum-distances -- list of rods (ie. (OBJ . DIST) pairs) + + ideal-distances -- (OBJ . (DIST . STRENGTH)) pairs + + dir-list -- list of stem directions. + */ struct Spaceable_element { diff --git a/lily/include/stem-tremolo.hh b/lily/include/stem-tremolo.hh index 71ad915593..c8c29a678a 100644 --- a/lily/include/stem-tremolo.hh +++ b/lily/include/stem-tremolo.hh @@ -13,6 +13,9 @@ #include "lily-proto.hh" #include "lily-guile.hh" +/* + stem -- pointer to the stem object. + */ class Stem_tremolo { public: diff --git a/lily/include/tie.hh b/lily/include/tie.hh index 4ecd9e56d0..329e41fb0b 100644 --- a/lily/include/tie.hh +++ b/lily/include/tie.hh @@ -13,6 +13,10 @@ #include "lily-guile.hh" #include "lily-proto.hh" + +/* + heads -- pair of element pointers, pointing to the two heads of the + tie. */ class Tie { public: diff --git a/lily/include/time-scaled-music-iterator.hh b/lily/include/time-scaled-music-iterator.hh index abdd2ac6a6..28ab473db0 100644 --- a/lily/include/time-scaled-music-iterator.hh +++ b/lily/include/time-scaled-music-iterator.hh @@ -15,7 +15,6 @@ class Time_scaled_music_iterator : public Music_wrapper_iterator { public: - VIRTUAL_COPY_CONS (Music_iterator); // construction protected: virtual void do_process_and_next (Moment); diff --git a/lily/include/translator-def.hh b/lily/include/translator-def.hh index c985222a40..1fcfc37ab5 100644 --- a/lily/include/translator-def.hh +++ b/lily/include/translator-def.hh @@ -14,16 +14,27 @@ #include "smobs.hh" #include "input.hh" +/* + The definition of a interpretation context as given in the + input. The lists are stored in order of definition. +*/ struct Translator_def : public Input { +private: + /* + these lists store the definition, in opposite order of entry + */ + SCM consists_name_list_; SCM end_consists_name_list_; SCM accepts_name_list_; SCM property_ops_; +public: SCM type_name_; SCM translator_group_type_; SCM modify_definition (SCM, SCM, bool); + SCM default_child_context_name (); void set_acceptor (SCM accepts, bool add); void add_element (SCM name); @@ -40,9 +51,10 @@ struct Translator_def : public Input static void apply_pushpop_property (Translator_group*, SCM syms, SCM eprop, SCM val); SCM clone_scm ()const; - DECLARE_SMOBS(Translator_def,foo); -private: + void apply_property_operations (Translator_group*); +private: + DECLARE_SMOBS(Translator_def,foo); Translator_def (); Translator_def (Translator_def const&); diff --git a/lily/include/tuplet-spanner.hh b/lily/include/tuplet-spanner.hh index 0bebbf3805..49a5bac13c 100644 --- a/lily/include/tuplet-spanner.hh +++ b/lily/include/tuplet-spanner.hh @@ -15,7 +15,14 @@ (or should we be above staff?) todo: handle breaking elegantly. +properties: + + beams -- list of beam ptrs. + + columns -- list of note-columns. + */ + class Tuplet_spanner { public: diff --git a/lily/include/unfolded-repeat-iterator.hh b/lily/include/unfolded-repeat-iterator.hh index e52361b473..97a649a10a 100644 --- a/lily/include/unfolded-repeat-iterator.hh +++ b/lily/include/unfolded-repeat-iterator.hh @@ -19,7 +19,6 @@ class Unfolded_repeat_iterator : public Music_iterator { public: - VIRTUAL_COPY_CONS (Music_iterator); /** How often have we done the body (assuming bodies are interspersed.)? */ diff --git a/lily/include/volta-spanner.hh b/lily/include/volta-spanner.hh index 733c43b1e0..4697b8d8b6 100644 --- a/lily/include/volta-spanner.hh +++ b/lily/include/volta-spanner.hh @@ -10,7 +10,13 @@ #include "spanner.hh" -/** Volta bracket with number */ +/** Volta bracket with number + +properties: + +bars -- list of barline ptrs. + +*/ class Volta_spanner { diff --git a/lily/interpretation-context-handle.cc b/lily/interpretation-context-handle.cc index e5b056e601..b6a403ea2d 100644 --- a/lily/interpretation-context-handle.cc +++ b/lily/interpretation-context-handle.cc @@ -11,32 +11,6 @@ #include "interpretation-context-handle.hh" #include "translator-group.hh" -Interpretation_context_handle::Interpretation_context_handle() -{ - report_to_l_ =0; -} - -Interpretation_context_handle::Interpretation_context_handle (Interpretation_context_handle const&s) -{ - report_to_l_ =0; - if (s.report_to_l_) - up (s.report_to_l_ ); -} - -Interpretation_context_handle* -Interpretation_context_handle::clone () const -{ - Interpretation_context_handle* handle = new Interpretation_context_handle; - handle->report_to_l_ = this->report_to_l_; - return handle; -} - -Interpretation_context_handle::~Interpretation_context_handle () -{ - if (report_to_l_) - down (); -} - void Interpretation_context_handle::up (Translator_group*t) { @@ -57,6 +31,13 @@ Interpretation_context_handle::try_music (Music *m) return report_to_l_->try_music (m); } +Interpretation_context_handle::Interpretation_context_handle (Interpretation_context_handle const&s) +{ + report_to_l_ =0; + if (s.report_to_l_) + up (s.report_to_l_ ); +} + void Interpretation_context_handle::operator = (Interpretation_context_handle const &s) { @@ -80,4 +61,14 @@ Interpretation_context_handle::report_to_l ()const return report_to_l_; } +Interpretation_context_handle::Interpretation_context_handle() +{ + report_to_l_ =0; +} + +Interpretation_context_handle::~Interpretation_context_handle () +{ + if (report_to_l_) + down (); +} diff --git a/lily/local-key-engraver.cc b/lily/local-key-engraver.cc index 07fd651e14..052f3a9234 100644 --- a/lily/local-key-engraver.cc +++ b/lily/local-key-engraver.cc @@ -23,7 +23,13 @@ events. Due to interaction with ties (which don't come together with note heads), this needs to be in a context higher than Tie_engraver. (FIXME). - */ + + FIXME: should not compute vertical positioning of accidentals, but + get them from the noteheads + +*/ + + struct Local_key_engraver : Engraver { Item *key_item_p_; protected: @@ -117,7 +123,15 @@ Local_key_engraver::process_acknowledged () Side_position::add_support (key_item_p_,support_l); } - if (!forget) + /* + We should not record the accidental if it is the first + note and it is tied from the previous measure. + + Checking whether it is tied also works mostly, but will it + always do the correct thing? + + */ + if (!forget && !tie_changes) { /* not really really correct if there are more than one @@ -127,19 +141,6 @@ Local_key_engraver::process_acknowledged () gh_int2scm (n)), gh_int2scm (a)); -#if 0 - /* - TESTME! - */ - if (!tied_l_arr_.find_l (support_l)) - { - local_key_.clear_internal_forceacc (note_l->pitch_); - } - else if (tie_changes) - { - local_key_.set_internal_forceacc (note_l->pitch_); - } -#endif } } diff --git a/lily/molecule.cc b/lily/molecule.cc index 079a829d8a..c0d1b48748 100644 --- a/lily/molecule.cc +++ b/lily/molecule.cc @@ -160,3 +160,9 @@ Molecule::create_scheme () const gh_cons (ly_interval2scm (dim_[X_AXIS]), ly_interval2scm (dim_[Y_AXIS]))); } + +Box +Molecule::extent_box () const +{ + return dim_; +} diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index c5d75d3a9f..3729344c06 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -153,8 +153,6 @@ Multi_measure_rest_engraver::do_pre_move_processing () void Multi_measure_rest_engraver::do_post_move_processing () { - Moment now (now_mom ()); - SCM smp = get_property ("measurePosition"); Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0); diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index bd177cea04..5f86f849c1 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -22,10 +22,16 @@ void Multi_measure_rest::set_interface (Score_element*me) { - me->set_elt_property ("columns", SCM_EOL); + me->set_interface (ly_symbol2scm ("multi-measure-rest-interface")); } -/* +bool +Multi_measure_rest::has_interface (Score_element*me) +{ + return me->has_interface (ly_symbol2scm ("multi-measure-rest-interface")); +} + + /* [TODO] 17 * variable-sized multi-measure rest symbol: |====| ?? */ diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index bae22a94af..b1697e199e 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -37,26 +37,10 @@ #include "part-combine-music.hh" #include "part-combine-music-iterator.hh" #include "request.hh" -#include "simple-music-iterator.hh" +#include "request-iterator.hh" #include "output-property.hh" #include "chord-tremolo-iterator.hh" -Music_iterator::Music_iterator () -{ - first_b_ = true; -} - -Music_iterator::Music_iterator (Music_iterator const& src) -{ - first_b_ = src.first_b_; - handle_ = *src.handle_.clone (); - music_l_ = src.music_l_; -} - -Music_iterator::~Music_iterator() -{ -} - void Music_iterator::do_print() const { @@ -110,6 +94,10 @@ Music_iterator::construct_children() { } +Music_iterator::~Music_iterator() +{ +} + Moment Music_iterator::next_moment() const { @@ -130,26 +118,11 @@ Music_iterator::do_process_and_next (Moment) } bool -Music_iterator::ok () const +Music_iterator::ok() const { return first_b_; } -Music* -Music_iterator::get_music () -{ - if (ok ()) - return music_l_; - return 0; -} - -bool -Music_iterator::next () -{ - first_b_ = false; - return ok (); -} - Music_iterator* Music_iterator::static_get_iterator_p (Music *m) { @@ -229,6 +202,11 @@ Music_iterator::get_iterator_p (Music *m) const return p; } +Music_iterator::Music_iterator() +{ + first_b_ = true; +} + Music_iterator* Music_iterator::try_music (Music *m) const { diff --git a/lily/music-wrapper-iterator.cc b/lily/music-wrapper-iterator.cc index 396e9c4657..af658cf72a 100644 --- a/lily/music-wrapper-iterator.cc +++ b/lily/music-wrapper-iterator.cc @@ -16,16 +16,7 @@ Music_wrapper_iterator::Music_wrapper_iterator () child_iter_p_ =0; } -Music_wrapper_iterator::Music_wrapper_iterator (Music_wrapper_iterator const &src) - : Music_iterator (src) -{ - child_iter_p_ = src.child_iter_p_->clone (); -} -Music_wrapper_iterator::~Music_wrapper_iterator () -{ - delete child_iter_p_; -} void Music_wrapper_iterator::do_print () const @@ -40,6 +31,12 @@ Music_wrapper_iterator::construct_children () get_iterator_p (dynamic_cast (music_l_)->element ()); } +Music_wrapper_iterator::~Music_wrapper_iterator () +{ + delete child_iter_p_; +} + + bool Music_wrapper_iterator::ok () const { @@ -53,17 +50,6 @@ Music_wrapper_iterator::do_process_and_next (Moment m) Music_iterator::do_process_and_next (m); } -Music* -Music_wrapper_iterator::get_music () -{ - return child_iter_p_->get_music (); -} - -bool -Music_wrapper_iterator::next () -{ - return child_iter_p_->next (); -} Moment Music_wrapper_iterator::next_moment () const diff --git a/lily/note-head.cc b/lily/note-head.cc index 71c7889a95..b0b97cb9a7 100644 --- a/lily/note-head.cc +++ b/lily/note-head.cc @@ -68,9 +68,8 @@ Note_head::brew_molecule (SCM smob) SCM style = me->get_elt_property ("style"); if (!gh_symbol_p (style)) { - style = ly_symbol2scm("default"); + return SCM_EOL; } - // ugh: use gh_call () Molecule out = me->lookup_l()->afm_find (String ("noteheads-") + diff --git a/lily/part-combine-music-iterator.cc b/lily/part-combine-music-iterator.cc index b5c3780961..3a72a587a9 100644 --- a/lily/part-combine-music-iterator.cc +++ b/lily/part-combine-music-iterator.cc @@ -10,11 +10,13 @@ #include "part-combine-music-iterator.hh" #include "translator-group.hh" #include "musical-request.hh" -#include "music-sequence.hh" #include "warn.hh" Part_combine_music_iterator::Part_combine_music_iterator () { + combined_b_ = true; + + now_ = 0; first_iter_p_ = 0; second_iter_p_ = 0; first_until_ = 0; @@ -115,118 +117,110 @@ Part_combine_music_iterator::change_to (Music_iterator *it, String to_type, error (_f ("none of these in my family: `%s'", to_id.ch_C ())); } +Pitch_interrogate_req* first_spanish_inquisition; // nobody expects it +Pitch_interrogate_req* second_spanish_inquisition; // won't strike twice + +Rhythm_interrogate_req* first_rhythmic_inquisition; +Rhythm_interrogate_req* second_rhythmic_inquisition; + void Part_combine_music_iterator::do_process_and_next (Moment m) { Part_combine_music const * p = dynamic_cast (music_l_); - Moment now = next_moment (); + now_ = next_moment (); - Array first_pitches; - Array first_durations; + /* + Hmm, shouldn't we check per iterator if next_moment < m? + */ if (first_iter_p_->ok ()) - { - Music_iterator* i = first_iter_p_->clone (); - Moment until = i->next_moment (); - - /* Urg, silly first_b_ stuff */ - if (now && i->next ()) - until = i->next_moment (); - - /* How about a 'now_moment ()' for iterators? */ - for (; i->ok () && i->next_moment () == until; i->next ()) - { - if (Music_sequence* m = dynamic_cast (i->get_music ())) - { - for (SCM s = m->music_list (); gh_pair_p (s); s = gh_cdr (s)) - { - Music *u = unsmob_music (gh_car (s)); - if (Melodic_req *r = dynamic_cast (u)) - first_pitches.push (r->pitch_); - if (Rhythmic_req *r = dynamic_cast (u)) - first_durations.push (r->duration_); - } - } - } - } - - Array second_pitches; - Array second_durations; + first_iter_p_->process_and_next (m); + if (second_iter_p_->ok ()) - { - Music_iterator* i = second_iter_p_->clone (); - Moment until = i->next_moment (); - - /* Urg, silly second_b_ stuff */ - if (now && i->next ()) - until = i->next_moment (); - - /* How about a 'now_moment ()' for iterators? */ - for (; i->ok () && i->next_moment () == until; i->next ()) - { - if (Music_sequence* m = dynamic_cast (i->get_music ())) - { - for (SCM s = m->music_list (); gh_pair_p (s); s = gh_cdr (s)) - { - Music *u = unsmob_music (gh_car (s)); - if (Melodic_req *r = dynamic_cast (u)) - second_pitches.push (r->pitch_); - if (Rhythmic_req *r = dynamic_cast (u)) - second_durations.push (r->duration_); - } - } - } - } + second_iter_p_->process_and_next (m); + + Music_iterator::do_process_and_next (m); + + /* + TODO: + + * Maybe we need a Skip_engraver? + + (check): can this all be handled now? + + Maybe different modes exist? + + * Wind instruments (Flute I/II) + * Hymnals: + + + Rules for Hymnals/SATB (John Henckel ): + + 1. if S and A differ by less than a third, the stems should be up/down. + 2. else if S and A have different values, the stems should be up/down. + 3. else if A sings "la" or higher, both S and A stems should be down. + 4. else both stems should be up + + * This may get really tricky: combining voices/staffs: string instruments + + */ + + if (!first_spanish_inquisition) + first_spanish_inquisition = new Pitch_interrogate_req; + first_iter_p_->try_music (first_spanish_inquisition); + if (!second_spanish_inquisition) + second_spanish_inquisition = new Pitch_interrogate_req; + second_iter_p_->try_music (second_spanish_inquisition); + + Array* first_pitches = &first_spanish_inquisition->pitch_arr_; + Array* second_pitches = &second_spanish_inquisition->pitch_arr_; + + if (!first_rhythmic_inquisition) + first_rhythmic_inquisition = new Rhythm_interrogate_req; + first_iter_p_->try_music (first_rhythmic_inquisition); + + if (!second_rhythmic_inquisition) + second_rhythmic_inquisition = new Rhythm_interrogate_req; + second_iter_p_->try_music (second_rhythmic_inquisition); + + Array* first_durations = &first_rhythmic_inquisition->duration_arr_; + Array* second_durations = &second_rhythmic_inquisition->duration_arr_; + SCM interval = SCM_BOOL_F; - if (first_pitches.size () && second_pitches.size ()) + if (first_pitches->size () && second_pitches->size ()) { - first_pitches.sort (Musical_pitch::compare); - second_pitches.sort (Musical_pitch::compare); - interval = gh_int2scm (first_pitches.top ().steps () - - second_pitches[0].steps ()); + first_pitches->sort (Musical_pitch::compare); + second_pitches->sort (Musical_pitch::compare); + interval = gh_int2scm (first_pitches->top ().steps () + - (*second_pitches)[0].steps ()); } - if (first_durations.size ()) + if (first_durations->size ()) { - first_durations.sort (Duration::compare); - Moment new_until = now + first_durations.top ().length_mom (); + first_durations->sort (Duration::compare); + Moment new_until = now_ + first_durations->top ().length_mom (); if (new_until > first_until_) first_until_ = new_until; } - if (second_durations.size ()) + if (second_durations->size ()) { - second_durations.sort (Duration::compare); - Moment new_until = now + second_durations.top ().length_mom (); + second_durations->sort (Duration::compare); + Moment new_until = now_ + second_durations->top ().length_mom (); if (new_until > second_until_) second_until_ = new_until; } -#if 0 /* DEBUG */ - printf ("now: %s\n", now.str ().ch_C ()); - printf ("first: "); - for (int i = 0; i < first_pitches.size (); i++) - { - printf ("%s, ", first_pitches[i].str ().ch_C ()); - } - printf ("\nsecond: "); - for (int i = 0; i < second_pitches.size (); i++) - { - printf ("%s, ", second_pitches[i].str ().ch_C ()); - } - printf ("\n"); -#endif - Translator_group * fir = first_iter_p_->report_to_l (); Translator_group * sir = second_iter_p_->report_to_l (); - bool solo_b = (first_pitches.empty () != second_pitches.empty ()) - && !(first_until_ > now && second_until_ > now); + bool solo_b = (first_pitches->empty () != second_pitches->empty ()) + && !(first_until_ > now_ && second_until_ > now_); - bool unirhythm_b = !solo_b && !compare (&first_durations, &second_durations); - bool unison_b = unirhythm_b && !first_pitches.empty () - &&!compare (&first_pitches, &second_pitches); - bool unisilence_b = unirhythm_b && first_pitches.empty (); + bool unirhythm_b = !solo_b && !compare (first_durations, second_durations); + bool unison_b = unirhythm_b && !first_pitches->empty () + &&!compare (first_pitches, second_pitches); + bool unisilence_b = unirhythm_b && first_pitches->empty (); Translator_group * fd = fir->find_create_translator_l (p->what_str_, "one"); Translator_group * sd = sir->find_create_translator_l (p->what_str_, "two"); @@ -244,23 +238,28 @@ Part_combine_music_iterator::do_process_and_next (Moment m) split_interval_b = true; } - bool combined_b = first_iter_p_->report_to_l ()->daddy_trans_l_ - == second_iter_p_->report_to_l ()->daddy_trans_l_; + /* + Hmm, maybe we should set/check combined_b_ against - String to_id = combined_b ? "one" : "two"; - if ((!unirhythm_b && combined_b) - || (split_interval_b && combined_b) - || (solo_b && combined_b) - /*|| (unisilence_b && combined_b) */ + first_iter_p_->report_to_l () == second_iter_p_->report_to_l () + + ? + */ + + String to_id = combined_b_ ? "one" : "two"; + if ((!unirhythm_b && combined_b_) + || (split_interval_b && combined_b_) + || (solo_b && combined_b_) + /*|| (unisilence_b && combined_b_) */ || ((unirhythm_b || unison_b || unisilence_b) - && !combined_b && !split_interval_b && !solo_b)) + && !combined_b_ && !split_interval_b && !solo_b)) { - combined_b = !combined_b; - to_id = combined_b ? "one" : "two"; + combined_b_ = !combined_b_; + to_id = combined_b_ ? "one" : "two"; change_to (second_iter_p_, p->what_str_, to_id); } - if (!combined_b) + if (!combined_b_) sir = second_iter_p_->report_to_l (); SCM b = unirhythm_b ? SCM_BOOL_T : SCM_BOOL_F; @@ -280,28 +279,22 @@ Part_combine_music_iterator::do_process_and_next (Moment m) sd->set_property ("unison", b); b = solo_b ? SCM_BOOL_T : SCM_BOOL_F; - if (first_pitches.size ()) + if (first_pitches->size ()) { fd->set_property ("solo", b); sd->set_property ("solo", SCM_BOOL_F); } - if (second_pitches.size ()) + if (second_pitches->size ()) { fd->set_property ("solo", SCM_BOOL_F); sd->set_property ("solo", b); } - /* - Hmm, shouldn't we check per iterator if next_moment < m? - */ - if (first_iter_p_->ok ()) - first_iter_p_->process_and_next (m); - - if (second_iter_p_->ok ()) - second_iter_p_->process_and_next (m); - - Music_iterator::do_process_and_next (m); + first_pitches->clear (); + second_pitches->clear (); + first_durations->clear (); + second_durations->clear (); } Music_iterator* diff --git a/lily/pitch-squash-engraver.cc b/lily/pitch-squash-engraver.cc index 027e73f37e..543ca89594 100644 --- a/lily/pitch-squash-engraver.cc +++ b/lily/pitch-squash-engraver.cc @@ -14,9 +14,10 @@ void Pitch_squash_engraver::acknowledge_element (Score_element_info i) { + SCM newpos = get_property ("squashedPosition"); if (Note_head::has_interface (i.elem_l_)) { - Staff_symbol_referencer::set_position (i.elem_l_,0); + i.elem_l_->set_elt_property ("staff-position", newpos); } } diff --git a/lily/request-chord-iterator.cc b/lily/request-chord-iterator.cc index f7ae404b92..7f0b00827f 100644 --- a/lily/request-chord-iterator.cc +++ b/lily/request-chord-iterator.cc @@ -12,17 +12,7 @@ #include "music-list.hh" #include "request.hh" -Request_chord_iterator::Request_chord_iterator () -{ - last_b_ = false; -} -Request_chord_iterator::Request_chord_iterator (Request_chord_iterator const &src) - : Music_iterator (src) -{ - last_b_ = src.last_b_; - elt_length_mom_ = src.elt_length_mom_; -} void Request_chord_iterator::construct_children() @@ -37,6 +27,12 @@ Request_chord_iterator::elt_l () const return (Request_chord*) music_l_; } +Request_chord_iterator::Request_chord_iterator () +{ + last_b_ = false; +} + + bool Request_chord_iterator::ok() const { @@ -61,27 +57,12 @@ Request_chord_iterator::do_print() const #endif } -bool -Request_chord_iterator::next () -{ - if (first_b_) - first_b_ = false; - else - last_b_ = true; - return ok (); -} - void Request_chord_iterator::do_process_and_next (Moment mom) { -#if 0 - // URG - //if (first_b_) -#else - if (ok ()) -#endif + if (first_b_) { - for (SCM s = dynamic_cast (get_music ())->music_list (); gh_pair_p (s); s = gh_cdr (s)) + for (SCM s = dynamic_cast (music_l_)->music_list (); gh_pair_p (s); s = gh_cdr (s)) { Music *mus = unsmob_music (gh_car (s)); if (Request * req_l = dynamic_cast (mus)) @@ -94,12 +75,9 @@ Request_chord_iterator::do_process_and_next (Moment mom) mus->origin ()->warning (_f ("Huh? Not a Request: `%s'", classname (mus))); } + first_b_ = false; } - next (); -#if 0 - // URG if (mom >= elt_length_mom_) last_b_ = true; -#endif } diff --git a/lily/request-iterator.cc b/lily/request-iterator.cc index e69de29bb2..51c7604281 100644 --- a/lily/request-iterator.cc +++ b/lily/request-iterator.cc @@ -0,0 +1,25 @@ +/* + request-iterator.cc -- implement Simple_music_iterator + + source file of the GNU LilyPond music typesetter + + (c) 2000 Han-Wen Nienhuys + + */ +#include "request-iterator.hh" +#include "music.hh" +#include "input.hh" + +void +Simple_music_iterator::do_process_and_next (Moment m) +{ + if (first_b_) + { + bool g= try_music (music_l_); + if (!g) + music_l_->origin ()->warning (_f ("Junking music: `%s'", classname(music_l_))); + + first_b_ = false; + } + Music_iterator::do_process_and_next (m); +} diff --git a/lily/rest-collision.cc b/lily/rest-collision.cc index 6429df3684..f5605bc667 100644 --- a/lily/rest-collision.cc +++ b/lily/rest-collision.cc @@ -218,6 +218,5 @@ Rest_collision::set_interface (Score_element*me) { me->set_extent_callback (0, X_AXIS); me->set_extent_callback (0, Y_AXIS); - me->set_elt_property ("elements", SCM_EOL); } diff --git a/lily/score-element.cc b/lily/score-element.cc index 06a9cf70fc..2e75fd9a0e 100644 --- a/lily/score-element.cc +++ b/lily/score-element.cc @@ -59,10 +59,6 @@ Score_element::Score_element(SCM basicprops) mutable_property_alist_ = SCM_EOL; smobify_self (); - set_elt_property ("dependencies", SCM_EOL); - - if (get_elt_property ("interfaces") == SCM_UNDEFINED) - set_elt_property ("interfaces", SCM_EOL); } @@ -257,7 +253,7 @@ Score_element::get_molecule () const if (gh_procedure_p (proc)) mol = gh_apply (proc, gh_list (this->self_scm (), SCM_UNDEFINED)); - + SCM origin =get_elt_property ("origin"); if (!unsmob_input (origin)) origin =ly_symbol2scm ("no-origin"); @@ -268,8 +264,17 @@ Score_element::get_molecule () const mol = gh_cons (gh_list (origin, gh_car (mol), SCM_UNDEFINED), gh_cdr (mol)); } - - return create_molecule (mol); + + Molecule m (create_molecule (mol)); + + /* + This is almost the same as setting molecule-callback to #f, but + this retains the dimensions of this element, which means that you + can erase elements individually. */ + if (to_boolean (get_elt_property ("transparent"))) + m = Molecule (m.extent_box (), SCM_EOL); + + return m; } diff --git a/lily/script-column-engraver.cc b/lily/script-column-engraver.cc index 23df7b72af..0a30bea249 100644 --- a/lily/script-column-engraver.cc +++ b/lily/script-column-engraver.cc @@ -54,13 +54,12 @@ Script_column_engraver::do_post_move_processing () } void -Script_column_engraver::acknowledge_element( Score_element_info inf) +Script_column_engraver::acknowledge_element(Score_element_info inf) { - if (Side_position::has_interface (inf.elem_l_)) // ugh FIXME + Item *thing = dynamic_cast (inf.elem_l_); + if (thing && Side_position::has_interface (inf.elem_l_)) // ugh FIXME { - Item *thing = dynamic_cast (inf.elem_l_); - if (thing - && !Item::breakable_b (thing) + if (!Item::breakable_b (thing) && Side_position::get_axis (inf.elem_l_) == Y_AXIS) { script_l_arr_.push (thing); @@ -74,7 +73,7 @@ Script_column_engraver::process_acknowledged () if (!scol_p_ && script_l_arr_.size () > 1) { scol_p_ = new Item (get_property ("basicScriptColumnProperties")); - scol_p_->set_elt_property ("scripts", SCM_EOL); + announce_element (scol_p_, 0); } diff --git a/lily/script-column.cc b/lily/script-column.cc index 15b2eb58e9..51055a3a9a 100644 --- a/lily/script-column.cc +++ b/lily/script-column.cc @@ -1,5 +1,5 @@ /* - g-script-column.cc -- implement Script_column + script-column.cc -- implement Script_column source file of the GNU LilyPond music typesetter diff --git a/lily/separation-item.cc b/lily/separation-item.cc index d740483ac8..a50bea8d4f 100644 --- a/lily/separation-item.cc +++ b/lily/separation-item.cc @@ -15,7 +15,6 @@ void Separation_item::set_interface (Score_element*s) { - s->set_elt_property ("elements", SCM_EOL); s->set_extent_callback (0, X_AXIS); s->set_extent_callback (0, Y_AXIS); } diff --git a/lily/sequential-music-iterator.cc b/lily/sequential-music-iterator.cc index 8ba2fa20db..d99381cf54 100644 --- a/lily/sequential-music-iterator.cc +++ b/lily/sequential-music-iterator.cc @@ -12,31 +12,6 @@ #include "music-list.hh" #include "request-chord-iterator.hh" -Sequential_music_iterator::Sequential_music_iterator () -{ - cursor_ = 0; - here_mom_ = 0; - iter_p_ =0; -} - -Sequential_music_iterator::Sequential_music_iterator (Sequential_music_iterator const &src) - : Music_iterator (src) -{ - cursor_ = src.cursor_; - here_mom_ = src.here_mom_; - iter_p_ = src.iter_p_->clone (); -} - -Sequential_music_iterator::~Sequential_music_iterator() -{ - if (iter_p_) - { - if (iter_p_->ok ()) - music_l_->origin ()->warning (_ ("Must stop before this music ends")); - delete iter_p_; - iter_p_ = 0; - } -} void Sequential_music_iterator::do_print() const @@ -45,6 +20,13 @@ Sequential_music_iterator::do_print() const iter_p_->print(); } +Sequential_music_iterator::Sequential_music_iterator () +{ + cursor_ = 0; + here_mom_ = 0; + iter_p_ =0; +} + void Sequential_music_iterator::construct_children() { @@ -93,68 +75,50 @@ Sequential_music_iterator::set_sequential_music_translator() set_translator (child_report); } -Music* -Sequential_music_iterator::get_music () -{ - if (ok ()) - return unsmob_music (gh_car (cursor_)); - - return 0; -} - -bool -Sequential_music_iterator::next () +Sequential_music_iterator::~Sequential_music_iterator() { - if (ok ()) + if (iter_p_) { - bool b = false; if (iter_p_->ok ()) - b = iter_p_->next (); - if (!b) - { - set_sequential_music_translator (); - leave_element (); - if (gh_pair_p (cursor_)) - start_next_element (); - b = ok (); - } - return b; + music_l_->origin ()->warning (_ ("Must stop before this music ends")); + delete iter_p_; + iter_p_ = 0; } - return false; } -/* - This should use get_music () and next () - */ void Sequential_music_iterator::do_process_and_next (Moment until) { - if (ok ()) + if (!iter_p_) + return; + + while (1) { - while (1) + Moment local_until = until - here_mom_; + while (iter_p_->ok()) + { + Moment here = iter_p_->next_moment(); + if (here != local_until) + goto loopexit; + + iter_p_->process_and_next (local_until); + } + + if (!iter_p_->ok()) { - Moment local_until = until - here_mom_; - while (iter_p_->ok ()) - { - Moment here = iter_p_->next_moment (); - if (here != local_until) - return Music_iterator::do_process_and_next (until); - - iter_p_->process_and_next (local_until); - } + set_sequential_music_translator(); + leave_element(); - if (!iter_p_->ok ()) - { - set_sequential_music_translator (); - leave_element (); - - if (gh_pair_p (cursor_)) - start_next_element (); - else - return Music_iterator::do_process_and_next (until); - } + if (gh_pair_p (cursor_)) + start_next_element(); + else + goto loopexit; } } + +loopexit: + + Music_iterator::do_process_and_next (until); } Moment diff --git a/lily/side-position-interface.cc b/lily/side-position-interface.cc index de2d398b70..e82bf70465 100644 --- a/lily/side-position-interface.cc +++ b/lily/side-position-interface.cc @@ -219,11 +219,6 @@ Side_position::add_staff_support (Score_element*me) void Side_position::set_axis (Score_element*me, Axis a) { - /* - // prop transparent ? - if (me->get_elt_property ("side-support-elements") == SCM_UNDEFINED) - me->set_elt_property ("side-support-elements" ,SCM_EOL); - */ if (!me->has_offset_callback_b (aligned_side, a)) me->add_offset_callback (aligned_side, a); } @@ -263,14 +258,14 @@ Side_position::set_padding (Score_element*me, Real p) bool Side_position::has_interface (Score_element*me) { - return me->get_elt_property ("side-support-elements") != SCM_EOL; + return me->has_interface (ly_symbol2scm ("side-position-interface")); } bool Side_position::supported_b (Score_element*me) { SCM s = me->get_elt_property ("side-support-elements"); - return s != SCM_UNDEFINED && s != SCM_EOL; + return gh_pair_p(s); } diff --git a/lily/simple-music-iterator.cc b/lily/simple-music-iterator.cc deleted file mode 100644 index d19d615a22..0000000000 --- a/lily/simple-music-iterator.cc +++ /dev/null @@ -1,36 +0,0 @@ -/* - simple-music-iterator.cc -- implement Simple_music_iterator - - source file of the GNU LilyPond music typesetter - - (c) 2000 Han-Wen Nienhuys - - */ - -#include "simple-music-iterator.hh" -#include "music.hh" -#include "input.hh" - -Simple_music_iterator::Simple_music_iterator () - : Music_iterator () -{ -} - -Simple_music_iterator::Simple_music_iterator (Simple_music_iterator const &src) - : Music_iterator (src) -{ -} - -void -Simple_music_iterator::do_process_and_next (Moment m) -{ - if (ok ()) - { - bool b = try_music (get_music ()); - if (!b) - music_l_->origin ()->warning (_f ("Junking music: `%s'", - classname (music_l_))); - - } - Music_iterator::do_process_and_next (m); -} diff --git a/lily/spaceable-element.cc b/lily/spaceable-element.cc index b11f984218..37cac89a5e 100644 --- a/lily/spaceable-element.cc +++ b/lily/spaceable-element.cc @@ -78,7 +78,4 @@ Spaceable_element::remove_interface (Score_element*me) void Spaceable_element::set_interface (Score_element*me) { - me->set_elt_property ("minimum-distances", SCM_EOL); - me->set_elt_property ("ideal-distances", SCM_EOL); - me->set_elt_property ("dir-list",SCM_EOL) ; } diff --git a/lily/stem-tremolo.cc b/lily/stem-tremolo.cc index e52df9fd05..e2cd5c6b2c 100644 --- a/lily/stem-tremolo.cc +++ b/lily/stem-tremolo.cc @@ -25,7 +25,6 @@ void Stem_tremolo::set_interface (Score_element *me) { -me->set_elt_property ("stem", SCM_EOL); } diff --git a/lily/text-engraver.cc b/lily/text-engraver.cc index b634bf70e6..4d72b074db 100644 --- a/lily/text-engraver.cc +++ b/lily/text-engraver.cc @@ -13,7 +13,7 @@ #include "item.hh" #include "musical-request.hh" #include "stem.hh" -#include "note-head.hh" +#include "rhythmic-head.hh" /** typeset directions that are plain text. @@ -48,7 +48,7 @@ Text_engraver::do_try_music (Music *m) void Text_engraver::acknowledge_element (Score_element_info inf) { - if (Note_head::has_interface (inf.elem_l_)) + if (Rhythmic_head::has_interface (inf.elem_l_)) { for (int i=0; i < texts_.size (); i++) { diff --git a/lily/translator-def.cc b/lily/translator-def.cc index 558d0786a2..83ae6ac045 100644 --- a/lily/translator-def.cc +++ b/lily/translator-def.cc @@ -82,7 +82,7 @@ void Translator_def::set_acceptor (SCM name, bool add) { if (add) - this->accepts_name_list_ = gh_append2 (this->accepts_name_list_, gh_cons (name, SCM_EOL)); + this->accepts_name_list_ = gh_cons (name, this->accepts_name_list_); else this->accepts_name_list_ = scm_delete_x (name, this->accepts_name_list_); } @@ -136,14 +136,14 @@ void Translator_def::add_push_property (SCM props, SCM syms, SCM vals) { this->property_ops_ = gh_cons (gh_list (push_sym, props, syms, vals, SCM_UNDEFINED), - this->property_ops_); + this->property_ops_); } void Translator_def::add_pop_property (SCM props, SCM syms) { this->property_ops_ = gh_cons (gh_list (push_sym, props, syms, SCM_UNDEFINED), - this->property_ops_); + this->property_ops_); } /* @@ -175,7 +175,6 @@ Translator_def::path_to_acceptable_translator (SCM type_str, Music_output_def* o accepted_arr.push (t); } - Link_array best_result; for (int i=0; i < accepted_arr.size (); i++) if (scm_equal_p (accepted_arr[i]->type_name_, type_str) == SCM_BOOL_T) @@ -240,6 +239,19 @@ Translator_def::instantiate (Music_output_def* md) tg->output_def_l_ = md; tg->definition_ = self_scm (); tg->type_str_ = ly_scm2string (type_name_); + SCM l1 = trans_list (consists_name_list_, tg); + SCM l2 =trans_list (end_consists_name_list_,tg); + l1 = scm_reverse_x (l1, l2); + + tg->simple_trans_list_ = l1; + + return tg; +} + + +void +Translator_def::apply_property_operations (Translator_group*tg) +{ SCM correct_order = scm_reverse (property_ops_); // pity of the mem. for (SCM s = correct_order; gh_pair_p (s); s = gh_cdr (s)) { @@ -259,14 +271,6 @@ Translator_def::instantiate (Music_output_def* md) tg->set_property (gh_car(entry), gh_cadr (entry)); } } - - SCM l1 = trans_list (consists_name_list_, tg); - SCM l2 =trans_list (end_consists_name_list_,tg); - l1 = scm_reverse_x (l1, l2); - - tg->simple_trans_list_ = l1; - - return tg; } SCM @@ -290,3 +294,13 @@ Translator_def::add_property_assign (SCM nm, SCM val) this->property_ops_); } +/* + Default child context as a SCM string, or something else if there is + none. +*/ +SCM +Translator_def::default_child_context_name () +{ + SCM d = accepts_name_list_; + return gh_pair_p (d) ? gh_car (scm_last_pair (d)) : SCM_EOL; +} diff --git a/lily/translator-group.cc b/lily/translator-group.cc index 94905795cf..19b54bb2aa 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -33,8 +33,7 @@ Translator_group::properties_dict () const Translator_group::~Translator_group () { - - //assert (removable_b()); + assert (removable_b()); } @@ -228,7 +227,8 @@ Translator_group::get_simple_translator (String type) const bool Translator_group::is_bottom_translator_b () const { - return unsmob_translator_def (definition_)->accepts_name_list_ == SCM_EOL; + return !gh_string_p (unsmob_translator_def (definition_)->default_child_context_name ()); + } Translator_group* @@ -236,8 +236,8 @@ Translator_group::get_default_interpreter() { if (!is_bottom_translator_b ()) { - SCM nm = unsmob_translator_def (definition_)->accepts_name_list_; - SCM st = output_def_l ()->find_translator_l (gh_car (nm)); + SCM nm = unsmob_translator_def (definition_)->default_child_context_name (); + SCM st = output_def_l ()->find_translator_l (nm); Translator_def *t = unsmob_translator_def (st); if (!t) @@ -281,6 +281,7 @@ Translator_group::do_print() const void Translator_group::do_add_processing () { + unsmob_translator_def (definition_)->apply_property_operations (this); for (SCM s = simple_trans_list_; gh_pair_p (s) ; s = gh_cdr (s)) { Translator * t = unsmob_translator (gh_car (s)); diff --git a/lily/tuplet-spanner.cc b/lily/tuplet-spanner.cc index a74e155f0f..4600df3e2d 100644 --- a/lily/tuplet-spanner.cc +++ b/lily/tuplet-spanner.cc @@ -27,8 +27,6 @@ void Tuplet_spanner::set_interface (Score_element*me) { - me-> set_elt_property ("beams", SCM_EOL); - me->set_elt_property ("columns", SCM_EOL); } /* diff --git a/lily/volta-spanner.cc b/lily/volta-spanner.cc index 7e73842989..c2d6c7511b 100644 --- a/lily/volta-spanner.cc +++ b/lily/volta-spanner.cc @@ -22,7 +22,6 @@ void Volta_spanner::set_interface (Score_element*me) { - me->set_elt_property ("bars", SCM_EOL); Side_position::set_axis (me, Y_AXIS); Directional_element_interface::set (me, UP); } diff --git a/ly/engraver.ly b/ly/engraver.ly index c34e936bcb..5ba0d7f4f6 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -533,7 +533,7 @@ ScoreContext = \translator { ) basicDynamicLineSpannerProperties = #`( - (interfaces . (dynamic-interface axis-group-interface)) + (interfaces . (dynamic-interface axis-group-interface side-position-interface)) (axes . ( 1)) (padding . 3) (minimum-space . 6) @@ -606,7 +606,7 @@ ScoreContext = \translator { (name . "lyric syllable") ) basicMarkProperties = #`( - (interfaces . (mark-interface)) + (interfaces . (mark-interface side-position-interface)) (molecule-callback . ,Text_item::brew_molecule) (breakable . #t) (visibility-lambda . ,end-of-line-invisible) @@ -626,6 +626,7 @@ ScoreContext = \translator { ) basicNoteHeadProperties = #`( (interfaces . (note-head-interface rhythmic-head-interface)) + (style . default) (molecule-callback . ,Note_head::brew_molecule) (name . "note head") ) @@ -661,7 +662,7 @@ ScoreContext = \translator { ) basicScriptProperties = #`( (molecule-callback . ,Script::brew_molecule) - (interfaces . (script-interface)) + (interfaces . (script-interface side-position-interface)) (name . "script") ) basicScriptColumnProperties = #`( @@ -734,7 +735,7 @@ ScoreContext = \translator { basicTextScriptProperties = #`( (molecule-callback . ,Text_item::brew_molecule) (no-spacing-rods . #t) - (interfaces . (text-script-interface text-item-interface)) + (interfaces . (text-script-interface text-item-interface side-position-interface)) (padding . 3.0) (name . "text script") ) @@ -800,7 +801,7 @@ ScoreContext = \translator { (name . "separation spanner") ) basicSustainPedalProperties = #`( - (interfaces . (sustain-pedal-interface)) + (interfaces . (sustain-pedal-interface side-position-interface)) (no-spacing-rods . #t) (molecule-callback . ,Sustain_pedal::brew_molecule) (self-alignment-X . 0) @@ -813,7 +814,7 @@ ScoreContext = \translator { (self-alignment-X . 0) (name . "una chorda pedal") ) - + basicVoltaSpannerProperties = #`( (molecule-callback . ,Volta_spanner::brew_molecule) (interfaces . (volta-spanner-interface side-position-interface)) diff --git a/ly/legal.ly b/ly/legal.ly new file mode 100644 index 0000000000..8ec3c9aaaa --- /dev/null +++ b/ly/legal.ly @@ -0,0 +1,4 @@ +% legal.ly + +hsize = 8.5 \in; +vsize = 14.0 \in; diff --git a/make/lilypond.spec.in b/make/lilypond.spec.in index d41de51303..4b50344d5e 100644 --- a/make/lilypond.spec.in +++ b/make/lilypond.spec.in @@ -15,7 +15,6 @@ LilyPond is a music typesetter. It produces beautiful sheet music using a high level description file as input. LilyPond is part of the GNU Project. - %package documentation Summary: Prebuilt website containing all LilyPond documentation. Group: Applications/Publishing @@ -23,7 +22,6 @@ Group: Applications/Publishing %description documentation - The documentation of LilyPond, both in HTML and PostScript. %prep @@ -91,6 +89,7 @@ fi %doc mudela-mode.el %ifnos cygwin +%{_prefix}/bin/abc2ly %{_prefix}/bin/etf2ly %{_prefix}/bin/musedata2ly %{_prefix}/bin/pmx2ly diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index 3611773a1a..205b71f658 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.3.85 -Entered-date: 08SEP00 +Version: 1.3.86 +Entered-date: 13SEP00 Description: Keywords: music notation typesetting midi fonts engraving Author: hanwen@cs.uu.nl (Han-Wen Nienhuys) janneke@gnu.org (Jan Nieuwenhuizen) Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys) Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert - 1000k lilypond-1.3.85.tar.gz + 1000k lilypond-1.3.86.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.3.85.tar.gz + 1000k lilypond-1.3.86.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index 5dfe670fe5..de47e9b123 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 1.3.85 +Version: 1.3.86 Release: 1 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.85.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.86.tar.gz Summary: A program for printing sheet music. URL: http://www.cs.uu.nl/~hanwen/lilypond # Icon: lilypond-icon.gif @@ -15,7 +15,6 @@ LilyPond is a music typesetter. It produces beautiful sheet music using a high level description file as input. LilyPond is part of the GNU Project. - %package documentation Summary: Prebuilt website containing all LilyPond documentation. Group: Applications/Publishing @@ -23,7 +22,6 @@ Group: Applications/Publishing %description documentation - The documentation of LilyPond, both in HTML and PostScript. %prep @@ -91,6 +89,7 @@ fi %doc mudela-mode.el %ifnos cygwin +%{_prefix}/bin/abc2ly %{_prefix}/bin/etf2ly %{_prefix}/bin/musedata2ly %{_prefix}/bin/pmx2ly diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index 0147f1da29..54e93d7e92 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -1,11 +1,12 @@ #!@PYTHON@ -# TODO: Rewrite this. The control structure is too hairy. -# - # TODO: -# Should use files in /tmp/ only. This potentially messes with +# +# * Rewrite this. The control structure is too hairy. +# * (c) on page 1 +# * more helpful info on lily crashes +# * Should use files in /tmp/ only. This potentially messes with # usergenerated files in the CWD -- 2.39.2