From: fred Date: Tue, 26 Mar 2002 23:55:37 +0000 (+0000) Subject: lilypond-1.3.86 X-Git-Tag: release/1.5.59~1322 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=03ae73cc35c21b09eec6c7ce58f482ebcd0fd643;p=lilypond.git lilypond-1.3.86 --- diff --git a/Documentation/faq.texi b/Documentation/faq.texi index 298e69af76..ad43f36b35 100644 --- a/Documentation/faq.texi +++ b/Documentation/faq.texi @@ -34,11 +34,31 @@ Note: relative paths are meant to be relative to the source directory @subsubsection I've got a simple question, but this FAQ doesn't help! -Please have a look in the searchable mail achives of -@uref{http://www.mail-archive.com/gnu-music-discuss@@gnu.org/, -gnu-music-discuss} and -@uref{http://www.mail-archive.com/help-gnu-music@@gnu.org/, help-gnu-music}. -Your question may well have been answered before. +Please have a look in the searchable mail archives of gnu-music-discuss +and help-gnu-music (see next FAQ entry). Your question may well have +been answered before. + +@subsubsection Are there archives of the mailing list? + +Yes. Currently, all information on the mailing lists is available at +gnu.org: + +@itemize +@item @uref{http://mail.gnu.org/mailman/listinfo/gnu-music-discuss} +@item @uref{http://mail.gnu.org/mailman/listinfo/info-gnu-music} +@item @uref{http://mail.gnu.org/mailman/listinfo/bug-gnu-music} +@item @uref{http://mail.gnu.org/mailman/listinfo/help-gnu-music} +@end itemize + +Archives of mail before September 12, 2000 are at +@code{mail-archive.com}: + +@itemize +@item @uref{http://www.mail-archive.com/info-gnu-music@@gnu.org} +@item @uref{http://www.mail-archive.com/help-gnu-music@@gnu.org} +@item @uref{http://www.mail-archive.com/bug-gnu-music@@gnu.org}) +@item @uref{http://www.mail-archive.com/gnu-music-discuss@@gnu.org} +@end itemize @node Installing,, ,top @section Installing @@ -277,6 +297,25 @@ This also works for crescendi, eg, @end example +@subsubsection How do I get a fermata on a barline + +The trick is to specify the fermata as a \mark. Use the following macro +before the bar line where you want the fermata: + +@example +barFermata = \mark "\\font\\fetafont=feta20\\fetafont\\char40"; +@end example + +The problem is that marks that occur at a line break are typeset only at +the beginning of the next line, opposite to what you want for the +fermata. This can be corrected by the following code + +@example + \property basicMarkProperties \push #'visibility-lambda = #begin-of-line-i\nvisible +@end example + +You can use a similar trick to put coda signs and comma's on barline. + @subsubsection How do I combine multiple pieces into one document? There are several solutions: diff --git a/Documentation/user/properties.itely b/Documentation/user/properties.itely index 670b0add03..63b40860eb 100644 --- a/Documentation/user/properties.itely +++ b/Documentation/user/properties.itely @@ -102,7 +102,7 @@ c'8 \property Voice.flagStyle = "grace" c'8 @cindex properties!Voice -@table @samp +@table @samp @item @code{abbrev}@indexcode{abbrev} @propertytype{integer} Set length for tremolo to be used if no length is explicitly specified. diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index c606b6cb5b..71f569c6fa 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -2732,6 +2732,9 @@ The engravers for paper output are: Note that the notes move, but the locations of accidentals stay the same. + Vertical position of squashing can be controlled through +@indexcode{squashedPosition}. + @item @code{Priority_horizontal_align_engraver} @indexcode{Priority_horizontal_align_engraver} diff --git a/input/bugs/broken-cresc.ly b/input/bugs/broken-cresc.ly new file mode 100644 index 0000000000..3580a230ff --- /dev/null +++ b/input/bugs/broken-cresc.ly @@ -0,0 +1,5 @@ +\score { + \notes \context Thread { + c1 \< c1 \break c1 c1 \! c1 + } +} diff --git a/input/test/tab-staff.ly b/input/test/tab-staff.ly new file mode 100644 index 0000000000..d7751a88bf --- /dev/null +++ b/input/test/tab-staff.ly @@ -0,0 +1,35 @@ +%{ + +Kludge for half-assed tab notation (you need to fill the numbers +yourself.) + +%} + +bla = \notes \relative c' { } + +\score { \notes +< + \context Voice = BLA \bla + \context TabStaff \context Thread \bla +> + +\paper { + \translator { + \StaffContext + \name TabStaff; + basicStaffSymbolProperties \push #'line-count = #6 + \remove "Clef_engraver"; + \remove "Time_signature_engraver"; + \consists "Pitch_squash_engraver"; + basicNoteHeadProperties \push #'transparent = ##t + basicNoteHeadProperties \push #'staff-position = #-6 + basicDotsProperties \push #'transparent = ##t + squashedPosition = #-4 + basicStemProperties \push #'length = #12 +} +\translator { +\ScoreContext +\accepts TabStaff; +} +} +} diff --git a/lily/include/molecule.hh b/lily/include/molecule.hh index 898cb63732..e61a64c8b9 100644 --- a/lily/include/molecule.hh +++ b/lily/include/molecule.hh @@ -73,6 +73,7 @@ public: void translate_axis (Real,Axis); Interval extent (Axis) const; + Box extent_box () const; /** codify THIS into a Scheme expression. */ diff --git a/lily/include/rest-collision.hh b/lily/include/rest-collision.hh index 79b7b8aa72..f7a547a94b 100644 --- a/lily/include/rest-collision.hh +++ b/lily/include/rest-collision.hh @@ -12,6 +12,13 @@ #include "lily-proto.hh" #include "lily-guile.hh" +/* + properties: + + elements -- list of elts (both rests and notes) participating in the + collision. + +*/ class Rest_collision // interface { diff --git a/lily/include/translator-def.hh b/lily/include/translator-def.hh index c985222a40..1fcfc37ab5 100644 --- a/lily/include/translator-def.hh +++ b/lily/include/translator-def.hh @@ -14,16 +14,27 @@ #include "smobs.hh" #include "input.hh" +/* + The definition of a interpretation context as given in the + input. The lists are stored in order of definition. +*/ struct Translator_def : public Input { +private: + /* + these lists store the definition, in opposite order of entry + */ + SCM consists_name_list_; SCM end_consists_name_list_; SCM accepts_name_list_; SCM property_ops_; +public: SCM type_name_; SCM translator_group_type_; SCM modify_definition (SCM, SCM, bool); + SCM default_child_context_name (); void set_acceptor (SCM accepts, bool add); void add_element (SCM name); @@ -40,9 +51,10 @@ struct Translator_def : public Input static void apply_pushpop_property (Translator_group*, SCM syms, SCM eprop, SCM val); SCM clone_scm ()const; - DECLARE_SMOBS(Translator_def,foo); -private: + void apply_property_operations (Translator_group*); +private: + DECLARE_SMOBS(Translator_def,foo); Translator_def (); Translator_def (Translator_def const&); diff --git a/lily/local-key-engraver.cc b/lily/local-key-engraver.cc index 07fd651e14..052f3a9234 100644 --- a/lily/local-key-engraver.cc +++ b/lily/local-key-engraver.cc @@ -23,7 +23,13 @@ events. Due to interaction with ties (which don't come together with note heads), this needs to be in a context higher than Tie_engraver. (FIXME). - */ + + FIXME: should not compute vertical positioning of accidentals, but + get them from the noteheads + +*/ + + struct Local_key_engraver : Engraver { Item *key_item_p_; protected: @@ -117,7 +123,15 @@ Local_key_engraver::process_acknowledged () Side_position::add_support (key_item_p_,support_l); } - if (!forget) + /* + We should not record the accidental if it is the first + note and it is tied from the previous measure. + + Checking whether it is tied also works mostly, but will it + always do the correct thing? + + */ + if (!forget && !tie_changes) { /* not really really correct if there are more than one @@ -127,19 +141,6 @@ Local_key_engraver::process_acknowledged () gh_int2scm (n)), gh_int2scm (a)); -#if 0 - /* - TESTME! - */ - if (!tied_l_arr_.find_l (support_l)) - { - local_key_.clear_internal_forceacc (note_l->pitch_); - } - else if (tie_changes) - { - local_key_.set_internal_forceacc (note_l->pitch_); - } -#endif } } diff --git a/lily/molecule.cc b/lily/molecule.cc index 079a829d8a..c0d1b48748 100644 --- a/lily/molecule.cc +++ b/lily/molecule.cc @@ -160,3 +160,9 @@ Molecule::create_scheme () const gh_cons (ly_interval2scm (dim_[X_AXIS]), ly_interval2scm (dim_[Y_AXIS]))); } + +Box +Molecule::extent_box () const +{ + return dim_; +} diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index c5d75d3a9f..3729344c06 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -153,8 +153,6 @@ Multi_measure_rest_engraver::do_pre_move_processing () void Multi_measure_rest_engraver::do_post_move_processing () { - Moment now (now_mom ()); - SCM smp = get_property ("measurePosition"); Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0); diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index bd177cea04..5f86f849c1 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -22,10 +22,16 @@ void Multi_measure_rest::set_interface (Score_element*me) { - me->set_elt_property ("columns", SCM_EOL); + me->set_interface (ly_symbol2scm ("multi-measure-rest-interface")); } -/* +bool +Multi_measure_rest::has_interface (Score_element*me) +{ + return me->has_interface (ly_symbol2scm ("multi-measure-rest-interface")); +} + + /* [TODO] 17 * variable-sized multi-measure rest symbol: |====| ?? */ diff --git a/lily/note-head.cc b/lily/note-head.cc index 71c7889a95..b0b97cb9a7 100644 --- a/lily/note-head.cc +++ b/lily/note-head.cc @@ -68,9 +68,8 @@ Note_head::brew_molecule (SCM smob) SCM style = me->get_elt_property ("style"); if (!gh_symbol_p (style)) { - style = ly_symbol2scm("default"); + return SCM_EOL; } - // ugh: use gh_call () Molecule out = me->lookup_l()->afm_find (String ("noteheads-") + diff --git a/lily/pitch-squash-engraver.cc b/lily/pitch-squash-engraver.cc index 027e73f37e..543ca89594 100644 --- a/lily/pitch-squash-engraver.cc +++ b/lily/pitch-squash-engraver.cc @@ -14,9 +14,10 @@ void Pitch_squash_engraver::acknowledge_element (Score_element_info i) { + SCM newpos = get_property ("squashedPosition"); if (Note_head::has_interface (i.elem_l_)) { - Staff_symbol_referencer::set_position (i.elem_l_,0); + i.elem_l_->set_elt_property ("staff-position", newpos); } } diff --git a/lily/score-element.cc b/lily/score-element.cc index 06a9cf70fc..2e75fd9a0e 100644 --- a/lily/score-element.cc +++ b/lily/score-element.cc @@ -59,10 +59,6 @@ Score_element::Score_element(SCM basicprops) mutable_property_alist_ = SCM_EOL; smobify_self (); - set_elt_property ("dependencies", SCM_EOL); - - if (get_elt_property ("interfaces") == SCM_UNDEFINED) - set_elt_property ("interfaces", SCM_EOL); } @@ -257,7 +253,7 @@ Score_element::get_molecule () const if (gh_procedure_p (proc)) mol = gh_apply (proc, gh_list (this->self_scm (), SCM_UNDEFINED)); - + SCM origin =get_elt_property ("origin"); if (!unsmob_input (origin)) origin =ly_symbol2scm ("no-origin"); @@ -268,8 +264,17 @@ Score_element::get_molecule () const mol = gh_cons (gh_list (origin, gh_car (mol), SCM_UNDEFINED), gh_cdr (mol)); } - - return create_molecule (mol); + + Molecule m (create_molecule (mol)); + + /* + This is almost the same as setting molecule-callback to #f, but + this retains the dimensions of this element, which means that you + can erase elements individually. */ + if (to_boolean (get_elt_property ("transparent"))) + m = Molecule (m.extent_box (), SCM_EOL); + + return m; } diff --git a/lily/translator-def.cc b/lily/translator-def.cc index 558d0786a2..83ae6ac045 100644 --- a/lily/translator-def.cc +++ b/lily/translator-def.cc @@ -82,7 +82,7 @@ void Translator_def::set_acceptor (SCM name, bool add) { if (add) - this->accepts_name_list_ = gh_append2 (this->accepts_name_list_, gh_cons (name, SCM_EOL)); + this->accepts_name_list_ = gh_cons (name, this->accepts_name_list_); else this->accepts_name_list_ = scm_delete_x (name, this->accepts_name_list_); } @@ -136,14 +136,14 @@ void Translator_def::add_push_property (SCM props, SCM syms, SCM vals) { this->property_ops_ = gh_cons (gh_list (push_sym, props, syms, vals, SCM_UNDEFINED), - this->property_ops_); + this->property_ops_); } void Translator_def::add_pop_property (SCM props, SCM syms) { this->property_ops_ = gh_cons (gh_list (push_sym, props, syms, SCM_UNDEFINED), - this->property_ops_); + this->property_ops_); } /* @@ -175,7 +175,6 @@ Translator_def::path_to_acceptable_translator (SCM type_str, Music_output_def* o accepted_arr.push (t); } - Link_array best_result; for (int i=0; i < accepted_arr.size (); i++) if (scm_equal_p (accepted_arr[i]->type_name_, type_str) == SCM_BOOL_T) @@ -240,6 +239,19 @@ Translator_def::instantiate (Music_output_def* md) tg->output_def_l_ = md; tg->definition_ = self_scm (); tg->type_str_ = ly_scm2string (type_name_); + SCM l1 = trans_list (consists_name_list_, tg); + SCM l2 =trans_list (end_consists_name_list_,tg); + l1 = scm_reverse_x (l1, l2); + + tg->simple_trans_list_ = l1; + + return tg; +} + + +void +Translator_def::apply_property_operations (Translator_group*tg) +{ SCM correct_order = scm_reverse (property_ops_); // pity of the mem. for (SCM s = correct_order; gh_pair_p (s); s = gh_cdr (s)) { @@ -259,14 +271,6 @@ Translator_def::instantiate (Music_output_def* md) tg->set_property (gh_car(entry), gh_cadr (entry)); } } - - SCM l1 = trans_list (consists_name_list_, tg); - SCM l2 =trans_list (end_consists_name_list_,tg); - l1 = scm_reverse_x (l1, l2); - - tg->simple_trans_list_ = l1; - - return tg; } SCM @@ -290,3 +294,13 @@ Translator_def::add_property_assign (SCM nm, SCM val) this->property_ops_); } +/* + Default child context as a SCM string, or something else if there is + none. +*/ +SCM +Translator_def::default_child_context_name () +{ + SCM d = accepts_name_list_; + return gh_pair_p (d) ? gh_car (scm_last_pair (d)) : SCM_EOL; +} diff --git a/lily/translator-group.cc b/lily/translator-group.cc index 02eb4c7fb9..19b54bb2aa 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -115,7 +115,7 @@ Translator_group::find_create_translator_l (String n, String id) return existing; Link_array path - = unsmob_translator_def (definition_)->path_to_acceptable_translator (gh_str02scm (n.ch_C()), output_def_l ()); + = unsmob_translator_def (definition_)->path_to_acceptable_translator (ly_str02scm ((char*)n.ch_C()), output_def_l ()); if (path.size ()) { @@ -227,7 +227,8 @@ Translator_group::get_simple_translator (String type) const bool Translator_group::is_bottom_translator_b () const { - return unsmob_translator_def (definition_)->accepts_name_list_ == SCM_EOL; + return !gh_string_p (unsmob_translator_def (definition_)->default_child_context_name ()); + } Translator_group* @@ -235,8 +236,8 @@ Translator_group::get_default_interpreter() { if (!is_bottom_translator_b ()) { - SCM nm = unsmob_translator_def (definition_)->accepts_name_list_; - SCM st = output_def_l ()->find_translator_l (gh_car (nm)); + SCM nm = unsmob_translator_def (definition_)->default_child_context_name (); + SCM st = output_def_l ()->find_translator_l (nm); Translator_def *t = unsmob_translator_def (st); if (!t) @@ -280,6 +281,7 @@ Translator_group::do_print() const void Translator_group::do_add_processing () { + unsmob_translator_def (definition_)->apply_property_operations (this); for (SCM s = simple_trans_list_; gh_pair_p (s) ; s = gh_cdr (s)) { Translator * t = unsmob_translator (gh_car (s)); diff --git a/ly/engraver.ly b/ly/engraver.ly index c34e936bcb..5ba0d7f4f6 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -533,7 +533,7 @@ ScoreContext = \translator { ) basicDynamicLineSpannerProperties = #`( - (interfaces . (dynamic-interface axis-group-interface)) + (interfaces . (dynamic-interface axis-group-interface side-position-interface)) (axes . ( 1)) (padding . 3) (minimum-space . 6) @@ -606,7 +606,7 @@ ScoreContext = \translator { (name . "lyric syllable") ) basicMarkProperties = #`( - (interfaces . (mark-interface)) + (interfaces . (mark-interface side-position-interface)) (molecule-callback . ,Text_item::brew_molecule) (breakable . #t) (visibility-lambda . ,end-of-line-invisible) @@ -626,6 +626,7 @@ ScoreContext = \translator { ) basicNoteHeadProperties = #`( (interfaces . (note-head-interface rhythmic-head-interface)) + (style . default) (molecule-callback . ,Note_head::brew_molecule) (name . "note head") ) @@ -661,7 +662,7 @@ ScoreContext = \translator { ) basicScriptProperties = #`( (molecule-callback . ,Script::brew_molecule) - (interfaces . (script-interface)) + (interfaces . (script-interface side-position-interface)) (name . "script") ) basicScriptColumnProperties = #`( @@ -734,7 +735,7 @@ ScoreContext = \translator { basicTextScriptProperties = #`( (molecule-callback . ,Text_item::brew_molecule) (no-spacing-rods . #t) - (interfaces . (text-script-interface text-item-interface)) + (interfaces . (text-script-interface text-item-interface side-position-interface)) (padding . 3.0) (name . "text script") ) @@ -800,7 +801,7 @@ ScoreContext = \translator { (name . "separation spanner") ) basicSustainPedalProperties = #`( - (interfaces . (sustain-pedal-interface)) + (interfaces . (sustain-pedal-interface side-position-interface)) (no-spacing-rods . #t) (molecule-callback . ,Sustain_pedal::brew_molecule) (self-alignment-X . 0) @@ -813,7 +814,7 @@ ScoreContext = \translator { (self-alignment-X . 0) (name . "una chorda pedal") ) - + basicVoltaSpannerProperties = #`( (molecule-callback . ,Volta_spanner::brew_molecule) (interfaces . (volta-spanner-interface side-position-interface)) diff --git a/ly/legal.ly b/ly/legal.ly new file mode 100644 index 0000000000..8ec3c9aaaa --- /dev/null +++ b/ly/legal.ly @@ -0,0 +1,4 @@ +% legal.ly + +hsize = 8.5 \in; +vsize = 14.0 \in; diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index 0147f1da29..54e93d7e92 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -1,11 +1,12 @@ #!@PYTHON@ -# TODO: Rewrite this. The control structure is too hairy. -# - # TODO: -# Should use files in /tmp/ only. This potentially messes with +# +# * Rewrite this. The control structure is too hairy. +# * (c) on page 1 +# * more helpful info on lily crashes +# * Should use files in /tmp/ only. This potentially messes with # usergenerated files in the CWD