From: fred Date: Tue, 26 Mar 2002 23:22:19 +0000 (+0000) Subject: lilypond-1.3.55 X-Git-Tag: release/1.5.59~1613 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=43ee68bcea7b28f2a438be21879cccf737e5116f;p=lilypond.git lilypond-1.3.55 --- diff --git a/lily/clef-item.cc b/lily/clef-item.cc index 21d97d8075..ce7c057be4 100644 --- a/lily/clef-item.cc +++ b/lily/clef-item.cc @@ -12,6 +12,10 @@ #include "molecule.hh" #include "text-item.hh" +Clef_item::Clef_item (SCM s) + : Item (s) +{} + void Clef_item::before_line_breaking () { @@ -21,10 +25,17 @@ Clef_item::before_line_breaking () style = ly_scm2string (style_sym); SCM glyph = get_elt_property ("glyph"); + + /* + FIXME: should use symbol. + */ if (gh_string_p (glyph)) { String s = ly_scm2string (glyph); - + + /* + FIXME: should use fontsize property to set clef changes. + */ if (break_status_dir() != RIGHT && style != "fullSizeChanges") { s += "_change"; diff --git a/lily/include/key-def.hh b/lily/include/key-def.hh index 2b9fdccff2..160e7c43cb 100644 --- a/lily/include/key-def.hh +++ b/lily/include/key-def.hh @@ -17,6 +17,8 @@ Universal key definition (Should rename class Key to 'Accidentals'?) FIXME: merge key.hh and key-def.hh classes. + + FIXME: use Scheme data structs for this. */ class Key_def { diff --git a/lily/include/key.hh b/lily/include/key.hh index 5c24db2f08..5e096997f3 100644 --- a/lily/include/key.hh +++ b/lily/include/key.hh @@ -10,6 +10,10 @@ #include "array.hh" #include "lily-proto.hh" +/* + JUNKME JUNKME JUNKME + */ + /// administration of current key in one octave. class Octave_key { diff --git a/lily/include/music-output-def.hh b/lily/include/music-output-def.hh index c19f9ce6fe..4b4c0f3d1c 100644 --- a/lily/include/music-output-def.hh +++ b/lily/include/music-output-def.hh @@ -26,7 +26,6 @@ public: Scope *scope_p_; Array filename_str_arr_; - Scheme_hash_table default_properties_; Music_output_def (Music_output_def const&); Music_output_def (); diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index e4b76f68d8..250fb169ea 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -5,7 +5,7 @@ (c) 1997--2000 Han-Wen Nienhuys */ -// clean me up + #include "key-engraver.hh" #include "key-item.hh" #include "command-request.hh" @@ -16,6 +16,11 @@ #include "timing-translator.hh" #include "staff-symbol-referencer.hh" +/* + this is a large mess. Please clean this to use Basic properties and + Scheme data structs. + */ + Key_engraver::Key_engraver () { item_p_ = 0; @@ -33,14 +38,19 @@ Key_engraver::create_key (bool def) { if (!item_p_) { - item_p_ = new Key_item; + item_p_ = new Key_item ( get_property ("basicKeyProperties")); + + item_p_->set_elt_property ("c0-position", gh_int2scm (0)); + + // todo: put this in basic props. + item_p_->set_elt_property ("old-accidentals", SCM_EOL); + item_p_->set_elt_property ("new-accidentals", SCM_EOL); + Staff_symbol_referencer_interface st (item_p_); st.set_interface (); - - item_p_->set_elt_property ("break-align-symbol", ly_symbol2scm ("Key_item")); - item_p_->set_elt_property ("multi-octave", - gh_bool2scm (key_.multi_octave_b_)); + if (key_.multi_octave_b_) + item_p_->set_elt_property ("multi-octave", gh_bool2scm (key_.multi_octave_b_)); announce_element (Score_element_info (item_p_,keyreq_l_)); @@ -68,8 +78,8 @@ Key_engraver::create_key (bool def) if (!def) - item_p_->set_elt_property ("visibility-lambda", - scm_eval (ly_symbol2scm ("all-visible"))); + item_p_->set_elt_property ("visibility-lambda", + scm_eval (ly_symbol2scm ("all-visible"))); } diff --git a/lily/parser.yy b/lily/parser.yy index 3c0320699b..e6c4fe3c19 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -547,18 +547,6 @@ paper_def_body: } | paper_def_body assignment semicolon { - } - | paper_def_body SCM_T '=' SCM_T { - if (!gh_symbol_p ($2)) - THIS->parser_error ("expect a symbol as lvalue"); - else - $$->default_properties_.set ($2, $4); - } - | paper_def_body SCM_T '=' real semicolon { - if (!gh_symbol_p ($2)) - THIS->parser_error ("expect a symbol as lvalue"); - else - $$->default_properties_.set ($2, gh_double2scm ($4)); } | paper_def_body translator_spec_block { $$->assign_translator ($2); diff --git a/ly/engraver.ly b/ly/engraver.ly index f52fb942b4..7db035d55a 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -145,6 +145,7 @@ VoiceContext = \translator { textScriptPadding = #3.0 \consists "Text_engraver"; + startSustain = #"Ped." stopSustain = #"*" stopStartSustain = #"*Ped." @@ -378,6 +379,101 @@ ScoreContext = \translator { defaultBarType = #"|" systemStartDelimiterGlyph = #'bar-line + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % default settings, mainly for breakable items + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + basicBarNumberProperties = #`( + (breakable . #t) + (visibility-lambda . ,begin-of-line-visible) + ) + basicMarkProperties = #'( + (breakable . #t) + (visibility-lambda . end-of-line-invisible) + ) + leftEdgeBasicProperties = #'( + (break-align-symbol . Left_edge_item) + (breakable . #t) + ) + + staffSymbolBasicProperties = #'( + (staff-space . 1.0 ) + (line-count . 5 ) + ) + basicTimeSignatureProperties = #`( + (break-align-symbol . Time_signature) + (visibility-lambda . ,all-visible) + (breakable . #t) + ) + basicBarlineProperties = #`( + (break-align-symbol . Staff_bar) + (visibility-lambda . ,begin-of-line-invisible) + (breakable . #t) + ) + basicSystemStartDelimiterProperties = #'( + (collapse-height . 1.0) + ) + basicKeyProperties = #`( + (break-align-symbol . Key_item) + (visibility-lambda . ,begin-of-line-visible) + (breakable . #t) + ) + basicClefItemProperties = #`( + (breakable . #t) + (break-align-symbol . Clef_item) + (visibility-lambda . ,begin-of-line-visible) + ) + + basicBeamProperties = #`( + (beam-thickness . 0.42) ; interline! + ) + basicStemTremoloProperties = #'( + (beam-width . 4.0) ; interline! + ) + + basicBreathingSignProperties = #'( + (break-align-symbol . Breathing_sign) + (breakable . #t ) + (visibility-lambda . ,begin-of-line-invisible) + ) + basicOctavateEightProperties = #'( + (self-alignment-X . 0) + (text . "8") + (style . "italic") + ) + basicDynamicLineSpannerProperties = #`( + (transparent . #t) + ) + basicDynamicTextProperties = # `( + (style . "dynamic") + (script-priority . 100) + (self-alignment-Y . 0) + ) + basicLyricTextProperties = #`( + (non-rhythmic . #t) + ) + basicRestCollisionProperties = #`( + (transparent . #t) + ) + basicCollisionProperties = #`( + (transparent . #t) + (axes 0 1) + ) + basicSingleMaltGroupingItemProperties = #'( + (transparent . #t) + ) + basicBreakAlignProperties = #'( + (breakable . #t) + ) + basicInstrumentNameProperties = #`( + (breakable . #t) + (break-align-symbol . Instrument_name) + (visibility-lambda . ,begin-of-line-visible) + ) + basicLocalKeyProperties = #`( + (left-padding . 0.2) + (right-padding . 0.4) + ) + \accepts "Staff"; \accepts "StaffGroup"; \accepts "RhythmicStaff"; @@ -390,7 +486,6 @@ ScoreContext = \translator { markVisibilityFunction = #end-of-line-invisible - barNumberVisibilityFunction = #begin-of-line-visible }; \translator { \ScoreContext } diff --git a/ly/params.ly b/ly/params.ly index cd799fdb76..15e9bbbb1e 100644 --- a/ly/params.ly +++ b/ly/params.ly @@ -1,7 +1,6 @@ % params.ly % generic paper parameters -#'staff-height = \staffheight; paperfile = \papersize + ".ly"; % paperfile = "a4.ly"; @@ -18,7 +17,6 @@ interline = \staffspace; % urg, need grace_ versions of these too? beam_thickness = 0.52 * (\staffspace - \stafflinethickness); -#'beam-thickness = \beam_thickness; %% UGR interbeam = (2.0 * \staffspace + \stafflinethickness - \beam_thickness) / 2.0; @@ -70,19 +68,10 @@ arithmetic_multiplier = 0.9 * \quartwidth ; arithmetic_basicspace = 2.0; - - -#'Stem_tremolo::beam-width = 1.5 * \quartwidth ; - -#'Left_edge_item::visibility-lambda = #begin-of-line-visible - % % UGH; junk these! % -#'Key_item::visibility-lambda = #begin-of-line-visible -#'Breathing_sign::visibility-lambda = #begin-of-line-invisible - % catch suspect beam slopes, set slope to zero if % outer stem is lengthened more than beam_lengthened = 0.2 * \staffspace; @@ -277,13 +266,6 @@ Wordwrap =0.0; \include "engraver.ly"; -#'margin-shape = #'() - -% -#'Local_key_item::left-padding = #'0.2 -#'Local_key_item::right-padding = #'0.4 -#'Staff_symbol::staff-space = \staffspace ; -#'Staff_symbol::line-count = #5