From b455eff253810748310bdf481eb9bd98a67600c6 Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 00:01:29 +0000 Subject: [PATCH] lilypond-1.3.98 --- input/test/instrument-name-grandstaff.ly | 18 ++++++++++++++++++ input/test/instrument-name.ly | 12 ++++++++++++ input/test/staff-margin.ly | 4 +--- input/trip.ly | 2 +- lily/clef-item.cc | 19 ++++++++++++++++++- lily/include/clef.hh | 1 + lily/instrument-name-engraver.cc | 13 ++++++------- lily/lily-guile.cc | 10 ++++++++++ lily/property-engraver.cc | 7 +++++-- lily/slur.cc | 1 + lily/system-start-delimiter-engraver.cc | 16 +--------------- lily/system-start-delimiter.cc | 1 - lily/translator-group.cc | 6 ++++-- .../Solo-Cello-Suites/allemande-urtext.ly | 1 + .../Solo-Cello-Suites/courante-urtext.ly | 1 + .../Solo-Cello-Suites/gigue-urtext.ly | 1 + .../Solo-Cello-Suites/menuetto-cello.ly | 5 ++++- .../Solo-Cello-Suites/menuetto-urtext.ly | 2 ++ .../Solo-Cello-Suites/menuetto-viola.ly | 5 +++-- .../Solo-Cello-Suites/sarabande-urtext.ly | 1 + scm/basic-properties.scm | 2 +- 21 files changed, 92 insertions(+), 36 deletions(-) create mode 100644 input/test/instrument-name-grandstaff.ly create mode 100644 input/test/instrument-name.ly diff --git a/input/test/instrument-name-grandstaff.ly b/input/test/instrument-name-grandstaff.ly new file mode 100644 index 0000000000..4e4017467e --- /dev/null +++ b/input/test/instrument-name-grandstaff.ly @@ -0,0 +1,18 @@ +\version "1.3.96"; + +\score { + \notes + \notes \context GrandStaff < + \context Staff = treble { + \property GrandStaff.instrument = "Violini " + \property Staff.instrument = " vn I" { c''4 }} + \context Staff = bass { \property Staff.instrument = " vn II" c''4 }> + + +\paper { +linewidth=-1.0; +\translator { \StaffContext + \consists "Instrument_name_engraver"; + } +\translator { \GrandStaffContext \consists "Instrument_name_engraver"; } +}} diff --git a/input/test/instrument-name.ly b/input/test/instrument-name.ly new file mode 100644 index 0000000000..b9df662586 --- /dev/null +++ b/input/test/instrument-name.ly @@ -0,0 +1,12 @@ +\version "1.3.96"; + +\score { + + \notes \context Staff = treble { + \property Staff.instrument = "instr " { c''4 }} + +\paper { +linewidth=-1.0; +\translator { \StaffContext \consists "Instrument_name_engraver"; } +}} + diff --git a/input/test/staff-margin.ly b/input/test/staff-margin.ly index 981b2a598f..315d115473 100644 --- a/input/test/staff-margin.ly +++ b/input/test/staff-margin.ly @@ -13,10 +13,8 @@ \paper { linewidth=-1.0; \translator { \ScoreContext - %textVerticalAlignment = #0 + } -%\translator { \StaffContext \consists "Instrument_name_engraver"; } -%\translator { \PianoStaffContext \consists "Instrument_name_engraver"; } \translator { \StaffContext \consists "Instrument_name_engraver"; } \translator { \PianoStaffContext \consists "Instrument_name_engraver"; } }} diff --git a/input/trip.ly b/input/trip.ly index 071311620e..f943744f35 100644 --- a/input/trip.ly +++ b/input/trip.ly @@ -205,7 +205,7 @@ fugaIIPedal = \notes \relative c { c2^^^-^\f \time 3/4; - \fugaIIPedal } + \fugaIIPedal \bar "|." ; } > > diff --git a/lily/clef-item.cc b/lily/clef-item.cc index faf226af33..44d716424e 100644 --- a/lily/clef-item.cc +++ b/lily/clef-item.cc @@ -11,10 +11,10 @@ #include "string.hh" #include "molecule.hh" #include "item.hh" +#include "lookup.hh" /* FIXME: should use symbol for #'style. - */ MAKE_SCHEME_CALLBACK(Clef,before_line_breaking,1); SCM @@ -66,3 +66,20 @@ Clef::set_interface (Score_element* me) } + + +MAKE_SCHEME_CALLBACK(Clef,brew_molecule,1) +SCM +Clef::brew_molecule (SCM smob) +{ + Score_element * sc = unsmob_element (smob); + SCM glyph = sc->get_elt_property ("glyph"); + if (gh_string_p (glyph)) + { + return sc->lookup_l ()->afm_find (String (ly_scm2string (glyph))).create_scheme (); + } + else + { + return SCM_EOL; + } +} diff --git a/lily/include/clef.hh b/lily/include/clef.hh index e5308818df..f5fabe24f1 100644 --- a/lily/include/clef.hh +++ b/lily/include/clef.hh @@ -15,6 +15,7 @@ struct Clef { DECLARE_SCHEME_CALLBACK(before_line_breaking, (SCM )); + DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM )); static bool has_interface (Score_element*); static void set_interface (Score_element*); }; diff --git a/lily/instrument-name-engraver.cc b/lily/instrument-name-engraver.cc index 131c67ad3b..69f29134b7 100644 --- a/lily/instrument-name-engraver.cc +++ b/lily/instrument-name-engraver.cc @@ -1,4 +1,3 @@ - /* new-staff-margin-engraver.cc -- implement Instrument_name_engraver @@ -13,11 +12,12 @@ #include "bar.hh" #include "system-start-delimiter.hh" #include "side-position-interface.hh" +#include "align-interface.hh" class Instrument_name_engraver : public Engraver { Item *text_; - Spanner * delim_ ; + Score_element * delim_ ; void create_text (SCM s); public: @@ -55,9 +55,6 @@ Instrument_name_engraver::create_text (SCM txt) text_ = new Item (get_property ("InstrumentName")); text_->set_elt_property ("text", txt); - /* - TODO: use more lispish names for break-align-symbols - */ if (delim_) text_->set_parent (delim_, Y_AXIS); @@ -81,10 +78,12 @@ Instrument_name_engraver::acknowledge_element (Score_element_info i) } } - if (System_start_delimiter::has_interface (i.elem_l_) + if (Align_interface::has_interface (i.elem_l_) + && Align_interface::axis (i.elem_l_) == Y_AXIS + //System_start_delimiter::has_interface (i.elem_l_) && i.origin_trans_l_->daddy_trans_l_ == daddy_trans_l_) { - delim_ = dynamic_cast (i.elem_l_); + delim_ = i.elem_l_; } } diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 4a6e26d5d1..7b722ba511 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -396,11 +396,21 @@ undefd () return SCM_UNDEFINED; } +#include "version.hh" +SCM +ly_version () +{ + char const* vs = "\'(" MAJOR_VERSION " " MINOR_VERSION " " PATCH_LEVEL " " MY_PATCH_LEVEL ")" ; + + + return gh_eval_str (vs); +} static void init_functions () { scm_make_gsubr ("ly-warn", 1, 0, 0, (Scheme_function_unknown)ly_warning); + scm_make_gsubr ("ly-version", 0, 0, 0, (Scheme_function_unknown)ly_warning); scm_make_gsubr ("ly-gulp-file", 1,0, 0, (Scheme_function_unknown)ly_gulp_file); scm_make_gsubr ("dir?", 1,0, 0, (Scheme_function_unknown)ly_isdir_p); scm_make_gsubr ("undefd", 0,0, 0, (Scheme_function_unknown)undefd); diff --git a/lily/property-engraver.cc b/lily/property-engraver.cc index 67b48089a3..bebdabbad5 100644 --- a/lily/property-engraver.cc +++ b/lily/property-engraver.cc @@ -153,8 +153,11 @@ Property_engraver::apply_properties (SCM p, Score_element *e, Translator_group*o SCM errport = scm_current_error_port (); warning (_("Wrong type for property")); scm_display (prop_sym, errport); - scm_puts (", type predicate: ", errport); - scm_display (type_p, errport); + scm_puts (", type: ", errport); + + SCM typefunc = scm_eval2 (ly_symbol2scm ("type-name"), SCM_EOL); + + scm_display (gh_call1 (typefunc, type_p), errport); scm_puts (", value found: ", errport); scm_display (val, errport); scm_puts (" type: ", errport); diff --git a/lily/slur.cc b/lily/slur.cc index 1ac4b5cf79..f52240d327 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -10,6 +10,7 @@ /* [TODO] * fix broken interstaff slurs + * should avoid stafflines with horizontal part. * begin and end should be treated as a/acknowledge Scripts. * smart changing of endings * smart changing of (Y-?)offsets to avoid ugly beziers diff --git a/lily/system-start-delimiter-engraver.cc b/lily/system-start-delimiter-engraver.cc index a6955147cb..e5abe9cdf4 100644 --- a/lily/system-start-delimiter-engraver.cc +++ b/lily/system-start-delimiter-engraver.cc @@ -66,18 +66,9 @@ void System_start_delimiter_engraver::do_creation_processing() { delim_ = new Spanner (get_property ("SystemStartDelimiter")); - System_start_delimiter::set_interface (delim_); + delim_->set_bound (LEFT, unsmob_element (get_property ("currentCommandColumn"))); - /* - You can't override the glyph using \property, you must do it in - the predefined context (ie. \translator { ... } ) - */ - SCM s = get_property ("systemStartDelimiterGlyph"); - if (gh_symbol_p (s)) - { - delim_->set_elt_property ("glyph", s); - } announce_element (delim_,0); } @@ -85,11 +76,6 @@ System_start_delimiter_engraver::do_creation_processing() void System_start_delimiter_engraver::do_removal_processing () { - // ugh, should have naming without bracket - SCM collapse = get_property ("bracketCollapseHeight"); - if (gh_number_p (collapse)) - delim_->set_elt_property ("collapse-height", collapse); - delim_->set_bound (RIGHT, unsmob_element (get_property ("currentCommandColumn"))); typeset_element (delim_); } diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc index 957dd429ee..d085267e11 100644 --- a/lily/system-start-delimiter.cc +++ b/lily/system-start-delimiter.cc @@ -44,7 +44,6 @@ System_start_delimiter::staff_bracket (Score_element*me,Real height) void System_start_delimiter::set_interface (Score_element*me) { - me->set_extent_callback (SCM_EOL, Y_AXIS); me->set_interface (ly_symbol2scm ("system-start-delimiter-interface")); } diff --git a/lily/translator-group.cc b/lily/translator-group.cc index 6b735ad953..6e455d8e5c 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -371,8 +371,10 @@ Translator_group::execute_single_pushpop_property (SCM prop, SCM eltprop, SCM va scm_display (eltprop,errport); scm_puts ( _(", value ").ch_C (), errport); scm_display (val, errport); - scm_puts (_(" must satisfy ").ch_C (), errport); - scm_display (predicate, errport); + scm_puts (_(" must be of type ").ch_C (), errport); + SCM typefunc = scm_eval2 (ly_symbol2scm ("type-name"), SCM_EOL); + + scm_display (gh_call1 (typefunc, predicate), errport); scm_puts ("\n", errport); } } diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/allemande-urtext.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/allemande-urtext.ly index fee7c2d782..480995effd 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/allemande-urtext.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/allemande-urtext.ly @@ -60,6 +60,7 @@ allemande_a = \context Staff \notes \relative c { cis(e g!)bes e()a, bes()g f()cis d()gis, a8 cis! | % knee \stemUp d,16 \stemBoth d''(c!)a bes!(g)e cis' d a f d d,8. + \bar "|."; } allemande_b = \notes \relative c { diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/courante-urtext.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/courante-urtext.ly index 8a35f8aafe..ff7f05d526 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/courante-urtext.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/courante-urtext.ly @@ -54,6 +54,7 @@ courante_a = \context Staff \notes \relative c { gis, d'(e f e d cis)d a d a cis | d a f a d, f a, d d,8. + \bar "|."; } courante_b = \notes \relative c { diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/gigue-urtext.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/gigue-urtext.ly index d31d4893e4..d300e28aeb 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/gigue-urtext.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/gigue-urtext.ly @@ -66,6 +66,7 @@ gigue_notes = \context Staff \notes \relative c { %72 cis'4 \stemBoth d16()c | bes(a g f e)d | cis(b a g f)e | d f a d f a | d4 + \bar "|."; } gigue_b = \context Staff \notes \relative c { diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-cello.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-cello.ly index 0cbaba1420..6b4fcf1a64 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-cello.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-cello.ly @@ -95,6 +95,9 @@ menuetto_ii_cello_staff = \context Staff < } } \midi{ \tempo 4 = 130; } - \header{ piece = "Menuetto II"; } + \header{ + piece = "Menuetto II"; + opus = ""; + } } diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-urtext.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-urtext.ly index 2c6fe350b4..a00f3c8a86 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-urtext.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-urtext.ly @@ -66,6 +66,7 @@ menuetto_i_b = \context Staff \notes \relative c { g4 \skip 4*1; f4 | cis8 \skip 8*3; d4 | s2.*2 + \bar "|."; } % UGH, fix this like in sarabande @@ -146,6 +147,7 @@ menuetto_ii = \context Staff\notes \relative c { e( fis g )b a4 | g8()fis e()d e()cis | d2. + \bar "|."; } \version "1.3.93"; diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-viola.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-viola.ly index 633af16bb5..c5bb695392 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-viola.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/menuetto-viola.ly @@ -58,8 +58,9 @@ menuetto_i_viola_staff = \context Staff < } \midi{ \tempo 4 = 110; } \header{ - opus= "" ; - piece ="Menuetto I"; } + opus= "" ; + piece ="Menuetto I"; + } } menuetto_ii_viola_global = \notes{ diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/sarabande-urtext.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/sarabande-urtext.ly index 7344202daa..a2f8b2f4c6 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/sarabande-urtext.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/sarabande-urtext.ly @@ -81,6 +81,7 @@ sarabande_b = \context Staff \notes \relative c { f'4 fis4. s8 | gis4. s8 | s2.*2 + \bar "|."; } diff --git a/scm/basic-properties.scm b/scm/basic-properties.scm index ff3204e8e2..7955f6a630 100644 --- a/scm/basic-properties.scm +++ b/scm/basic-properties.scm @@ -156,7 +156,7 @@ (flag-width-function . ,default-beam-flag-width-function) (space-function . ,default-beam-space-function) (damping . 1) - (meta . ,(element-description "Beam" general-element-interface beam-interface)) + (meta . ,(element-description "Beam" beam-interface)) ) ) -- 2.39.5