From: Han-Wen Nienhuys Date: Mon, 17 Jul 2000 12:53:44 +0000 (+0200) Subject: release: 1.3.73 X-Git-Tag: release/1.3.73 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=9661ba1fb275f3e14f8a69f2cee2f02a2f893e48;p=lilypond.git release: 1.3.73 ====== * Robustness fix for minimise_least_squares () * cleanups of Slur_bezier_bow, removed Bezier_bow. * cleanup of Tie. Changed Tie into interface. Made ties flatter by default. * changed SCM_UNDEFINED to SCM_UNSPECIFIED for return values that go back into Scheme. * changed SCM_UNSPECIFIED to SCM_EOL for undefined element properties. This makes initializing list properties redundant. * removed idiotic code for including tfm.[1-5] into search path. * fixed problem with tuplet placement for cross staff tuplets. 1.3 --- diff --git a/CHANGES b/CHANGES index 3e075d37a5..d6504f1579 100644 --- a/CHANGES +++ b/CHANGES @@ -1,15 +1,30 @@ ---- ../lilypond-1.3.72.mb1/CHANGES Thu Jul 13 18:50:24 2000 -++ b/CHANGES Fri Jul 14 16:33:48 2000 -@@ -1,3 +1,9 @@ -1.3.72.mb2 -====== * Removed \interscoreline after the last line, prevents some - empty pages. +empty pages. (patch by Mats Bengtsson) + +* Smobified Music, junked associated identifiers. Use Scheme list to +store Music_sequence. Removed const declarations from +Music_iterators. Added a mutable and immutable property list to +Music. Use music property for all Scheme values in Music. Created +and fixed a load of Garbage Collection bugs. + +* Changed number font to allow automatic .mf creation. + +* Output place of definition as \special{src:LOCATION}. See FAQ for +explanation how to use. + +* Schemified Local_key_item and fixed minor bug with accidentals. + +* new Japanese .po file. + +* Bugfix for broken tie direction + +* Bugfix for bar at beginning of line break + +1.3.72 +====== - 1.3.72.mb1 - ====== - * Robustness fix for minimise_least_squares () +* Robustness fix for minimise_least_squares () * cleanups of Slur_bezier_bow, removed Bezier_bow. diff --git a/Documentation/faq.texi b/Documentation/faq.texi index aa35683a34..ae735e482b 100644 --- a/Documentation/faq.texi +++ b/Documentation/faq.texi @@ -2,16 +2,9 @@ @setfilename faq.info @settitle FAQ - GNU LilyPond FAQs -@node Top, , Windows32, (dir) +@node Top, , , (dir) @top @menu -* FAQ - GNU LilyPond FAQs:: FAQ - GNU LilyPond FAQs -@end menu - - - -@node FAQ - GNU LilyPond FAQs, Miscellaneous, , Top -@menu * Miscellaneous:: Miscellaneous * Installing:: Installing * Documentation:: Documentation @@ -26,7 +19,7 @@ @chapter FAQ - GNU LilyPond FAQs -@node Miscellaneous, Installing, FAQ - GNU LilyPond FAQs, FAQ - GNU LilyPond FAQs +@node Miscellaneous, ,,top @section Miscellaneous @subsubsection HELP! I'm stuck! @@ -37,7 +30,7 @@ directly. Note: relative paths are meant to be relative to the source directory -@node Installing, Documentation, Miscellaneous, FAQ - GNU LilyPond FAQs +@node Installing,, ,top @section Installing @@ -88,21 +81,23 @@ Metafont when you run TeX. Check your TeX installation, or ask your local TeX guru. The supplied @file{.afm} files are intended to be used by LilyPond, not by any other programs. -@node Documentation, Language- mudela, Installing, FAQ - GNU LilyPond FAQs +@node Documentation,, ,top @section Documentation @subsubsection What a sober website/manual you have there! -LilyPond development is moving quite fast, documentation will often lag -a bit behind. But don't hesitate to point out inaccuracies. Whip up -your mail reader and write to the mailing list. +LilyPond development is moving fast, so the documentation will often be out +of date. But don't hesitate to point out inaccuracies. Whip up your +mail reader and write to the mailing list. @subsubsection Please take me off your mailing list, I get so much mail! Don't ask Han-wen, don't ask David. Instead, read about @uref{../../index.html#mailing-lists, the mailing lists} here. -@node Language- mudela, Do you support -, Documentation, FAQ - GNU LilyPond FAQs + + +@node Language- mudela,, ,top @section Language: mudela @subsubsection Why do I have to type the accidentals to the note if I @@ -150,7 +145,7 @@ of (x,y) positions and symbols. You can only sensibly do TeX stuff in the symbol string. You can access the symbol string easily for some symbols (notably lyrics and @code{^"text"} commands). -@node Do you support -, How do I -, Language- mudela, FAQ - GNU LilyPond FAQs +@node Do you support -,, ,top @section Do you support ... @subsubsection Do you support pop songs (chords, single staff, lyrics)? @@ -183,7 +178,7 @@ No. Yes. See @file{input/test/grace.ly}. -@node How do I -, Development, Do you support -, FAQ - GNU LilyPond FAQs +@node How do I -,, ,top @section How do I .... @subsubsection How do I change the TeX layout? @@ -324,7 +319,7 @@ will do the trick for you: @end example -@node Development, Running, How do I -, FAQ - GNU LilyPond FAQs +@node Development,, ,top @section Development @subsubsection Could you implement feature XXXX? It is really easy, just extend the syntax to allow YYYY! @@ -398,9 +393,63 @@ end Upgrade/downgrade to 4.17. -@node Running, Copyright, Development, FAQ - GNU LilyPond FAQs +@node Running,, ,top @section Running +@subsubsection Correcting errors is so tedious. Is there a better way? + +As of 1.3.73, lilypond provides support for the xdvi @code{src:} +special. This can be used with Xdvik (22.16 or better) and xdvi (22.28 +or better) to go to the place in the input that corresponds to a symbol +in the output. + +lilypond: + +Decide if you want column positioning, and edit @file{lily.scm} +according to the comments at the function @code{define-origin}. + +emacs: + +Put this in @file{~/.emacs}: +@example +(server-start) +@end example + +For column positioning, apply @uref{this +patch,http://www.cs.uu.nl/~hanwen/software/emacsclient-column} to +@code{emacsclient.c} and @code{server.el}. Stick the compiled +emacsclient into a bin directory, and put @code{server.el} into a elisp +directory (eg. @file{~/usr/share/emacs/}). Add the following to your +@file{.emacs} init file, before invoking server-start. +@example +(setq load-path (cons (concat (getenv "HOME") "/usr/share/emacs") + load-path)) +@end example + +Xdvik: + +Warning: @uref{Xdvik,ftp://ftp.cs.uu.nl/pub/tex-archive/dviware/xdvik/}, +which is shipped with most TeX distributions, doesn't work very well for +src specials. You're better off using plain xdvi. +@example + xdvi -srcmode -srcvisibility output.dvi +@end example + +Click control-mouse button 2 for making emacs jump to the appropriate place. + +For column positioning you must install this @uref{patch, +http://www.cs.uu.nl/~hanwen/software/xdvik-src} to make Xdvik emit +column numbers. Add the command line option @code{-srceditorcommand +"emacsclient --no-wait +%l:%c %f"} + +Xdvi + +@uref{Xdvi,ftp://ftp.math.berkeley.edu/pub/Software/TeX/xdvi.tar.gz} has +better support for src specials. Apply @uref{this patch, +http://www.cs.uu.nl/~hanwen/software/xdvi-src}. When viewing, +control-mousebutton 1 will take you to the correct line/column. + + @subsubsection I use dvilj4, and there are lots of warning messages for the printing You should use dvips and ghostscript to print the @code{dvi} output: the @@ -492,7 +541,7 @@ The MIDI output was originally put in as a proof that MIDI could be done, and as a method of proof"reading" the input. The MIDI support is by no means finished. Patches appreciated. -@node Copyright, Windows32, Running, FAQ - GNU LilyPond FAQs +@node Copyright,, ,top @section Copyright @subsubsection What is Urtext? Critical Edition? @@ -646,7 +695,7 @@ for a summary of copyright relative to old music, also for the expert forum for such subsubsections. -@node Windows32, Top, Copyright, FAQ - GNU LilyPond FAQs +@node Windows32,, ,top @section Windows32 @subsubsection I downloaded the windows32 port, and it doesn't match the website! diff --git a/Documentation/regression-test.tely b/Documentation/regression-test.tely index 9cdf843841..0e745b244f 100644 --- a/Documentation/regression-test.tely +++ b/Documentation/regression-test.tely @@ -287,7 +287,6 @@ between note and accidentals is less than between the notes with the same value. Clef changes also get extra space, but not as much as barlines. - Even if a line is very tightly spaced, there will still be room between prefatory matter and the following notes. The space after the prefatory is very rigid. In contrast, the space before the barline @@ -380,6 +379,9 @@ also created on a clef change. @mudelafile{keys.ly} + + + @ignore @c the input file is too long and does not test for specific bugs diff --git a/VERSION b/VERSION index 5faea6a0dc..a0d0b48def 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 -PATCH_LEVEL=72 -MY_PATCH_LEVEL=mb2 +PATCH_LEVEL=73 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/flower/include/input.hh b/flower/include/input.hh index 44f2bb90da..a9baf330b3 100644 --- a/flower/include/input.hh +++ b/flower/include/input.hh @@ -28,6 +28,13 @@ public: Input spot () const; String location_str () const; String line_number_str () const; + + + String file_str ()const; + int line_number ()const; + int column_number ()const; + + Input (Source_file*, char const*); Input (); }; diff --git a/flower/include/source-file.hh b/flower/include/source-file.hh index 26c0b021f4..f8a3e4a036 100644 --- a/flower/include/source-file.hh +++ b/flower/include/source-file.hh @@ -54,7 +54,7 @@ public: // only used in binary-source-file, currently -protected: +public: Slice line_slice (char const* pos_ch_C) const; String line_str (char const* pos_ch_C) const; int column_i (char const* pos_ch_C) const; diff --git a/flower/input.cc b/flower/input.cc index 7483606ba0..1ec7fb9428 100644 --- a/flower/input.cc +++ b/flower/input.cc @@ -37,11 +37,9 @@ Input::set_spot (Input const &i) } /* - Produce almost GNU-compliant error message. Lily used to be rather - GNU-compliant in this too, but correcting mudela is such a breeze if - you('re edidor) know(s) the error column too (there's no GNU standard - on columns, is there?). - + Produce GNU-compliant error message. Correcting mudela is such a + breeze if you('re edidor) know(s) the error column too + Format: [file:line:column:][warning:]message @@ -114,3 +112,33 @@ Input::line_number_str () const else return "?"; } + +String +Input::file_str () const +{ + if (source_file_l_) + return source_file_l_->name_str (); + else + return ""; +} + + +int +Input::line_number () const +{ + if (source_file_l_) + return source_file_l_->line_i (defined_ch_C_); + else + return 0; + +} + +int +Input::column_number () const +{ + if (source_file_l_) + return source_file_l_->column_i (defined_ch_C_); + else + return 0; + +} diff --git a/input/bugs/repeat-line-break.ly b/input/bugs/repeat-line-break.ly deleted file mode 100644 index 06ff02cd31..0000000000 --- a/input/bugs/repeat-line-break.ly +++ /dev/null @@ -1,10 +0,0 @@ - -\score { -\notes -\context Staff\relative c'' { - \repeat "volta" 2 { c1 \break } \alternative { d e } - c1 - \repeat "volta" 2 { c1 } \alternative { { d \break} e } - -} -} diff --git a/input/minimal.ly b/input/minimal.ly new file mode 100644 index 0000000000..b654a3a666 --- /dev/null +++ b/input/minimal.ly @@ -0,0 +1,9 @@ + + +\score{ \sequential {\clef bass ; } +\paper { \translator { \type Score_engraver ; \name "Score"; } + linewidth =1.5\cm; + +} + +} diff --git a/input/trip.ly b/input/trip.ly index c661e62277..2e0f75403b 100644 --- a/input/trip.ly +++ b/input/trip.ly @@ -52,7 +52,6 @@ praeludiumLeft = \notes \relative c { \context Staff < \context Voice = two { r4 } \context Voice = one { \stemup s4 dis' cis cis ~ | - % BUG -> (insane springs.) \times 4/5 { [cis8 ( cis diff --git a/lily/align-note-column-engraver.cc b/lily/align-note-column-engraver.cc index 05a51c710b..75fb5b94e3 100644 --- a/lily/align-note-column-engraver.cc +++ b/lily/align-note-column-engraver.cc @@ -51,7 +51,7 @@ Align_note_column_engraver::do_creation_processing () Side_position::set_direction (align_item_p_, LEFT); // needed for setting font size. - announce_element (Score_element_info (align_item_p_, 0)); + announce_element (align_item_p_, 0); } void diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index 316cc56f62..2b75352435 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -254,7 +254,7 @@ Auto_beam_engraver::create_beam_p () Beam::add_stem (beam_p,(*stem_l_arr_p_)[i]); } - announce_element (Score_element_info (beam_p, 0)); + announce_element (beam_p, 0); return beam_p; } diff --git a/lily/axis-group-engraver.cc b/lily/axis-group-engraver.cc index 25ed6142d9..ca6f5fb359 100644 --- a/lily/axis-group-engraver.cc +++ b/lily/axis-group-engraver.cc @@ -6,13 +6,33 @@ (c) 1999--2000 Han-Wen Nienhuys */ -#include "axis-group-engraver.hh" #include "spanner.hh" #include "paper-column.hh" #include "axis-group-interface.hh" - +#include "engraver.hh" #include "engraver-group-engraver.hh" +/** + Put stuff in a Spanner with an Axis_group_interface. + Use as last element of a context. + */ +class Axis_group_engraver : public Engraver +{ +protected: + Spanner *staffline_p_; + Link_array elts_; + virtual void do_creation_processing(); + virtual void do_removal_processing(); + virtual void acknowledge_element (Score_element_info); + virtual void process_acknowledged (); + virtual Spanner* get_spanner_p () const; +public: + VIRTUAL_COPY_CONS(Translator); + Axis_group_engraver (); +}; + +ADD_THIS_TRANSLATOR(Axis_group_engraver); + Axis_group_engraver::Axis_group_engraver () { staffline_p_ = 0; @@ -29,7 +49,7 @@ Axis_group_engraver::do_creation_processing () Pointer_group_interface (it, "bounded-by-me").add_element (staffline_p_); staffline_p_->set_bound(LEFT,it); - announce_element (Score_element_info (staffline_p_, 0)); + announce_element (staffline_p_, 0); } Spanner* @@ -91,4 +111,38 @@ Axis_group_engraver::process_acknowledged () elts_.clear (); } -ADD_THIS_TRANSLATOR(Axis_group_engraver); + +//////////////////////////////////////////////////////// + +// maybenot sucsh a good idea after all. + +#include "hara-kiri-group-spanner.hh" +#include "rhythmic-head.hh" + +class Hara_kiri_engraver : public Axis_group_engraver +{ +protected: + virtual Spanner*get_spanner_p ()const; + virtual void acknowledge_element (Score_element_info); +public: + VIRTUAL_COPY_CONS(Translator); +}; + +Spanner* +Hara_kiri_engraver::get_spanner_p () const +{ + Spanner * sp = new Spanner (get_property ("basicHaraKiriVerticalGroupspannerProperties")); + Hara_kiri_group_spanner::set_interface (sp); + return sp; +} + +void +Hara_kiri_engraver::acknowledge_element (Score_element_info i) +{ + Axis_group_engraver::acknowledge_element (i); + if (Rhythmic_head::has_interface (i.elem_l_)) + { + Hara_kiri_group_spanner::add_interesting_item (staffline_p_, i.elem_l_); + } +} +ADD_THIS_TRANSLATOR(Hara_kiri_engraver); diff --git a/lily/axis-group-interface.cc b/lily/axis-group-interface.cc index 83f391c976..943c74a7ba 100644 --- a/lily/axis-group-interface.cc +++ b/lily/axis-group-interface.cc @@ -126,5 +126,4 @@ Axis_group_interface::set_interface (Score_element*me) { me->set_interface (ly_symbol2scm ("axis-group-interface")); } - me->set_elt_property ("elements", SCM_EOL); } diff --git a/lily/bar-engraver.cc b/lily/bar-engraver.cc index 3451841d66..dfa4d906fa 100644 --- a/lily/bar-engraver.cc +++ b/lily/bar-engraver.cc @@ -37,7 +37,7 @@ Bar_engraver::create_bar () bar_p_->set_elt_property ("glyph", default_type); // ugh } - announce_element (Score_element_info (bar_p_, 0)); + announce_element (bar_p_, 0); } } diff --git a/lily/bar-number-engraver.cc b/lily/bar-number-engraver.cc index 5b29f4a19f..facf059ace 100644 --- a/lily/bar-number-engraver.cc +++ b/lily/bar-number-engraver.cc @@ -25,7 +25,6 @@ protected: Protected_scm staffs_; protected: - virtual void do_creation_processing (); virtual void do_pre_move_processing (); virtual void acknowledge_element (Score_element_info); void create_items(); @@ -62,10 +61,6 @@ Bar_number_engraver::Bar_number_engraver () staffs_ = SCM_EOL; } -void -Bar_number_engraver::do_creation_processing () -{ -} @@ -130,6 +125,6 @@ Bar_number_engraver::create_items () } - announce_element (Score_element_info (text_p_, 0)); + announce_element (text_p_, 0); } diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc index 1678dff784..5574830c37 100644 --- a/lily/beam-engraver.cc +++ b/lily/beam-engraver.cc @@ -72,7 +72,7 @@ Beam_engraver::do_try_music (Music *m) if (d == STOP && !beam_p_) { - m->warning (_ ("can't find start of beam")); + m->origin ()->warning (_ ("can't find start of beam")); return false; } reqs_drul_[d ] = c; @@ -88,7 +88,7 @@ Beam_engraver::do_process_music () if (reqs_drul_[STOP]) { if (!beam_p_) - reqs_drul_[STOP]->warning (_("can't find start of beam")); + reqs_drul_[STOP]->origin ()->warning (_("can't find start of beam")); prev_start_req_ =0; finished_beam_p_ = beam_p_; finished_beam_info_p_ = beam_info_p_; @@ -117,7 +117,7 @@ Beam_engraver::do_process_music () { if (beam_p_) { - reqs_drul_[START]->warning (_ ("already have a beam")); + reqs_drul_[START]->origin ()->warning (_ ("already have a beam")); return; } @@ -135,7 +135,7 @@ Beam_engraver::do_process_music () /* urg, must copy to Auto_beam_engraver too */ - announce_element (Score_element_info (beam_p_, reqs_drul_[START])); + announce_element (beam_p_, reqs_drul_[START]); } } @@ -174,7 +174,7 @@ Beam_engraver::do_removal_processing () typeset_beam (); if (beam_p_) { - prev_start_req_->warning (_ ("unterminated beam")); + prev_start_req_->origin ()->warning (_ ("unterminated beam")); finished_beam_p_ = beam_p_; finished_beam_info_p_ = beam_info_p_; typeset_beam (); @@ -209,7 +209,7 @@ Beam_engraver::acknowledge_element (Score_element_info info) { String s = _ ("stem must have Rhythmic structure"); if (info.req_l_) - info.req_l_->warning (s); + info.req_l_->origin ()->warning (s); else ::warning (s); @@ -218,8 +218,8 @@ Beam_engraver::acknowledge_element (Score_element_info info) if (rhythmic_req->duration_.durlog_i_<= 2) { - rhythmic_req->warning (_ ("stem doesn't fit in beam")); - prev_start_req_->warning (_ ("beam was started here")); + rhythmic_req->origin ()->warning (_ ("stem doesn't fit in beam")); + prev_start_req_->origin ()->warning (_ ("beam was started here")); /* don't return, since diff --git a/lily/break-align-engraver.cc b/lily/break-align-engraver.cc index cd8c9a1b81..3ca38f7db7 100644 --- a/lily/break-align-engraver.cc +++ b/lily/break-align-engraver.cc @@ -98,7 +98,7 @@ Break_align_engraver::acknowledge_element (Score_element_info inf) { align_l_ = new Item (get_property ("basicBreakAlignProperties")); Break_align_item::set_interface (align_l_); - announce_element (Score_element_info (align_l_,0)); + announce_element (align_l_,0); SCM edge_sym = ly_symbol2scm ("Left_edge_item"); Item * edge = new Item (get_property ("leftEdgeBasicProperties")); @@ -113,7 +113,7 @@ Break_align_engraver::acknowledge_element (Score_element_info inf) align_l_->set_elt_property ("group-center-element", edge->self_scm_); - announce_element (Score_element_info(edge, 0)); + announce_element (edge, 0); column_alist_ = scm_assoc_set_x (column_alist_, edge_sym, edge->self_scm_); } @@ -135,7 +135,7 @@ Break_align_engraver::acknowledge_element (Score_element_info inf) group->set_elt_property ("break-align-symbol", align_name); group->set_parent (align_l_, Y_AXIS); - announce_element (Score_element_info (group, 0)); + announce_element (group, 0); column_alist_ = scm_assoc_set_x (column_alist_, align_name, group->self_scm_); } Axis_group_interface::add_element (group, item_l); diff --git a/lily/breathing-sign-engraver.cc b/lily/breathing-sign-engraver.cc index 1088b39d33..2a19cdb4ab 100644 --- a/lily/breathing-sign-engraver.cc +++ b/lily/breathing-sign-engraver.cc @@ -18,7 +18,7 @@ TODO: #include "musical-request.hh" #include "command-request.hh" #include "engraver-group-engraver.hh" -#include "local-key-item.hh" +#include "item.hh" #include "engraver.hh" #include "command-request.hh" @@ -67,7 +67,7 @@ Breathing_sign_engraver::do_process_music() Breathing_sign::set_interface (breathing_sign_p_); - announce_element (Score_element_info (breathing_sign_p_, breathing_sign_req_l_)); + announce_element (breathing_sign_p_, breathing_sign_req_l_); } } diff --git a/lily/change-iterator.cc b/lily/change-iterator.cc index f860c69773..08fdc53271 100644 --- a/lily/change-iterator.cc +++ b/lily/change-iterator.cc @@ -28,7 +28,7 @@ Change_iterator::error (String reason) + report_to_l ()->type_str_ + " = `" + report_to_l ()->id_str_ + "': "; warning (warn2); - t->warning (warn1); + t->origin ()->warning (warn1); } /* diff --git a/lily/chord-name-engraver.cc b/lily/chord-name-engraver.cc index 3e82a77350..41a452f76e 100644 --- a/lily/chord-name-engraver.cc +++ b/lily/chord-name-engraver.cc @@ -113,7 +113,7 @@ Chord_name_engraver::do_process_music () if (chord.bass_b_) chord_name_p_->set_elt_property ("bass", chord.bass_pitch_.to_scm ()); - announce_element (Score_element_info (chord_name_p_, 0)); + announce_element (chord_name_p_, 0); } void diff --git a/lily/chord-tremolo-engraver.cc b/lily/chord-tremolo-engraver.cc index 87fdecbce8..63626bd022 100644 --- a/lily/chord-tremolo-engraver.cc +++ b/lily/chord-tremolo-engraver.cc @@ -101,7 +101,7 @@ Chord_tremolo_engraver::do_process_music () SCM smp = get_property ("measurePosition"); Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0); beam_start_location_ = mp; - announce_element (Score_element_info (beam_p_, repeat_)); + announce_element (beam_p_, repeat_); } } @@ -112,7 +112,7 @@ Chord_tremolo_engraver::do_removal_processing () typeset_beam (); if (beam_p_) { - repeat_->warning (_ ("unterminated chord tremolo")); + repeat_->origin ()->warning (_ ("unterminated chord tremolo")); finished_beam_p_ = beam_p_; typeset_beam (); } @@ -171,7 +171,7 @@ Chord_tremolo_engraver::acknowledge_element (Score_element_info info) { String s = _ ("stem must have Rhythmic structure"); if (info.req_l_) - info.req_l_->warning (s); + info.req_l_->origin ()->warning (s); else ::warning (s); } diff --git a/lily/chord-tremolo-iterator.cc b/lily/chord-tremolo-iterator.cc index c74c8be464..1fe1425527 100644 --- a/lily/chord-tremolo-iterator.cc +++ b/lily/chord-tremolo-iterator.cc @@ -12,15 +12,16 @@ this is culled from various other iterators, but sharing code by subclassing proved to be too difficult. */ +#include "input.hh" #include "chord-tremolo-iterator.hh" #include "repeated-music.hh" void Chord_tremolo_iterator::construct_children () { - Repeated_music const* rep = dynamic_cast (music_l_); + Repeated_music * rep = dynamic_cast (music_l_); factor_ = Moment (1, rep->repeats_i_); - child_iter_p_ = get_iterator_p (rep->repeat_body_p_); + child_iter_p_ = get_iterator_p (rep->body ()); } Chord_tremolo_iterator::Chord_tremolo_iterator() @@ -38,7 +39,7 @@ Chord_tremolo_iterator::do_process_and_next (Moment m) if (yeah) set_translator (yeah->report_to_l ()); else - music_l_->warning ( _("no one to print a tremolos")); + music_l_->origin ()->warning ( _("no one to print a tremolos")); } child_iter_p_->process_and_next (factor_ * m); @@ -63,7 +64,7 @@ Chord_tremolo_iterator::~Chord_tremolo_iterator () } Music_iterator* -Chord_tremolo_iterator::try_music_in_children (Music const *m) const +Chord_tremolo_iterator::try_music_in_children (Music *m) const { return child_iter_p_->try_music (m); } diff --git a/lily/clef-engraver.cc b/lily/clef-engraver.cc index b9813a1aa9..5d287e38a8 100644 --- a/lily/clef-engraver.cc +++ b/lily/clef-engraver.cc @@ -164,7 +164,7 @@ Clef_engraver::do_try_music (Music * r_l) { clef_req_l_ = cl; if (!set_type (cl->clef_str_)) - cl->error (_ ("unknown clef type")); + cl->origin ()->warning (_ ("unknown clef type")); return true; } @@ -179,7 +179,7 @@ Clef_engraver::create_clef() if (!clef_p_) { Item *c= new Item ( current_settings_); - announce_element (Score_element_info (c, clef_req_l_)); + announce_element (c, clef_req_l_); Staff_symbol_referencer::set_interface (c); @@ -198,7 +198,7 @@ Clef_engraver::create_clef() g->add_offset_callback (Side_position::centered_on_parent, X_AXIS); g->set_elt_property ("direction", gh_int2scm (octave_dir_)); octavate_p_ = g; - announce_element (Score_element_info (octavate_p_, clef_req_l_)); + announce_element (octavate_p_, clef_req_l_); } } diff --git a/lily/collision-engraver.cc b/lily/collision-engraver.cc index 9b3218de78..fc0d97cc98 100644 --- a/lily/collision-engraver.cc +++ b/lily/collision-engraver.cc @@ -40,7 +40,7 @@ Collision_engraver::process_acknowledged () Axis_group_interface::set_interface (col_p_); Axis_group_interface::set_axes (col_p_, X_AXIS, Y_AXIS); - announce_element (Score_element_info (col_p_,0)); + announce_element (col_p_,0); } for (int i=0; i< note_column_l_arr_.size (); i++) diff --git a/lily/command-request.cc b/lily/command-request.cc index 92143f8a55..bc919f63e7 100644 --- a/lily/command-request.cc +++ b/lily/command-request.cc @@ -105,16 +105,16 @@ bool Key_change_req::do_equal_b (Request const * req) const { Key_change_req const * k = dynamic_cast (req); - return k && scm_equal_p (pitch_alist_, k->pitch_alist_); + return k && scm_equal_p (get_mus_property ("pitch-alist"), k->get_mus_property ("pitch-alist")); } - void Key_change_req::transpose (Musical_pitch p) { SCM newlist = SCM_EOL; - for (SCM s = pitch_alist_; gh_pair_p (s); s = gh_cdr (s)) + SCM pa = get_mus_property ("pitch-alist"); + for (SCM s = pa; gh_pair_p (s); s = gh_cdr (s)) { SCM k = gh_caar (s); @@ -141,7 +141,7 @@ Key_change_req::transpose (Musical_pitch p) } } - pitch_alist_ = newlist; + set_mus_property ("pitch-alist", newlist); } Break_req::Break_req () @@ -149,10 +149,10 @@ Break_req::Break_req () } - bool Mark_req::do_equal_b (Request const * r) const { Mark_req const * other = dynamic_cast (r); - return other && scm_equal_p (other->mark_label_, mark_label_); + return other && scm_equal_p (other->get_mus_property ("mark-label"), + get_mus_property ("mark-label")); } diff --git a/lily/debug.cc b/lily/debug.cc index e3aad9a4aa..44f120101d 100644 --- a/lily/debug.cc +++ b/lily/debug.cc @@ -1,6 +1,6 @@ /* debug.cc -- implement debugging routines - + source file of the GNU LilyPond music typesetter (c) 1996--2000 Han-Wen Nienhuys diff --git a/lily/dot-column-engraver.cc b/lily/dot-column-engraver.cc index 35ca2c3cc4..935d3f3e65 100644 --- a/lily/dot-column-engraver.cc +++ b/lily/dot-column-engraver.cc @@ -56,7 +56,7 @@ Dot_column_engraver::acknowledge_element (Score_element_info info) Dot_column::set_interface (dotcol_p_); Side_position::set_axis (dotcol_p_, X_AXIS); Side_position::set_direction (dotcol_p_, RIGHT); - announce_element (Score_element_info (dotcol_p_, 0)); + announce_element (dotcol_p_, 0); } Dot_column::add_head (dotcol_p_, info.elem_l_); diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index f0390d4798..c57c533265 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -123,9 +123,8 @@ Dynamic_engraver::do_process_music () Side_position::set_axis (line_spanner_, Y_AXIS); Axis_group_interface::set_interface (line_spanner_); Axis_group_interface::set_axes (line_spanner_, Y_AXIS, Y_AXIS); - announce_element (Score_element_info - (line_spanner_, - text_req_l_ ? text_req_l_ : accepted_spanreqs_drul_[START])); + announce_element (line_spanner_, + text_req_l_ ? text_req_l_ : accepted_spanreqs_drul_[START]); } } @@ -174,14 +173,14 @@ Dynamic_engraver::do_process_music () text_p_->add_offset_callback (Side_position::aligned_on_self, Y_AXIS); - announce_element (Score_element_info (text_p_, text_req_l_)); + announce_element (text_p_, text_req_l_); } if (accepted_spanreqs_drul_[STOP]) { if (!cresc_p_) { - accepted_spanreqs_drul_[STOP]->warning + accepted_spanreqs_drul_[STOP]->origin ()->warning (_ ("can't find start of (de)crescendo")); } else @@ -198,7 +197,7 @@ Dynamic_engraver::do_process_music () { if (current_cresc_req_) { - accepted_spanreqs_drul_[START]->warning + accepted_spanreqs_drul_[START]->origin ()->warning (current_cresc_req_->span_dir_ == 1 ? _ ("already have a crescendo") @@ -267,7 +266,7 @@ Dynamic_engraver::do_process_music () cresc_p_->set_elt_property ("self-alignment-Y", gh_int2scm (0)); cresc_p_->add_offset_callback (Side_position::aligned_on_self, Y_AXIS); - announce_element (Score_element_info (cresc_p_, accepted_spanreqs_drul_[START])); + announce_element (cresc_p_, accepted_spanreqs_drul_[START]); } } } @@ -287,7 +286,7 @@ Dynamic_engraver::do_removal_processing () { typeset_element (cresc_p_ ); finished_cresc_p_ = cresc_p_; - current_cresc_req_->warning (_ ("unterminated (de)crescendo")); + current_cresc_req_->origin ()->warning (_ ("unterminated (de)crescendo")); } if (line_spanner_) { diff --git a/lily/engraver-group-engraver.cc b/lily/engraver-group-engraver.cc index db7a7d79dd..c12283e8e4 100644 --- a/lily/engraver-group-engraver.cc +++ b/lily/engraver-group-engraver.cc @@ -23,6 +23,7 @@ Engraver_group_engraver::announce_element (Score_element_info info) Engraver::announce_element (info); } + void Engraver_group_engraver::do_announces() { @@ -32,17 +33,12 @@ Engraver_group_engraver::do_announces() trg->do_announces (); } - Request dummy_req; - while (announce_info_arr_.size ()) { for (int j =0; j < announce_info_arr_.size(); j++) { Score_element_info info = announce_info_arr_[j]; - if (!info.req_l_) - info.req_l_ = &dummy_req; - for (Cons *p = trans_p_list_.head_; p; p = p->next_) { if (!dynamic_cast (p->car_)) diff --git a/lily/engraver.cc b/lily/engraver.cc index 7ef5dda44f..896c206f12 100644 --- a/lily/engraver.cc +++ b/lily/engraver.cc @@ -17,17 +17,29 @@ void -Engraver::announce_element (Score_element_info i) +Engraver::announce_element (Score_element_info inf) { - Score_element * e = i.elem_l_; + daddy_grav_l()->announce_element (inf); +} +void +Engraver::announce_element (Score_element* e, Music *m) +{ if (e->get_elt_property ("interfaces") == SCM_EOL) Group_interface (e, "interfaces").add_thing (ly_symbol2scm (e->name())); + + if (m && m->origin ()->location_str ().length_i ()) + { + e->set_elt_property ("origin", m->get_mus_property ("origin")); + } + Score_element_info i (e, m); if (!i.origin_trans_l_) i.origin_trans_l_ = this; daddy_grav_l()->announce_element (i); } + + void Engraver::typeset_element (Score_element*p) diff --git a/lily/extender-engraver.cc b/lily/extender-engraver.cc index 21a246d713..db813f141a 100644 --- a/lily/extender-engraver.cc +++ b/lily/extender-engraver.cc @@ -95,7 +95,7 @@ Extender_engraver::do_removal_processing () { if (extender_p_) { - req_l_->warning (_ ("unterminated extender")); + req_l_->origin ()->warning (_ ("unterminated extender")); extender_p_->set_bound(RIGHT, unsmob_element (get_property ("currentCommandColumn"))); } } @@ -107,7 +107,7 @@ Extender_engraver::do_process_music () { if (!last_lyric_l_) { - req_l_->warning (_ ("Nothing to connect extender to on the left. Ignoring extender request.")); + req_l_->origin ()->warning (_ ("Nothing to connect extender to on the left. Ignoring extender request.")); return; } @@ -115,7 +115,7 @@ Extender_engraver::do_process_music () extender_p_->set_extent_callback (Score_element::point_dimension_callback, Y_AXIS); Lyric_extender (extender_p_).set_textitem (LEFT, last_lyric_l_); - announce_element (Score_element_info (extender_p_, req_l_)); + announce_element (extender_p_, req_l_); } } diff --git a/lily/folded-repeat-iterator.cc b/lily/folded-repeat-iterator.cc index 1083b8fa69..38241b8cf4 100644 --- a/lily/folded-repeat-iterator.cc +++ b/lily/folded-repeat-iterator.cc @@ -45,8 +45,8 @@ Folded_repeat_iterator::next_moment () const void Folded_repeat_iterator::construct_children () { - Repeated_music const * mus = dynamic_cast (music_l_); - main_iter_p_ = get_iterator_p (mus->repeat_body_p_); + Repeated_music * mus = dynamic_cast (music_l_); + main_iter_p_ = get_iterator_p (mus->body ()); if (!main_iter_p_->ok()) { leave_body (); @@ -61,7 +61,7 @@ Folded_repeat_iterator::do_process_and_next (Moment m) { bool success = try_music (music_l_); if (!success) - music_l_->warning ( _("no one to print a repeat brace")); + music_l_->origin ()->warning ( _("no one to print a repeat brace")); } if (main_iter_p_) @@ -90,36 +90,30 @@ Folded_repeat_iterator::do_process_and_next (Moment m) void Folded_repeat_iterator::leave_body () { - Repeated_music const * mus = dynamic_cast (music_l_); + Repeated_music * mus = dynamic_cast (music_l_); delete main_iter_p_; main_iter_p_ = 0; - main_length_mom_ += mus->repeat_body_p_->length_mom (); + main_length_mom_ += mus->body ()->length_mom (); } void Folded_repeat_iterator::enter_alternative () { - Repeated_music const * mus = dynamic_cast (music_l_); - if (mus->alternatives_p_) + Repeated_music * mus = dynamic_cast (music_l_); + if (mus->alternatives ()) { Simultaneous_music_iterator * s = new Simultaneous_music_iterator; s->separate_contexts_b_ = true; - s->init_translator (mus->alternatives_p_, report_to_l ()); + s->init_translator (mus->alternatives (), report_to_l ()); alternative_iter_p_ = s; alternative_iter_p_->construct_children (); } } -void -Folded_repeat_iterator::do_print () const -{ -#ifndef NPRINT -#endif -} Music_iterator* -Folded_repeat_iterator::try_music_in_children (Music const* m) const +Folded_repeat_iterator::try_music_in_children (Music * m) const { if (main_iter_p_) { diff --git a/lily/gourlay-breaking.cc b/lily/gourlay-breaking.cc index 192ece0a69..b442cca427 100644 --- a/lily/gourlay-breaking.cc +++ b/lily/gourlay-breaking.cc @@ -136,7 +136,7 @@ Gourlay_breaking::do_solve () const /* do the last one */ if (break_idx % HAPPY_DOTS_I) - progress_indication (String ("[") + to_str (break_idx) + "]"); + progress_indication (String ("[") + to_str (break_idx) + "]"); progress_indication ("\n"); diff --git a/lily/hara-kiri-engraver.cc b/lily/hara-kiri-engraver.cc deleted file mode 100644 index c251871682..0000000000 --- a/lily/hara-kiri-engraver.cc +++ /dev/null @@ -1,31 +0,0 @@ -/* - hara-kiri-engraver.cc -- implement Hara_kiri_engraver - - source file of the GNU LilyPond music typesetter - - (c) 1999--2000 Han-Wen Nienhuys - - */ -#include "hara-kiri-group-spanner.hh" -#include "hara-kiri-engraver.hh" -#include "rhythmic-head.hh" -#include "spanner.hh" - -Spanner* -Hara_kiri_engraver::get_spanner_p () const -{ - Spanner * sp = new Spanner (get_property ("basicHaraKiriVerticalGroupspannerProperties")); - Hara_kiri_group_spanner::set_interface (sp); - return sp; -} - -void -Hara_kiri_engraver::acknowledge_element (Score_element_info i) -{ - Axis_group_engraver::acknowledge_element (i); - if (Rhythmic_head::has_interface (i.elem_l_)) - { - Hara_kiri_group_spanner::add_interesting_item (staffline_p_, i.elem_l_); - } -} -ADD_THIS_TRANSLATOR(Hara_kiri_engraver); diff --git a/lily/hyphen-engraver.cc b/lily/hyphen-engraver.cc index 9625b16f02..79fbe31f7f 100644 --- a/lily/hyphen-engraver.cc +++ b/lily/hyphen-engraver.cc @@ -87,7 +87,7 @@ Hyphen_engraver::do_removal_processing () { if (hyphen_p_) { - req_l_->warning (_ ("unterminated hyphen")); + req_l_->origin ()->warning (_ ("unterminated hyphen")); hyphen_p_->set_bound(RIGHT, unsmob_element (get_property ("currentCommandColumn"))); } } @@ -99,14 +99,14 @@ Hyphen_engraver::do_process_music () { if (!last_lyric_l_) { - req_l_->warning (_ ("Nothing to connect hyphen to on the left. Ignoring hyphen request.")); + req_l_->origin ()->warning (_ ("Nothing to connect hyphen to on the left. Ignoring hyphen request.")); return; } hyphen_p_ = new Spanner (get_property ("basicHyphenSpannerProperties")); hyphen_p_->set_extent_callback (Score_element::point_dimension_callback,Y_AXIS); Hyphen_spanner (hyphen_p_).set_textitem (LEFT, last_lyric_l_); - announce_element (Score_element_info (hyphen_p_, req_l_)); + announce_element (hyphen_p_, req_l_); } } diff --git a/lily/identifier.cc b/lily/identifier.cc index c82598ed5e..41b5e049f9 100644 --- a/lily/identifier.cc +++ b/lily/identifier.cc @@ -16,7 +16,6 @@ #include "identifier.hh" #include "my-lily-lexer.hh" #include "debug.hh" -#include "request.hh" #include "translator-group.hh" #include "ly-smobs.icc" @@ -83,8 +82,6 @@ Class ## _identifier::do_print () const { \ DEFAULT_PRINT(Translator_group); -DEFAULT_PRINT(Music); -DEFAULT_PRINT(Request); DEFAULT_PRINT(Score); DEFAULT_PRINT(Music_output_def); @@ -97,8 +94,6 @@ Class ## _identifier::do_str () const { \ DUMMY_STR(Translator_group); -DUMMY_STR(Music); -DUMMY_STR(Request); DUMMY_STR(Score); DUMMY_STR(Music_output_def); DUMMY_STR(Duration); @@ -156,12 +151,8 @@ Class ## _identifier::Class ## _identifier (Class ## _identifier const &s) \ IMPLEMENT_ID_CLASS(Duration); IMPLEMENT_ID_CLASS(Translator_group); -IMPLEMENT_ID_CLASS(Music); IMPLEMENT_ID_CLASS(Score); -IMPLEMENT_ID_CLASS(Request); IMPLEMENT_ID_CLASS(Music_output_def); -VIRTUAL_ACCESSOR(Music); -VIRTUAL_ACCESSOR(Request); VIRTUAL_ACCESSOR(Translator_group); VIRTUAL_ACCESSOR(Music_output_def); DEFAULT_ACCESSOR(Duration); diff --git a/lily/include/axis-group-engraver.hh b/lily/include/axis-group-engraver.hh deleted file mode 100644 index 23d8793a21..0000000000 --- a/lily/include/axis-group-engraver.hh +++ /dev/null @@ -1,38 +0,0 @@ -/* - axis-group-engraver.hh -- declare Axis_group_engraver - - source file of the GNU LilyPond music typesetter - - (c) 1999--2000 Han-Wen Nienhuys - - */ - -#ifndef AXIS_GROUP_ENGRAVER_HH -#define AXIS_GROUP_ENGRAVER_HH - - -#include "engraver.hh" - -/** - Put stuff in a Spanner with an Axis_group_interface. - Use as last element of a context. - */ -class Axis_group_engraver : public Engraver -{ -protected: - Spanner *staffline_p_; - Link_array elts_; - - virtual void do_creation_processing(); - virtual void do_removal_processing(); - virtual void acknowledge_element (Score_element_info); - virtual void process_acknowledged (); - virtual Spanner* get_spanner_p () const; -public: - VIRTUAL_COPY_CONS(Translator); - - Axis_group_engraver (); -}; - -#endif /* AXIS_GROUP_ENGRAVER_HH */ - diff --git a/lily/include/chord-tremolo-iterator.hh b/lily/include/chord-tremolo-iterator.hh index 9100bce319..9cd632985d 100644 --- a/lily/include/chord-tremolo-iterator.hh +++ b/lily/include/chord-tremolo-iterator.hh @@ -27,7 +27,7 @@ protected: virtual bool ok () const; virtual void do_print () const; virtual void do_process_and_next (Moment) ; - virtual Music_iterator *try_music_in_children (Music const *) const; + virtual Music_iterator *try_music_in_children (Music *) const; }; diff --git a/lily/include/command-request.hh b/lily/include/command-request.hh index 845598a3ad..7593325081 100644 --- a/lily/include/command-request.hh +++ b/lily/include/command-request.hh @@ -26,8 +26,9 @@ protected: class Mark_req : public Request { public: - Protected_scm mark_label_; -protected: + SCM mark_label (); + + virtual bool do_equal_b (Request const*) const; VIRTUAL_COPY_CONS(Music); }; @@ -102,8 +103,8 @@ class Breathing_sign_req : public Request { class Key_change_req : public Request { public: - Protected_scm pitch_alist_; - + SCM pitch_alist (); + protected: VIRTUAL_COPY_CONS(Music); void transpose (Musical_pitch d); diff --git a/lily/include/engraver.hh b/lily/include/engraver.hh index 2c3ef7afd6..3c20037f7e 100644 --- a/lily/include/engraver.hh +++ b/lily/include/engraver.hh @@ -24,18 +24,13 @@ class Engraver : public virtual Translator { friend class Engraver_group_engraver; - protected: - - /// utility Paper_def * paper_l() const; /** Invoke walker method to typeset element. Default: pass on to daddy. */ virtual void typeset_element (Score_element*elem_p); - - /** take note of item/spanner put item in spanner. Adjust local key; etc. @@ -52,7 +47,8 @@ protected: /** Announce element. Default: pass on to daddy. Utility */ - virtual void announce_element (Score_element_info); + virtual void announce_element (Score_element*, Music*); + virtual void announce_element (Score_element_info); public: VIRTUAL_COPY_CONS(Translator); Engraver_group_engraver * daddy_grav_l() const; @@ -60,8 +56,6 @@ public: override other ctor */ Engraver () {} - - }; diff --git a/lily/include/folded-repeat-iterator.hh b/lily/include/folded-repeat-iterator.hh index 499b7b4be8..e26bac173e 100644 --- a/lily/include/folded-repeat-iterator.hh +++ b/lily/include/folded-repeat-iterator.hh @@ -34,9 +34,8 @@ protected: void enter_alternative (); void leave_body (); - virtual void do_print () const; virtual void do_process_and_next (Moment); - virtual Music_iterator *try_music_in_children (Music const *) const; + virtual Music_iterator *try_music_in_children (Music *) const; }; #endif /* FOLDED_REPEAT_ITERATOR_HH */ diff --git a/lily/include/font-size-engraver.hh b/lily/include/font-size-engraver.hh deleted file mode 100644 index 5ebc44dd7b..0000000000 --- a/lily/include/font-size-engraver.hh +++ /dev/null @@ -1,34 +0,0 @@ -/* - font-size-engraver.hh -- declare Font_size_engraver - - source file of the GNU LilyPond music typesetter - - (c) 1998--2000 Han-Wen Nienhuys - - */ - -#ifndef FONT_SIZE_GRAV_HH -#define FONT_SIZE_GRAV_HH - -#include "engraver.hh" -#include "protected-scm.hh" -/** - Set font size on elements that do not have a fontsize set yet. - - Reads context property fontSize. - - Writes element property fontsize - */ -class Font_size_engraver : public Engraver { - Protected_scm size_; -protected: - virtual void acknowledge_element (Score_element_info); - virtual void do_process_music (); -public: - Font_size_engraver (); - - VIRTUAL_COPY_CONS (Translator); -}; - -#endif /* FONT_SIZE_GRAV_HH */ - diff --git a/lily/include/hara-kiri-engraver.hh b/lily/include/hara-kiri-engraver.hh index 93eeb8feb7..0c1d70778e 100644 --- a/lily/include/hara-kiri-engraver.hh +++ b/lily/include/hara-kiri-engraver.hh @@ -12,13 +12,4 @@ #include "axis-group-engraver.hh" -class Hara_kiri_engraver : public Axis_group_engraver -{ -protected: - virtual Spanner*get_spanner_p ()const; - virtual void acknowledge_element (Score_element_info); -public: - VIRTUAL_COPY_CONS(Translator); -}; - #endif /* HARA_KIRI_ENGRAVER_HH */ diff --git a/lily/include/identifier.hh b/lily/include/identifier.hh index cb9b8b6fdf..750c49089a 100644 --- a/lily/include/identifier.hh +++ b/lily/include/identifier.hh @@ -16,9 +16,7 @@ class Translator_group_identifier; -class Music_identifier; class Output_def_identifier; -class Request_identifier; class Score_identifier; class Duration_identifier; @@ -49,9 +47,7 @@ struct Identifier : public Input { void error (String) const; String str () const; IDACCESSOR(Translator_group) - IDACCESSOR(Music) IDACCESSOR(Music_output_def) - IDACCESSOR(Request) IDACCESSOR(Score) IDACCESSOR(Duration) VIRTUAL_COPY_CONS(Identifier); @@ -77,9 +73,7 @@ struct Class ## _identifier : Identifier {\ DECLARE_ID_CLASS(Translator_group); DECLARE_ID_CLASS(Duration); -DECLARE_ID_CLASS(Music); DECLARE_ID_CLASS(Score); -DECLARE_ID_CLASS(Request); DECLARE_ID_CLASS(Music_output_def); Identifier * unsmob_identifier (SCM); diff --git a/lily/include/input-smob.hh b/lily/include/input-smob.hh new file mode 100644 index 0000000000..87d63c5ba6 --- /dev/null +++ b/lily/include/input-smob.hh @@ -0,0 +1,22 @@ +/* + input-smob.hh -- declare input smob + + source file of the GNU LilyPond music typesetter + + (c) 2000 Han-Wen Nienhuys + + */ + +#ifndef INPUT_SMOB_HH +#define INPUT_SMOB_HH + +#include "input.hh" +#include "lily-guile.hh" + +SCM make_input (Input spot); +Input *unsmob_input (SCM); + +extern Input dummy_input_global; + +#endif /* INPUT_SMOB_HH */ + diff --git a/lily/include/item.hh b/lily/include/item.hh index 3a84af0def..85c58aa4a9 100644 --- a/lily/include/item.hh +++ b/lily/include/item.hh @@ -56,6 +56,7 @@ public: protected: virtual void discretionary_processing (); void copy_breakable_items(); + virtual SCM do_derived_mark (); }; diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index 3dc1f64f16..be8a39ff6f 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -79,11 +79,11 @@ void add_scm_init_func (void (*)()); #define MAKE_SCHEME_CALLBACK(TYPE, FUNC) \ -static SCM TYPE ## _ ## FUNC ## _scm;\ +static SCM TYPE ## _ ## FUNC ## _proc;\ void \ TYPE ## _ ## FUNC ## _init_functions () \ { \ - TYPE ## _ ## FUNC ## _scm = gh_new_procedure1_0 (#TYPE "::" #FUNC, \ + TYPE ## _ ## FUNC ## _proc = gh_new_procedure1_0 (#TYPE "::" #FUNC, \ (SCM(*)(...))TYPE :: FUNC); \ } \ \ diff --git a/lily/include/line-of-score.hh b/lily/include/line-of-score.hh index 8de2257cb3..bd1186d54e 100644 --- a/lily/include/line-of-score.hh +++ b/lily/include/line-of-score.hh @@ -33,9 +33,7 @@ public: int rank_i_; void post_processing(bool); - Protected_scm output_; Line_of_score(SCM); - /// is #c# contained in #*this#? bool contains_b (Paper_column const *c) const; int element_count () const; diff --git a/lily/include/local-key-item.hh b/lily/include/local-key-item.hh index fb2c190ece..e1f45bd305 100644 --- a/lily/include/local-key-item.hh +++ b/lily/include/local-key-item.hh @@ -8,47 +8,17 @@ #define LOCALKEYITEM_HH -#include "item.hh" #include "array.hh" #include "musical-pitch.hh" - - -struct Local_key_cautionary_tuple -{ - Musical_pitch pitch_; - bool cautionary_b_; - bool natural_b_; - - Local_key_cautionary_tuple () - { - cautionary_b_ = false; - natural_b_ = false; - } - static int compare (Local_key_cautionary_tuple const&s1, Local_key_cautionary_tuple const&s2) - { - return Musical_pitch::compare (s1.pitch_, s2.pitch_); - } -}; - -/** - Accidentals which can be different for each octave. - - TODO: schemify me! - */ -class Local_key_item : public Item +class Local_key_item { - Array accidental_arr_; - - static Molecule accidental (Score_element*me, int,bool,bool) ; + static Molecule parenthesize (Score_element*me, Molecule) ; public: - Local_key_item (SCM ); - static SCM brew_molecule (SCM); - - void add_pitch (Musical_pitch, bool cautionary, bool natural); - - static SCM before_line_breaking (SCM); + static SCM brew_molecule (SCM); + static void add_pitch (Score_element*me, Musical_pitch, bool cautionary, bool natural); static bool has_interface (Score_element*); + static void set_interface (Score_element*); }; diff --git a/lily/include/ly-smobs.icc b/lily/include/ly-smobs.icc index d496d25bc9..8a8648e6a5 100644 --- a/lily/include/ly-smobs.icc +++ b/lily/include/ly-smobs.icc @@ -10,6 +10,7 @@ #ifndef LY_SMOBS_ICC #define LY_SMOBS_ICC +#include "smobs.hh" #define IMPLEMENT_UNSMOB(CL, name) \ diff --git a/lily/include/lyric-combine-music-iterator.hh b/lily/include/lyric-combine-music-iterator.hh index 73b7c925a8..2264996110 100644 --- a/lily/include/lyric-combine-music-iterator.hh +++ b/lily/include/lyric-combine-music-iterator.hh @@ -22,7 +22,7 @@ protected: virtual void construct_children (); virtual Moment next_moment () const; virtual void do_process_and_next (Moment); - virtual Music_iterator *try_music_in_children (Music const*) const; + virtual Music_iterator *try_music_in_children (Music *) const; virtual bool ok () const; virtual void do_print () const; diff --git a/lily/include/lyric-combine-music.hh b/lily/include/lyric-combine-music.hh index 16a60a60c0..a4a47c2a43 100644 --- a/lily/include/lyric-combine-music.hh +++ b/lily/include/lyric-combine-music.hh @@ -14,21 +14,15 @@ class Lyric_combine_music : public Music { - Music * music_p_; - Music * lyrics_p_; public: Music * music_l () const; Music * lyrics_l () const; Lyric_combine_music (Music*, Music*); - virtual void transpose (Musical_pitch); virtual void do_print () const; - VIRTUAL_COPY_CONS(Music); - Lyric_combine_music (Lyric_combine_music const&); virtual Moment length_mom () const; - virtual ~Lyric_combine_music (); virtual Musical_pitch to_relative_octave (Musical_pitch); virtual void compress (Moment); }; diff --git a/lily/include/molecule.hh b/lily/include/molecule.hh index 548085bcff..898cb63732 100644 --- a/lily/include/molecule.hh +++ b/lily/include/molecule.hh @@ -37,6 +37,8 @@ Empty molecules have empty dimensions. If add_at_edge is used to init the molecule, we assume that DIMENSIONS = (Interval(0,0),Interval(0,0) + + TODO: go full smob with Molecule. */ class Molecule { diff --git a/lily/include/music-iterator.hh b/lily/include/music-iterator.hh index 754525578a..561e9c11eb 100644 --- a/lily/include/music-iterator.hh +++ b/lily/include/music-iterator.hh @@ -28,7 +28,7 @@ class Music_iterator { Interpretation_context_handle handle_; protected: - Music const * music_l_; + Music * music_l_; /// ugh. JUNKME bool first_b_; @@ -47,7 +47,7 @@ protected: /** Get an iterator for MUS, inheriting the translation unit from THIS. */ - Music_iterator* get_iterator_p (Music const*mus) const; + 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 @@ -55,7 +55,7 @@ protected: virtual void do_process_and_next (Moment until); - virtual Music_iterator* try_music_in_children (Music const *) const; + virtual Music_iterator* try_music_in_children (Music *) const; public: @@ -63,7 +63,7 @@ public: Do the reporting. Will try MUSIC_L_ in its own translator first, then its children. Returns the iterator that succeeded */ - Music_iterator * try_music (Music const *) const; + Music_iterator * try_music (Music *) const; /** The translation unit that we this iterator is reporting to now. @@ -75,8 +75,8 @@ public: /** Get an iterator matching the type of MUS, and use TRANS to find an accompanying translation unit */ - static Music_iterator* static_get_iterator_p (Music const* mus); - void init_translator (Music const *, Translator_group *); + static Music_iterator* static_get_iterator_p (Music * mus); + void init_translator (Music *, Translator_group *); Music_iterator(); diff --git a/lily/include/music-list.hh b/lily/include/music-list.hh index 386cf49fae..6abf926c4d 100644 --- a/lily/include/music-list.hh +++ b/lily/include/music-list.hh @@ -11,46 +11,7 @@ #ifndef Music_sequence_HH #define Music_sequence_HH -#include "music.hh" -#include "cons.hh" - - -class Music_list : public Cons_list , public Input -{ -public: - Musical_pitch do_relative_octave (Musical_pitch, bool); - void add_music (Music*); - Music_list (Music_list const&); - Music_list (); -}; - - -/** - Music can be a list of other "Music" elements - */ -class Music_sequence : public Music -{ -public: - Music_list * music_p_list_p_; - - Music_sequence (Music_sequence const&); - Music_sequence (Music_list *l_p); - - VIRTUAL_COPY_CONS(Music); - - Musical_pitch do_relative_octave (Musical_pitch p, bool b); - virtual void transpose (Musical_pitch ); - virtual void compress (Moment); - void add_music (Music *music_p); - int length_i () const; - Moment cumulative_length () const; - Moment maximum_length () const; - virtual ~Music_sequence (); - -protected: - virtual Musical_pitch to_relative_octave (Musical_pitch); - virtual void do_print() const; -}; +#include "music-sequence.hh" /** Simultaneous_music is a list of music-elements which happen simultaneously @@ -58,15 +19,12 @@ protected: class Simultaneous_music : public Music_sequence { public: - VIRTUAL_COPY_CONS(Music); - - Simultaneous_music(Music_list *); + Simultaneous_music(SCM); virtual Musical_pitch to_relative_octave (Musical_pitch); virtual Moment length_mom () const; }; - /** The request is a collection of Requests. A note that you enter in mudela is one Request_chord, one syllable of lyrics is one Request_chord @@ -75,12 +33,10 @@ class Request_chord : public Simultaneous_music { public: VIRTUAL_COPY_CONS(Music); - virtual Musical_pitch to_relative_octave (Musical_pitch); - Request_chord(); + Request_chord(SCM list); }; - /** Sequential_music is a list of music-elements which are placed behind each other. */ @@ -88,8 +44,8 @@ class Sequential_music : public Music_sequence { public: VIRTUAL_COPY_CONS(Music); - - Sequential_music(Music_list*); + Sequential_music(SCM); virtual Moment length_mom () const; }; + #endif // Music_sequence_HH diff --git a/lily/include/music-sequence.hh b/lily/include/music-sequence.hh new file mode 100644 index 0000000000..736d4abf98 --- /dev/null +++ b/lily/include/music-sequence.hh @@ -0,0 +1,40 @@ + + +/* + music-sequence.hh -- declare + + source file of the GNU LilyPond music typesetter + + (c) 2000 Han-Wen Nienhuys + + */ + +#ifndef MUSIC_SEQUENCE_HH +#define MUSIC_SEQUENCE_HH +#include "music.hh" +/** + Music can be a list of other "Music" elements + */ +class Music_sequence : public Music +{ +public: + Music_sequence (SCM h); + + SCM music_list () const; + void append_music (Music *); + VIRTUAL_COPY_CONS(Music); + + Musical_pitch do_relative_octave (Musical_pitch p, bool b); + virtual void transpose (Musical_pitch ); + void truncate (int k); + virtual void compress (Moment); + int length_i () const; + Moment cumulative_length () const; + Moment maximum_length () const; + +protected: + virtual Musical_pitch to_relative_octave (Musical_pitch); + virtual void do_print() const; + +}; +#endif diff --git a/lily/include/music-wrapper-iterator.hh b/lily/include/music-wrapper-iterator.hh index 97bbe2abc1..8200709e52 100644 --- a/lily/include/music-wrapper-iterator.hh +++ b/lily/include/music-wrapper-iterator.hh @@ -31,7 +31,7 @@ public: protected: virtual void do_print () const; virtual void do_process_and_next (Moment) ; - virtual Music_iterator *try_music_in_children (Music const *) const; + virtual Music_iterator *try_music_in_children (Music *) const; Music_iterator *child_iter_p_; }; diff --git a/lily/include/music-wrapper.hh b/lily/include/music-wrapper.hh index 95d7f0bd84..76987deac5 100644 --- a/lily/include/music-wrapper.hh +++ b/lily/include/music-wrapper.hh @@ -21,17 +21,14 @@ */ class Music_wrapper : public Music { - Music * element_p_; public: Music_wrapper (Music*); - Music * element_l () const; + Music * element () const; virtual void transpose (Musical_pitch); virtual void do_print () const; VIRTUAL_COPY_CONS(Music); - Music_wrapper (Music_wrapper const&); virtual Moment length_mom () const; - virtual ~Music_wrapper (); virtual Musical_pitch to_relative_octave (Musical_pitch); virtual void compress (Moment); }; diff --git a/lily/include/music.hh b/lily/include/music.hh index ce355795d9..2eee399d18 100644 --- a/lily/include/music.hh +++ b/lily/include/music.hh @@ -12,10 +12,10 @@ #define MUSIC_HH #include "virtual-methods.hh" -#include "input.hh" #include "minterval.hh" #include "lily-proto.hh" #include "string.hh" +#include "smobs.hh" /** Music is anything that has duration and supports both time compression and transposition. @@ -28,14 +28,31 @@ @see Music_sequence */ -class Music:public Input { +class Music { public: + DECLARE_SMOBS; + SCM immutable_property_alist_; + SCM mutable_property_alist_; + + Input *origin () const; + void set_spot (Input); + + SCM get_mus_property (const char*) const; + SCM get_mus_property (SCM) const; + void set_mus_property (const char * , SCM val); + void set_immutable_mus_property (const char * , SCM val); + void set_immutable_mus_property (SCM key, SCM val); + void set_mus_property (SCM , SCM val); + void set_mus_pointer (const char*, SCM val); + SCM remove_mus_property (const char* nm); + + virtual SCM do_derived_mark (); virtual Musical_pitch to_relative_octave (Musical_pitch); /// The duration of this piece of music virtual Moment length_mom () const; - virtual ~Music(){} + virtual ~Music(); void print() const; /// Transpose, with the interval central C to #p# virtual void transpose (Musical_pitch p); @@ -43,12 +60,14 @@ public: /// Scale the music in time by #factor#. virtual void compress (Moment factor); VIRTUAL_COPY_CONS(Music); - + Music (Music const &m); Music(); protected: virtual void do_print() const; }; + +Music * unsmob_music (SCM); #endif // MUSIC_HH diff --git a/lily/include/output-property.hh b/lily/include/output-property.hh index f266642eb2..8590868d81 100644 --- a/lily/include/output-property.hh +++ b/lily/include/output-property.hh @@ -13,15 +13,18 @@ #include "music.hh" #include "protected-scm.hh" + +/* + +props: + + relevant stuff: the predicate, the symbol, the value + + */ class Output_property : public Music { public: Output_property(SCM, SCM, SCM); - - /** - relevant stuff: the predicate, the symbol, the value - */ - Protected_scm pred_sym_val_list_; }; #endif /* OUTPUT_PROPERTY_HH */ diff --git a/lily/include/paper-outputter.hh b/lily/include/paper-outputter.hh index ff9846cfbf..a0660f8032 100644 --- a/lily/include/paper-outputter.hh +++ b/lily/include/paper-outputter.hh @@ -21,11 +21,6 @@ */ class Paper_outputter { -#if 0 - Protected_scm molecules_; - SCM last_cons_; -#endif - bool verbatim_scheme_b_; Paper_stream * stream_p_; public: diff --git a/lily/include/paper-score.hh b/lily/include/paper-score.hh index 41823001cb..31914b2c20 100644 --- a/lily/include/paper-score.hh +++ b/lily/include/paper-score.hh @@ -38,8 +38,6 @@ public: int find_col_idx (Paper_column const *) const; Link_array broken_col_range (Item const*,Item const*) const; - - void typeset_line (Line_of_score*); protected: diff --git a/lily/include/repeated-music.hh b/lily/include/repeated-music.hh index 4f373f5958..cb9b9b5760 100644 --- a/lily/include/repeated-music.hh +++ b/lily/include/repeated-music.hh @@ -49,7 +49,12 @@ */ class Repeated_music : public Music { + Music * repeat_body_p_; + Music_sequence * alternatives_p_; public: + + Music * body () const; + Music_sequence * alternatives () const; String type_; bool fold_b_; @@ -58,10 +63,6 @@ public: /// how often do we repeat? int repeats_i_; - - Music * repeat_body_p_; - Music_sequence * alternatives_p_; - virtual Musical_pitch to_relative_octave (Musical_pitch); /// The duration of this piece of music @@ -79,7 +80,6 @@ public: Repeated_music (Music*, int , Music_sequence*); Repeated_music (Repeated_music const&); - ~Repeated_music (); protected: virtual void do_print() const; }; diff --git a/lily/include/request-chord-iterator.hh b/lily/include/request-chord-iterator.hh index fb9b38e042..bc09247992 100644 --- a/lily/include/request-chord-iterator.hh +++ b/lily/include/request-chord-iterator.hh @@ -22,7 +22,6 @@ class Request_chord_iterator : public Music_iterator { */ Moment elt_length_mom_; bool last_b_; - Cons* cursor_; public: Request_chord_iterator (); diff --git a/lily/include/request-chord.hh b/lily/include/request-chord.hh deleted file mode 100644 index c558419bc2..0000000000 --- a/lily/include/request-chord.hh +++ /dev/null @@ -1,15 +0,0 @@ -/* - request-chord.hh -- declare Request_chord - - source file of the GNU LilyPond music typesetter - - (c) 1998--2000 Han-Wen Nienhuys - - */ - -#ifndef REQUEST_CHORD_HH -#define REQUEST_CHORD_HH - - -#endif /* REQUEST_CHORD_HH */ - diff --git a/lily/include/score-element.hh b/lily/include/score-element.hh index eaf4e3cebd..7ce14c8cc1 100644 --- a/lily/include/score-element.hh +++ b/lily/include/score-element.hh @@ -131,7 +131,7 @@ public: virtual void do_break_processing (); virtual Score_element *find_broken_piece (Line_of_score*) const; virtual void discretionary_processing (); - virtual void do_derived_mark (); + virtual SCM do_derived_mark (); Molecule get_molecule () const; void suicide (); diff --git a/lily/include/score.hh b/lily/include/score.hh index 7be4e5c20b..b7515dc32a 100644 --- a/lily/include/score.hh +++ b/lily/include/score.hh @@ -12,6 +12,7 @@ #include "input.hh" #include "lily-proto.hh" +#include "protected-scm.hh" #include "parray.hh" /// the total music def of one movement @@ -19,7 +20,7 @@ class Score: public Input { public: /// paper_, staffs_ and commands_ form the problem definition. Link_array def_p_arr_; - Music * music_p_; + Protected_scm music_; Scope * header_p_; int errorlevel_i_; diff --git a/lily/include/sequential-music-iterator.hh b/lily/include/sequential-music-iterator.hh index 0d2565abf5..79f493fa87 100644 --- a/lily/include/sequential-music-iterator.hh +++ b/lily/include/sequential-music-iterator.hh @@ -28,13 +28,13 @@ public: protected: virtual void do_print() const; virtual void do_process_and_next (Moment); - virtual Music_iterator *try_music_in_children (Music const*) const; + virtual Music_iterator *try_music_in_children (Music *) const; private: Moment here_mom_; - Cons *cursor_; + SCM cursor_; Music_iterator * iter_p_; /* diff --git a/lily/include/simultaneous-music-iterator.hh b/lily/include/simultaneous-music-iterator.hh index 96ec914760..6c4008a95b 100644 --- a/lily/include/simultaneous-music-iterator.hh +++ b/lily/include/simultaneous-music-iterator.hh @@ -29,7 +29,7 @@ public: protected: virtual void do_print () const; virtual void do_process_and_next (Moment); - virtual Music_iterator *try_music_in_children (Music const*) const; + virtual Music_iterator *try_music_in_children (Music *) const; private: diff --git a/lily/include/spanner.hh b/lily/include/spanner.hh index dd5a61b21b..165ed99efe 100644 --- a/lily/include/spanner.hh +++ b/lily/include/spanner.hh @@ -34,7 +34,10 @@ class Spanner : public Score_element { public: Link_array broken_into_l_arr_; + + // todo: move to somewhere else. Real get_broken_left_end_align () const; + // TODO: make virtual and do this for Items as well. Interval_t spanned_rank_iv (); void set_bound (Direction d, Score_element*); @@ -48,7 +51,7 @@ public: static int compare (Spanner * const &,Spanner * const &); virtual Score_element* find_broken_piece (Line_of_score*) const; - virtual void do_derived_mark (); + virtual SCM do_derived_mark (); protected: void set_my_columns (); VIRTUAL_COPY_CONS(Score_element); diff --git a/lily/include/translation-property.hh b/lily/include/translation-property.hh index aecce178f2..ffb2968a29 100644 --- a/lily/include/translation-property.hh +++ b/lily/include/translation-property.hh @@ -11,22 +11,19 @@ #define TRANSLATION_PROPERTY_HH #include "music.hh" -#include "protected-scm.hh" /** - Set a property of Translator - */ + Set a property of Translator + + value -- the value to set + symbol -- the symbol to set. + +*/ class Translation_property : public Music { public: - String var_str_; - Protected_scm value_; - VIRTUAL_COPY_CONS(Music); - -protected: - virtual void do_print () const; }; #endif // PROPERTY_HH diff --git a/lily/include/translator-group.hh b/lily/include/translator-group.hh index 8ceac15def..5bb0d08e28 100644 --- a/lily/include/translator-group.hh +++ b/lily/include/translator-group.hh @@ -40,6 +40,7 @@ protected: public: SCM get_property (SCM name_sym) const; void set_property (String var_name, SCM value); + void set_property (SCM var_sym, SCM value); Translator_group *where_defined (SCM name_sym) const; String id_str_; diff --git a/lily/include/unfolded-repeat-iterator.hh b/lily/include/unfolded-repeat-iterator.hh index 9008f30420..97a649a10a 100644 --- a/lily/include/unfolded-repeat-iterator.hh +++ b/lily/include/unfolded-repeat-iterator.hh @@ -39,7 +39,7 @@ public: Music_iterator * current_iter_p_; /// pointer to the alternative that will be processed next. - Cons *alternative_cons_l_; + SCM alternative_cons_; ~Unfolded_repeat_iterator(); Unfolded_repeat_iterator (); @@ -48,7 +48,7 @@ protected: virtual void construct_children (); virtual Moment next_moment () const; virtual void do_process_and_next (Moment); - virtual Music_iterator *try_music_in_children (Music const*) const; + virtual Music_iterator *try_music_in_children (Music *) const; virtual bool ok () const; virtual void next_element (); diff --git a/lily/input-smob.cc b/lily/input-smob.cc new file mode 100644 index 0000000000..ead1b749e2 --- /dev/null +++ b/lily/input-smob.cc @@ -0,0 +1,76 @@ +/* + input-smob.cc -- implement Input smob + + source file of the GNU LilyPond music typesetter + + (c) 2000 Han-Wen Nienhuys + + */ + +#include "input.hh" +#include "input-smob.hh" +#include "string.hh" +#include "ly-smobs.icc" + +static long input_tag; + + +static +SCM mark_smob (SCM) +{ + return SCM_EOL; +} + +static int +print_smob (SCM s, SCM port, scm_print_state *) +{ + String str = "#location_str () + ">"; + scm_puts (str.ch_C(), port); + return 1; +} + +static +scm_sizet free_smob (SCM s) +{ + delete unsmob_input (s); + return 0; +} + +static +void start_input_smobs() +{ + input_tag + = scm_make_smob_type_mfpe ("input", 0, + mark_smob, free_smob, + print_smob, 0); +} + +SCM +make_input (Input ip) +{ + Input * nip = new Input (ip); + SCM z; + + SCM_NEWCELL(z); + SCM_SETCAR (z, (SCM)input_tag); + SCM_SETCDR (z, (SCM)nip); + // fixme: done_malloc + return z; +} + +Input * +unsmob_input (SCM s) +{ + if (SCM_IMP (s)) + return 0; + if ((long)SCM_CAR(s) == input_tag) // ugh. + return (Input*) SCM_CDR(s); + else + return 0; +} + + +ADD_SCM_INIT_FUNC(input, start_input_smobs); + + +Input dummy_input_global; diff --git a/lily/instrument-name-engraver.cc b/lily/instrument-name-engraver.cc index 8b65565b94..26520d46e3 100644 --- a/lily/instrument-name-engraver.cc +++ b/lily/instrument-name-engraver.cc @@ -64,7 +64,7 @@ Instrument_name_engraver::create_text (SCM txt) if (delim_) text_->set_parent (delim_, Y_AXIS); - announce_element (Score_element_info (text_,0)); + announce_element (text_,0); } } diff --git a/lily/item.cc b/lily/item.cc index 4e995bfd77..d9531c6dfb 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -149,6 +149,12 @@ Item::handle_prebroken_dependencies () /* Can't do this earlier, because try_visibility_lambda () might set the elt property transparent, which would then be copied. + + TODO: + + handle visibility-lambda the item itself iso. breakstatusdir, so + the function can do more complicated things. + */ SCM vis = get_elt_property ("visibility-lambda"); if (gh_procedure_p (vis)) @@ -170,3 +176,12 @@ Item::handle_prebroken_dependencies () } } +SCM +Item::do_derived_mark () +{ + if (broken_to_drul_[LEFT]) + scm_gc_mark (broken_to_drul_[LEFT]->self_scm_); + if (broken_to_drul_[RIGHT]) + scm_gc_mark (broken_to_drul_[RIGHT]->self_scm_); + return SCM_EOL; +} diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index 9208f26ab3..9f1b66d1a6 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -9,7 +9,7 @@ #include "key-item.hh" #include "command-request.hh" #include "musical-request.hh" -#include "local-key-item.hh" +#include "item.hh" #include "bar.hh" #include "timing-translator.hh" #include "staff-symbol-referencer.hh" @@ -65,6 +65,7 @@ Key_engraver::create_key (bool def) item_p_->set_elt_property ("new-accidentals", get_property ("keySignature")); Staff_symbol_referencer::set_interface (item_p_); + Key_item::set_interface (item_p_); SCM prop = get_property ("keyOctaviation"); bool multi = to_boolean (prop); @@ -72,7 +73,7 @@ Key_engraver::create_key (bool def) if (multi) item_p_->set_elt_property ("multi-octave", gh_bool2scm (multi)); - announce_element (Score_element_info (item_p_,keyreq_l_)); + announce_element (item_p_,keyreq_l_); } if (!def) @@ -137,10 +138,11 @@ Key_engraver::do_pre_move_processing () void Key_engraver::read_req (Key_change_req const * r) { - if (r->pitch_alist_ == SCM_UNDEFINED) + SCM p = r->get_mus_property ("pitch-alist"); + if (p == SCM_UNDEFINED) return; - SCM n = scm_list_copy (r->pitch_alist_); + SCM n = scm_list_copy (p); SCM accs = SCM_EOL; for (SCM s = get_property ("keyAccidentalOrder"); gh_pair_p (s); s = gh_cdr (s)) diff --git a/lily/key-performer.cc b/lily/key-performer.cc index b55210a448..79fdac637e 100644 --- a/lily/key-performer.cc +++ b/lily/key-performer.cc @@ -26,7 +26,7 @@ Key_performer::~Key_performer () void Key_performer::do_process_music () { - if (key_req_l_ && key_req_l_->pitch_alist_ != SCM_UNDEFINED) + if (key_req_l_ && key_req_l_->get_mus_property ("pitch-alist") != SCM_UNDEFINED) { audio_p_ = new Audio_key (); // *key_req_l_->key_); Audio_element_info info (audio_p_, key_req_l_); diff --git a/lily/lexer.ll b/lily/lexer.ll index 7178826d35..9be2c94085 100644 --- a/lily/lexer.ll +++ b/lily/lexer.ll @@ -137,9 +137,9 @@ HYPHEN -- String s (YYText ()+1); s = s.left_str (s.index_last_i ('"')); DEBUG_OUT << "#version `" << s << "'\n"; + yy_pop_state (); if (!valid_version_b (s)) return INVALID; - yy_pop_state (); } . { LexerError ("No quoted string found after \\version"); @@ -477,9 +477,14 @@ My_lily_lexer::scan_escaped_word (String str) } else if (gh_number_p (sid)) { yylval.scm = sid; return NUMBER_IDENTIFIER; + } else if (Music * mus =unsmob_music (sid)) { + yylval.scm = sid; + + return dynamic_cast (mus) ? REQUEST_IDENTIFIER : MUSIC_IDENTIFIER; } + Identifier * id = unsmob_identifier (sid); if (id) { yylval.id = id; diff --git a/lily/line-group-group-engraver.cc b/lily/line-group-group-engraver.cc index 908396dbe8..53c61f40c3 100644 --- a/lily/line-group-group-engraver.cc +++ b/lily/line-group-group-engraver.cc @@ -52,7 +52,7 @@ Line_group_engraver_group::do_creation_processing() staffline_p_->set_bound(LEFT,it); Pointer_group_interface (it, "bounded-by-me").add_element (staffline_p_); - Engraver::announce_element (Score_element_info (staffline_p_,0)); + Engraver::announce_element (staffline_p_,0); } void diff --git a/lily/line-number-engraver.cc b/lily/line-number-engraver.cc index 2811792adb..476ade7070 100644 --- a/lily/line-number-engraver.cc +++ b/lily/line-number-engraver.cc @@ -43,14 +43,17 @@ Line_number_engraver::process_acknowledged () text_item_p_->set_parent (interesting_[0].elem_l_, Y_AXIS); - announce_element (Score_element_info (text_item_p_, 0)); + announce_element (text_item_p_, 0); } } void Line_number_engraver::acknowledge_element (Score_element_info inf) { - if (Note_head::has_interface (inf.elem_l_)) + if (!inf.req_l_) + return ; + + if ( Note_head::has_interface (inf.elem_l_)) { interesting_.push (inf); support_.push (inf.elem_l_); @@ -73,7 +76,7 @@ Line_number_engraver::do_pre_move_processing () if (i) s += ","; - s += interesting_[i].req_l_->line_number_str (); + s += interesting_[i].req_l_->origin ()->line_number_str (); } diff --git a/lily/line-of-score.cc b/lily/line-of-score.cc index bbe0690406..3d104e9377 100644 --- a/lily/line-of-score.cc +++ b/lily/line-of-score.cc @@ -6,6 +6,7 @@ (c) 1996--2000 Han-Wen Nienhuys */ +#include "input-smob.hh" #include "axis-group-interface.hh" #include "debug.hh" #include "line-of-score.hh" @@ -35,8 +36,6 @@ Line_of_score::Line_of_score(SCM s) : Spanner (s) { rank_i_ = 0; - set_elt_property ("columns", SCM_EOL); - set_elt_property ("all-elements", SCM_EOL); Axis_group_interface::set_interface (this); Axis_group_interface::set_axes (this, Y_AXIS,X_AXIS); @@ -149,37 +148,73 @@ Line_of_score::break_into_pieces (Array const &breaking) } +#define GLOBAL_SYMBOL(cname, name) \ +SCM cname ; \ +void \ +cname ## _init_func () \ +{ \ + cname = ly_symbol2scm (name); \ + scm_permanent_object (cname); \ +} \ +ADD_SCM_INIT_FUNC(cname,cname ## _init_func);\ + + +GLOBAL_SYMBOL( offset_sym , "translate-molecule"); +GLOBAL_SYMBOL( placebox_sym , "placebox"); +GLOBAL_SYMBOL( combine_sym , "combine-molecule"); +GLOBAL_SYMBOL( no_origin_sym , "no-origin"); +GLOBAL_SYMBOL( define_origin_sym , "define-origin"); + + + void Line_of_score::output_molecule (SCM expr, Offset o) { - SCM offset_sym = ly_symbol2scm ("translate-molecule"); - SCM combine_sym = ly_symbol2scm ("combine-molecule"); -enter: - if (!gh_pair_p (expr)) - return; - - SCM head =gh_car (expr); - if (head == offset_sym) + while (1) { - o += ly_scm2offset (gh_cadr (expr)); - expr = gh_caddr (expr); - goto enter; - } - else if (head == combine_sym) - { - output_molecule (gh_cadr (expr), o); - expr = gh_caddr (expr); - goto enter; // tail recursion - } - else - { - pscore_l_->outputter_l_-> - output_scheme (gh_list (ly_symbol2scm ("placebox"), - gh_double2scm (o[X_AXIS]), - gh_double2scm (o[Y_AXIS]), - expr, - SCM_UNDEFINED)); + if (!gh_pair_p (expr)) + return; + + SCM head =gh_car (expr); + if (unsmob_input (head)) + { + Input * ip = unsmob_input (head); + + + pscore_l_->outputter_l_->output_scheme (gh_list (define_origin_sym, + ly_str02scm (ip->file_str ().ch_C()), + gh_int2scm (ip->line_number ()), + gh_int2scm (ip->column_number ()), + SCM_UNDEFINED)); + expr = gh_cadr (expr); + } + else if (head == no_origin_sym) + { + pscore_l_->outputter_l_->output_scheme (gh_list (no_origin_sym, SCM_UNDEFINED)); + expr = gh_cadr (expr); + } + else if (head == offset_sym) + { + o += ly_scm2offset (gh_cadr (expr)); + expr = gh_caddr (expr); + } + else if (head == combine_sym) + { + output_molecule (gh_cadr (expr), o); + expr = gh_caddr (expr); + } + else + { + pscore_l_->outputter_l_-> + output_scheme (gh_list (placebox_sym, + gh_double2scm (o[X_AXIS]), + gh_double2scm (o[Y_AXIS]), + expr, + SCM_UNDEFINED)); + + return; + } } } @@ -373,3 +408,4 @@ Line_of_score::column_l_arr ()const } return acs; } + diff --git a/lily/local-key-engraver.cc b/lily/local-key-engraver.cc index 2067092594..07fd651e14 100644 --- a/lily/local-key-engraver.cc +++ b/lily/local-key-engraver.cc @@ -7,7 +7,7 @@ #include "musical-request.hh" #include "command-request.hh" #include "local-key-item.hh" -#include "key-item.hh" +#include "item.hh" #include "tie.hh" #include "rhythmic-head.hh" #include "timing-translator.hh" @@ -25,7 +25,7 @@ (FIXME). */ struct Local_key_engraver : Engraver { - Local_key_item *key_item_p_; + Item *key_item_p_; protected: VIRTUAL_COPY_CONS(Translator); virtual void do_process_music(); @@ -97,12 +97,13 @@ Local_key_engraver::process_acknowledged () { if (!key_item_p_) { - key_item_p_ = new Local_key_item (get_property ("basicLocalKeyProperties")); + key_item_p_ = new Item(get_property ("basicLocalKeyProperties")); + Local_key_item::set_interface (key_item_p_); Side_position::set_axis (key_item_p_, X_AXIS); Side_position::set_direction (key_item_p_, LEFT); Staff_symbol_referencer::set_interface (key_item_p_); - announce_element (Score_element_info (key_item_p_, 0)); + announce_element (key_item_p_, 0); } @@ -110,14 +111,18 @@ Local_key_engraver::process_acknowledged () sign (prev_acc) * (prev_acc - a) == 1 && abs(prev_acc) == 2; - key_item_p_->add_pitch (note_l->pitch_, - note_l->cautionary_b_, - extra_natural); + Local_key_item::add_pitch (key_item_p_, note_l->pitch_, + note_l->cautionary_b_, + extra_natural); Side_position::add_support (key_item_p_,support_l); } if (!forget) { + /* + not really really correct if there are more than one + noteheads with the same notename. + */ localsig = scm_assoc_set_x (localsig, gh_cons (gh_int2scm (o), gh_int2scm (n)), gh_int2scm (a)); @@ -141,10 +146,8 @@ Local_key_engraver::process_acknowledged () - daddy_trans_l_->set_property ("localKeySignature", localsig); + daddy_trans_l_->set_property ("localKeySignature", localsig); } - /* - */ if (key_item_p_ && grace_align_l_) { @@ -218,16 +221,20 @@ Local_key_engraver::do_process_music() Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0); SCM sig = get_property ("keySignature"); - if (!mp) - { - if (!to_boolean (get_property ("noResetKey"))) - daddy_trans_l_->set_property ("localKeySignature", ly_deep_copy (sig)); - } - else if (last_keysig_ != sig) + + /* + Detect key sig changes. If we haven't found any, check if at start + of measure, and set localKeySignature anyhow. */ + if (last_keysig_ != sig) { daddy_trans_l_->set_property ("localKeySignature", ly_deep_copy (sig)); last_keysig_ = sig; } + else if (!mp) + { + if (!to_boolean (get_property ("noResetKey"))) + daddy_trans_l_->set_property ("localKeySignature", ly_deep_copy (sig)); + } } diff --git a/lily/local-key-item.cc b/lily/local-key-item.cc index 9cc338a48a..6ef1dfba8a 100644 --- a/lily/local-key-item.cc +++ b/lily/local-key-item.cc @@ -14,61 +14,69 @@ #include "rhythmic-head.hh" #include "misc.hh" +SCM +pitch_less (SCM p1, SCM p2) +{ + for (int i = 3; i--; p1 = gh_cdr (p1), p2 = gh_cdr (p2)) + { + if (scm_less_p (gh_car (p1), gh_car (p2))) + return SCM_BOOL_T; + if (gh_car (p1) != gh_car (p2)) + return SCM_BOOL_F; + } + return SCM_BOOL_T; +} + +SCM pitch_less_proc; + + void -Local_key_item::add_pitch (Musical_pitch p, bool cautionary, bool natural) +init_pitch_funcs () { - for (int i=0; i< accidental_arr_.size(); i++) - if (!Musical_pitch::compare (p, accidental_arr_[i].pitch_)) - return; - /* maybe natural (and cautionary) should be modif. nonetheless? */ - - Local_key_cautionary_tuple t; - t.pitch_ = p; - t.cautionary_b_ = cautionary; - t.natural_b_ = natural; - accidental_arr_.push (t); + pitch_less_proc = gh_new_procedure2_0 ("pitch-less", &pitch_less); } -MAKE_SCHEME_CALLBACK(Local_key_item,before_line_breaking); +ADD_SCM_INIT_FUNC(pitch,init_pitch_funcs); -SCM -Local_key_item::before_line_breaking (SCM smob) + +void +Local_key_item::add_pitch (Score_element*me, Musical_pitch p, bool cautionary, bool natural) { - Local_key_item* me = dynamic_cast(unsmob_element (smob)); - me->accidental_arr_.sort (Local_key_cautionary_tuple::compare); - return SCM_UNSPECIFIED; + SCM acs = me->get_elt_property ("accidentals"); + SCM pitch = p.to_scm (); + SCM opts = SCM_EOL; + if (cautionary) + opts = gh_cons (ly_symbol2scm ("cautionary"), opts); + if (natural) + opts = gh_cons (ly_symbol2scm ("natural"), opts); + + pitch = gh_append2 (pitch, opts); + acs = scm_merge_x (acs, gh_cons (pitch, SCM_EOL), pitch_less_proc); + + me->set_elt_property ("accidentals", acs); } Molecule -Local_key_item::accidental (Score_element*me, int j, bool cautionary, bool natural) +Local_key_item::parenthesize (Score_element*me, Molecule m) { - Molecule m (me->lookup_l ()->afm_find (String ("accidentals-") + to_str (j))); - if (natural) - { - Molecule prefix = me->lookup_l ()->afm_find (String ("accidentals-0")); - m.add_at_edge(X_AXIS, LEFT, Molecule(prefix), 0); - } - if (cautionary) - { - Molecule open = me->lookup_l ()->afm_find (String ("accidentals-(")); - Molecule close = me->lookup_l ()->afm_find (String ("accidentals-)")); - m.add_at_edge(X_AXIS, LEFT, Molecule(open), 0); - m.add_at_edge(X_AXIS, RIGHT, Molecule(close), 0); - } - + Molecule open = me->lookup_l ()->afm_find (String ("accidentals-(")); + Molecule close = me->lookup_l ()->afm_find (String ("accidentals-)")); + m.add_at_edge(X_AXIS, LEFT, Molecule(open), 0); + m.add_at_edge(X_AXIS, RIGHT, Molecule(close), 0); + return m; } /* - UGH. clean me up + UGH. clean me, revise placement routine (See Ross & Wanske; + accidental placement is more complicated than this. */ MAKE_SCHEME_CALLBACK(Local_key_item,brew_molecule); SCM Local_key_item::brew_molecule (SCM smob) { - Local_key_item* lki = dynamic_cast(unsmob_element (smob)); - Score_element* me = lki; + Score_element* me = unsmob_element (smob); Molecule mol; @@ -76,10 +84,13 @@ Local_key_item::brew_molecule (SCM smob) Molecule octave_mol; bool oct_b = false; int lastoct = -100; - - for (int i = 0; i < lki->accidental_arr_.size(); i++) + + SCM accs = me->get_elt_property ("accidentals"); + for (SCM s = accs; + gh_pair_p (s); s = gh_cdr (s)) { - Musical_pitch p (lki->accidental_arr_[i].pitch_); + Musical_pitch p (gh_car (s)); + // do one octave if (p.octave_i_ != lastoct) { @@ -99,12 +110,20 @@ Local_key_item::brew_molecule (SCM smob) Real dy = (gh_number_p (c0) ? gh_scm2int (c0) : 0 + p.notename_i_) * note_distance; - Molecule m (accidental (me,p.accidental_i_, - lki->accidental_arr_[i].cautionary_b_, - lki->accidental_arr_[i].natural_b_)); + Molecule acc (me->lookup_l ()->afm_find (String ("accidentals-") + + to_str (p.accidental_i_))); + + if (scm_memq (ly_symbol2scm ("natural"), gh_car (s)) != SCM_BOOL_F) + { + Molecule prefix = me->lookup_l ()->afm_find (String ("accidentals-0")); + acc.add_at_edge(X_AXIS, LEFT, Molecule(prefix), 0); + } + + if (scm_memq (ly_symbol2scm ("cautionary"), gh_car (s)) != SCM_BOOL_F) + acc = parenthesize (me, acc); - m.translate_axis (dy, Y_AXIS); - octave_mol.add_at_edge (X_AXIS, RIGHT, m, 0); + acc.translate_axis (dy, Y_AXIS); + octave_mol.add_at_edge (X_AXIS, RIGHT, acc, 0); } if (oct_b) @@ -115,7 +134,7 @@ Local_key_item::brew_molecule (SCM smob) octave_mol = Molecule (); } - if (lki->accidental_arr_.size()) + if (gh_pair_p (accs)) { Drul_array pads; @@ -142,13 +161,13 @@ Local_key_item::brew_molecule (SCM smob) return mol.create_scheme(); } -Local_key_item::Local_key_item (SCM s) - : Item (s) -{ - -} bool Local_key_item::has_interface (Score_element*m) { return m && m->has_interface (ly_symbol2scm ("accidentals-interface")); } +void +Local_key_item::set_interface (Score_element*m) +{ + m->set_interface (ly_symbol2scm ("accidentals-interface")); +} diff --git a/lily/lyric-combine-music-iterator.cc b/lily/lyric-combine-music-iterator.cc index fe73d4f62e..c422d79e63 100644 --- a/lily/lyric-combine-music-iterator.cc +++ b/lily/lyric-combine-music-iterator.cc @@ -12,16 +12,25 @@ #include "lyric-combine-music.hh" #include "musical-request.hh" -Busy_playing_req busy_req; -Melisma_req melisma_start_req; -Melisma_req melisma_stop_req; -Melisma_playing_req melisma_playing_req; - +/* + Ugh, why static? + */ +Busy_playing_req *busy_req; +Melisma_req *melisma_start_req; +Melisma_req *melisma_stop_req; +Melisma_playing_req * melisma_playing_req; Lyric_combine_music_iterator::Lyric_combine_music_iterator () { - melisma_start_req.span_dir_ = START; - melisma_stop_req.span_dir_ = STOP; + if (!busy_req) + { + busy_req = new Busy_playing_req; + melisma_playing_req = new Melisma_playing_req; + melisma_stop_req = new Melisma_req; + melisma_start_req = new Melisma_req; + } + melisma_start_req->span_dir_ = START; + melisma_stop_req->span_dir_ = STOP; music_iter_p_ =0; lyric_iter_p_ =0; @@ -65,19 +74,20 @@ Lyric_combine_music_iterator::do_process_and_next (Moment m) music_iter_p_->process_and_next (m); - bool busy = try_music (&busy_req); + bool busy = try_music (busy_req); if (busy) { - bool melisma_b = try_music (&melisma_playing_req); + bool melisma_b = try_music (melisma_playing_req); if (!melisma_b) { if (lyric_iter_p_->ok ()) { + // FIXME #if 0 // devise a new way for this if (melisma_b && !melisma_started_b_) - lyric_iter_p_->try_music (&melisma_start_req); + lyric_iter_p_->try_music (melisma_start_req); else if (melisma_started_b_) - lyric_iter_p_->try_music (&melisma_stop_req); + lyric_iter_p_->try_music (melisma_stop_req); #endif Moment m= lyric_iter_p_->next_moment (); @@ -86,8 +96,6 @@ Lyric_combine_music_iterator::do_process_and_next (Moment m) } } - - Music_iterator::do_process_and_next (m); } @@ -98,7 +106,7 @@ Lyric_combine_music_iterator::~Lyric_combine_music_iterator () } Music_iterator* -Lyric_combine_music_iterator::try_music_in_children (Music const *m) const +Lyric_combine_music_iterator::try_music_in_children (Music *m) const { Music_iterator * i = music_iter_p_->try_music (m); if (i) diff --git a/lily/lyric-combine-music.cc b/lily/lyric-combine-music.cc index 5676d4cff0..d6e42d2cbc 100644 --- a/lily/lyric-combine-music.cc +++ b/lily/lyric-combine-music.cc @@ -12,64 +12,52 @@ Lyric_combine_music::Lyric_combine_music (Music * m, Music * l) { - music_p_ = m; - lyrics_p_ = l; + set_mus_property ("music", m->self_scm_); + set_mus_property ("lyrics", l->self_scm_); } -Lyric_combine_music::~Lyric_combine_music () -{ - delete music_p_; - delete lyrics_p_; -} - -Lyric_combine_music::Lyric_combine_music (Lyric_combine_music const&s) - : Music (s) -{ - music_p_ = s.music_p_ ? s.music_p_->clone ():0; - lyrics_p_ = s.lyrics_p_ ? s.lyrics_p_->clone ():0; -} void Lyric_combine_music::transpose (Musical_pitch p) { - music_p_->transpose (p); - lyrics_p_->transpose (p); + music_l ()->transpose (p); + lyrics_l () ->transpose (p); } void Lyric_combine_music::do_print () const { - music_p_->print(); - lyrics_p_->print (); + music_l ()->print(); + lyrics_l () ->print (); } Moment Lyric_combine_music::length_mom () const { - return music_p_->length_mom (); + return music_l ()->length_mom (); } Musical_pitch Lyric_combine_music::to_relative_octave ( Musical_pitch p ) { - p = music_p_->to_relative_octave (p); - return lyrics_p_->to_relative_octave (p); + p = music_l ()->to_relative_octave (p); + return lyrics_l () ->to_relative_octave (p); } void Lyric_combine_music::compress (Moment m) { - music_p_->compress (m); + music_l ()->compress (m); } Music* Lyric_combine_music::music_l () const { - return music_p_; + return unsmob_music (get_mus_property ("music")); } Music* Lyric_combine_music::lyrics_l () const { - return lyrics_p_; + return unsmob_music (get_mus_property ("lyrics")); } diff --git a/lily/lyric-engraver.cc b/lily/lyric-engraver.cc index 9f142dc891..3108ca01a4 100644 --- a/lily/lyric-engraver.cc +++ b/lily/lyric-engraver.cc @@ -53,7 +53,7 @@ Lyric_engraver::do_process_music() */ text_p_->translate_axis (paper_l()->get_var ("quartwidth")/2, X_AXIS); - announce_element (Score_element_info (text_p_, req_l_)); + announce_element (text_p_, req_l_); } } diff --git a/lily/mark-engraver.cc b/lily/mark-engraver.cc index 9a9b96e245..6b37780158 100644 --- a/lily/mark-engraver.cc +++ b/lily/mark-engraver.cc @@ -123,7 +123,7 @@ Mark_engraver::create_items (Request *rq) } - announce_element (Score_element_info (text_p_, rq)); + announce_element (text_p_, rq); } @@ -161,9 +161,11 @@ Mark_engraver::do_process_music () /* automatic marks. */ - SCM m = (mark_req_l_->mark_label_ == SCM_UNDEFINED) - ? get_property ("rehearsalMark") - : SCM(mark_req_l_->mark_label_); + + SCM m = mark_req_l_->get_mus_property ("label"); + if (gh_string_p (m)) + m = get_property ("rehearsalMark"); +; if (gh_number_p (m)) { diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index 214ea14fc2..d6a34e3268 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -115,7 +115,7 @@ Multi_measure_rest_engraver::do_process_music () Multi_measure_rest::set_interface (mmrest_p_); Staff_symbol_referencer::set_interface (mmrest_p_); - announce_element (Score_element_info (mmrest_p_, busy_span_req_l_)); + announce_element (mmrest_p_, busy_span_req_l_); start_measure_i_ = gh_scm2int (get_property ("currentBarNumber")); } diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index 1ad45da523..d3a92834e7 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -122,33 +122,33 @@ Music_iterator::ok() const } Music_iterator* -Music_iterator::static_get_iterator_p (Music const *m) +Music_iterator::static_get_iterator_p (Music *m) { Music_iterator * p =0; /* It would be nice to do this decentrally, but the order of this is significant. */ - if (dynamic_cast (m)) + if (dynamic_cast (m)) p = new Request_chord_iterator; - else if (dynamic_cast (m)) + else if (dynamic_cast (m)) p = new Lyric_combine_music_iterator; - else if (dynamic_cast (m)) + else if (dynamic_cast (m)) p = new Simultaneous_music_iterator; - else if (dynamic_cast (m)) + else if (dynamic_cast (m)) p = new Sequential_music_iterator; - else if (dynamic_cast (m)) + else if (dynamic_cast (m)) p = new Property_iterator; - else if (dynamic_cast (m)) + else if (dynamic_cast (m)) p = new Change_iterator; - else if (dynamic_cast (m)) + else if (dynamic_cast (m)) p = new Time_scaled_music_iterator; - else if (dynamic_cast (m)) + else if (dynamic_cast (m)) p = new Grace_iterator; - else if (dynamic_cast (m)) + else if (dynamic_cast (m)) p = new Auto_change_iterator; - else if (dynamic_cast (m)) + else if (dynamic_cast (m)) p = new Music_wrapper_iterator; - else if (Repeated_music const * n = dynamic_cast (m)) + else if (Repeated_music * n = dynamic_cast (m)) { if (n->type_ == "tremolo") p = new Chord_tremolo_iterator; @@ -167,10 +167,10 @@ Music_iterator::static_get_iterator_p (Music const *m) } void -Music_iterator::init_translator (Music const *m, Translator_group *report_l) +Music_iterator::init_translator (Music *m, Translator_group *report_l) { music_l_ = m; - if (Context_specced_music const * csm =dynamic_cast(m)) + if (Context_specced_music * csm =dynamic_cast(m)) { Translator_group* a =report_l-> find_create_translator_l (csm->translator_type_str_, csm->translator_id_str_); @@ -185,7 +185,7 @@ Music_iterator::init_translator (Music const *m, Translator_group *report_l) Music_iterator* -Music_iterator::get_iterator_p (Music const*m) const +Music_iterator::get_iterator_p (Music *m) const { Music_iterator*p = static_get_iterator_p (m); p->init_translator (m, report_to_l()); @@ -200,7 +200,7 @@ Music_iterator::Music_iterator() } Music_iterator* -Music_iterator::try_music (Music const *m) const +Music_iterator::try_music (Music *m) const { bool b = report_to_l ()->try_music ((Music*)m); // ugh Music_iterator * it = b ? (Music_iterator*) this : 0; // ugh @@ -210,7 +210,7 @@ Music_iterator::try_music (Music const *m) const } Music_iterator* -Music_iterator::try_music_in_children (Music const * ) const +Music_iterator::try_music_in_children (Music * ) const { return 0; } diff --git a/lily/music-list.cc b/lily/music-list.cc index 5824cc7ada..4df9c53da4 100644 --- a/lily/music-list.cc +++ b/lily/music-list.cc @@ -21,25 +21,18 @@ Simultaneous_music::length_mom () const return maximum_length (); } - -void -Music_sequence::compress (Moment m) -{ - for (Cons *i = music_p_list_p_->head_; i; i = i->next_) - i->car_->compress (m); -} - -Simultaneous_music::Simultaneous_music(Music_list *p) - : Music_sequence (p) +Simultaneous_music::Simultaneous_music(SCM head) + : Music_sequence (head) { } -Sequential_music::Sequential_music(Music_list *p) - : Music_sequence (p) +Sequential_music::Sequential_music(SCM head) + : Music_sequence (head) { } + Moment Sequential_music::length_mom () const { @@ -52,57 +45,18 @@ Simultaneous_music::to_relative_octave (Musical_pitch p) return do_relative_octave (p, true); } - - - -Musical_pitch -Music_list::do_relative_octave (Musical_pitch last, bool ret_first) -{ - Musical_pitch retval; - int count=0; - for (Cons *i = head_; i ; i = i->next_) - { - last = i->car_->to_relative_octave (last); - if (!count ++ ) - retval = last; - } - - if (!ret_first) - retval = last; - - return retval; -} - - -Music_list::Music_list (Music_list const &s) - : Cons_list (s), Input (s) +Request_chord::Request_chord(SCM s) + : Simultaneous_music (s) { - Cons_list::init (); - clone_killing_cons_list (*this, s.head_); } - -void -Music_list::add_music (Music*m_p) -{ - if (!m_p) - return; - - append (new Killing_cons (m_p, 0)); -} - -Request_chord::Request_chord() - : Simultaneous_music (new Music_list) -{ -} - - Musical_pitch Request_chord::to_relative_octave (Musical_pitch last) { - for (Cons *i = music_p_list_p_->head_; i ; i = i->next_) - { - if (Melodic_req *m= dynamic_cast (i->car_)) + for (SCM s = music_list (); gh_pair_p (s); s = gh_cdr (s)) + { + Music * mus = unsmob_music (gh_car (s)); + if (Melodic_req *m= dynamic_cast (mus)) { Musical_pitch &pit = m->pitch_; pit.to_relative_octave (last); @@ -113,11 +67,4 @@ Request_chord::to_relative_octave (Musical_pitch last) } -Music_list::Music_list () -{ -} -Music_sequence::~Music_sequence () -{ - delete music_p_list_p_; -} diff --git a/lily/music-sequence.cc b/lily/music-sequence.cc index 9d5801d2f2..aa3bc2eb35 100644 --- a/lily/music-sequence.cc +++ b/lily/music-sequence.cc @@ -10,50 +10,74 @@ #include "debug.hh" #include "musical-pitch.hh" -Music_sequence::Music_sequence (Music_sequence const&s) - : Music (s) + +void +Music_sequence::truncate (int k) { - music_p_list_p_ = new Music_list (*s.music_p_list_p_); -} + SCM l = get_mus_property ("list"); + if (k == 0) + { + l = SCM_EOL; + } + else + { + SCM s = l; + k--; + for (; gh_pair_p (s) && k--; s = gh_cdr (s)) + ; + if (gh_pair_p (s)) + { + gh_set_cdr_x (s, SCM_EOL); + } + } + set_mus_property ("list", l); +} +SCM +Music_sequence::music_list ()const +{ + return get_mus_property ("list"); +} -Music_sequence::Music_sequence(Music_list *mlist_p) +/* + Ugh this sucks. Linear. do not use. + */ +void +Music_sequence::append_music (Music *m) +{ + set_mus_property ("list", + gh_append2( music_list(), gh_cons (m->self_scm_, SCM_EOL))); +} +Music_sequence::Music_sequence(SCM h) { - music_p_list_p_ = mlist_p; + set_mus_property ("list", h); } void Music_sequence::transpose (Musical_pitch rq) { - for (Cons *i = music_p_list_p_->head_; i; i = i->next_) - i->car_->transpose (rq); + for (SCM s = music_list (); gh_pair_p (s); s = gh_cdr (s)) + unsmob_music (gh_car (s))->transpose (rq); } void Music_sequence::do_print() const { #ifndef NPRINT - for (Cons *i = music_p_list_p_->head_; i; i = i->next_) - i->car_->print(); + for (SCM s = music_list (); gh_pair_p (s); s = gh_cdr (s)) + unsmob_music (gh_car (s))->print(); #endif } -void -Music_sequence::add_music (Music *m_p) -{ - music_p_list_p_->add_music (m_p); -} Moment Music_sequence::cumulative_length () const { Moment last=0; - for (Cons *i = music_p_list_p_->head_; i; i = i->next_) - { - last += i->car_->length_mom (); - } + for (SCM s = music_list (); gh_pair_p (s); s = gh_cdr (s)) + last += unsmob_music (gh_car (s))->length_mom (); return last; } @@ -68,19 +92,40 @@ Moment Music_sequence::maximum_length () const { Moment dur = 0; - for (Cons *i = music_p_list_p_->head_; i; i = i->next_) - dur = dur >? i->car_->length_mom (); + for (SCM s = music_list (); gh_pair_p (s); s = gh_cdr (s)) + dur = dur >? unsmob_music (gh_car (s))->length_mom (); return dur; } int Music_sequence::length_i () const { - return cons_list_size_i (music_p_list_p_->head_); + return scm_ilength (music_list ()); } Musical_pitch -Music_sequence::do_relative_octave (Musical_pitch p, bool b) +Music_sequence::do_relative_octave (Musical_pitch p, bool ret_first) +{ + Musical_pitch retval; + int count=0; + + Musical_pitch last = p; + for (SCM s = music_list (); gh_pair_p (s); s = gh_cdr (s)) + { + last = unsmob_music (gh_car (s))->to_relative_octave (last); + if (!count ++ ) + retval = last; + } + + if (!ret_first) + retval = last; + + return retval; +} + +void +Music_sequence::compress (Moment m) { - return music_p_list_p_->do_relative_octave (p, b); + for (SCM s = music_list (); gh_pair_p (s); s = gh_cdr (s)) + unsmob_music (gh_car (s))->compress (m); } diff --git a/lily/music-wrapper-iterator.cc b/lily/music-wrapper-iterator.cc index 69429384dc..af658cf72a 100644 --- a/lily/music-wrapper-iterator.cc +++ b/lily/music-wrapper-iterator.cc @@ -28,7 +28,7 @@ void Music_wrapper_iterator::construct_children () { child_iter_p_ = - get_iterator_p (dynamic_cast (music_l_)->element_l ()); + get_iterator_p (dynamic_cast (music_l_)->element ()); } Music_wrapper_iterator::~Music_wrapper_iterator () @@ -59,7 +59,7 @@ Music_wrapper_iterator::next_moment () const Music_iterator* -Music_wrapper_iterator::try_music_in_children (Music const *m) const +Music_wrapper_iterator::try_music_in_children (Music *m) const { return child_iter_p_->try_music (m); } diff --git a/lily/music-wrapper.cc b/lily/music-wrapper.cc index 26807805e7..59d3c43441 100644 --- a/lily/music-wrapper.cc +++ b/lily/music-wrapper.cc @@ -10,61 +10,47 @@ #include "music-wrapper.hh" -Music_wrapper::~Music_wrapper () -{ - delete element_p_; -} - -Music_wrapper::Music_wrapper (Music_wrapper const&s) - : Music (s) -{ - element_p_ = (s.element_p_)?s.element_p_->clone ():0; -} - void Music_wrapper::do_print () const { - element_p_->print (); + element ()->print (); } - void Music_wrapper::transpose (Musical_pitch p) { - if (element_p_) - element_p_-> transpose (p); + if (element ()) + element ()-> transpose (p); } Music_wrapper::Music_wrapper(Music*p) { - element_p_ = p; + set_mus_property ("element", p->self_scm_); } - - Moment Music_wrapper::length_mom () const { - return element_p_->length_mom (); + return element ()->length_mom (); } Musical_pitch Music_wrapper::to_relative_octave (Musical_pitch p) { - return element_p_->to_relative_octave (p); + return element ()->to_relative_octave (p); } Music* -Music_wrapper::element_l () const +Music_wrapper::element () const { - return element_p_; + return unsmob_music (get_mus_property ("element")); } void Music_wrapper::compress (Moment m) { - element_l ()->compress (m); + element ()->compress (m); } diff --git a/lily/music.cc b/lily/music.cc index 4b1f842458..536082211e 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -6,13 +6,57 @@ (c) 1997--2000 Han-Wen Nienhuys */ +#include "input-smob.hh" #include "music.hh" #include "music-list.hh" #include "debug.hh" #include "musical-pitch.hh" +#include "ly-smobs.icc" + +SCM +ly_deep_mus_copy (SCM m) +{ + if (unsmob_music (m)) + { + return unsmob_music (m)->clone ()->self_scm_; + } + else if (gh_pair_p (m)) + { + return gh_cons (ly_deep_copy (gh_car (m)), ly_deep_copy (gh_cdr (m))); + } + else + return m; +} + + +Music::Music (Music const &m) +{ + self_scm_ = SCM_EOL; + immutable_property_alist_ = m.immutable_property_alist_; + SCM c =ly_deep_mus_copy (m.mutable_property_alist_); + mutable_property_alist_ = c; + + smobify_self (); + + set_spot (*m.origin ()); +} + Music::Music() { + self_scm_ = SCM_EOL; + immutable_property_alist_ = SCM_EOL; + mutable_property_alist_ = SCM_EOL; + smobify_self (); +} + +SCM +Music::mark_smob (SCM m) +{ + Music * mus = SMOB_TO_TYPE (Music, m); + scm_gc_mark (mus->immutable_property_alist_); + scm_gc_mark (mus->mutable_property_alist_); + return mus->do_derived_mark (); } void @@ -31,17 +75,13 @@ Music::length_mom () const return 0; } -void -Music::print() const +int +Music::print_smob(SCM s, SCM p, scm_print_state*) { -#ifndef NPRINT - if (! flower_dstream) - return ; - DEBUG_OUT << classname(this) << "{"; - - do_print(); - DEBUG_OUT << "}\n"; -#endif + scm_puts ("#",p); + return 1; } Musical_pitch @@ -56,3 +96,102 @@ Music::transpose (Musical_pitch ) { } + +IMPLEMENT_UNSMOB(Music,music); +IMPLEMENT_SMOBS(Music); + +/****************************/ + +SCM +Music::get_mus_property (const char *nm) const +{ + SCM sym = ly_symbol2scm (nm); + return get_mus_property (sym); +} + +SCM +Music::get_mus_property (SCM sym) const +{ + SCM s = scm_sloppy_assq(sym, mutable_property_alist_); + if (s != SCM_BOOL_F) + return gh_cdr (s); + + s = scm_sloppy_assq (sym, immutable_property_alist_); + return (s == SCM_BOOL_F) ? SCM_EOL : gh_cdr (s); +} + +/* + Remove the value associated with KEY, and return it. The result is + that a next call will yield SCM_EOL (and not the underlying + `basic' property. +*/ +SCM +Music::remove_mus_property (const char* key) +{ + SCM val = get_mus_property (key); + if (val != SCM_EOL) + set_mus_property (key, SCM_EOL); + return val; +} + +void +Music::set_mus_property (const char* k, SCM v) +{ + SCM s = ly_symbol2scm (k); + set_mus_property (s, v); +} + +void +Music::set_immutable_mus_property (const char*k, SCM v) +{ + SCM s = ly_symbol2scm (k); + set_immutable_mus_property (s, v); +} + +void +Music::set_immutable_mus_property (SCM s, SCM v) +{ + immutable_property_alist_ = gh_cons (gh_cons (s,v), mutable_property_alist_); + mutable_property_alist_ = scm_assq_remove_x (mutable_property_alist_, s); +} +void +Music::set_mus_property (SCM s, SCM v) +{ + mutable_property_alist_ = scm_assq_set_x (mutable_property_alist_, s, v); +} + +void +Music::set_spot (Input ip) +{ + set_mus_property ("origin", make_input (ip)); +} + + + +Input* +Music::origin () const +{ + Input *ip = unsmob_input (get_mus_property ("origin")); + return ip ? ip : & dummy_input_global; +} + +SCM +Music::do_derived_mark () +{ + return SCM_EOL; +} + +void +Music::print ()const +{ +} + +void +Music::do_smobify_self () +{ +} + +Music::~Music () +{ + +} diff --git a/lily/my-lily-parser.cc b/lily/my-lily-parser.cc index dbdbeabd18..3e4bbb602b 100644 --- a/lily/my-lily-parser.cc +++ b/lily/my-lily-parser.cc @@ -106,8 +106,6 @@ My_lily_parser::get_chord (Musical_pitch tonic, Musical_pitch* bass_p, Duration d) { - Simultaneous_music*v = new Request_chord; - v->set_spot (here_input ()); /* UARGAUGRAGRUAUGRUINAGRAUGIRNA @@ -120,22 +118,22 @@ My_lily_parser::get_chord (Musical_pitch tonic, Tonic_req* t = new Tonic_req; t->pitch_ = tonic; - v->add_music (t); + SCM l = SCM_EOL; //urg if (chord.inversion_b_ && Chord::find_notename_i (&chord.pitch_arr_, chord.inversion_pitch_) > 0) { Inversion_req* i = new Inversion_req; i->pitch_ = chord.inversion_pitch_; - v->add_music (i); + l = gh_cons (i->self_scm_, l); } if (chord.bass_b_) { Bass_req* b = new Bass_req; b->pitch_ = chord.bass_pitch_; - v->add_music (b); + l = gh_cons (b->self_scm_, l); } Array pitch_arr = chord.to_pitch_arr (); @@ -145,9 +143,12 @@ My_lily_parser::get_chord (Musical_pitch tonic, Note_req* n = new Note_req; n->pitch_ = p; n->duration_ = d; - v->add_music (n); + l = gh_cons (n->self_scm_, l); } + Simultaneous_music*v = new Request_chord (l); + v->set_spot (here_input ()); + return v; } diff --git a/lily/note-heads-engraver.cc b/lily/note-heads-engraver.cc index 39b1cf6b13..5378672633 100644 --- a/lily/note-heads-engraver.cc +++ b/lily/note-heads-engraver.cc @@ -111,14 +111,13 @@ Note_heads_engraver::do_process_music() d->set_parent (note_p, Y_AXIS); d->add_offset_callback (Dots::quantised_position_callback, Y_AXIS); - announce_element (Score_element_info (d,0)); + announce_element (d,0); dot_p_arr_.push (d); } note_p->set_elt_property("staff-position", gh_int2scm (note_req_l->pitch_.steps ())); - Score_element_info itinf (note_p,note_req_l); - announce_element (itinf); + announce_element (note_p,note_req_l); note_p_arr_.push (note_p); } } diff --git a/lily/note-name-engraver.cc b/lily/note-name-engraver.cc index c46007a16f..095f18cd60 100644 --- a/lily/note-name-engraver.cc +++ b/lily/note-name-engraver.cc @@ -48,7 +48,7 @@ Note_name_engraver::do_process_music () { Item * t = new Item (get_property ("basicNoteNameProperties")); t->set_elt_property ("text", ly_str02scm ( s.ch_C())); - announce_element (Score_element_info (t, req_l_arr_[0])); + announce_element (t, req_l_arr_[0]); texts_.push (t); } } diff --git a/lily/output-property-engraver.cc b/lily/output-property-engraver.cc index ebbb40b6b6..40036ec0af 100644 --- a/lily/output-property-engraver.cc +++ b/lily/output-property-engraver.cc @@ -42,7 +42,7 @@ Output_property_engraver::acknowledge_element (Score_element_info inf) for (int i=props_.size (); i--; ) { Output_property * o = props_[i]; - SCM pred = gh_car (o->pred_sym_val_list_); + SCM pred = o->get_mus_property ("predicate"); /* should typecheck pred. @@ -51,8 +51,9 @@ Output_property_engraver::acknowledge_element (Score_element_info inf) gh_list (inf.elem_l_->self_scm_, SCM_UNDEFINED)); if (to_boolean (result)) { - inf.elem_l_->set_elt_property (gh_cadr (o->pred_sym_val_list_), - gh_caddr (o->pred_sym_val_list_)); + SCM sym = o->get_mus_property ("symbol"); + SCM val = o->get_mus_property ("value"); + inf.elem_l_->set_elt_property (sym, val); } } } diff --git a/lily/output-property.cc b/lily/output-property.cc index e8a2d6a463..8cd70e8262 100644 --- a/lily/output-property.cc +++ b/lily/output-property.cc @@ -11,6 +11,8 @@ Output_property::Output_property(SCM pred, SCM sym, SCM val) { - pred_sym_val_list_ = gh_list (pred, sym, val, SCM_UNDEFINED); + set_mus_property ("predicate", pred); + set_mus_property ("symbol", sym); + set_mus_property ("value", val); } diff --git a/lily/paper-def.cc b/lily/paper-def.cc index 9eec211a70..d90d5b305b 100644 --- a/lily/paper-def.cc +++ b/lily/paper-def.cc @@ -68,7 +68,7 @@ Paper_def::get_realvar (SCM s) const } else { - non_fatal_error (_("not a real variable")); + programming_error ("not a real variable"); return 0.0; } } diff --git a/lily/paper-outputter.cc b/lily/paper-outputter.cc index 0277f753a7..39d1b49c0e 100644 --- a/lily/paper-outputter.cc +++ b/lily/paper-outputter.cc @@ -126,6 +126,12 @@ Paper_outputter::output_scheme (SCM scm) } +/* + UGH. + + Should probably change interface to do less eval ( symbol ), and more + apply (procedure, args) + */ void Paper_outputter::dump_scheme (SCM s) { diff --git a/lily/paper-score.cc b/lily/paper-score.cc index 86797de758..ec2c83f65f 100644 --- a/lily/paper-score.cc +++ b/lily/paper-score.cc @@ -40,6 +40,11 @@ Paper_score::typeset_line (Line_of_score *l) } main_smob_ = gh_cons (l->self_scm_, main_smob_); l->pscore_l_ = this; + + /* + We don't unprotect l->self_scm_, we haven't got any place else to + protect it from collection. */ + } Paper_score::Paper_score (Paper_score const &s) diff --git a/lily/parser.yy b/lily/parser.yy index d2449736ed..8ce72cb885 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -31,6 +31,7 @@ #include "music-list.hh" #include "change-translator.hh" #include "file-results.hh" +#include "input.hh" #include "scope.hh" #include "relative-music.hh" #include "lyric-combine-music.hh" @@ -86,7 +87,6 @@ print_mudela_versions (ostream &os) Identifier *id; String * string; Music *music; - Music_list *music_list; Score *score; Scope *scope; Interval *interval; @@ -194,14 +194,14 @@ yylex (YYSTYPE *s, void * v_l) %token CHORDMODIFIER_PITCH %token DURATION_IDENTIFIER %token IDENTIFIER -%token MUSIC_IDENTIFIER -%token REQUEST_IDENTIFIER %token TRANS_IDENTIFIER -%token NUMBER_IDENTIFIER %token SCORE_IDENTIFIER %token MUSIC_OUTPUT_DEF_IDENTIFIER +%token NUMBER_IDENTIFIER +%token REQUEST_IDENTIFIER +%token MUSIC_IDENTIFIER %token STRING_IDENTIFIER SCM_IDENTIFIER %token DURATION RESTNAME %token STRING @@ -239,7 +239,7 @@ yylex (YYSTYPE *s, void * v_l) %type Music Sequential_music Simultaneous_music Music_sequence %type relative_music re_rhythmed_music %type property_def translator_change -%type Music_list +%type Music_list %type music_output_def_body %type shorthand_command_req %type post_request @@ -378,11 +378,12 @@ identifier_init: $$ = smobify (new Translator_group_identifier ($1, TRANS_IDENTIFIER)); } | Music { - $$ = smobify (new Music_identifier ($1, MUSIC_IDENTIFIER)); + $$ = $1->self_scm_; + scm_unprotect_object ($$); } - | post_request { - $$ = smobify (new Request_identifier ($1, REQUEST_IDENTIFIER)); + $$ = $1->self_scm_; + scm_unprotect_object ($$); } | explicit_duration { $$ = smobify (new Duration_identifier ($1, DURATION_IDENTIFIER)); @@ -474,8 +475,11 @@ score_block: score_body: Music { $$ = new Score; + $$->set_spot (THIS->here_input ()); - $$->music_p_ = $1; + SCM m = $1->self_scm_; + scm_unprotect_object (m); + $$->music_ = m; } | SCORE_IDENTIFIER { $$ = $1->access_content_Score (true); @@ -548,7 +552,6 @@ music_output_def_body: music. */ dynamic_cast ($$)->set_tempo ($2->dur_.length_mom (), $2->metronome_i_); - delete $2; } | music_output_def_body bare_int '=' FONT STRING { // ugh, what a syntax Lookup * l =unsmob_lookup (Lookup::make_lookup()); @@ -570,11 +573,19 @@ tempo_request: ; Music_list: /* empty */ { - $$ = new Music_list; - $$->set_spot (THIS->here_input ()); + $$ = gh_cons (SCM_EOL, SCM_EOL); } | Music_list Music { - $$->add_music ($2); + SCM s = $$; + SCM c = gh_cons ($2->self_scm_, SCM_EOL); + scm_unprotect_object ($2->self_scm_); /* UGH */ + + + if (gh_pair_p (gh_cdr (s))) + gh_set_cdr_x (gh_cdr (s), c); /* append */ + else + gh_set_car_x (s, c); /* set first cons */ + gh_set_cdr_x (s, c) ; /* remember last cell */ } | Music_list error { } @@ -604,42 +615,37 @@ Repeated_music: { Music_sequence* m = dynamic_cast ($5); if (m && $3 < m->length_i ()) - $5->warning (_ ("More alternatives than repeats. Junking excess alternatives.")); + $5->origin ()->warning (_ ("More alternatives than repeats. Junking excess alternatives.")); Repeated_music * r = new Repeated_music ($4, $3 >? 1, m); $$ = r; r->type_ = ly_scm2string ($2); r->fold_b_ = (r->type_ == "fold"); r->volta_fold_b_ = (r->type_ == "volta"); - r->set_spot ($4->spot ()); + r->set_spot (*$4->origin ()); } ; Music_sequence: '{' Music_list '}' { - $$ = new Music_sequence ($2); - $$->set_spot ($2->spot ()); + $$ = new Music_sequence (gh_car ($2)); } ; Sequential_music: SEQUENTIAL '{' Music_list '}' { - $$ = new Sequential_music ($3); - $$->set_spot ($3->spot ()); + $$ = new Sequential_music (gh_car ($3)); } | '{' Music_list '}' { - $$ = new Sequential_music ($2); - $$->set_spot ($2->spot ()); + $$ = new Sequential_music (gh_car ($2)); } ; Simultaneous_music: SIMULTANEOUS '{' Music_list '}'{ - $$ = new Simultaneous_music ($3); - $$->set_spot ($3->spot ()); + $$ = new Simultaneous_music (gh_car ($3)); } | '<' Music_list '>' { - $$ = new Simultaneous_music ($2); - $$->set_spot ($2->spot ()); + $$ = new Simultaneous_music (gh_car ($2)); } ; @@ -659,7 +665,7 @@ Simple_music: $$ = new Output_property (pred,$3, $5); } - | MUSIC_IDENTIFIER { $$ = $1->access_content_Music (true); } + | MUSIC_IDENTIFIER { $$ = unsmob_music ($1)->clone (); } | property_def | translator_change | Simple_music '*' bare_unsigned '/' bare_unsigned { @@ -687,7 +693,7 @@ Composite_music: Auto_change_music * chm = new Auto_change_music (ly_scm2string ($2), $3); $$ = chm; - chm->set_spot ($3->spot ()); + chm->set_spot (*$3->origin ()); } | GRACE Music { $$ = new Grace_music ($2); @@ -715,11 +721,11 @@ Composite_music: | Sequential_music { $$ = $1; } | TRANSPOSE musical_pitch Music { $$ = new Transposed_music ($3, *$2); - delete $2; + delete $2; // ugh } | TRANSPOSE steno_tonic_pitch Music { $$ = new Transposed_music ($3, *$2); - delete $2; + delete $2; // ugh } | NOTES { THIS->lexer_p_->push_note_state (); } @@ -748,7 +754,7 @@ Composite_music: relative_music: RELATIVE absolute_musical_pitch Music { $$ = new Relative_octave_music ($3, *$2); - delete $2; + delete $2; // ugh } ; @@ -774,8 +780,8 @@ property_def: PROPERTY STRING '.' STRING '=' scalar { Translation_property *t = new Translation_property; - t->var_str_ = ly_scm2string ($4); - t->value_ = $6; + t->set_mus_property ("symbol", scm_string_to_symbol ($4)); + t->set_mus_property ("value", $6); Context_specced_music *csm = new Context_specced_music (t); $$ = csm; @@ -797,9 +803,9 @@ request_chord: Music_sequence *l = dynamic_cast($2); if (l) { for (int i=0; i < $1->size(); i++) - l->add_music ($1->elem(i)); + l->append_music ($1->elem(i)); for (int i=0; i < $3->size(); i++) - l->add_music ($3->elem(i)); + l->append_music ($3->elem(i)); } else programming_error ("Need Sequence to add music to"); @@ -811,16 +817,15 @@ request_chord: command_element: command_req { - $$ = new Request_chord; + $$ = new Request_chord (gh_cons ($1->self_scm_, SCM_EOL)); $$-> set_spot (THIS->here_input ()); $1-> set_spot (THIS->here_input ()); - ((Simultaneous_music*)$$) ->add_music ($1);//ugh } | PARTIAL duration_length ';' { Translation_property * p = new Translation_property; - p->var_str_ = "measurePosition"; - p->value_ = (new Moment (-$2->length_mom ()))->smobify_self (); - delete $2; + p->set_mus_property ("symbol", ly_symbol2scm ( "measurePosition")); + p->set_mus_property ("value", (new Moment (-$2->length_mom ()))->smobify_self ()); + delete $2; // ugh Context_specced_music * sp = new Context_specced_music (p); $$ =sp ; sp-> translator_type_str_ = "Score"; @@ -881,13 +886,13 @@ verbose_command_req: } | MARK STRING { Mark_req *m = new Mark_req; - m->mark_label_ = $2; + m->set_mus_property ("label", $2); $$ = m; } | MARK bare_unsigned { Mark_req *m = new Mark_req; - m->mark_label_ = gh_int2scm ($2); + m->set_mus_property ("label", gh_int2scm ($2)); $$ = m; } @@ -906,7 +911,7 @@ verbose_command_req: | SKIP duration_length { Skip_req * skip_p = new Skip_req; skip_p->duration_ = *$2; - delete $2; + delete $2; // ugh $$ = skip_p; } | tempo_request { @@ -923,7 +928,7 @@ verbose_command_req: | KEY NOTENAME_PITCH SCM_IDENTIFIER { Key_change_req *key_p= new Key_change_req; - key_p->pitch_alist_ = $3; + key_p->set_mus_property ("pitch-alist", $3); ((Music* )key_p)->transpose (* $2); $$ = key_p; } @@ -964,14 +969,14 @@ request_with_dir: if (Script_req * gs = dynamic_cast ($2)) gs->dir_ = Direction ($1); else if ($1) - $2->warning (_ ("Can't specify direction for this request")); + $2->origin ()->warning (_ ("Can't specify direction for this request")); $$ = $2; } ; verbose_request: REQUEST_IDENTIFIER { - $$ = (Request*)$1->access_content_Request (true); + $$ = dynamic_cast (unsmob_music ($1)->clone ()); $$->set_spot (THIS->here_input ()); } | TEXTSCRIPT STRING STRING { @@ -1268,77 +1273,68 @@ simple_element: n->cautionary_b_ = $3 % 2; n->forceacc_b_ = $2 % 2 || n->cautionary_b_; - Simultaneous_music*v = new Request_chord; + + Simultaneous_music*v = new Request_chord (gh_list (n->self_scm_, SCM_UNDEFINED)); v->set_spot ($1->spot ()); n->set_spot ($1->spot ()); - - v->add_music (n); - $$ = v; delete $1; delete $4; } | RESTNAME optional_notemode_duration { - Simultaneous_music* velt_p = new Request_chord; - velt_p->set_spot (THIS->here_input()); + SCM e = SCM_UNDEFINED; if (ly_scm2string ($1) =="s") { /* Space */ Skip_req * skip_p = new Skip_req; skip_p->duration_ = *$2; skip_p->set_spot (THIS->here_input()); - velt_p->add_music (skip_p); + e = skip_p->self_scm_; } else { Rest_req * rest_req_p = new Rest_req; rest_req_p->duration_ = *$2; rest_req_p->set_spot (THIS->here_input()); - - velt_p->add_music (rest_req_p); + e = rest_req_p->self_scm_; } + Simultaneous_music* velt_p = new Request_chord (gh_list (e,SCM_UNDEFINED)); + velt_p->set_spot (THIS->here_input()); - delete $2; + delete $2; // ugh $$ = velt_p; } | MEASURES optional_notemode_duration { Skip_req * sk = new Skip_req; sk->duration_ = *$2; - Music_list * ms = new Music_list; - Request_chord * rqc1 = new Request_chord; - Request_chord * rqc2 = new Request_chord; - Request_chord * rqc3 = new Request_chord; + Span_req *sp1 = new Span_req; Span_req *sp2 = new Span_req; sp1-> span_dir_ = START; sp2-> span_dir_ = STOP; sp1->span_type_str_ = sp2->span_type_str_ = "rest"; - rqc1->add_music (sp1); - rqc2->add_music (sk); - rqc3->add_music (sp2); - - ms->add_music (rqc1); - ms->add_music (rqc2); - ms->add_music (rqc3); + + Request_chord * rqc1 = new Request_chord (gh_list (sp1->self_scm_, SCM_UNDEFINED)); + Request_chord * rqc2 = new Request_chord (gh_list (sk->self_scm_, SCM_UNDEFINED));; + Request_chord * rqc3 = new Request_chord(gh_list (sp2->self_scm_, SCM_UNDEFINED));; + + SCM ms = gh_list (rqc1->self_scm_, rqc2->self_scm_, rqc3->self_scm_, SCM_UNDEFINED); $$ = new Sequential_music (ms); } | STRING optional_notemode_duration { if (!THIS->lexer_p_->lyric_state_b ()) THIS->parser_error (_ ("Have to be in Lyric mode for lyrics")); - Simultaneous_music* velt_p = new Request_chord; - Lyric_req* lreq_p = new Lyric_req; lreq_p ->text_str_ = ly_scm2string ($1); lreq_p->duration_ = *$2; lreq_p->set_spot (THIS->here_input()); + Simultaneous_music* velt_p = new Request_chord (gh_list (lreq_p->self_scm_, SCM_UNDEFINED)); - velt_p->add_music (lreq_p); - - delete $2; + delete $2; // ugh $$= velt_p; } diff --git a/lily/performer-group-performer.cc b/lily/performer-group-performer.cc index 6bc925a1bd..7a38830b53 100644 --- a/lily/performer-group-performer.cc +++ b/lily/performer-group-performer.cc @@ -32,17 +32,13 @@ Performer_group_performer::do_announces() } - Request dummy_req; + while (announce_info_arr_.size ()) { for (int j =0; j < announce_info_arr_.size(); j++) { Audio_element_info info = announce_info_arr_[j]; - - if (!info.req_l_) - info.req_l_ = &dummy_req; - for (Cons *p = trans_p_list_.head_; p; p = p->next_) { if (!dynamic_cast (p->car_)) diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index 7f4d1777cc..f7127c425a 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -154,7 +154,7 @@ Piano_pedal_engraver::do_process_music () { if (!p->start_req_l_) { - p->req_l_drul_[STOP]->warning (_f ("can't find start of piano pedal: %s", p->name_ )); + p->req_l_drul_[STOP]->origin ()->warning (_f ("can't find start of piano pedal: %s", p->name_ )); } else { @@ -166,7 +166,7 @@ Piano_pedal_engraver::do_process_music () { if (!p->start_req_l_) { - p->req_l_drul_[STOP]->warning (_f ("can't find start of piano pedal: %s", p->name_ )); + p->req_l_drul_[STOP]->origin ()->warning (_f ("can't find start of piano pedal: %s", p->name_ )); } else { @@ -199,10 +199,10 @@ Piano_pedal_engraver::do_process_music () // todo: init with basic props. p->item_p_->add_offset_callback (Side_position::aligned_on_self, X_AXIS); p->item_p_->add_offset_callback (Side_position::centered_on_parent, X_AXIS); - announce_element (Score_element_info (p->item_p_, + announce_element (p->item_p_, p->req_l_drul_[START] ? p->req_l_drul_[START] - : p->req_l_drul_[STOP])); + : p->req_l_drul_[STOP]); } } } diff --git a/lily/piano-pedal-performer.cc b/lily/piano-pedal-performer.cc index c3d2a1a0f4..6b1efab435 100644 --- a/lily/piano-pedal-performer.cc +++ b/lily/piano-pedal-performer.cc @@ -84,7 +84,7 @@ Piano_pedal_performer::do_process_music () { if (!p->start_req_l_) { - p->req_l_drul_[STOP]->warning (_f ("can't find start of piano pedal: %s", String (p->name_))); + p->req_l_drul_[STOP]->origin ()->warning (_f ("can't find start of piano pedal: %s", String (p->name_))); } else { diff --git a/lily/property-iterator.cc b/lily/property-iterator.cc index 06d34035ed..9f47bce0d1 100644 --- a/lily/property-iterator.cc +++ b/lily/property-iterator.cc @@ -17,9 +17,10 @@ void Property_iterator::do_process_and_next (Moment m) { - Translation_property const * prop = dynamic_cast (music_l_); - if (prop->var_str_.length_i ()) - report_to_l ()->set_property (prop->var_str_, prop->value_); + Translation_property * prop = dynamic_cast (music_l_); + SCM sym = prop->get_mus_property ("symbol"); + if (gh_symbol_p(sym)) + report_to_l ()->set_property (sym, prop->get_mus_property ("value")); Music_iterator::do_process_and_next (m); } diff --git a/lily/relative-octave-music.cc b/lily/relative-octave-music.cc index e2552b65a8..f786e7b0ed 100644 --- a/lily/relative-octave-music.cc +++ b/lily/relative-octave-music.cc @@ -20,7 +20,7 @@ Relative_octave_music::to_relative_octave (Musical_pitch) Relative_octave_music::Relative_octave_music(Music*p,Musical_pitch def) : Music_wrapper (p) { - last_pitch_ = element_l ()->to_relative_octave (def); + last_pitch_ = element ()->to_relative_octave (def); } void diff --git a/lily/repeat-engraver.cc b/lily/repeat-engraver.cc index dc66a1497a..9874744414 100644 --- a/lily/repeat-engraver.cc +++ b/lily/repeat-engraver.cc @@ -111,8 +111,8 @@ Repeat_engraver::do_try_music (Music* m) void Repeat_engraver::queue_events () { - Music_sequence* alt = repeated_music_l_->alternatives_p_; - Moment walk_mom = now_mom () + repeated_music_l_->repeat_body_p_->length_mom (); + Music_sequence* alt = repeated_music_l_->alternatives (); + Moment walk_mom = now_mom () + repeated_music_l_->body ()->length_mom (); SCM novolta = get_property ("noVoltaBraces"); bool create_volta = !to_boolean (novolta); @@ -135,8 +135,11 @@ Repeat_engraver::queue_events () appropriate timestamps. The volta spanner event (a number string) happens at the begin of the alt. The :| bar event at the ending. */ - for (Cons *i = alt->music_p_list_p_->head_; i; i = i->next_) - { + + for (SCM s = repeated_music_l_->alternatives ()->music_list (); + gh_pair_p (s); s = gh_cdr (s)) + { + Music *mus =unsmob_music (gh_car (s)); /* some idiot might typeset a repeat not starting on a @@ -155,17 +158,17 @@ Repeat_engraver::queue_events () Bar_create_event * c = new Bar_create_event (walk_mom, last_number+ 1, volta_number); - if (!i->next_) + if (!gh_pair_p (gh_cdr (s))) c->last_b_ = true; becel.append (c); last_number = volta_number; volta_number ++; SCM l (get_property ("voltaSpannerDuration")); - if (SMOB_IS_TYPE_B (Moment, l)) + if (unsmob_moment(l)) { - Moment vSD_mom = *SMOB_TO_TYPE (Moment,l); - if ( vSD_mom < i->car_->length_mom() ) // terminate volta early ? + Moment vSD_mom = *unsmob_moment (l); + if ( vSD_mom < mus->length_mom() ) // terminate volta early ? { vSD_mom += walk_mom; c->last_b_ = true; @@ -173,9 +176,9 @@ Repeat_engraver::queue_events () } } } - walk_mom += i->car_->length_mom(); + walk_mom += mus->length_mom(); - if (i->next_) + if (gh_pair_p (gh_cdr (s))) becel.append (new Bar_create_event (walk_mom, ":|")); else becel.append (new Bar_create_event (walk_mom, "stop")); @@ -235,7 +238,7 @@ Repeat_engraver::do_process_music () assert (!volta_span_p_); volta_span_p_ = new Spanner (get_property ("basicVoltaSpannerProperties")); Volta_spanner::set_interface (volta_span_p_); - announce_element (Score_element_info (volta_span_p_,0)); + announce_element (volta_span_p_,0); volta_span_p_->set_elt_property ("text", ly_str02scm (t.ch_C())); volta_span_p_->set_elt_property ("last-volta", diff --git a/lily/repeated-music.cc b/lily/repeated-music.cc index 82d1c9fe9c..f2e9b77daa 100644 --- a/lily/repeated-music.cc +++ b/lily/repeated-music.cc @@ -12,15 +12,29 @@ #include "musical-pitch.hh" #include "debug.hh" +Music * +Repeated_music::body ()const +{ + return unsmob_music (get_mus_property ("body")); +} + +Music_sequence* +Repeated_music::alternatives ()const +{ + return dynamic_cast (unsmob_music (get_mus_property ("alternatives"))); +} + Repeated_music::Repeated_music(Music *beg, int times, Music_sequence * alts) { - repeat_body_p_ = beg; + set_mus_property ("body", beg->self_scm_); fold_b_ = false; repeats_i_ = times; - alternatives_p_ = alts; volta_fold_b_ = true; if (alts) - alts->music_p_list_p_->truncate (times); + { + alts->truncate (times); + set_mus_property ("alternatives", alts->self_scm_); + } } Repeated_music::Repeated_music (Repeated_music const &s) @@ -30,16 +44,8 @@ Repeated_music::Repeated_music (Repeated_music const &s) fold_b_ = s.fold_b_; volta_fold_b_ = s.volta_fold_b_; type_ = s.type_; - repeat_body_p_ = s.repeat_body_p_ ? s.repeat_body_p_->clone () : 0; - alternatives_p_ = s.alternatives_p_ - ? dynamic_cast (s.alternatives_p_->clone ()):0; } -Repeated_music::~Repeated_music () -{ - delete repeat_body_p_; - delete alternatives_p_; -} void Repeated_music::do_print () const @@ -47,71 +53,69 @@ Repeated_music::do_print () const #ifndef NPRINT DEBUG_OUT << "Fold = " << fold_b_ << " reps: " << repeats_i_; - if (repeat_body_p_) - repeat_body_p_->print(); + if (body ()) + body ()->print(); - if (alternatives_p_) - alternatives_p_->print(); + if (alternatives ()) + alternatives ()->print(); #endif } Musical_pitch Repeated_music::to_relative_octave (Musical_pitch p) { - if (repeat_body_p_) - p = repeat_body_p_->to_relative_octave (p); + if (body ()) + p = body ()->to_relative_octave (p); Musical_pitch last = p ; - if (alternatives_p_) - for (Cons *i = alternatives_p_->music_p_list_p_->head_; i ; i = i->next_) - { - last = i->car_->to_relative_octave (p); - } + if (alternatives ()) + for (SCM s = alternatives ()->music_list (); gh_pair_p (s); s = gh_cdr (s)) + unsmob_music (gh_car (s))->to_relative_octave (p); + return last; } - - void Repeated_music::transpose (Musical_pitch p) { - if (repeat_body_p_) - repeat_body_p_->transpose (p); + if (body ()) + body ()->transpose (p); - if (alternatives_p_) - alternatives_p_->transpose (p); + if (alternatives ()) + alternatives ()->transpose (p); } void Repeated_music::compress (Moment p) { - if (repeat_body_p_) - repeat_body_p_->compress (p); + if (body ()) + body ()->compress (p); - if (alternatives_p_) - alternatives_p_->compress (p); + if (alternatives ()) + alternatives ()->compress (p); } Moment Repeated_music::alternatives_length_mom () const { - if (!alternatives_p_ ) + if (!alternatives () ) return 0; if (fold_b_) - return alternatives_p_->maximum_length (); + return alternatives ()->maximum_length (); Moment m =0; int done =0; - Cons *p = alternatives_p_->music_p_list_p_->head_; - while (p && done < repeats_i_) + + SCM p = alternatives ()->music_list (); + while (gh_pair_p (p) && done < repeats_i_) { - m = m + p->car_->length_mom (); + m = m + unsmob_music (gh_car (p))->length_mom (); done ++; if (volta_fold_b_ - || repeats_i_ - done < alternatives_p_->length_i ()) - p = p->next_; + || repeats_i_ - done < alternatives ()->length_i ()) + p = gh_cdr (p); } return m; } @@ -120,9 +124,9 @@ Moment Repeated_music::body_length_mom () const { Moment m = 0; - if (repeat_body_p_) + if (body ()) { - m = repeat_body_p_->length_mom (); + m = body ()->length_mom (); if (!fold_b_ && !volta_fold_b_) m *= Rational (repeats_i_); } diff --git a/lily/request-chord-iterator.cc b/lily/request-chord-iterator.cc index 65f3027077..7f0b00827f 100644 --- a/lily/request-chord-iterator.cc +++ b/lily/request-chord-iterator.cc @@ -30,7 +30,6 @@ Request_chord_iterator::elt_l () const Request_chord_iterator::Request_chord_iterator () { last_b_ = false; - cursor_ = 0; } @@ -63,18 +62,19 @@ Request_chord_iterator::do_process_and_next (Moment mom) { if (first_b_) { - for (Cons *i = elt_l ()->music_p_list_p_->head_; i; i = i->next_) + for (SCM s = dynamic_cast (music_l_)->music_list (); gh_pair_p (s); s = gh_cdr (s)) { - if (Request * req_l = dynamic_cast (i->car_)) + Music *mus = unsmob_music (gh_car (s)); + if (Request * req_l = dynamic_cast (mus)) { bool gotcha = try_music (req_l); if (!gotcha) - req_l->warning (_f ("Junking request: `%s'", classname( req_l))); + req_l->origin ()->warning (_f ("Junking request: `%s'", classname( req_l))); } else - i->car_->warning (_f ("Huh? Not a Request: `%s'", - classname (i->car_))); - } + mus->origin ()->warning (_f ("Huh? Not a Request: `%s'", + classname (mus))); + } first_b_ = false; } diff --git a/lily/request-iterator.cc b/lily/request-iterator.cc index 6cefe8b5b5..51c7604281 100644 --- a/lily/request-iterator.cc +++ b/lily/request-iterator.cc @@ -8,7 +8,7 @@ */ #include "request-iterator.hh" #include "music.hh" - +#include "input.hh" void Simple_music_iterator::do_process_and_next (Moment m) @@ -17,7 +17,7 @@ Simple_music_iterator::do_process_and_next (Moment m) { bool g= try_music (music_l_); if (!g) - music_l_->warning (_f ("Junking music: `%s'", classname(music_l_))); + music_l_->origin ()->warning (_f ("Junking music: `%s'", classname(music_l_))); first_b_ = false; } diff --git a/lily/rest-collision-engraver.cc b/lily/rest-collision-engraver.cc index e748b88c01..be91eb2306 100644 --- a/lily/rest-collision-engraver.cc +++ b/lily/rest-collision-engraver.cc @@ -42,7 +42,7 @@ Rest_collision_engraver::process_acknowledged () rest_collision_p_ = new Item (get_property ("basicRestCollisionProperties")); Rest_collision::set_interface (rest_collision_p_); - announce_element (Score_element_info (rest_collision_p_, 0)); + announce_element (rest_collision_p_, 0); for (int i=0; i< note_column_l_arr_.size (); i++) Rest_collision::add_column ( rest_collision_p_,note_column_l_arr_[i]); } diff --git a/lily/rest-engraver.cc b/lily/rest-engraver.cc index 1d615fccb3..259140717a 100644 --- a/lily/rest-engraver.cc +++ b/lily/rest-engraver.cc @@ -84,10 +84,10 @@ Rest_engraver::do_process_music () dot_p_->add_offset_callback (Dots::quantised_position_callback, Y_AXIS); dot_p_->set_elt_property ("dot-count", gh_int2scm (rest_req_l_->duration_.dots_i_)); - announce_element (Score_element_info (dot_p_,0)); + announce_element (dot_p_,0); } - announce_element (Score_element_info (rest_p_, rest_req_l_)); + announce_element (rest_p_, rest_req_l_); } } diff --git a/lily/rhythmic-column-engraver.cc b/lily/rhythmic-column-engraver.cc index 82c02d9a4a..b72f6b1f99 100644 --- a/lily/rhythmic-column-engraver.cc +++ b/lily/rhythmic-column-engraver.cc @@ -54,7 +54,7 @@ Rhythmic_column_engraver::process_acknowledged () { ncol_p_ = new Item (get_property("basicNoteColumnProperties")); Note_column::set_interface (ncol_p_); - announce_element (Score_element_info (ncol_p_, 0)); + announce_element (ncol_p_, 0); } for (int i=0; i < rhead_l_arr_.size (); i++) diff --git a/lily/score-element.cc b/lily/score-element.cc index f53cd8e9b2..451c1f40be 100644 --- a/lily/score-element.cc +++ b/lily/score-element.cc @@ -10,6 +10,7 @@ #include #include +#include "input-smob.hh" #include "libc-extension.hh" #include "group-interface.hh" #include "misc.hh" @@ -78,12 +79,9 @@ Score_element::Score_element (Score_element const&s) Score_element::~Score_element() { - // this goes awry when score-elements are copied... - /* - Kijk goed naar hoe smobify en unsmobify werken. unsmobify_self - is te gebruiken wanneer C++ geheugen beheer weer overneemt van - GUILE. --hwn */ + do nothing scm-ish and no unprotecting here. + */ } @@ -248,10 +246,24 @@ Molecule Score_element::get_molecule () const { SCM proc = get_elt_property ("molecule-callback"); + + SCM mol = SCM_EOL; if (gh_procedure_p (proc)) - return create_molecule (gh_apply (proc, gh_list (this->self_scm_, SCM_UNDEFINED))); + mol = gh_apply (proc, gh_list (this->self_scm_, SCM_UNDEFINED)); + - return Molecule (); + SCM origin =get_elt_property ("origin"); + if (!unsmob_input (origin)) + origin =ly_symbol2scm ("no-origin"); + + if (gh_pair_p (mol)) + { + // ugr. + mol = gh_cons (gh_list (origin, gh_car (mol), SCM_UNDEFINED), gh_cdr (mol)); + } + + + return create_molecule (mol); } @@ -710,15 +722,17 @@ Score_element::mark_smob (SCM ses) programming_error ("SMOB marking gone awry"); return SCM_EOL; } - scm_gc_mark ( s->immutable_property_alist_); - - s->do_derived_mark (); + scm_gc_mark (s->immutable_property_alist_); + scm_gc_mark (s->mutable_property_alist_); + if (s->parent_l (Y_AXIS)) scm_gc_mark (s->parent_l (Y_AXIS)->self_scm_); if (s->parent_l (X_AXIS)) scm_gc_mark (s->parent_l (X_AXIS)->self_scm_); - return s->mutable_property_alist_; + if (s->original_l_) + scm_gc_mark (s->original_l_->self_scm_); + return s->do_derived_mark (); } int @@ -736,9 +750,10 @@ Score_element::print_smob (SCM s, SCM port, scm_print_state *) return 1; } -void +SCM Score_element::do_derived_mark () { + return SCM_EOL; } void diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index 1e35503f42..c360b99649 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -267,6 +267,8 @@ Score_engraver::do_add_processing () pscore_p_ = new Paper_score; pscore_p_->paper_l_ = dynamic_cast(output_def_l_); - pscore_p_->typeset_line (new Line_of_score (get_property(ly_symbol2scm ("basicLineOfScoreProperties")))); + SCM props = get_property(ly_symbol2scm ("basicLineOfScoreProperties")); + + pscore_p_->typeset_line (new Line_of_score (props)); } diff --git a/lily/score.cc b/lily/score.cc index b9027e9288..8a4e348d0d 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -31,14 +31,15 @@ Score::Score() : Input() { header_p_ = 0; - music_p_ = 0; + music_ = SCM_EOL; errorlevel_i_ = 0; } Score::Score (Score const &s) : Input (s) { - music_p_ = (s.music_p_) ? s.music_p_->clone() : 0; + Music * m =unsmob_music (s.music_); + music_ = m?m->clone()->self_scm_ : SCM_EOL; for (int i=0; i < s.def_p_arr_.size (); i++) def_p_arr_.push(s.def_p_arr_[i]->clone()); errorlevel_i_ = s.errorlevel_i_; @@ -49,7 +50,6 @@ Score::~Score() { delete header_p_; junk_pointer_array (def_p_arr_); - delete music_p_; } void @@ -61,15 +61,17 @@ Score::run_translator (Music_output_def *odef_l) Global_translator * trans_p = odef_l->get_global_translator_p(); if (!trans_p) { - non_fatal_error (_("no toplevel translator")); + programming_error ("no toplevel translator"); return ; } progress_indication ("\n" + _("Interpreting music...")); - trans_p->final_mom_ = music_p_->length_mom (); + Music * music = unsmob_music (music_); + + trans_p->final_mom_ = music->length_mom (); - Music_iterator * iter = Music_iterator::static_get_iterator_p (music_p_); - iter->init_translator(music_p_, trans_p); + Music_iterator * iter = Music_iterator::static_get_iterator_p (music); + iter->init_translator(music, trans_p); iter->construct_children(); @@ -115,7 +117,7 @@ Score::run_translator (Music_output_def *odef_l) void Score::process() { - if (!music_p_) + if (!unsmob_music (music_)) return; print(); @@ -135,7 +137,7 @@ Score::print() const { #ifndef NPRINT DEBUG_OUT << "score {\n"; - music_p_ -> print (); + // music_p_ -> print (); for (int i=0; i < def_p_arr_.size (); i++) def_p_arr_[i]->print(); DEBUG_OUT << "}\n"; diff --git a/lily/script-column-engraver.cc b/lily/script-column-engraver.cc index 73da380668..23df7b72af 100644 --- a/lily/script-column-engraver.cc +++ b/lily/script-column-engraver.cc @@ -76,7 +76,7 @@ Script_column_engraver::process_acknowledged () scol_p_ = new Item (get_property ("basicScriptColumnProperties")); scol_p_->set_elt_property ("scripts", SCM_EOL); - announce_element (Score_element_info (scol_p_, 0)); + announce_element (scol_p_, 0); } if (scol_p_) diff --git a/lily/script-engraver.cc b/lily/script-engraver.cc index effd5b7123..db95e855f4 100644 --- a/lily/script-engraver.cc +++ b/lily/script-engraver.cc @@ -62,7 +62,7 @@ Script_engraver::do_process_music() if (list == SCM_BOOL_F) { - l->warning (_f ("Don't know how to interpret articulation `%s'", + l->origin ()->warning (_f ("Don't know how to interpret articulation `%s'", l->articulation_str_.ch_C ())); continue; } @@ -109,7 +109,7 @@ Script_engraver::do_process_music() script_p_arr_.push (p); - announce_element (Score_element_info (p, l)); + announce_element (p, l); } } diff --git a/lily/separating-line-group-engraver.cc b/lily/separating-line-group-engraver.cc index 7cc7ad681a..eda666a9b4 100644 --- a/lily/separating-line-group-engraver.cc +++ b/lily/separating-line-group-engraver.cc @@ -41,7 +41,7 @@ Separating_line_group_engraver::do_creation_processing () { sep_span_p_ = new Spanner (get_property ("basicSeparatingGroupSpannerProperties")); Separating_group_spanner::set_interface (sep_span_p_); - announce_element (Score_element_info (sep_span_p_, 0)); + announce_element (sep_span_p_, 0); sep_span_p_->set_bound (LEFT, unsmob_element (get_property ("currentCommandColumn"))); } @@ -70,7 +70,7 @@ Separating_line_group_engraver::acknowledge_element (Score_element_info i) if (ib) p_ref_->set_elt_property ("breakable", SCM_BOOL_T); - announce_element (Score_element_info (p_ref_, 0)); + announce_element (p_ref_, 0); } Separation_item::add_item (p_ref_,it); } diff --git a/lily/sequential-music-iterator.cc b/lily/sequential-music-iterator.cc index 8473d23cd6..d99381cf54 100644 --- a/lily/sequential-music-iterator.cc +++ b/lily/sequential-music-iterator.cc @@ -30,9 +30,9 @@ Sequential_music_iterator::Sequential_music_iterator () void Sequential_music_iterator::construct_children() { - cursor_ = dynamic_cast (music_l_)->music_p_list_p_->head_; + cursor_ = dynamic_cast (music_l_)->music_list (); - while (cursor_) + while (gh_pair_p (cursor_ )) { start_next_element(); if (!iter_p_->ok()) @@ -52,16 +52,16 @@ Sequential_music_iterator::leave_element() { delete iter_p_; iter_p_ =0; - Moment elt_time = cursor_->car_->length_mom (); + Moment elt_time = unsmob_music (gh_car (cursor_))->length_mom (); here_mom_ += elt_time; - cursor_ =cursor_->next_; + cursor_ =gh_cdr (cursor_); } void Sequential_music_iterator::start_next_element() { assert (!iter_p_); - iter_p_ = get_iterator_p (cursor_->car_); + iter_p_ = get_iterator_p (unsmob_music (gh_car (cursor_))); } void @@ -80,15 +80,12 @@ Sequential_music_iterator::~Sequential_music_iterator() if (iter_p_) { if (iter_p_->ok ()) - music_l_->warning (_ ("Must stop before this music ends")); + music_l_->origin ()->warning (_ ("Must stop before this music ends")); delete iter_p_; iter_p_ = 0; } } - - - void Sequential_music_iterator::do_process_and_next (Moment until) { @@ -112,7 +109,7 @@ Sequential_music_iterator::do_process_and_next (Moment until) set_sequential_music_translator(); leave_element(); - if (cursor_) + if (gh_pair_p (cursor_)) start_next_element(); else goto loopexit; @@ -138,7 +135,7 @@ Sequential_music_iterator::ok() const } Music_iterator* -Sequential_music_iterator::try_music_in_children (Music const *m) const +Sequential_music_iterator::try_music_in_children (Music *m) const { return iter_p_ ? iter_p_->try_music (m) : 0; } diff --git a/lily/simultaneous-music-iterator.cc b/lily/simultaneous-music-iterator.cc index 7e60780cc9..5ea7f71218 100644 --- a/lily/simultaneous-music-iterator.cc +++ b/lily/simultaneous-music-iterator.cc @@ -28,10 +28,11 @@ Simultaneous_music_iterator::construct_children() int j = 0; Music_sequence const *sim = dynamic_cast (music_l_); - Cons *i = (sim->music_p_list_p_) ? sim->music_p_list_p_->head_ : 0; - for (; i; i = i->next_, j++) + SCM i = sim->music_list (); + for (; gh_pair_p(i); i = gh_cdr(i), j++) { - Music_iterator * mi = static_get_iterator_p (i->car_); + Music *mus = unsmob_music (gh_car (i)); + Music_iterator * mi = static_get_iterator_p (mus); /* if separate_contexts_b_ is set, create a new context with the number number as name */ @@ -44,7 +45,7 @@ Simultaneous_music_iterator::construct_children() if (!t) t = report_to_l (); - mi->init_translator (i->car_, t); + mi->init_translator (mus, t); mi->construct_children (); if (mi->ok()) @@ -106,7 +107,7 @@ Simultaneous_music_iterator::ok() const } Music_iterator* -Simultaneous_music_iterator::try_music_in_children (Music const*m) const +Simultaneous_music_iterator::try_music_in_children (Music *m) const { Music_iterator * b=0; for (Cons *p = children_p_list_.head_; !b && p; p = p->next_) diff --git a/lily/slur-engraver.cc b/lily/slur-engraver.cc index 893c0c4bed..839b64649a 100644 --- a/lily/slur-engraver.cc +++ b/lily/slur-engraver.cc @@ -79,7 +79,7 @@ Slur_engraver::do_removal_processing () if (!wgb) for (int i=0; i < requests_arr_.size (); i++) { - requests_arr_[i]->warning (_ ("unterminated slur")); + requests_arr_[i]->origin ()->warning (_ ("unterminated slur")); } } @@ -95,7 +95,7 @@ Slur_engraver::do_process_music () { if (slur_l_stack_.empty ()) - slur_req_l->warning (_f ("can't find both ends of %s", _ ("slur"))); + slur_req_l->origin ()->warning (_f ("can't find both ends of %s", _ ("slur"))); else { Score_element* slur = slur_l_stack_.pop (); @@ -121,7 +121,7 @@ Slur_engraver::do_process_music () } start_slur_l_arr_.push (slur); requests_arr_.push (slur_req_l); - announce_element (Score_element_info (slur, slur_req_l)); + announce_element (slur, slur_req_l); } } for (int i=0; i < start_slur_l_arr_.size (); i++) diff --git a/lily/spacing-engraver.cc b/lily/spacing-engraver.cc index 4dc344b8c0..de4be78cb2 100644 --- a/lily/spacing-engraver.cc +++ b/lily/spacing-engraver.cc @@ -78,7 +78,7 @@ Spacing_engraver::do_creation_processing () spacing_p_ =new Spanner (get_property ("basicSpacingSpannerProperties")); Spacing_spanner::set_interface (spacing_p_); spacing_p_->set_bound (LEFT, unsmob_element (get_property ("currentCommandColumn"))); - announce_element (Score_element_info (spacing_p_, 0)); + announce_element (spacing_p_, 0); } void diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index d032027005..d83d58e725 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -41,6 +41,11 @@ Spacing_spanner::do_measure (Score_element*me, Link_array cols) { Moment shortest; Moment mean_shortest; + + /* + space as if this duration is present. + */ + Moment base_shortest_duration = *unsmob_moment (me->get_elt_property ("maximum-duration-for-spacing")); shortest.set_infinite (1); int n = 0; @@ -94,11 +99,11 @@ Spacing_spanner::do_measure (Score_element*me, Link_array cols) // 2nd condition should be (i+1 < col_count()), ie. not the last column in score. FIXME else if (!lc->musical_b() && i+1 < cols.size ()) { - left_distance= default_bar_spacing (me,lc,rc,shortest); + left_distance= default_bar_spacing (me,lc,rc,shortest musical_b()) { - left_distance = note_spacing (me,lc, rc, shortest); + left_distance = note_spacing (me,lc, rc, shortest paper_l ()->get_var ("arithmetic_basicspace") - log; @@ -218,7 +223,8 @@ Spacing_spanner::get_duration_space (Score_element*me, Moment d, Moment shortest Real -Spacing_spanner::note_spacing (Score_element*me, Score_element *lc, Score_element *rc, Moment shortest) +Spacing_spanner::note_spacing (Score_element*me, Score_element *lc, Score_element *rc, + Moment shortest) { Moment shortest_playing_len = 0; SCM s = lc->get_elt_property ("shortest-playing-duration"); diff --git a/lily/span-bar-engraver.cc b/lily/span-bar-engraver.cc index dd40fd96e2..a228a1b298 100644 --- a/lily/span-bar-engraver.cc +++ b/lily/span-bar-engraver.cc @@ -66,7 +66,7 @@ Span_bar_engraver::acknowledge_element (Score_element_info i) spanbar_p_->set_parent (bar_l_arr_[0], Y_AXIS); spanbar_p_->set_parent (bar_l_arr_[0], X_AXIS); - announce_element (Score_element_info (spanbar_p_,0)); + announce_element (spanbar_p_,0); } } } diff --git a/lily/span-dynamic-performer.cc b/lily/span-dynamic-performer.cc index deef286259..5a1eadfe49 100644 --- a/lily/span-dynamic-performer.cc +++ b/lily/span-dynamic-performer.cc @@ -84,7 +84,7 @@ Span_dynamic_performer::do_process_music () { if (!span_start_req_l_) { - span_req_l_drul_[STOP]->warning (_ ("can't find start of (de)crescendo")); + span_req_l_drul_[STOP]->origin ()->warning (_ ("can't find start of (de)crescendo")); } else { diff --git a/lily/spanner.cc b/lily/spanner.cc index f9cb12f4c1..5c8f4a1977 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -260,9 +260,14 @@ Spanner::get_broken_left_end_align () const return 0.0; } -void +SCM Spanner::do_derived_mark () { + /* + We'd be fucked if this is called before spanned_drul_[] is inited. */ + if (status_i_ == ORPHAN) + return SCM_EOL; + Direction d = LEFT; do if (spanned_drul_[d]) @@ -271,6 +276,8 @@ Spanner::do_derived_mark () for (int i= broken_into_l_arr_.size () ; i--;) scm_gc_mark (broken_into_l_arr_[i]->self_scm_); + + return SCM_EOL; } void diff --git a/lily/staff-symbol-engraver.cc b/lily/staff-symbol-engraver.cc index 1078870c62..d5fb4860f2 100644 --- a/lily/staff-symbol-engraver.cc +++ b/lily/staff-symbol-engraver.cc @@ -48,7 +48,7 @@ Staff_symbol_engraver::do_creation_processing() span_p_->set_bound(LEFT, unsmob_element (get_property ("currentCommandColumn"))); - announce_element (Score_element_info (span_p_, 0)); + announce_element (span_p_, 0); } void diff --git a/lily/stem-engraver.cc b/lily/stem-engraver.cc index 2b5367aab2..1c3de7e27a 100644 --- a/lily/stem-engraver.cc +++ b/lily/stem-engraver.cc @@ -106,7 +106,7 @@ Stem_engraver::acknowledge_element(Score_element_info i) tremolo_p_ = new Item (get_property ("basicStemTremoloProperties")); Stem_tremolo::set_interface (tremolo_p_); - announce_element (Score_element_info (tremolo_p_, tremolo_req_l_)); + announce_element (tremolo_p_, tremolo_req_l_); /* The number of tremolo flags is the number of flags of the tremolo-type minus the number of flags of the note @@ -120,12 +120,12 @@ Stem_engraver::acknowledge_element(Score_element_info i) gh_int2scm (tremolo_flags)); } } - announce_element (Score_element_info (stem_p_, r)); + announce_element (stem_p_, r); } if (Stem::flag_i (stem_p_) != duration_log) { - r->warning (_f ("Adding note head to incompatible stem (type = %d)", 1 << Stem::flag_i (stem_p_))); + r->origin ()->warning (_f ("Adding note head to incompatible stem (type = %d)", 1 << Stem::flag_i (stem_p_))); } Stem::add_head (stem_p_,h); diff --git a/lily/system-start-delimiter-engraver.cc b/lily/system-start-delimiter-engraver.cc index 2f9c366195..35189db939 100644 --- a/lily/system-start-delimiter-engraver.cc +++ b/lily/system-start-delimiter-engraver.cc @@ -79,7 +79,7 @@ System_start_delimiter_engraver::do_creation_processing() delim_->set_elt_property ("glyph", s); } - announce_element (Score_element_info (delim_,0)); + announce_element (delim_,0); } void diff --git a/lily/text-engraver.cc b/lily/text-engraver.cc index 118f8ff2a9..f6661e2359 100644 --- a/lily/text-engraver.cc +++ b/lily/text-engraver.cc @@ -103,7 +103,7 @@ Text_engraver::do_process_music () text->set_elt_property ("no-spacing-rods" , SCM_BOOL_F); text->set_extent_callback (0, X_AXIS); } - announce_element (Score_element_info (text, r)); + announce_element (text, r); texts_.push (text); } } diff --git a/lily/tie-engraver.cc b/lily/tie-engraver.cc index 0f3f3b2300..aa3180f7f6 100644 --- a/lily/tie-engraver.cc +++ b/lily/tie-engraver.cc @@ -184,7 +184,7 @@ Tie_engraver::process_acknowledged () Tie::set_head (p,RIGHT, dynamic_cast (unsmob_element (gh_cdr (pair)))); tie_p_arr_.push (p); - announce_element (Score_element_info (p, req_l_)); + announce_element (p, req_l_); } else for (SCM s = head_list; gh_pair_p (s); s = gh_cdr (s)) { @@ -195,12 +195,12 @@ Tie_engraver::process_acknowledged () Tie::set_head (p, RIGHT, dynamic_cast (unsmob_element (gh_cdar (s)))); tie_p_arr_.push (p); - announce_element (Score_element_info (p, req_l_)); + announce_element (p, req_l_); } if (!tie_p_arr_.size ()) { - req_l_->warning (_ ("No ties were created!")); + req_l_->origin ()->warning (_ ("No ties were created!")); } else if (tie_p_arr_.size () > 1 && !tie_column_p_) { @@ -208,7 +208,7 @@ Tie_engraver::process_acknowledged () Tie_column::set_interface (tie_column_p_); for (int i = tie_p_arr_.size (); i--; ) Tie_column::add_tie (tie_column_p_,tie_p_arr_ [i]); - announce_element (Score_element_info (tie_column_p_, 0)); + announce_element (tie_column_p_, 0); } } } diff --git a/lily/tie-performer.cc b/lily/tie-performer.cc index 51d1375d84..f1088d4c8e 100644 --- a/lily/tie-performer.cc +++ b/lily/tie-performer.cc @@ -106,7 +106,7 @@ Tie_performer::process_acknowledged () if (!tie_p_arr_.size ()) { - req_l_->warning (_("No ties were created!")); + req_l_->origin ()->warning (_("No ties were created!")); } } diff --git a/lily/tie.cc b/lily/tie.cc index 8e1cacf486..4eae4439cb 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -84,11 +84,21 @@ Tie::get_default_dir (Score_element*me) Item * sl = head(me,LEFT) ? Rhythmic_head::stem_l (head (me,LEFT)) :0; Item * sr = head(me,RIGHT) ? Rhythmic_head::stem_l (head (me,RIGHT)) :0; - if (sl && Directional_element_interface (sl).get () == UP - && sr && Directional_element_interface (sr).get () == UP) - return DOWN; - else - return UP; + + if (sl && sr) + { + if (Directional_element_interface (sl).get () == UP + && Directional_element_interface (sr).get () == UP) + return DOWN; + } + else if (sl || sr) + { + Item *s = sl ? sl : sr; + return - Directional_element_interface (s). get (); + } + + + return UP; } diff --git a/lily/time-scaled-music-iterator.cc b/lily/time-scaled-music-iterator.cc index da04bbf30f..6230181c88 100644 --- a/lily/time-scaled-music-iterator.cc +++ b/lily/time-scaled-music-iterator.cc @@ -22,7 +22,7 @@ Time_scaled_music_iterator::do_process_and_next (Moment m) if (yeah) set_translator (yeah->report_to_l ()); else - music_l_->warning ( _("no one to print a tuplet start bracket")); + music_l_->origin ()->warning ( _("no one to print a tuplet start bracket")); } Music_wrapper_iterator::do_process_and_next (m); diff --git a/lily/time-signature-engraver.cc b/lily/time-signature-engraver.cc index 9b44c6ded4..99f7898328 100644 --- a/lily/time-signature-engraver.cc +++ b/lily/time-signature-engraver.cc @@ -64,7 +64,7 @@ Time_signature_engraver::do_process_music() if (time_signature_p_) - announce_element (Score_element_info (time_signature_p_, req)); + announce_element (time_signature_p_, req); } void diff --git a/lily/timing-translator.cc b/lily/timing-translator.cc index 9096284795..762ac771ba 100644 --- a/lily/timing-translator.cc +++ b/lily/timing-translator.cc @@ -33,8 +33,8 @@ Timing_translator::do_try_music (Music*r) return true; if (String (classname (timing_req_l_arr_[i])) == classname (r)) { - r->warning (_ ("conflicting timing request")); - timing_req_l_arr_[i]->warning (_("This is the other timing request")); + r->origin ()->warning (_ ("conflicting timing request")); + timing_req_l_arr_[i]->origin ()->warning (_("This is the other timing request")); return false; } } @@ -75,7 +75,7 @@ Timing_translator::do_process_music() { if (measure_position ()) { - tr_l ->warning (_f ("barcheck failed at: %s", + tr_l ->origin ()->warning (_f ("barcheck failed at: %s", measure_position ().str ())); // resync daddy_trans_l_->set_property("measurePosition", diff --git a/lily/translation-property.cc b/lily/translation-property.cc index 45f8de630c..cdd2579202 100644 --- a/lily/translation-property.cc +++ b/lily/translation-property.cc @@ -9,12 +9,5 @@ #include "translation-property.hh" #include "debug.hh" -void -Translation_property::do_print () const -{ -#ifndef NPRINT - DEBUG_OUT << "." << var_str_ << " = " ; - if (flower_dstream && !flower_dstream->silent_b ("Translation_property")) - ly_display_scm (value_); -#endif -} + + diff --git a/lily/translator-group.cc b/lily/translator-group.cc index 62de8aa634..4303d0cbf4 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -459,6 +459,13 @@ Translator_group::get_property (SCM sym) const void Translator_group::set_property (String id, SCM val) { - properties_dict_->set (ly_symbol2scm (id.ch_C()), val); + set_property (ly_symbol2scm (id.ch_C()), val); } +void +Translator_group::set_property (SCM sym, SCM val) +{ + properties_dict_->set (sym, val); +} + + diff --git a/lily/tuplet-engraver.cc b/lily/tuplet-engraver.cc index 6fcdba950e..0c38ef1d2a 100644 --- a/lily/tuplet-engraver.cc +++ b/lily/tuplet-engraver.cc @@ -44,7 +44,7 @@ Tuplet_engraver::do_try_music (Music *r) { if (Time_scaled_music * c = dynamic_cast (r)) { - Music *el = c->element_l (); + Music *el = c->element (); if (!dynamic_cast (el)) { time_scaled_music_arr_.push (c); @@ -84,7 +84,7 @@ Tuplet_engraver::do_process_music () glep->set_elt_property ("text", ly_str02scm (to_str (time_scaled_music_arr_[i]->den_i_).ch_C())); - announce_element (Score_element_info (glep, time_scaled_music_arr_ [i])); + announce_element (glep, time_scaled_music_arr_ [i]); } } diff --git a/lily/unfolded-repeat-iterator.cc b/lily/unfolded-repeat-iterator.cc index a51bbca2f6..6395987a1d 100644 --- a/lily/unfolded-repeat-iterator.cc +++ b/lily/unfolded-repeat-iterator.cc @@ -40,26 +40,26 @@ the alternative just set. void Unfolded_repeat_iterator::next_element () { - Repeated_music const* mus =dynamic_cast (music_l_); + Repeated_music * mus =dynamic_cast (music_l_); delete current_iter_p_; current_iter_p_ =0; if (do_main_b_) { - done_mom_ += mus->repeat_body_p_->length_mom (); + done_mom_ += mus->body ()->length_mom (); if (!mus->volta_fold_b_) done_count_ ++; - if (alternative_cons_l_) + if (gh_pair_p (alternative_cons_)) { - current_iter_p_ = get_iterator_p (alternative_cons_l_->car_); + current_iter_p_ = get_iterator_p (unsmob_music (gh_car (alternative_cons_))); do_main_b_ = false; } else if (done_count_ < mus->repeats_i_ && !mus->volta_fold_b_) { - current_iter_p_ = get_iterator_p (mus->repeat_body_p_); + current_iter_p_ = get_iterator_p (mus->body ()); do_main_b_ = true; } } @@ -69,13 +69,13 @@ Unfolded_repeat_iterator::next_element () we're not in the main part. So we're either in an alternative, or we just finished. */ - if (alternative_cons_l_) + if (alternative_cons_) { - done_mom_ += alternative_cons_l_->car_->length_mom (); + done_mom_ += unsmob_music (gh_car (alternative_cons_))->length_mom (); if (mus->volta_fold_b_ || mus->repeats_i_ - done_count_ < alternative_count_i_) - alternative_cons_l_ = alternative_cons_l_->next_; + alternative_cons_ = gh_cdr (alternative_cons_); /* we've done the main body as well, but didn't go over the other @@ -84,13 +84,13 @@ Unfolded_repeat_iterator::next_element () done_count_ ++; } - if (done_count_ < mus->repeats_i_ && alternative_cons_l_) + if (done_count_ < mus->repeats_i_ && gh_pair_p (alternative_cons_)) { if (mus->volta_fold_b_) - current_iter_p_ = get_iterator_p (alternative_cons_l_->car_); + current_iter_p_ = get_iterator_p (unsmob_music (gh_car (alternative_cons_))); else { - current_iter_p_ = get_iterator_p (mus->repeat_body_p_); + current_iter_p_ = get_iterator_p (mus->body ()); do_main_b_ = true; } } @@ -113,22 +113,23 @@ Unfolded_repeat_iterator::next_moment () const void Unfolded_repeat_iterator::construct_children () { - Repeated_music const* mus =dynamic_cast (music_l_); - alternative_cons_l_ = (mus->alternatives_p_) - ? mus->alternatives_p_->music_p_list_p_->head_ - : 0; + Repeated_music * mus =dynamic_cast (music_l_); + + alternative_cons_ = (mus->alternatives ()) + ? mus->alternatives ()->music_list () + : SCM_EOL; - for (Cons *p = alternative_cons_l_; p; p = p->next_) + for (SCM p = alternative_cons_; gh_pair_p (p); p = gh_cdr (p)) alternative_count_i_ ++; - if (mus->repeat_body_p_) + if (mus->body ()) { - current_iter_p_ = get_iterator_p (mus->repeat_body_p_); + current_iter_p_ = get_iterator_p (mus->body ()); do_main_b_ = true; } - else if (alternative_cons_l_) + else if (gh_pair_p (alternative_cons_)) { - current_iter_p_ = get_iterator_p (alternative_cons_l_->car_); + current_iter_p_ = get_iterator_p (unsmob_music (gh_car (alternative_cons_))); do_main_b_ = false; } } @@ -142,7 +143,7 @@ Unfolded_repeat_iterator::do_process_and_next (Moment m) if (yeah) set_translator (yeah->report_to_l ()); else - music_l_->warning ( _("no one to print a volta bracket")); + music_l_->origin ()->warning ( _("no one to print a volta bracket")); } while (1) { @@ -172,7 +173,7 @@ Unfolded_repeat_iterator::do_print () const } Music_iterator* -Unfolded_repeat_iterator::try_music_in_children (Music const * m) const +Unfolded_repeat_iterator::try_music_in_children (Music * m) const { return current_iter_p_->try_music (m); } diff --git a/lily/vertical-align-engraver.cc b/lily/vertical-align-engraver.cc index 028037df76..40eba8acf7 100644 --- a/lily/vertical-align-engraver.cc +++ b/lily/vertical-align-engraver.cc @@ -6,7 +6,6 @@ (c) 1997--2000 Han-Wen Nienhuys */ #include "translator-group.hh" -#include "axis-group-engraver.hh" #include "paper-column.hh" #include "align-interface.hh" #include "span-bar.hh" @@ -20,10 +19,8 @@ class Vertical_align_engraver : public Engraver bool qualifies_b (Score_element_info) const; public: VIRTUAL_COPY_CONS(Translator); - Vertical_align_engraver(); protected: - virtual void acknowledge_element (Score_element_info); virtual void do_creation_processing(); virtual void do_removal_processing(); @@ -44,7 +41,7 @@ Vertical_align_engraver::do_creation_processing() gh_int2scm (DOWN)); valign_p_->set_bound(LEFT,unsmob_element (get_property ("currentCommandColumn"))); - announce_element (Score_element_info (valign_p_ , 0)); + announce_element (valign_p_ , 0); } void diff --git a/ly/engraver.ly b/ly/engraver.ly index f458dda6c0..b9bbb9fb10 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -264,6 +264,7 @@ StaffGroupContext= \translator { LyricsVoiceContext= \translator{ \type "Engraver_group_engraver"; \consistsend "Axis_group_engraver"; + LyricVoiceMinimumVerticalExtent = #(cons -2.5 2.5) \name LyricVoice ; \consists "Separating_line_group_engraver"; @@ -405,7 +406,7 @@ ScoreContext = \translator { (break-align-symbol . Staff_bar) (barsize-procedure . ,Bar::get_staff_bar_size) (molecule-callback . ,Bar::brew_molecule) - (visibility-lambda . ,begin-of-line-invisible) + (visibility-lambda . ,all-visible) (breakable . #t) (before-line-breaking-callback . ,Bar::before_line_breaking) ;; @@ -522,7 +523,7 @@ ScoreContext = \translator { (molecule-callback . ,Local_key_item::brew_molecule) (left-padding . 0.2) (right-padding . 0.4) - (interfaces . (accidentals-interface )) + (interfaces . (accidentals-interface)) ) basicLineOfScoreProperties = #`( (axes . (0 1)) @@ -605,6 +606,9 @@ ScoreContext = \translator { ) basicSpacingSpannerProperties =#`( (spacing-procedure . ,Spacing_spanner::set_springs) + + ;; assume that notes at least this long are present. + (maximum-duration-for-spacing . ,(make-moment 1 8)) ) basicSpanBarProperties = #`( (break-align-symbol . Staff_bar) diff --git a/ly/init.ly b/ly/init.ly index fd0a20c879..41308ac2cf 100644 --- a/ly/init.ly +++ b/ly/init.ly @@ -1,10 +1,7 @@ % Toplevel initialisation file. -foo = \tempo 4 = 100 ; - \version "1.3.59"; - \include "declarations.ly"; \maininput diff --git a/ly/init.sly b/ly/init.sly index af663b0138..ae387ade84 100644 --- a/ly/init.sly +++ b/ly/init.sly @@ -1,6 +1,6 @@ % Toplevel initialisation file. -\version "1.3.42"; +\version "1.3.68"; \include "declarations.ly" diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index 91af71de84..e7e6b811eb 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.3.72 -Entered-date: 09JUL00 +Version: 1.3.73 +Entered-date: 17JUL00 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.72.tar.gz + 1000k lilypond-1.3.73.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.3.72.tar.gz + 1000k lilypond-1.3.73.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index 3e1eac912c..37f6140aac 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 1.3.72 +Version: 1.3.73 Release: 1 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.72.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.73.tar.gz Summary: A program for printing sheet music. URL: http://www.cs.uu.nl/~hanwen/lilypond # Icon: lilypond-icon.gif diff --git a/mf/feta-generic.mf b/mf/feta-generic.mf index 4d01e53bf7..4b53e941bf 100644 --- a/mf/feta-generic.mf +++ b/mf/feta-generic.mf @@ -39,11 +39,11 @@ else: % input feta-bolletjes; % input feta-banier; % input feta-eindelijk; -% input feta-klef; + input feta-klef; % input feta-toevallig; % input feta-schrift; % input feta-haak; % input feta-timesig; - input feta-pendaal; +% input feta-pendaal; % input feta-accordion; fi diff --git a/mf/feta-klef.mf b/mf/feta-klef.mf index 579e555585..a759cc0e85 100644 --- a/mf/feta-klef.mf +++ b/mf/feta-klef.mf @@ -76,14 +76,14 @@ def draw_c_clef (expr reduction) = fet_beginchar ("C clef", "C", "altoclef") if test = 1: - draw_staff (-2,2); + draw_staff (-2,2, 0.0); fi; draw_c_clef (1.0); fet_endchar; fet_beginchar ("C clef", "C_change", "caltoclef") if test = 1: - draw_staff (-2,2); + draw_staff (-2,2, 0.0); fi; draw_c_clef (.8); fet_endchar; @@ -108,7 +108,7 @@ def draw_bass_clef(expr exact_center, reduction) = set_char_box(left_space# + - xpart exact_center, right_space# + - xpart exact_center + ball_to_right#, + xpart exact_center + ball_to_right# + 7/12 reduced_il#, - ypart exact_center + 2.5 reduced_il#, ypart exact_center +reduced_il#); @@ -156,7 +156,7 @@ enddef; fet_beginchar("F clef ", "F", "bassclef") if test = 1: - draw_staff(-3,1); + draw_staff(-3,1, 0.0); fi; draw_bass_clef((.5 staff_space#, 0), 1.0); fet_endchar; @@ -300,7 +300,7 @@ enddef; fet_beginchar("G clef", "G", "trebleclef") if test = 1: - draw_staff(-1,3); + draw_staff(-1,3, 0.0); fi; draw_gclef((1.7 staff_space#,0), 1.0); fet_endchar; diff --git a/mf/feta-nummer10.mf b/mf/feta-nummer10.mf index f3f25459d8..1a802df0dd 100644 --- a/mf/feta-nummer10.mf +++ b/mf/feta-nummer10.mf @@ -1,9 +1,10 @@ + % feta-nummer10.mf % part of LilyPond's pretty-but-neat music font -size:=10; +design_size:=10; -input feta-nummer-generic; +input feta-nummer; end. diff --git a/mf/feta-nummer12.mf b/mf/feta-nummer12.mf index fe599fdbdc..315caebb43 100644 --- a/mf/feta-nummer12.mf +++ b/mf/feta-nummer12.mf @@ -1,9 +1,9 @@ % feta-nummer10.mf % part of LilyPond's pretty-but-neat music font -size:=12; +design_size:=12; -input feta-nummer-generic; +input feta-nummer; end. diff --git a/mf/feta-nummer14.mf b/mf/feta-nummer14.mf new file mode 100644 index 0000000000..dc966e6be4 --- /dev/null +++ b/mf/feta-nummer14.mf @@ -0,0 +1,2 @@ +design_size := 14.4; +input feta-nummer; diff --git a/mf/feta-nummer3.mf b/mf/feta-nummer3.mf index d9c79640cb..8ac70299c6 100644 --- a/mf/feta-nummer3.mf +++ b/mf/feta-nummer3.mf @@ -2,9 +2,9 @@ % part of LilyPond's pretty-but-neat music font % size:=4; -size:=16*3/15; +design_size:=16*3/15; -input feta-nummer-generic.mf; +input feta-nummer.mf; end. diff --git a/mf/feta-nummer4.mf b/mf/feta-nummer4.mf index efa2f9ac48..97b59333d3 100644 --- a/mf/feta-nummer4.mf +++ b/mf/feta-nummer4.mf @@ -2,9 +2,9 @@ % part of LilyPond's pretty-but-neat music font % size:=4; -size:=16*4/15; +design_size:=16*4/15; -input feta-nummer-generic.mf; +input feta-nummer.mf; end. diff --git a/mf/feta-nummer5.mf b/mf/feta-nummer5.mf index 0a9fb3ffa3..21c474f1a7 100644 --- a/mf/feta-nummer5.mf +++ b/mf/feta-nummer5.mf @@ -2,9 +2,9 @@ % part of LilyPond's pretty-but-neat music font % size:=5; -size:=20*4/15; +design_size:=20*4/15; -input feta-nummer-generic.mf; +input feta-nummer.mf; end. diff --git a/mf/feta-nummer6.mf b/mf/feta-nummer6.mf index 3daff78c4e..fbda92971a 100644 --- a/mf/feta-nummer6.mf +++ b/mf/feta-nummer6.mf @@ -2,9 +2,9 @@ % part of LilyPond's pretty-but-neat music font % size:=5; -size:=20*6/15; +design_size:=20*6/15; -input feta-nummer-generic.mf; +input feta-nummer.mf; end. diff --git a/mf/feta-nummer7.mf b/mf/feta-nummer7.mf index a098d0f62a..fcc15d6b8f 100644 --- a/mf/feta-nummer7.mf +++ b/mf/feta-nummer7.mf @@ -2,9 +2,9 @@ % part of LilyPond's pretty-but-neat music font % size:=5; -size:=26*4/15; +design_size:=26*4/15; -input feta-nummer-generic.mf; +input feta-nummer.mf; end. diff --git a/mf/feta-nummer8.mf b/mf/feta-nummer8.mf index 874cb8f8a0..d790057895 100644 --- a/mf/feta-nummer8.mf +++ b/mf/feta-nummer8.mf @@ -1,9 +1,7 @@ % feta-nummer8.mf % part of LilyPond's pretty-but-neat music font -size:=8; +design_size:=8; -input feta-nummer-generic.mf; - -end. +input feta-nummer.mf; diff --git a/po/ja.po b/po/ja.po index c5319994f9..5384961816 100644 --- a/po/ja.po +++ b/po/ja.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: lilypond 1.2.17\n" -"POT-Creation-Date: 2000-06-09 02:01+0200\n" +"POT-Creation-Date: 1999-09-16 20:29+0200\n" "PO-Revision-Date: 2000-03-29 20:50+0900\n" "Last-Translator: Daisuke Yamashita \n" "Language-Team: Japanese \n" @@ -17,259 +17,281 @@ msgstr "" msgid "EOF in a string" msgstr "ʸ»úÎóÃæ¤Ë EOF ¤¬¤¢¤ê¤Þ¤¹" -#: data-file.cc:116 input.cc:87 midi-parser.cc:100 warn.cc:22 +#: data-file.cc:116 input.cc:86 midi-parser.cc:100 warn.cc:21 msgid "warning: " msgstr "·Ù¹ð: " -#: dstream.cc:184 +#: dstream.cc:158 msgid "not enough fields in Dstream init" msgstr "Dstream ½é´ü²½»þ¤Î¥Õ¥£¡¼¥ë¥É¤¬ÉÔ½½Ê¬" -#: getopt-long.cc:143 -#, fuzzy, c-format -msgid "option `%s' requires an argument" +#: flower-debug.cc:17 +msgid "Debug output disabled. Compiled with NPRINT." +msgstr "¥Ç¥Ð¥Ã¥°½ÐÎϤ¬Ìµ¸ú¤Ë¤µ¤ì¤Æ¤¤¤Þ¤¹¡£NPRINT ¤Ä¤­¤Ç¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤Þ¤·¤¿¡£" + +#: getopt-long.cc:141 +#, c-format +msgid "Option `%s' requires an argument" msgstr "¥ª¥×¥·¥ç¥ó `%s' ¤Ë¤Ï°ú¿ô¤¬É¬ÍפǤ¹" -#: getopt-long.cc:147 -#, fuzzy, c-format -msgid "option `%s' doesn't allow an argument" +#: getopt-long.cc:145 +#, c-format +msgid "Option `%s' doesn't allow an argument" msgstr "¥ª¥×¥·¥ç¥ó `%s' ¤Ï°ú¿ô¤òµö²Ä¤·¤Þ¤»¤ó" -#: getopt-long.cc:151 +#: getopt-long.cc:149 #, c-format msgid "unrecognized option: `%s'" msgstr "ǧ¼±¤Ç¤­¤Ê¤¤¥ª¥×¥·¥ç¥ó: `%s'" -#: getopt-long.cc:158 +#: getopt-long.cc:156 #, c-format msgid "invalid argument `%s' to option `%s'" msgstr "¥ª¥×¥·¥ç¥ó `%2$s' ¤ËÂФ¹¤ë̵¸ú¤Ê°ú¿ô `%1$s'" -#: input.cc:92 warn.cc:8 warn.cc:16 +#: text-stream.cc:8 +msgid "" +msgstr "" + +#: mapped-file-storage.cc:87 midi-stream.cc:77 mudela-stream.cc:104 +#: paper-stream.cc:25 scores.cc:38 simple-file-storage.cc:44 text-stream.cc:21 +#, c-format +msgid "Can't open file: `%s'" +msgstr "¥Õ¥¡¥¤¥ë¤ò³«¤±¤Þ¤»¤ó: `%s'" + +#: input.cc:91 warn.cc:7 warn.cc:15 msgid "error: " msgstr "¥¨¥é¡¼: " -#: input.cc:98 -#, fuzzy -msgid "non fatal error: " +#: input.cc:97 +msgid "Non fatal error: " msgstr "³¹Ô²Äǽ¤Ê¥¨¥é¡¼: " -#: input.cc:106 source-file.cc:62 source-file.cc:155 +#: input.cc:105 source-file.cc:63 source-file.cc:156 msgid "position unknown" msgstr "°ÌÃÖ¤¬È½¤ê¤Þ¤»¤ó" #: mapped-file-storage.cc:74 -#, fuzzy -msgid "can't map file" +msgid "Can't map file" msgstr "¥Õ¥¡¥¤¥ë¤ò¥Þ¥Ã¥×¤Ç¤­¤Þ¤»¤ó" -#: mapped-file-storage.cc:87 midi-stream.cc:77 mudela-stream.cc:111 -#: paper-stream.cc:25 scores.cc:38 simple-file-storage.cc:44 text-stream.cc:22 -#, fuzzy, c-format -msgid "can't open file: `%s'" -msgstr "¥Õ¥¡¥¤¥ë¤ò³«¤±¤Þ¤»¤ó: `%s'" - #: simple-file-storage.cc:56 #, c-format msgid "Huh? Got %d, expected %d characters" msgstr "¤Ï¡© %2$d ʸ»ú¤¢¤ë¤Ï¤º¤Ê¤Î¤Ë %1$d ʸ»ú¤·¤«¤Ê¤¤" -#: text-stream.cc:9 -msgid "" -msgstr "" - -#: warn.cc:35 +#: warn.cc:34 msgid "programming error: " msgstr "¥×¥í¥°¥é¥à¾å¤Î¥¨¥é¡¼: " -#: warn.cc:35 +#: warn.cc:34 msgid " (Continuing; cross thumbs)" msgstr " (³¤±¤Þ¤¹ -- cross thumbs)" -#: afm.cc:42 -#, fuzzy, c-format -msgid "can't find character number: %d" -msgstr "ʸ»úÈֹ椬¸«¤Ä¤«¤ê¤Þ¤»¤ó: %d" +#: warn.cc:40 +msgid "programming warning: " +msgstr "¥×¥í¥°¥é¥à¾å¤Î·Ù¹ð: " -#: afm.cc:57 -#, fuzzy, c-format -msgid "can't find character called: `%s'" +#: afm.cc:129 +#, c-format +msgid "Can't find character called: `%s'" msgstr "¸Æ¤Ó½Ð¤µ¤ì¤¿Ê¸»ú¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: `%s'" -#: afm.cc:87 -msgid "Error parsing AFM file" -msgstr "" +#: afm.cc:154 +#, c-format +msgid "Can't find character number: %d" +msgstr "ʸ»úÈֹ椬¸«¤Ä¤«¤ê¤Þ¤»¤ó: %d" -#: all-font-metrics.cc:104 lookup.cc:56 -#, fuzzy, c-format -msgid "can't find font: `%s'" +#: all-font-metrics.cc:69 lookup.cc:103 +#, c-format +msgid "Can't find font: `%s'" msgstr "¥Õ¥©¥ó¥È¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: `%s'" -#: all-font-metrics.cc:105 +#: all-font-metrics.cc:70 msgid "Loading default font" msgstr "¥Ç¥Õ¥©¥ë¥È¥Õ¥©¥ó¥È¤ò¥í¡¼¥É¤·¤Þ¤¹" -#: all-font-metrics.cc:122 -#, fuzzy, c-format -msgid "can't find default font: `%s'" +#: all-font-metrics.cc:75 +#, c-format +msgid "Can't find default font: `%s'" msgstr "¥Ç¥Õ¥©¥ë¥È¥Õ¥©¥ó¥È¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: `%s'" -#: all-font-metrics.cc:123 includable-lexer.cc:49 lookup.cc:57 scores.cc:109 +#: all-font-metrics.cc:76 #, c-format -msgid "(search path: `%s')" +msgid "(search path: `%s)'" msgstr "(¸¡º÷¥Ñ¥¹: `%s')" -#: all-font-metrics.cc:124 +#: all-font-metrics.cc:77 msgid "Giving up" msgstr "Äü¤á¤Þ¤·¤¿" -#: auto-change-iterator.cc:43 change-iterator.cc:60 -msgid "Can't switch translators, I'm there already" -msgstr "¥È¥é¥ó¥¹¥ì¡¼¥¿¤òÀÚ¤êÂØ¤¨¤é¤ì¤Þ¤»¤ó¡£´û¤Ë¤½¤¦¤Ê¤Ã¤Æ¤¤¤Þ¤¹" - -#: beam-engraver.cc:40 beam-engraver.cc:56 -msgid "can't find start of beam" -msgstr "" +#: beam-engraver.cc:42 beam-engraver.cc:58 +msgid "no beam to end" +msgstr "ËöÈø¤Ø¤Î³Ã¤¬¤¢¤ê¤Þ¤»¤ó" -#: beam-engraver.cc:85 -#, fuzzy -msgid "already have a beam" +#: beam-engraver.cc:87 +msgid "Already have a Beam" msgstr "´û¤Ë³Ã¤¬¤¢¤ê¤Þ¤¹" -#: beam-engraver.cc:141 -#, fuzzy -msgid "unterminated beam" -msgstr "½ªÃ¼¤Î¤Ê¤¤¥Ï¥¤¥Õ¥ó" +#: beam-engraver.cc:149 +msgid "unfinished beam" +msgstr "½ªÎ»¤µ¤ì¤Æ¤¤¤Ê¤¤³Ã" -#: beam-engraver.cc:169 chord-tremolo-engraver.cc:167 -#, fuzzy -msgid "stem must have Rhythmic structure" +#: beam-engraver.cc:174 +msgid "Stem must have Rhythmic structure" msgstr "ÉäÈø¤Ï¥ê¥º¥à¹½Â¤¤ò»ý¤¿¤Í¤Ð¤Ê¤ê¤Þ¤»¤ó" -#: beam-engraver.cc:180 -#, fuzzy -msgid "stem doesn't fit in beam" +#: beam-engraver.cc:185 +msgid "Stem doesn't fit in beam" msgstr "ÉäÈø¤¬³Ã¤ÎÃæ¤Ë¤ª¤µ¤Þ¤ê¤Þ¤»¤ó" -#: beam-engraver.cc:181 -#, fuzzy -msgid "beam was started here" +#: beam-engraver.cc:186 +msgid "Beam was started here" msgstr "³Ã¤Ï¤³¤³¤«¤é³«»Ï¤µ¤ì¤Þ¤·¤¿" -#: beam.cc:90 -#, fuzzy -msgid "beam has less than two stems" +#: beam.cc:147 +msgid "beam with less than two stems" msgstr "³Ã¤¬Æó¤Ä̤Ëþ¤ÎÉäÈø¤È¤È¤â¤Ë»È¤ï¤ì¤Þ¤·¤¿" -#: beam.cc:483 +#: beam.cc:312 msgid "weird beam vertical offset" msgstr "¿âľÊý¸þ¤Î°ÌÃ֤Ȥ·¤Æ¤ª¤«¤·¤Ê³Ã" -#: break-align-item.cc:87 -#, fuzzy, c-format -msgid "unknown spacing pair `%s', `%s'" -msgstr "Ƚ¤é¤Ê¤¤¥È¥é¥ó¥¹¥ì¡¼¥¿: `%s'" +#: break-algorithm.cc:28 +msgid "0 lines" +msgstr "0 ¹Ô" + +#: break-algorithm.cc:30 +#, c-format +msgid "1 line (of %.0f columns)" +msgstr "1 ¹Ô (%.0f ¥«¥é¥à)" + +#: break-algorithm.cc:32 +#, c-format +msgid "%d lines (with an average of %.1f columns)" +msgstr "%d ¹Ô (Ê¿¶Ñ %.1f ¥«¥é¥à)" + +#: break-algorithm.cc:155 +msgid "Score does not have any columns" +msgstr "ÉèÌ̤˥«¥é¥à¤¬¤¢¤ê¤Þ¤»¤ó" + +#: break-algorithm.cc:172 +#, c-format +msgid "approximated %s" +msgstr "¤ª¤ª¤è¤½ %s" + +#: break-algorithm.cc:174 +#, c-format +msgid "calculated %s exactly" +msgstr "Àµ³Î¤Ë·×»»¤µ¤ì¤¿ %s" + +#: break-algorithm.cc:175 +#, c-format +msgid "elapsed time %.2f seconds" +msgstr "%.2f É÷вá" #: change-iterator.cc:22 -#, fuzzy, c-format -msgid "can't change `%s' to `%s'" +#, c-format +msgid "Can't change `%s' to `%s'" msgstr "`%s' ¤«¤é `%s' ¤ËÊѹ¹¤Ç¤­¤Þ¤»¤ó" +#: change-iterator.cc:57 +msgid "Can't switch translators, I'm there already" +msgstr "¥È¥é¥ó¥¹¥ì¡¼¥¿¤òÀÚ¤êÂØ¤¨¤é¤ì¤Þ¤»¤ó¡£´û¤Ë¤½¤¦¤Ê¤Ã¤Æ¤¤¤Þ¤¹" + #. #. We could change the current translator's id, but that would make #. errors hard to catch #. #. last->translator_id_str_ = change_l ()->change_to_id_str_; #. -#: change-iterator.cc:79 +#: change-iterator.cc:76 msgid "I'm one myself" msgstr "¥È¥é¥ó¥¹¥ì¡¼¥¿¤½¤Î¤â¤Î¤Ç¤¹" -#: change-iterator.cc:82 +#: change-iterator.cc:79 msgid "none of these in my family" msgstr "¥Õ¥¡¥ß¥ê¤ÎÃæ¤Ë¤¢¤ê¤Þ¤»¤ó" -#: chord-tremolo-engraver.cc:111 -#, fuzzy -msgid "unterminated chord tremolo" -msgstr "½ªÃ¼¤Î¤Ê¤¤¥Ï¥¤¥Õ¥ó" +#: chord-tremolo-engraver.cc:41 chord-tremolo-engraver.cc:58 +msgid "no tremolo beam to end" +msgstr "ËöÈø¤Ø¤Î¥È¥ì¥â¥íµ­¹æ¤¬¤¢¤ê¤Þ¤»¤ó" -#: chord-tremolo-iterator.cc:41 -#, fuzzy -msgid "no one to print a tremolos" -msgstr "È¿Éüµ­¹æ¤òɽ¼¨¤¹¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤»¤ó" +#: chord-tremolo-engraver.cc:83 +msgid "Already have a tremolo beam" +msgstr "¤¹¤Ç¤Ë¥È¥ì¥â¥íµ­¹æ¤¬¤¢¤ê¤Þ¤¹" -#: chord.cc:151 +#: chord-tremolo-engraver.cc:124 +msgid "unfinished tremolo beam" +msgstr "½ª¤ï¤Ã¤Æ¤¤¤Ê¤¤¥È¥ì¥â¥íµ­¹æ" + +#: chord.cc:231 #, c-format msgid "invalid subtraction: not part of chord: %s" msgstr "̵¸ú¤Ê°ú¤­»»: ¥³¡¼¥É¤Î°ìÉô¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó: %s" -#: chord.cc:375 +#: chord.cc:245 #, c-format msgid "invalid inversion pitch: not part of chord: %s" msgstr "̵¸ú¤Êž²ó¥Ô¥Ã¥Á: ¥³¡¼¥É¤Î°ìÉô¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó: %s" -#: clef-engraver.cc:166 +#: clef-engraver.cc:178 msgid "unknown clef type" msgstr "ÉÔÌÀ¤Ê²»Éôµ­¹æ(Clef)" -#: collision.cc:111 +#: collision.cc:95 msgid "Too many clashing notecolumns. Ignoring them." msgstr "Äà¤ê¹ç¤ï¤Ê¤¤²»É䤬¿¤¹¤®¤Þ¤¹¡£¤½¤ì¤é¤ò̵»ë¤·¤Þ¤¹¡£" -#: crescendo.cc:69 +#: crescendo.cc:42 msgid "crescendo" msgstr "¥¯¥ì¥Ã¥·¥§¥ó¥É" -#: crescendo.cc:69 +#: crescendo.cc:42 msgid "too small" msgstr "¾®¤µ¤¹¤®¤Þ¤¹" -#: cross-staff.cc:19 -#, fuzzy -msgid "" -"minVerticalAlign != maxVerticalAlign: cross staff spanners may be broken" -msgstr "" -"minVerticalAlign != maxVerticalAlign: ÆâÉôŪ¤Ê beams/slurs ¤¬²õ¤ì¤Þ¤·¤¿" - -#: debug.cc:26 +#: debug.cc:56 msgid "floating point exception" msgstr "ÉâÆ°¾®¿ôÅÀÎã³°" -#: debug.cc:50 -#, fuzzy -msgid "can't set mem-checking!" +#: debug.cc:139 +msgid "Can't set mem-checking!" msgstr "¥á¥â¥ê¥Á¥§¥Ã¥¯¤òÀßÄê¤Ç¤­¤Þ¤»¤ó" #: dimensions.cc:13 msgid "NaN" msgstr "NaN" -#: dynamic-engraver.cc:281 span-dynamic-performer.cc:87 -#, fuzzy -msgid "can't find start of (de)crescendo" -msgstr "ËöÈø¤Ø¤Î(¥Ç)¥¯¥ì¥Ã¥·¥§¥ó¥É¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó" +#: dynamic-engraver.cc:109 +msgid "Got a dynamic already. Continuing dazed and confused." +msgstr "´û¤ËưŪ¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£º®Í𤷤¿¤Þ¤Þ³¤±¤Þ¤¹¡£" -#: dynamic-engraver.cc:300 -#, fuzzy -msgid "already have a crescendo" -msgstr "´û¤Ë³Ã¤¬¤¢¤ê¤Þ¤¹" +#: dynamic-engraver.cc:162 +msgid "Can't find (de)crescendo to end" +msgstr "ËöÈø¤Ø¤Î(¥Ç)¥¯¥ì¥Ã¥·¥§¥ó¥É¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó" -#: dynamic-engraver.cc:301 -#, fuzzy -msgid "already have a decrescendo" -msgstr "´û¤Ë³Ã¤¬¤¢¤ê¤Þ¤¹" +#: dynamic-engraver.cc:216 +msgid "Too many crescendi here" +msgstr "¤³¤³¤Î¥¯¥ì¥Ã¥·¥§¥ó¥É¤¬Â¿¤¹¤®¤Þ¤¹" -#: dynamic-engraver.cc:381 -#, fuzzy -msgid "unterminated (de)crescendo" +#: dynamic-engraver.cc:254 +msgid "unended crescendo" msgstr "½ªÎ»¤·¤Æ¤¤¤Ê¤¤¥¯¥ì¥Ã¥·¥§¥ó¥É" -#: extender-engraver.cc:96 +#: encompass-info.cc:32 +msgid "Slur over rest?" +msgstr "¥¹¥é¡¼¤¬µÙÉä¤ò¤Þ¤¿¤¤¤Ç¤¤¤ë?" + +#: encompass-info.cc:67 stem-info.cc:140 +msgid "minVerticalAlign != maxVerticalAlign: interstaff beams/slurs may be broken" +msgstr "minVerticalAlign != maxVerticalAlign: ÆâÉôŪ¤Ê beams/slurs ¤¬²õ¤ì¤Þ¤·¤¿" + +#: extender-engraver.cc:62 msgid "unterminated extender" msgstr "½ªÃ¼¤Î¤Ê¤¤¥¨¥¯¥¹¥Æ¥ó¥À" -#: extender-engraver.cc:108 +#: extender-engraver.cc:74 msgid "Nothing to connect extender to on the left. Ignoring extender request." msgstr "¥¨¥¯¥¹¥Æ¥ó¥À¤¬º¸Â¦¤Ë¤Ä¤Ê¤¬¤ê¤Þ¤»¤ó¡£¥¨¥¯¥¹¥Æ¥ó¥ÀÍ×µá¤ò̵»ë¤·¤Þ¤¹¡£" @@ -277,37 +299,51 @@ msgstr " msgid "no one to print a repeat brace" msgstr "È¿Éüµ­¹æ¤òɽ¼¨¤¹¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤»¤ó" -#: gourlay-breaking.cc:157 -msgid "No feasible line breaking found" -msgstr "" - #: grace-iterator.cc:43 msgid "no Grace context available" msgstr "Áõ¾þ¥³¥ó¥Æ¥­¥¹¥È¤¬¤¢¤ê¤Þ¤»¤ó" -#: grace-position-engraver.cc:93 +#: grace-position-engraver.cc:89 msgid "Unattached grace notes. Attaching to last musical column." msgstr "Áõ¾þ²»É䤬¤Ä¤±¤é¤ì¤Þ¤»¤ó¤Ç¤·¤¿¡£Ä¾Á°¤Î¥«¥é¥à¤Ë¤Ä¤±¤Þ¤¹" -#: hyphen-engraver.cc:59 +#: hyphen-engraver.cc:60 msgid "unterminated hyphen" msgstr "½ªÃ¼¤Î¤Ê¤¤¥Ï¥¤¥Õ¥ó" -#: hyphen-engraver.cc:71 +#: hyphen-engraver.cc:72 msgid "Nothing to connect hyphen to on the left. Ignoring hyphen request." msgstr "º¸Â¦¤Ë·Ò¤²¤ë¥Ï¥¤¥Õ¥ó¤¬¤¢¤ê¤Þ¤»¤ó¡£¥Ï¥¤¥Õ¥ó¤ÎÍ×µá¤ò̵»ë¤·¤Þ¤¹" -#: identifier.cc:44 +#: identifier.cc:46 #, c-format msgid "wrong identifier type, expected: `%s'" msgstr "´Ö°ã¤Ã¤¿¼±Ê̻ҷ¿¡¢¤³¤³¤ËÍè¤ë¤Ù¤­¤â¤Î¤Ï: `%s'" -#: includable-lexer.cc:47 lily-guile.cc:121 lily-guile.cc:144 +#: includable-lexer.cc:47 lily-guile.cc:82 lily-guile.cc:105 #: midi-score-parser.cc:24 scores.cc:108 scores.cc:114 -#, fuzzy, c-format -msgid "can't find file: `%s'" +#, c-format +msgid "Can't find file: `%s'" msgstr "¥Õ¥¡¥¤¥ë¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: `%s'" +#: includable-lexer.cc:49 lookup.cc:104 scores.cc:109 +#, c-format +msgid "(search path: `%s')" +msgstr "(¸¡º÷¥Ñ¥¹: `%s')" + +#: ineq-constrained-qp.cc:169 +#, c-format +msgid "Ineq_constrained_qp::solve (): Constraint off by %f" +msgstr "Ineq_constrained_qp::solve (): À©¸Â¤ò %f ¤Ç²ò½ü" + +#: ineq-constrained-qp.cc:233 +msgid "Didn't converge!" +msgstr "¼ý«¤·¤Þ¤»¤ó¤Ç¤·¤¿!" + +#: ineq-constrained-qp.cc:235 +msgid "too much degeneracy" +msgstr "¾®¤µ¤¹¤®¤Þ¤¹" + #: key-def.cc:31 msgid "No key name, assuming `C'" msgstr "¥­¡¼Ì¾¤¬¤¢¤ê¤Þ¤»¤ó¡¢`C' ¤ò»î¤ß¤Þ¤¹" @@ -316,49 +352,54 @@ msgstr " msgid "Don't know how handle empty keys" msgstr "¶õ¤Î¥­¡¼¤Î°·¤¤Êý¤¬È½¤ê¤Þ¤»¤ó" -#: key-engraver.cc:74 key-performer.cc:65 +#: key-engraver.cc:70 key-performer.cc:65 msgid "FIXME: key change merge" msgstr "FIXME: ¥­¡¼Êѹ¹¤Î¥Þ¡¼¥¸" -#: lily-guile.cc:123 lily-guile.cc:146 +#: key.cc:54 key.cc:59 #, c-format -msgid "(load path: `%s')" -msgstr "(ÆÉ¹þ¥Ñ¥¹: `%s')" +msgid "Don't have that many octaves (%s)" +msgstr "¤½¤ó¤Ê¤ËÂô»³¤Î¥ª¥¯¥¿¡¼¥Ö (%s) ¤ò»È¤ï¤Ê¤¤¤Ç¤¯¤À¤µ¤¤" -#: line-of-score.cc:90 +#: key.cc:77 #, c-format -msgid "Element count %d." -msgstr "" +msgid "underdone accidentals (%s)" +msgstr "¥Õ¥é¥Ã¥È¤¬Â¿¤¹¤®¤Þ¤¹ (%s)" -#: line-of-score.cc:207 paper-score.cc:70 +#: key.cc:82 #, c-format -msgid "Element count %d " -msgstr "" +msgid "overdone accidentals (%s)" +msgstr "¥·¥ã¡¼¥×¤¬Â¿¤¹¤®¤Þ¤¹ (%s)" -#: line-of-score.cc:221 -msgid "Calculating column positions..." -msgstr "¥«¥é¥à°ÌÃÖ¤ò·×»»Ãæ..." +#: lily-guile.cc:84 lily-guile.cc:107 +#, c-format +msgid "(load path: `%s')" +msgstr "(ÆÉ¹þ¥Ñ¥¹: `%s')" + +#: line-of-score.cc:91 +msgid "Huh? Empty Line_of_score?" +msgstr "¤Ï? ÉèÌ̤ιԤ¬¶õ?" -#: local-key-engraver.cc:82 +#: local-key-engraver.cc:42 msgid "out of tune:" msgstr "Èϰϳ°¤ÎÄ´:" -#: local-key-engraver.cc:83 time-signature-engraver.cc:29 -#: translator-group.cc:416 translator-group.cc:425 -#, fuzzy, c-format -msgid "can't find: `%s'" +#: local-key-engraver.cc:43 time-signature-engraver.cc:29 +#: translator-group.cc:437 translator-group.cc:446 +#, c-format +msgid "Can't find: `%s'" msgstr "¸«¤Ä¤«¤ê¤Þ¤»¤ó: `%s'" -#: lookup.cc:58 +#: lookup.cc:105 msgid "Aborting" msgstr "½ªÎ»¤·¤Þ¤¹" -#: lookup.cc:198 +#: lookup.cc:436 #, c-format msgid "Non-matching braces in text `%s', adding braces" msgstr "¥Æ¥­¥¹¥È `%s' Ãæ¤Ë°ìÃפ¹¤ë¥Ö¥ì¡¼¥¹¤¬¤¢¤ê¤Þ¤»¤ó¡£¥Ö¥ì¡¼¥¹¤òÄɲä·¤Þ¤¹" -#: main.cc:71 main.cc:92 +#: main.cc:71 main.cc:91 msgid "enable debugging output" msgstr "¥Ç¥Ð¥Ã¥°½ÐÎϤòÍ­¸ú" @@ -367,11 +408,10 @@ msgid "EXT" msgstr "EXT" #: main.cc:72 -#, fuzzy -msgid "use output format EXT (scm, ps, tex or as)" +msgid "use output format EXT" msgstr "½ÐÎÏ¥Õ¥©¡¼¥Þ¥Ã¥È EXT ¤ò»È¤¦" -#: main.cc:73 main.cc:93 +#: main.cc:73 main.cc:92 msgid "this help" msgstr "¤³¤Î¥Ø¥ë¥×" @@ -383,7 +423,7 @@ msgstr "DIR" msgid "add DIR to search path" msgstr "DIR ¤ò¸¡º÷¥Ñ¥¹¤ËÄɲÃ" -#: main.cc:75 main.cc:96 +#: main.cc:75 main.cc:95 msgid "FILE" msgstr "FILE" @@ -415,7 +455,7 @@ msgstr " msgid "inhibit file output naming and exporting" msgstr "̾Á°ÉÕ¤±¤È¥¨¥¯¥¹¥Ý¡¼¥È¤Î½ÐÎÏ¥Õ¥¡¥¤¥ë¤òÍÞÀ©¤¹¤ë" -#: main.cc:81 main.cc:100 +#: main.cc:81 main.cc:99 msgid "don't timestamp the output" msgstr "½ÐÎϤ˥¿¥¤¥à¥¹¥¿¥ó¥×¤ò¤Ä¤±¤Ê¤¤" @@ -427,47 +467,37 @@ msgstr " msgid "ignore mudela version" msgstr "mudela ¤Î¥Ð¡¼¥¸¥ç¥ó¤ò̵»ë¤¹¤ë" -#: main.cc:84 main.cc:101 +#: main.cc:84 main.cc:100 msgid "print version number" msgstr "¥Ð¡¼¥¸¥ç¥óÈÖ¹æ¤òɽ¼¨" -#: main.cc:85 main.cc:103 +#: main.cc:85 main.cc:102 msgid "show warranty and copyright" msgstr "ÊݾڤÈÃøºî¸¢¤Ë¤Ä¤¤¤ÆÉ½¼¨¤¹¤ë" -#: main.cc:100 +#: main.cc:92 #, c-format msgid "Usage: %s [OPTION]... [FILE]..." msgstr "»È¤¤Êý: %s [¥ª¥×¥·¥ç¥ó]... [¥Õ¥¡¥¤¥ë]..." -#: main.cc:102 +#: main.cc:94 msgid "Typeset music and or play MIDI from FILE" msgstr "¥Õ¥¡¥¤¥ë¤Î³Ú¶Ê¤òÁÈÈǤ·¤¿¤ê¡¢MIDI ±éÁÕ¤·¤¿¤ê¤¹¤ë" -#: main.cc:106 -msgid "" -"LilyPond is a music typesetter. It produces beautiful sheet music\n" -"using a high level description file as input. LilyPond is part of \n" -"the GNU Project.\n" -msgstr "" -"LilyPond ¤Ï³Ú¶ÊÁÈÈÇ¥½¥Õ¥È¤Ç¤¹¡£ÆþÎÏ¥Õ¥¡¥¤¥ë¤Ë¤Ï¥Ï¥¤¥ì¥Ù¥ë¤Êµ­½Ò¤ò»ÈÍѤǤ­¡¢\n" -"Èþ¤·¤¤ÉèÌ̤òºîÀ®¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£LilyPond ¤Ï GNU " -"¥×¥í¥¸¥§¥¯¥È¤Î°ìÉô¤Ç¤¹¡£\n" - -#: main.cc:112 main.cc:116 +#: main.cc:100 main.cc:115 msgid "Options:" msgstr "¥ª¥×¥·¥ç¥ó:" -#: main.cc:116 +#: main.cc:104 msgid "This binary was compiled with the following options:" msgstr "¤³¤Î¥Ð¥¤¥Ê¥ê¤Ï°Ê²¼¤Î¥ª¥×¥·¥ç¥óÉÕ¤­¤Ç¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤Þ¤·¤¿" -#: main.cc:120 main.cc:135 +#: main.cc:119 main.cc:123 #, c-format msgid "Report bugs to %s" msgstr "¥Ð¥°¥ì¥Ý¡¼¥È¤Ï %s ¤Ø" -#: main.cc:53 main.cc:143 +#: main.cc:52 main.cc:137 #, c-format msgid "" "This is free software. It is covered by the GNU General Public License,\n" @@ -483,17 +513,17 @@ msgstr "" "¤³¤ì¤ò²þÊѤ·¤¿¤ê¡¢Ê£À½¤òÇÛÉÛ¤·¤¿¤ê¤¹¤ë»ö¤Ï´¿·Þ¤µ¤ì¤Þ¤¹¡£\n" "`--warranty' ¥ª¥×¥·¥ç¥óÉÕ¤­¤Çµ¯Æ°¤¹¤ë¤È¡¢¤è¤ê¾ÜºÙ¤Ê¾ðÊ󤬯À¤é¤ì¤Þ¤¹¡£\n" -#: main.cc:60 main.cc:150 main.cc:162 +#: main.cc:59 main.cc:144 main.cc:156 #, c-format msgid "Copyright (c) %s by" msgstr "Copyright (c) %s by" #. GNU GNU? -#: main.cc:160 +#: main.cc:154 msgid "GNU LilyPond -- The GNU Project music typesetter" msgstr "GNU LilyPond -- The GNU Project music typesetter" -#: main.cc:69 main.cc:168 +#: main.cc:68 main.cc:162 msgid "" " This program is free software; you can redistribute it and/or\n" "modify it under the terms of the GNU General Public License version 2\n" @@ -524,37 +554,33 @@ msgstr "" "USA.\n" "\n" "-- »²¹ÍÌõ\n" -" ¤³¤Î¥×¥í¥°¥é¥à¤Ï¡¢¥Õ¥ê¡¼¥½¥Õ¥È¥¦¥§¥¢¤Ç¤¹¡£¤¢¤Ê¤¿¤Ï Free Software " -"Foundation\n" -"¤¬¸øÉ½¤·¤¿ GNU °ìÈ̸øÍ­»ÈÍѵöÂú¤Î¥Ð¡¼¥¸¥ç¥ó 2 " -"¤Î¾ò¹à¤Ë´ð¤Å¤¤¤Æ¡¢¤³¤Î¥×¥í¥°¥é\n" +" ¤³¤Î¥×¥í¥°¥é¥à¤Ï¡¢¥Õ¥ê¡¼¥½¥Õ¥È¥¦¥§¥¢¤Ç¤¹¡£¤¢¤Ê¤¿¤Ï Free Software Foundation\n" +"¤¬¸øÉ½¤·¤¿ GNU °ìÈ̸øÍ­»ÈÍѵöÂú¤Î¥Ð¡¼¥¸¥ç¥ó 2 ¤Î¾ò¹à¤Ë´ð¤Å¤¤¤Æ¡¢¤³¤Î¥×¥í¥°¥é\n" "¥à¤òºÆÈÒÉÛ¤Þ¤¿¤ÏÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£\n" "\n" -"¤³¤Î¥×¥í¥°¥é¥à¤ÏÍ­ÍѤȤϻפ¤¤Þ¤¹¤¬¡¢ÈÒÉÛ¤ËÅö¤¿¤Ã¤Æ¤Ï¡¢»Ô¾ìÀ­µÚ¤ÓÆÃÄêÌÜŪŬ¹ç" -"\n" -"À­¤Ë¤Ä¤¤¤Æ¤Î°ÅÌÛ¤ÎÊݾڤâ´Þ¤á¤Æ¡¢¤¤¤«¤Ê¤ëÊݾڤâ¹Ô¤Ê¤¤¤Þ¤»¤ó¡£¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï¡¢" -"\n" +"¤³¤Î¥×¥í¥°¥é¥à¤ÏÍ­ÍѤȤϻפ¤¤Þ¤¹¤¬¡¢ÈÒÉÛ¤ËÅö¤¿¤Ã¤Æ¤Ï¡¢»Ô¾ìÀ­µÚ¤ÓÆÃÄêÌÜŪŬ¹ç\n" +"À­¤Ë¤Ä¤¤¤Æ¤Î°ÅÌÛ¤ÎÊݾڤâ´Þ¤á¤Æ¡¢¤¤¤«¤Ê¤ëÊݾڤâ¹Ô¤Ê¤¤¤Þ¤»¤ó¡£¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï¡¢\n" "GNU °ìÈ̸øÍ­»ÈÍѵöÂú½ñ¤ò¤ªÆÉ¤ß²¼¤µ¤¤¡£\n" "\n" "¤¢¤Ê¤¿¤Ï¡¢¤³¤Î¥×¥í¥°¥é¥à¤È°ì½ï¤Ë GNU °ìÈ̸øÍ­»ÈÍѵöÂú½ñ¤ò¼õ¤±¼è¤Ã¤Æ¤¤¤ë¤Ï¤º\n" "¤Ç¤¹(COPYING ¥Õ¥¡¥¤¥ë¤ò»²¾È)¡£¤½¤¦¤Ç¤Ê¤¤¾ì¹ç¤Ï¡¢Free Software Foundation,\n" "Inc., 675 Mass Ave, Cambridge, MA 02139, USA ¤Ë¼ê»æ¤ò½ñ¤¤¤Æ¤¯¤À¤µ¤¤¡£\n" -#: midi-item.cc:311 +#: midi-item.cc:303 #, c-format msgid "no such instrument: `%s'" msgstr "¤½¤ÎÍͤʳڴï¤Ï¤¢¤ê¤Þ¤»¤ó: `%s'" -#: midi-item.cc:365 +#: midi-item.cc:357 #, c-format msgid "unconventional key: flats: %d, sharps: %d" msgstr "´·½¬¤Ë¹ç¤ï¤Ê¤¤¥­¡¼¤Ç¤¹: ¥Õ¥é¥Ã¥È: %d ¸Ä, ¥·¥ã¡¼¥× %d ¸Ä" -#: midi-item.cc:410 +#: midi-item.cc:402 msgid "silly duration" msgstr "Çϼ¯¤²¤¿²»Ä¹" -#: midi-item.cc:423 +#: midi-item.cc:415 msgid "silly pitch" msgstr "Çϼ¯¤²¤¿¥Ô¥Ã¥Á" @@ -562,13 +588,13 @@ msgstr " msgid "Error syncing file (disk full?)" msgstr "¥Õ¥¡¥¤¥ë¤ÎƱĴ¥¨¥é¡¼ (¥Ç¥£¥¹¥¯¤¬°ìÇÕ?)" -#: music-output-def.cc:57 +#: music-output-def.cc:56 msgid "Interpretation context with empty type" msgstr "¶õ¥¿¥¤¥×¤Î²ò¼á¥³¥ó¥Æ¥­¥¹¥È" -#: music-output-def.cc:87 -#, fuzzy, c-format -msgid "can't find `%s' context" +#: music-output-def.cc:83 +#, c-format +msgid "Can't find `%s' context" msgstr "`%s' ¥³¥ó¥Æ¥­¥¹¥È¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó" #: musical-request.cc:42 @@ -576,134 +602,154 @@ msgstr "`%s' msgid "Transposition by %s makes accidental larger than two" msgstr "%s ¤ÎÊÑÄ´¤Ë¤è¤Ã¤Æ¡¢Æó¤Ä¤òͤ¨¤ëÇÉÀ¸²»¤¬ºî¤é¤ì¤Þ¤·¤¿" -#: my-lily-lexer.cc:129 +#: my-lily-lexer.cc:137 +#, c-format +msgid "redeclaration of `\\%s'" +msgstr "`\\%s' ¤ÎºÆÀë¸À" + +#: my-lily-lexer.cc:143 #, c-format msgid "Identifier name is a keyword: `%s'" msgstr "¼±ÊÌ»Ò̾¤Ï¥­¡¼¥ï¡¼¥É¤Ç¤¹: `%s'" -#: my-lily-lexer.cc:148 +#: my-lily-lexer.cc:172 #, c-format msgid "error at EOF: %s" msgstr "EOF ¤Î¤È¤³¤í¤Ç¥¨¥é¡¼: %s" -#: midi-score-parser.cc:94 my-lily-parser.cc:56 +#: midi-score-parser.cc:94 my-lily-parser.cc:60 msgid "Parsing..." msgstr "¹½Ê¸²òÀÏÃæ..." -#: my-lily-parser.cc:64 +#: my-lily-parser.cc:69 msgid "Braces don't match" msgstr "¥Ö¥ì¡¼¥¹¤¬°ìÃפ·¤Þ¤»¤ó" -#: paper-def.cc:70 +#: p-col.cc:48 +msgid "Must set spring between differing columns" +msgstr "°Û¤Ê¤ë¥«¥é¥à¤Î´Ö¤Ë spring ¤ò¥»¥Ã¥È¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó" + +#: paper-def.cc:95 #, c-format msgid "unknown paper variable: `%s'" msgstr "paper ÊÑ¿ô¤ÎÃͤ¬È½¤ê¤Þ¤»¤ó: `%s'" -#: paper-def.cc:74 +#: paper-def.cc:99 msgid "not a real variable" msgstr "Ãͤ¬¼Â¿ô¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" -#: paper-def.cc:165 +#. for now; breaks -fscm output +#: paper-def.cc:251 +msgid "Outputting Score, defined at: " +msgstr "ÉèÌ̤ò½ÐÎϤ·¤Þ¤¹¡£¤³¤³¤ÇÄêµÁ: " + +#: paper-def.cc:280 #, c-format msgid "paper output to %s..." msgstr "%s ¤Ø paper ½ÐÎÏ..." -#: mudela-stream.cc:93 paper-outputter.cc:92 performance.cc:95 +#: mudela-stream.cc:86 paper-outputter.cc:76 performance.cc:97 msgid ", at " msgstr ", at " -#: paper-score.cc:72 +#: paper-outputter.cc:130 +#, c-format +msgid "improbable offset for object type: `%s'" +msgstr "¥ª¥Ö¥¸¥§¥¯¥È·¿¤Ë¤È¤Ã¤Æ¤¢¤ê¤½¤¦¤Ë¤Ê¤¤¥ª¥Õ¥»¥Ã¥È: `%s'" + +#: paper-score.cc:131 +msgid "Can't solve this casting problem exactly; reverting to Word_wrap" +msgstr "Àµ³Î¤Ë¥­¥ã¥¹¥È¤ò²ò·è¤Ç¤­¤Þ¤»¤ó -- Word_wrap ¤ËÉüµ¢¤·¤Þ¤¹" + +#: paper-score.cc:156 msgid "Preprocessing elements..." msgstr "Í×ÁǤòÁ°½èÍýÃæ..." -#: paper-score.cc:97 -msgid "Outputting Score, defined at: " -msgstr "ÉèÌ̤ò½ÐÎϤ·¤Þ¤¹¡£¤³¤³¤ÇÄêµÁ: " +#: paper-score.cc:160 +msgid "Calculating column positions..." +msgstr "¥«¥é¥à°ÌÃÖ¤ò·×»»Ãæ..." + +#: paper-score.cc:179 +#, c-format +msgid "%s elements" +msgstr "%s ¸Ä¤ÎÍ×ÁÇ" + +#: paper-score.cc:182 +msgid "Line ... " +msgstr "¹Ô ..." #: performance.cc:50 msgid "Track ... " msgstr "¥È¥é¥Ã¥¯ ..." #. perhaps multiple text events? -#: performance.cc:75 +#: performance.cc:77 msgid "Creator: " msgstr "ºî¶Ê¼Ô: " -#: performance.cc:90 +#: performance.cc:92 msgid "Automatically generated" msgstr "¼«Æ°À¸À®¤µ¤ì¤¿" -#: performance.cc:104 +#: performance.cc:106 #, c-format msgid "from musical definition: %s" msgstr "²»³ÚŪÄêµÁ¤è¤ê: %s" -#: performance.cc:172 +#: performance.cc:174 #, c-format msgid "MIDI output to %s..." msgstr "%s ¤Ø¤Î MIDI ½ÐÎÏ" -#: piano-pedal-engraver.cc:158 piano-pedal-engraver.cc:170 -#: piano-pedal-performer.cc:87 -#, fuzzy, c-format -msgid "can't find start of piano pedal: %s" -msgstr "¸Æ¤Ó½Ð¤µ¤ì¤¿Ê¸»ú¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: `%s'" - -#: property-engraver.cc:106 -#, fuzzy -msgid "Wrong type for property" -msgstr "°À­ÃͤؤΥ¿¥¤¥×¤¬´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹" +#: qlpsolve.cc:88 qlpsolve.cc:139 +msgid "degenerate constraints" +msgstr "À©¸Â¤ò´ËÏÂ" -#: repeat-engraver.cc:196 +#: repeat-engraver.cc:177 msgid "No bar engraver found. Ignoring repeats." msgstr "¾®À᤬¸«¤Ä¤«¤ê¤Þ¤»¤ó¡£È¿Éü¤ò̵»ë¤·¤Þ¤¹¡£" -#: request-chord-iterator.cc:72 +#: request-chord-iterator.cc:73 #, c-format msgid "Junking request: `%s'" msgstr "Í×µá¤ò¼Î¤Æ¤Þ¤¹: `%s'" -#: request-chord-iterator.cc:75 +#: request-chord-iterator.cc:76 #, c-format msgid "Huh? Not a Request: `%s'" msgstr "¤Ï? Í×µá¤Ç¤Ï¤Ê¤¤: `%s'" -#: request-iterator.cc:20 -#, fuzzy, c-format -msgid "Junking music: `%s'" -msgstr "Í×µá¤ò¼Î¤Æ¤Þ¤¹: `%s'" - -#: rest-collision.cc:135 +#: rest-collision.cc:64 msgid "too many colliding rests" msgstr "µÙÉä¤Î¾×ÆÍ¤¬Â¿¤¹¤®¤Þ¤¹" -#: rest-collision.cc:139 +#: rest-collision.cc:68 msgid "too many notes for rest collision" msgstr "µÙÉä¤Î¾×ÆÍ¤ËÂФ·¤Æ²»É䤬¿¤¹¤®¤Þ¤¹" -#: score-engraver.cc:139 +#: score-engraver.cc:149 #, c-format msgid "unbound spanner `%s'" msgstr "ÊĤ¸¤Æ¤¤¤Ê¤¤¥¹¥Ñ¥Ê `%s'" -#: score.cc:64 +#: score.cc:56 msgid "no toplevel translator" msgstr "ºÇ¾å°Ì¤Î¥È¥é¥ó¥¹¥ì¡¼¥¿¤¬¤¢¤ê¤Þ¤»¤ó" -#: score.cc:67 +#: score.cc:59 msgid "Interpreting music..." msgstr "³Ú¶Ê¤Î²ò¼áÃæ..." -#: score.cc:79 +#: score.cc:70 msgid "Need music in a score" msgstr "³ÚÉè¤Ë¤Ï³Ú¶Ê¤¬É¬ÍפǤ¹" #. should we? hampers debugging. -#: score.cc:92 +#: score.cc:83 msgid "Errors found/*, not processing score*/" msgstr "¥¨¥é¡¼¤òȯ¸«/*, ³ÚÉè¤ò½èÍý¤·¤Þ¤»¤ó*/" -#: score.cc:97 +#: score.cc:88 #, c-format msgid "elapsed time: %.2f seconds" msgstr "·Ð²á»þ´Ö: %.2f ÉÃ" @@ -717,78 +763,119 @@ msgstr " msgid "Score contains errors; will not process it" msgstr "³ÚÉè¤Ë¥¨¥é¡¼¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹ -- ½èÍý¤·¤Þ¤»¤ó" -#: script-engraver.cc:68 +#: script-engraver.cc:49 #, c-format msgid "Don't know how to interpret articulation `%s'" msgstr "²»Àá `%s' ¤Î²ò¼áÊýË¡¤¬È½¤ê¤Þ¤»¤ó" -#: sequential-music-iterator.cc:83 +#: sequential-music-iterator.cc:82 msgid "Must stop before this music ends" msgstr "¤³¤Î³Ú¶Ê¤Î½ª¤ï¤ê¤Þ¤Ç¤Ë»ß¤á¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó" #. this shouldn't happen, but let's continue anyway. -#: single-malt-grouping-item.cc:51 +#: single-malt-grouping-item.cc:43 msgid "Single_malt_grouping_item: I've been drinking too much" msgstr "Single_malt_grouping_item: °û¤ß¤¹¤®¤Á¤ã¤Ã¤¿" -#: slur-engraver.cc:82 +#: slur-engraver.cc:64 msgid "unterminated slur" msgstr "½ªÃ¼¤µ¤ì¤Æ¤¤¤Ê¤¤¥¹¥é¡¼" -#: slur-engraver.cc:98 -#, fuzzy, c-format -msgid "can't find both ends of %s" +#: slur-engraver.cc:80 +#, c-format +msgid "Can't find both ends of %s" msgstr "%s ¤Îξü¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó" -#: slur-engraver.cc:98 +#: slur-engraver.cc:80 msgid "slur" msgstr "¥¹¥é¡¼" -#: slur.cc:231 +#: slur.cc:38 msgid "Putting slur over rest. Ignoring." msgstr "µÙÉä¤ò¤Þ¤¿¤¤¤À¥¹¥é¡¼¤¬¤¢¤ê¤Þ¤¹¡£Ìµ»ë¤·¤Þ¤¹¡£" -#: slur.cc:312 -msgid "Slur over rest?" -msgstr "¥¹¥é¡¼¤¬µÙÉä¤ò¤Þ¤¿¤¤¤Ç¤¤¤ë?" +#: spanner.cc:41 +msgid "Left spanpoint is right spanpoint" +msgstr "ÈϰϤκ¸Â¦¤¬¡¢±¦Â¦¤Ë¤¢¤ê¤Þ¤¹" -#: spanner.cc:35 spanner.cc:174 +#: spanner.cc:111 #, c-format msgid "Spanner `%s' has equal left and right spanpoints" msgstr "ÈϰϻØÄê»Ò `%s' ¤Îº¸±¦¤ÎÅÀ¤¬Æ±¤¸¤Ç¤¹" -#: stem-engraver.cc:124 +#: spanner.cc:143 +msgid "spanner with negative length" +msgstr "ÈϰϻØÄê»Ò¤¬Éé¤ÎŤµ¤Ç¤¹" + +#: spring-spacer.cc:134 +msgid "I'm too fat; call Oprah" +msgstr "ÂÀ¤¹¤®¤Þ¤¹ -- Oprah ¤ò¸Æ¤ó¤Ç" + +#: spring-spacer.cc:299 +msgid "Solution doesn't satisfy constraints" +msgstr "¤½¤Î²ò·è¤ÏÀ©¸Â¤òËþ¤¿¤·¤Þ¤»¤ó" + +#: spring-spacer.cc:400 +#, c-format +msgid "Improbable distance: %f point, setting to 10 mm" +msgstr "¤¢¤ê¤½¤¦¤Ë¤Ê¤¤µ÷Î¥: %f ¥Ý¥¤¥ó¥È, 10 mm ¤ËÀßÄꤷ¤Þ¤¹" + +#: spring-spacer.cc:405 +msgid "Negative distance, setting to 10 mm" +msgstr "Éé¤ÎÃͤȤʤëµ÷Î¥, 10 mm ¤ËÀßÄꤷ¤Þ¤¹" + +#: stem-engraver.cc:80 #, c-format msgid "Adding note head to incompatible stem (type = %d)" msgstr "Ì·½â¤·¤¿ÉäÈø¤ØÉ䯬¤òÄɲä·¤Þ¤¹ (¥¿¥¤¥× = %d)" -#: stem.cc:118 +#: stem.cc:26 +msgid "stem direction set already!" +msgstr "ÉäÈø¤ÎÊý¸þ¤Ï´û¤Ë¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤Þ¤¹!" + +#: stem.cc:106 msgid "Weird stem size; check for narrow beams" msgstr "ÊѤÊÉäÈø¤Î¥µ¥¤¥º -- ºÙ¤¤³Ã¤Î¥Á¥§¥Ã¥¯¤ò¤·¤Æ²¼¤µ¤¤" -#: tfm-reader.cc:115 +#: tfm-reader.cc:108 #, c-format msgid "TFM header of `%s' has only %u word(s)" msgstr "`%s' ¤Î TFM ¥Ø¥Ã¥À¤Ë %u ¸ì¤·¤«¤¢¤ê¤Þ¤»¤ó" -#: tfm-reader.cc:153 +#: tfm-reader.cc:146 #, c-format msgid "%s: TFM file has %u parameters, which is more than the %u I can handle" msgstr "%s: TFM ¥Õ¥¡¥¤¥ë¤Ï %u ¸Ä¤Î¥Ñ¥é¥á¥¿¤¬¤¢¤ê¤Þ¤¹¤¬¡¢%u °Ê¾å¤Ï°·¤¨¤Þ¤»¤ó" -#: tfm.cc:70 -#, fuzzy, c-format -msgid "can't find ascii character: `%d'" +#: tfm.cc:64 +#, c-format +msgid "Can't find ascii character: `%d'" msgstr "ascii ʸ»ú¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó: `%d'" -#: tie-engraver.cc:195 tie-performer.cc:109 +#: tie-engraver.cc:91 +msgid "unequal number of note heads for tie" +msgstr "¥¿¥¤¤ËÂбþ¤¹¤ëÉ䯬¤Î¿ô¤¬¶ÑÅù¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" + +#: tie-engraver.cc:155 tie-performer.cc:106 msgid "No ties were created!" msgstr "ºî¤é¤ì¤¿¥¿¥¤¤¬¤¢¤ê¤Þ¤»¤ó!" -#: tie.cc:80 +#: tie.cc:55 msgid "lonely tie" msgstr "°ì¤Ä¤À¤±¤Î¥¿¥¤" +#: time-description.cc:17 +msgid "cadenza" +msgstr "cadenza" + +#: time-description.cc:106 +msgid "Partial measure must be non-negative" +msgstr "¾®ÀáÉô¤ÏÈóÉé¤Ç¤Ê¤¯¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó" + +#: time-description.cc:108 +msgid "partial measure too large" +msgstr "¾®ÀáÉô¤¬Â礭¤¹¤®¤Þ¤¹" + #: time-scaled-music-iterator.cc:25 msgid "no one to print a tuplet start bracket" msgstr "¥¿¥×¥ì¥Ã¥È³«»Ï¥Ö¥é¥±¥Ã¥È¤òɽ¼¨¤¹¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤»¤ó" @@ -797,191 +884,219 @@ msgstr " msgid "lost in time:" msgstr "Çï»Ò¤Ë̤¤¤Þ¤·¤¿:" -#: timing-translator.cc:36 +#: timing-translator.cc:26 msgid "conflicting timing request" msgstr "Çï»Ò¤ÎÍ׵᤬¶¥¹ç¤·¤Þ¤¹" -#: timing-translator.cc:37 -msgid "This is the other timing request" -msgstr "" +#: timing-translator.cc:62 +msgid "time signature change not allowed here" +msgstr "¤³¤³¤Ç¤ÏÇï»Òµ­¹æ¤òÊѹ¹¤Ç¤­¤Þ¤»¤ó" -#: timing-translator.cc:78 +#: timing-translator.cc:83 #, c-format msgid "barcheck failed at: %s" msgstr "¾®Àá¥Á¥§¥Ã¥¯¤¬¼ºÇÔ: %s" -#: translator-ctors.cc:42 +#: translator-ctors.cc:39 #, c-format msgid "unknown translator: `%s'" msgstr "Ƚ¤é¤Ê¤¤¥È¥é¥ó¥¹¥ì¡¼¥¿: `%s'" -#: translator-group.cc:81 translator-group.cc:94 +#: translator-group.cc:78 translator-group.cc:91 msgid "Program has no such type" msgstr "¥×¥í¥°¥é¥à¤Ë¤Ï¤½¤ÎÍͤʥ¿¥¤¥×¤¬¤¢¤ê¤Þ¤»¤ó" -#: translator-group.cc:85 translator-group.cc:100 +#: translator-group.cc:82 translator-group.cc:97 #, c-format msgid "Already contains: `%s'" msgstr "´û¤Ë´Þ¤ó¤Ç¤¤¤Þ¤¹: `%s'" -#: translator-group.cc:210 -#, fuzzy, c-format -msgid "can't find or create `%s' called `%s'" +#: translator-group.cc:207 +#, c-format +msgid "Can't find or create `%s' called `%s'" msgstr "`%2$s' ¤Ë¸Æ¤Ð¤ì¤¿ `%1$s' ¤¬¸«¤Ä¤«¤é¤Ê¤¤¤«ºî¤ì¤Þ¤»¤ó" -#: translator-group.cc:322 -#, fuzzy, c-format -msgid "can't find or create: `%s'" +#: translator-group.cc:341 +#, c-format +msgid "Can't find or create: `%s'" msgstr "¸«¤Ä¤«¤é¤Ê¤¤¤«ºî¤ì¤Þ¤»¤ó: `%s'" +#: transposed-music.cc:31 +msgid "Will ignore \\relative for transposed music" +msgstr "žĴ¤µ¤ì¤¿³Ú¶Ê¤Ï \\relative ¤ò̵»ë¤·¤Þ¤¹" + #: unfolded-repeat-iterator.cc:145 msgid "no one to print a volta bracket" msgstr "volta ¥Ö¥é¥±¥Ã¥È¤òɽ¼¨¤¹¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤»¤ó" -#: parser.yy:58 +#: word-wrap.cc:75 +#, c-format +msgid "Ugh, this measure is too long, breakpoint: %d" +msgstr "¤¦¤°¤Ã¡¢¤³¤Î¾®Àá¤ÏŤ¹¤®¤Þ¤¹¡£¤­¤ë¾ì½ê: %d" + +#: word-wrap.cc:77 +msgid "Generating stupido solution" +msgstr "Çϼ¯¤²¤¿²ò·è¤òÀ¸À®Ãæ" + +#: word-wrap.cc:95 +msgid "I don't fit; put me on Montignac" +msgstr "¾å¼ê¤¯¤Ï¤Þ¤ê¤Þ¤»¤ó -- Montignac ¤Î¤È¤³¤í¤ËÃÖ¤¤¤Æ¤¯¤À¤µ¤¤" + +#: parser.yy:55 #, c-format msgid "Oldest supported input version: %s" msgstr "°ìÈָŤ¤ÆþÎϲÄǽ¥Ð¡¼¥¸¥ç¥ó: %s" -#: parser.yy:427 +#: parser.yy:313 +msgid "Can't evaluate Scheme in safe mode" +msgstr "°ÂÁ´¥â¡¼¥É¤Ç¤Ï Scheme ¤Îɾ²Á¤ò¤Ç¤­¤Þ¤»¤ó" + +#: parser.yy:433 parser.yy:441 parser.yy:465 msgid "Need a translator group for a context" msgstr "¥³¥ó¥Æ¥­¥¹¥È¤Ë¤Ï¥È¥é¥ó¥¹¥ì¡¼¥¿¥°¥ë¡¼¥×¤¬É¬ÍפǤ¹" -#: parser.yy:448 +#: parser.yy:459 msgid "Wrong type for property value" msgstr "°À­ÃͤؤΥ¿¥¤¥×¤¬´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹" -#: parser.yy:694 +#: parser.yy:515 +msgid "More than one music block" +msgstr "Ê£¿ô¤Î³Ú¶Ê¥Ö¥í¥Ã¥¯" + +#: parser.yy:575 +msgid "Need even number of args for shape array" +msgstr "shape ÇÛÎó¤Ø¤Î°ú¿ô¤Ï¶ö¿ô¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó" + +#: parser.yy:723 msgid "More alternatives than repeats. Junking excess alternatives." msgstr "·«¤êÊÖ¤·¤è¤ê¤âÁªÂò»è¤¬Â¿¤¤¡£Ä¶²áʬ¤ò¼Î¤Æ¤Þ¤¹¡£" -#: parser.yy:739 -msgid "Second argument must be a symbol" -msgstr "" +#: parser.yy:946 parser.yy:1360 parser.yy:1380 +#, c-format +msgid "not a duration: %d" +msgstr "²»Ä¹¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó: %d" -#: parser.yy:744 -msgid "First argument must be a procedure taking 1 argument" -msgstr "" +#: parser.yy:948 parser.yy:1382 +msgid "Can't abbreviate" +msgstr "¾Êά¤Ç¤­¤Þ¤»¤ó" -#: parser.yy:1069 +#: parser.yy:1076 msgid "Can't specify direction for this request" msgstr "¤³¤ÎÍ×µá¤ËÂФ¹¤ëÊý¸þ¤ò»ØÄꤹ¤ë¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó" -#: parser.yy:1170 -#, c-format -msgid "Expecting %d arguments" -msgstr "" - -#: parser.yy:1193 parser.yy:1201 parser.yy:1443 +#: parser.yy:1211 parser.yy:1219 parser.yy:1444 msgid "Have to be in Lyric mode for lyrics" msgstr "²Î»ì¤Ï Lyric ¥â¡¼¥ÉÆâ¤Ë½ñ¤¤¤Æ¤¯¤À¤µ¤¤" -#: parser.yy:1342 parser.yy:1362 -#, c-format -msgid "not a duration: %d" -msgstr "²»Ä¹¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó: %d" - -#: parser.yy:1371 +#: parser.yy:1391 msgid "Have to be in Note mode for notes" msgstr "²»Éä¤Ï Note ¥â¡¼¥ÉÆâ¤Ë½ñ¤¤¤Æ¤¯¤À¤µ¤¤" -#: parser.yy:1459 +#: parser.yy:1403 +msgid "Can't abbreviate tuplet" +msgstr "¥¿¥×¥ì¥Ã¥È¤ò¾Êά¤Ç¤­¤Þ¤»¤ó" + +#: parser.yy:1450 msgid "Have to be in Chord mode for chords" msgstr "¥³¡¼¥É¤Ï Chord ¥â¡¼¥ÉÆâ¤Ë½ñ¤¤¤Æ¤¯¤À¤µ¤¤" -#: lexer.ll:158 +#: lexer.ll:155 msgid "EOF found inside a comment" msgstr "¥³¥á¥ó¥ÈÆâ¤Ë EOF ¤¬¸«¤Ä¤«¤ê¤Þ¤·¤¿" -#: lexer.ll:172 +#: lexer.ll:169 msgid "\\maininput disallowed outside init files" msgstr "½é´ü²½¥Õ¥¡¥¤¥ë¤Î³°¤Ç¤Ï \\maininput ¤òµ­½Ò¤Ç¤­¤Þ¤»¤ó" -#: lexer.ll:202 +#: lexer.ll:199 #, c-format msgid "undefined identifier: `%s'" msgstr "̤ÄêµÁ¤Î¼±ÊÌ»Ò: `%s'" #. backup rule -#: lexer.ll:207 +#: lexer.ll:204 msgid "Missing end quote" msgstr "½ªÎ»¥¯¥ª¡¼¥È¤¬¤¢¤ê¤Þ¤»¤ó" #. backup rule -#: lexer.ll:229 lexer.ll:233 +#: lexer.ll:227 lexer.ll:231 msgid "white expected" msgstr "¶õÇò¤¬É¬ÍפǤ¹" -#: lexer.ll:241 -msgid "Can't evaluate Scheme in safe mode" -msgstr "°ÂÁ´¥â¡¼¥É¤Ç¤Ï Scheme ¤Îɾ²Á¤ò¤Ç¤­¤Þ¤»¤ó" - -#: lexer.ll:436 +#: lexer.ll:401 #, c-format msgid "invalid character: `%c'" msgstr "̵¸ú¤Êʸ»ú: `%c'" -#: lexer.ll:494 +#: lexer.ll:457 #, c-format msgid "unknown escaped string: `\\%s'" msgstr "̤ÃΤΥ¨¥¹¥±¡¼¥×ʸ»úÎó: `\\%s'" -#: lexer.ll:580 +#: lexer.ll:543 #, c-format msgid "incorrect mudela version: %s (%s, %s)" msgstr "´Ö°ã¤Ã¤¿ mudela ¥Ð¡¼¥¸¥ç¥ó: %s (%s, %s)" -#: main.cc:91 +#: out/BLURB.hh:2 +msgid "" +"LilyPond is a music typesetter. It produces beautiful sheet music\n" +"using a high level description file as input. LilyPond is part of \n" +"the GNU Project.\n" +msgstr "" +"LilyPond ¤Ï³Ú¶ÊÁÈÈÇ¥½¥Õ¥È¤Ç¤¹¡£ÆþÎÏ¥Õ¥¡¥¤¥ë¤Ë¤Ï¥Ï¥¤¥ì¥Ù¥ë¤Êµ­½Ò¤ò»ÈÍѤǤ­¡¢\n" +"Èþ¤·¤¤ÉèÌ̤òºîÀ®¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£LilyPond ¤Ï GNU ¥×¥í¥¸¥§¥¯¥È¤Î°ìÉô¤Ç¤¹¡£\n" + +#: main.cc:90 msgid "write exact durations, e.g.: a4*385/384" msgstr "Àµ³Î¤Ê²»Ä¹¤ò½ñ¤¤¤Æ¤¯¤À¤µ¤¤¡£Îã: a4*385/384" -#: main.cc:94 +#: main.cc:93 msgid "ACC[:MINOR]" msgstr "ACC[:MINOR]" -#: main.cc:94 +#: main.cc:93 msgid "set key: ACC +sharps/-flats; :1 minor" msgstr "Ä´¤òÀßÄê: ACC +¥·¥ã¡¼¥×/-¥Õ¥é¥Ã¥È :1 ûĴ" -#: main.cc:95 -#, fuzzy -msgid "don't output tuplets or double dots, smallest is 32" +#: main.cc:94 +msgid "assume no tuplets or double dots, smallest is 32" msgstr "ÉäÅÀ¤äÊ£ÉäÅÀ¤ò¤Ê¤¯¤¹¤è¤¦»î¤ß¤Þ¤¹¡¢ºÇ¾®¤Ï 32" -#: main.cc:96 +#: main.cc:95 msgid "set FILE as default output" msgstr "¥Ç¥Õ¥©¥ë¥È½ÐÎϤȤ·¤Æ FILE ¤òÀßÄꤹ¤ë" -#: main.cc:97 -msgid "don't output tuplets" -msgstr "" +#: main.cc:96 +msgid "assume no tuplets" +msgstr "ÉäÅÀ¤ò̵¤¯¤¹¤è¤¦»î¤ß¤Þ¤¹" -#: main.cc:98 +#: main.cc:97 msgid "be quiet" msgstr "ÀŤ«¤Ë¤·¤Þ¤¹" -#: main.cc:99 +#: main.cc:98 msgid "DUR" msgstr "DUR" -#: main.cc:99 +#: main.cc:98 msgid "set smallest duration" msgstr "²»Ä¹¤òºÇ¾®¤ËÀßÄꤷ¤Þ¤¹" -#: main.cc:102 +#: main.cc:101 msgid "be verbose" msgstr "¾ÜºÙ¤Ê¾ðÊó¤òɽ¼¨¤·¤Þ¤¹" -#: main.cc:104 +#: main.cc:103 msgid "assume no double dotted notes" msgstr "Ê£ÉäÅÀ²»Éä¤ò̵¤¯¤¹¤è¤¦»î¤ß¤Þ¤¹" -#: main.cc:111 +#: main.cc:110 #, c-format msgid "Usage: %s [OPTION]... [FILE]" msgstr "»È¤¤Êý: %s [¥ª¥×¥·¥ç¥ó]... [¥Õ¥¡¥¤¥ë]" -#: main.cc:113 +#: main.cc:112 msgid "Translate MIDI-file to mudela" msgstr "MIDI ¥Õ¥¡¥¤¥ë¤ò mudela ¤ËÊÑ´¹¤·¤Þ¤¹" @@ -1006,8 +1121,7 @@ msgid "invalid number of tracks" msgstr "̵¸ú¤Ê¥È¥é¥Ã¥¯¿ô" #: midi-score-parser.cc:58 -#, fuzzy -msgid "can't handle non-metrical time" +msgid "Can't handle non-metrical time" msgstr "±¤Î§¤Ë¤Ê¤é¤Ê¤¤Çï»Ò¤Ï°·¤¨¤Þ¤»¤ó" #: midi-track-parser.cc:68 @@ -1078,11 +1192,11 @@ msgstr " msgid "Settling columns..." msgstr "¥«¥é¥à¤ò·èÄꤷ¤Þ¤¹..." -#: mudela-staff.cc:178 +#: mudela-staff.cc:177 msgid "% MIDI copyright:" msgstr "% MIDI copyright:" -#: mudela-staff.cc:179 +#: mudela-staff.cc:178 msgid "% MIDI instrument:" msgstr "% MIDI instrument:" @@ -1092,172 +1206,15 @@ msgid "lily indent level: %d" msgstr "lily indent level: %d" #. Maybe better not to translate these? -#: mudela-stream.cc:83 +#: mudela-stream.cc:76 msgid "% Creator: " msgstr "%s Creator: " -#: mudela-stream.cc:88 +#: mudela-stream.cc:81 msgid "% Automatically generated" msgstr "% Automatically generated" -#: mudela-stream.cc:97 +#: mudela-stream.cc:90 #, c-format msgid "% from input file: " msgstr "% from input file: " - -#~ msgid "Debug output disabled. Compiled with NPRINT." -#~ msgstr "" -#~ "¥Ç¥Ð¥Ã¥°½ÐÎϤ¬Ìµ¸ú¤Ë¤µ¤ì¤Æ¤¤¤Þ¤¹¡£NPRINT ¤Ä¤­¤Ç¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤Þ¤·¤¿¡£" - -#~ msgid "programming warning: " -#~ msgstr "¥×¥í¥°¥é¥à¾å¤Î·Ù¹ð: " - -#~ msgid "(search path: `%s)'" -#~ msgstr "(¸¡º÷¥Ñ¥¹: `%s')" - -#~ msgid "no beam to end" -#~ msgstr "ËöÈø¤Ø¤Î³Ã¤¬¤¢¤ê¤Þ¤»¤ó" - -#~ msgid "unfinished beam" -#~ msgstr "½ªÎ»¤µ¤ì¤Æ¤¤¤Ê¤¤³Ã" - -#~ msgid "0 lines" -#~ msgstr "0 ¹Ô" - -#~ msgid "1 line (of %.0f columns)" -#~ msgstr "1 ¹Ô (%.0f ¥«¥é¥à)" - -#~ msgid "%d lines (with an average of %.1f columns)" -#~ msgstr "%d ¹Ô (Ê¿¶Ñ %.1f ¥«¥é¥à)" - -#~ msgid "Score does not have any columns" -#~ msgstr "ÉèÌ̤˥«¥é¥à¤¬¤¢¤ê¤Þ¤»¤ó" - -#~ msgid "approximated %s" -#~ msgstr "¤ª¤ª¤è¤½ %s" - -#~ msgid "calculated %s exactly" -#~ msgstr "Àµ³Î¤Ë·×»»¤µ¤ì¤¿ %s" - -#~ msgid "elapsed time %.2f seconds" -#~ msgstr "%.2f É÷вá" - -#~ msgid "no tremolo beam to end" -#~ msgstr "ËöÈø¤Ø¤Î¥È¥ì¥â¥íµ­¹æ¤¬¤¢¤ê¤Þ¤»¤ó" - -#~ msgid "Already have a tremolo beam" -#~ msgstr "¤¹¤Ç¤Ë¥È¥ì¥â¥íµ­¹æ¤¬¤¢¤ê¤Þ¤¹" - -#~ msgid "unfinished tremolo beam" -#~ msgstr "½ª¤ï¤Ã¤Æ¤¤¤Ê¤¤¥È¥ì¥â¥íµ­¹æ" - -#~ msgid "Got a dynamic already. Continuing dazed and confused." -#~ msgstr "´û¤ËưŪ¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£º®Í𤷤¿¤Þ¤Þ³¤±¤Þ¤¹¡£" - -#~ msgid "Too many crescendi here" -#~ msgstr "¤³¤³¤Î¥¯¥ì¥Ã¥·¥§¥ó¥É¤¬Â¿¤¹¤®¤Þ¤¹" - -#~ msgid "Ineq_constrained_qp::solve (): Constraint off by %f" -#~ msgstr "Ineq_constrained_qp::solve (): À©¸Â¤ò %f ¤Ç²ò½ü" - -#~ msgid "Didn't converge!" -#~ msgstr "¼ý«¤·¤Þ¤»¤ó¤Ç¤·¤¿!" - -#~ msgid "too much degeneracy" -#~ msgstr "¾®¤µ¤¹¤®¤Þ¤¹" - -#~ msgid "Don't have that many octaves (%s)" -#~ msgstr "¤½¤ó¤Ê¤ËÂô»³¤Î¥ª¥¯¥¿¡¼¥Ö (%s) ¤ò»È¤ï¤Ê¤¤¤Ç¤¯¤À¤µ¤¤" - -#~ msgid "underdone accidentals (%s)" -#~ msgstr "¥Õ¥é¥Ã¥È¤¬Â¿¤¹¤®¤Þ¤¹ (%s)" - -#~ msgid "overdone accidentals (%s)" -#~ msgstr "¥·¥ã¡¼¥×¤¬Â¿¤¹¤®¤Þ¤¹ (%s)" - -#~ msgid "Huh? Empty Line_of_score?" -#~ msgstr "¤Ï? ÉèÌ̤ιԤ¬¶õ?" - -#~ msgid "redeclaration of `\\%s'" -#~ msgstr "`\\%s' ¤ÎºÆÀë¸À" - -#~ msgid "Must set spring between differing columns" -#~ msgstr "°Û¤Ê¤ë¥«¥é¥à¤Î´Ö¤Ë spring ¤ò¥»¥Ã¥È¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó" - -#~ msgid "improbable offset for object type: `%s'" -#~ msgstr "¥ª¥Ö¥¸¥§¥¯¥È·¿¤Ë¤È¤Ã¤Æ¤¢¤ê¤½¤¦¤Ë¤Ê¤¤¥ª¥Õ¥»¥Ã¥È: `%s'" - -#~ msgid "Can't solve this casting problem exactly; reverting to Word_wrap" -#~ msgstr "Àµ³Î¤Ë¥­¥ã¥¹¥È¤ò²ò·è¤Ç¤­¤Þ¤»¤ó -- Word_wrap ¤ËÉüµ¢¤·¤Þ¤¹" - -#~ msgid "%s elements" -#~ msgstr "%s ¸Ä¤ÎÍ×ÁÇ" - -#~ msgid "Line ... " -#~ msgstr "¹Ô ..." - -#~ msgid "degenerate constraints" -#~ msgstr "À©¸Â¤ò´ËÏÂ" - -#~ msgid "Left spanpoint is right spanpoint" -#~ msgstr "ÈϰϤκ¸Â¦¤¬¡¢±¦Â¦¤Ë¤¢¤ê¤Þ¤¹" - -#~ msgid "spanner with negative length" -#~ msgstr "ÈϰϻØÄê»Ò¤¬Éé¤ÎŤµ¤Ç¤¹" - -#~ msgid "I'm too fat; call Oprah" -#~ msgstr "ÂÀ¤¹¤®¤Þ¤¹ -- Oprah ¤ò¸Æ¤ó¤Ç" - -#~ msgid "Solution doesn't satisfy constraints" -#~ msgstr "¤½¤Î²ò·è¤ÏÀ©¸Â¤òËþ¤¿¤·¤Þ¤»¤ó" - -#~ msgid "Improbable distance: %f point, setting to 10 mm" -#~ msgstr "¤¢¤ê¤½¤¦¤Ë¤Ê¤¤µ÷Î¥: %f ¥Ý¥¤¥ó¥È, 10 mm ¤ËÀßÄꤷ¤Þ¤¹" - -#~ msgid "Negative distance, setting to 10 mm" -#~ msgstr "Éé¤ÎÃͤȤʤëµ÷Î¥, 10 mm ¤ËÀßÄꤷ¤Þ¤¹" - -#~ msgid "stem direction set already!" -#~ msgstr "ÉäÈø¤ÎÊý¸þ¤Ï´û¤Ë¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤Þ¤¹!" - -#~ msgid "unequal number of note heads for tie" -#~ msgstr "¥¿¥¤¤ËÂбþ¤¹¤ëÉ䯬¤Î¿ô¤¬¶ÑÅù¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" - -#~ msgid "cadenza" -#~ msgstr "cadenza" - -#~ msgid "Partial measure must be non-negative" -#~ msgstr "¾®ÀáÉô¤ÏÈóÉé¤Ç¤Ê¤¯¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó" - -#~ msgid "partial measure too large" -#~ msgstr "¾®ÀáÉô¤¬Â礭¤¹¤®¤Þ¤¹" - -#~ msgid "time signature change not allowed here" -#~ msgstr "¤³¤³¤Ç¤ÏÇï»Òµ­¹æ¤òÊѹ¹¤Ç¤­¤Þ¤»¤ó" - -#~ msgid "Will ignore \\relative for transposed music" -#~ msgstr "žĴ¤µ¤ì¤¿³Ú¶Ê¤Ï \\relative ¤ò̵»ë¤·¤Þ¤¹" - -#~ msgid "Ugh, this measure is too long, breakpoint: %d" -#~ msgstr "¤¦¤°¤Ã¡¢¤³¤Î¾®Àá¤ÏŤ¹¤®¤Þ¤¹¡£¤­¤ë¾ì½ê: %d" - -#~ msgid "Generating stupido solution" -#~ msgstr "Çϼ¯¤²¤¿²ò·è¤òÀ¸À®Ãæ" - -#~ msgid "I don't fit; put me on Montignac" -#~ msgstr "¾å¼ê¤¯¤Ï¤Þ¤ê¤Þ¤»¤ó -- Montignac ¤Î¤È¤³¤í¤ËÃÖ¤¤¤Æ¤¯¤À¤µ¤¤" - -#~ msgid "More than one music block" -#~ msgstr "Ê£¿ô¤Î³Ú¶Ê¥Ö¥í¥Ã¥¯" - -#~ msgid "Need even number of args for shape array" -#~ msgstr "shape ÇÛÎó¤Ø¤Î°ú¿ô¤Ï¶ö¿ô¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó" - -#~ msgid "Can't abbreviate" -#~ msgstr "¾Êά¤Ç¤­¤Þ¤»¤ó" - -#~ msgid "Can't abbreviate tuplet" -#~ msgstr "¥¿¥×¥ì¥Ã¥È¤ò¾Êά¤Ç¤­¤Þ¤»¤ó" - -#~ msgid "assume no tuplets" -#~ msgstr "ÉäÅÀ¤ò̵¤¯¤¹¤è¤¦»î¤ß¤Þ¤¹" diff --git a/scm/lily.scm b/scm/lily.scm index 7088dd1dab..99f21eb25b 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -395,6 +395,17 @@ (define (volta h w thick vert_start vert_end) (embedded-ps ((ps-scm 'volta) h w thick vert_start vert_end))) + (define (define-origin file line col) + ; use this for column positions + (string-append "\\special{src:" (number->string line) ":" + (number->string col) " " file "}") + + ; line numbers only: + ;(string-append "\\special{src:" (number->string line) " " file "}") +) + ; no-origin not yet supported by Xdvi + (define (no-origin) "") + ;; TeX ;; The procedures listed below form the public interface of TeX-scm. ;; (should merge the 2 lists) @@ -427,6 +438,8 @@ (define text ,text) (define tuplet ,tuplet) (define volta ,volta) + (define define-origin ,define-origin) + (define no-origin ,no-origin) )) ((eq? action-name 'beam) beam) @@ -645,6 +658,9 @@ "\n unknown\n") + (define (define-origin a b c ) "") + (define (no-origin) "") + ;; PS (cond ((eq? action-name 'all-definitions) `(begin @@ -676,6 +692,8 @@ (define stop-line ,stop-line) (define stop-last-line ,stop-line) (define text ,text) + (define no-origin ,no-origin) + (define define-origin ,define-origin) )) ((eq? action-name 'tuplet) tuplet) ((eq? action-name 'beam) beam) diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index 34ce7efd3c..e5484a52dd 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -263,7 +263,7 @@ class TeXOutput: %%\headheight9pt %%\headsep0pt %% Maybe this is too drastic, but let us give it a try. -\geometry{width=%spt, height=%spt,headheight=2mm,headsep=0pt,footskip=2mm} +\geometry{width=%spt, textheight=%spt,headheight=2mm,headsep=0pt,footskip=2mm} \input{lilyponddefs} \input{titledefs} %s