From: Jan Nieuwenhuizen Date: Thu, 11 Aug 2005 11:43:36 +0000 (+0000) Subject: * input/regression/slur-script.ly: Fixed. X-Git-Tag: release/2.7.5~24 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b4d2043223a86826764bc531e684a864c97605fe;p=lilypond.git * input/regression/slur-script.ly: Fixed. * lily/phrasing-slur-engraver.cc (class Phrasing_slur_engraver): Update cut and paste code from Slur_engraver. * scm/define-grob-interfaces.scm (dynamic-line-spanner-interface): Add. * scm/define-grobs.scm (DynamicLineSpanner): Add dynamic-line-spanner-interface. (DynamicLineSpanner, TextScript, Fingering): Add slur-padding. --- diff --git a/ChangeLog b/ChangeLog index 04f522432e..27da26c83d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,27 @@ +2005-08-11 Jan Nieuwenhuizen + + * input/regression/slur-script.ly: Fixed. + + * lily/phrasing-slur-engraver.cc (class Phrasing_slur_engraver): + Update cut and paste code from Slur_engraver. + + * scm/define-grob-interfaces.scm (dynamic-line-spanner-interface): + Add. + + * scm/define-grobs.scm (DynamicLineSpanner): Add + dynamic-line-spanner-interface. + (DynamicLineSpanner, TextScript, Fingering): Add slur-padding. + +2005-08-09 Jan Nieuwenhuizen + + * lily/slur-engraver.cc (acknowledge_extra_object): Bugfix: use + to_boolean () so that non-set 'inside-slur means false. + + * lily/slur.cc (outside_slur_callback): Bugfixes: make sure that + slur has control-points. Skip script without direction. Always + do_shift if script inside slur, even if slur not contained in + script y-extent. Increment k in loop. + 2005-08-11 Mats Bengtsson * scm/define-markup-commands.scm: Improved regexp to search for diff --git a/flower/getopt-long.cc b/flower/getopt-long.cc index 9c24d78fba..f97b0bb2c4 100644 --- a/flower/getopt-long.cc +++ b/flower/getopt-long.cc @@ -222,7 +222,7 @@ Getopt_long::operator () () if (argument_index_) return parseshort (); - const char *argument = arg_value_char_a_a_[array_index_]; + char const *argument = arg_value_char_a_a_[array_index_]; if (argument[0] != '-') return 0; diff --git a/flower/include/virtual-methods.hh b/flower/include/virtual-methods.hh index 76ed3e9ea3..47113cc06d 100644 --- a/flower/include/virtual-methods.hh +++ b/flower/include/virtual-methods.hh @@ -13,7 +13,7 @@ #define classname(class_ptr) demangle_classname (typeid (* (class_ptr))) -const char * +char const * demangle_classname (std::type_info const &); /* Virtual copy constructor. Make up for C++'s lack of a standard diff --git a/flower/memory-stream.cc b/flower/memory-stream.cc index f0302d81da..0fcedb7565 100644 --- a/flower/memory-stream.cc +++ b/flower/memory-stream.cc @@ -67,7 +67,7 @@ Memory_out_stream::get_length () const return size_; } -const char * +char const * Memory_out_stream::get_string () const { return buffer_; @@ -75,7 +75,7 @@ Memory_out_stream::get_string () const ssize_t Memory_out_stream::writer (void *cookie, - const char *buffer, + char const *buffer, size_t size) { Memory_out_stream *stream = (Memory_out_stream *) cookie; diff --git a/flower/rtti.cc b/flower/rtti.cc index 3166cb9dd9..0c48f7fe90 100644 --- a/flower/rtti.cc +++ b/flower/rtti.cc @@ -2,7 +2,7 @@ #include "virtual-methods.hh" -const char * +char const * demangle_classname (std::type_info const &t) { char const *s = t.name (); diff --git a/input/regression/slur-script.ly b/input/regression/slur-script.ly index b9ec503a26..1ec5a59f87 100644 --- a/input/regression/slur-script.ly +++ b/input/regression/slur-script.ly @@ -24,5 +24,5 @@ b-.( b-. \once \override Script #'padding = #1.2 b-.) - e=''16[-.( f-.)] + e='16[-.( f-.)] } diff --git a/kpath-guile/kpath.c b/kpath-guile/kpath.c index 503d2265b0..3b8f988778 100644 --- a/kpath-guile/kpath.c +++ b/kpath-guile/kpath.c @@ -60,7 +60,7 @@ static char *(*dl_kpse_var_expand) (char const*) = 0; static kpse_format_info_type (*dl_kpse_format_info)[kpse_last_format] = 0; kpse_file_format_type -kpathsea_find_format (const char* name) +kpathsea_find_format (char const* name) { int i; int len = strlen (name); diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index 823f288081..6c1684fba2 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -197,9 +197,7 @@ Auto_beam_engraver::create_beam () context ()->get_grob_key ("Beam")); for (int i = 0; i < stems_->size (); i++) - { - Beam::add_stem (beam, (*stems_)[i]); - } + Beam::add_stem (beam, (*stems_)[i]); announce_grob (beam, (*stems_)[0]->self_scm ()); diff --git a/lily/bezier.cc b/lily/bezier.cc index e701ae9d55..9c60903bc1 100644 --- a/lily/bezier.cc +++ b/lily/bezier.cc @@ -75,7 +75,6 @@ Bezier::get_other_coordinate (Axis a, Real x) const return 0.0; } - #ifdef PARANOID Offset c = curve_point (ts[0]); if (fabs (c[a] - x) > 1e-8) diff --git a/lily/coherent-ligature-engraver.cc b/lily/coherent-ligature-engraver.cc index ed89983026..9c7ad42b9b 100644 --- a/lily/coherent-ligature-engraver.cc +++ b/lily/coherent-ligature-engraver.cc @@ -79,7 +79,7 @@ * until it really works and I also get Han-Wen's/Jan's permission to * add it to the spacing spanner code. */ -#if 0 // experimental code to collapse spacing after ligature +#if 0 /* experimental code to collapse spacing after ligature */ SCM incr_scm = lc->get_property ("forced-spacing"); if (incr_scm != SCM_EOL) /* (Paper_column::is_musical (l)) */ { @@ -133,7 +133,7 @@ Coherent_ligature_engraver::get_set_column (Item *item, Paper_column *column) if ((sibling) && (Staff_symbol_referencer::get_staff_symbol (sibling) == sl)) { -#if 0 // experimental code to collapse spacing after ligature +#if 0 /* experimental code to collapse spacing after ligature */ Grob *sibling_parent = sibling->get_parent (X_AXIS); sibling_parent->warning (_f ("Coherent_ligature_engraver: " "setting `spacing-increment=" diff --git a/lily/context-property.cc b/lily/context-property.cc index 959d6309f6..880086209a 100644 --- a/lily/context-property.cc +++ b/lily/context-property.cc @@ -189,7 +189,7 @@ updated_grob_properties (Context *tg, SCM sym) } Grob * -make_grob_from_properties (Engraver *tr, SCM symbol, SCM cause, const char *name) +make_grob_from_properties (Engraver *tr, SCM symbol, SCM cause, char const *name) { Context *context = tr->context (); @@ -215,7 +215,7 @@ make_grob_from_properties (Engraver *tr, SCM symbol, SCM cause, const char *name } Item * -make_item_from_properties (Engraver *tr, SCM x, SCM cause, const char *name) +make_item_from_properties (Engraver *tr, SCM x, SCM cause, char const *name) { Item *it = dynamic_cast (make_grob_from_properties (tr, x, cause, name)); assert (it); @@ -223,16 +223,16 @@ make_item_from_properties (Engraver *tr, SCM x, SCM cause, const char *name) } Paper_column * -make_paper_column_from_properties (Engraver *tr, SCM x, const char *name) +make_paper_column_from_properties (Engraver *tr, SCM x, char const *name) { return dynamic_cast (make_grob_from_properties (tr, x, SCM_EOL, name)); } Spanner * -make_spanner_from_properties (Engraver *tr, SCM x, SCM cause, const char *name) +make_spanner_from_properties (Engraver *tr, SCM x, SCM cause, char const *name) { - Spanner* sp = dynamic_cast (make_grob_from_properties (tr, x, cause, name)); + Spanner *sp = dynamic_cast (make_grob_from_properties (tr, x, cause, name)); assert (sp); return sp; } diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index dde923ea1d..1cb03277f3 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -119,7 +119,6 @@ Dynamic_engraver::process_music () { Music *rq = accepted_spanevents_drul_[START]; line_spanner_ = make_spanner ("DynamicLineSpanner", rq ? rq->self_scm () : SCM_EOL); - if (script_ev_) rq = script_ev_; } @@ -146,6 +145,8 @@ Dynamic_engraver::process_music () if (Direction d = to_dir (script_ev_->get_property ("direction"))) set_grob_direction (line_spanner_, d); + else if (Direction d = to_dir (line_spanner_->get_property ("direction"))) + set_grob_direction (script_, d); Axis_group_interface::add_element (line_spanner_, script_); } diff --git a/lily/grob-array.cc b/lily/grob-array.cc index 2aa4ee7991..785b5c215a 100644 --- a/lily/grob-array.cc +++ b/lily/grob-array.cc @@ -49,8 +49,7 @@ Grob_array::mark_smob (SCM s) { (void) s; -#if 0 - // see System::derived_mark () const +#if 0 /* see System::derived_mark () const */ Grob_array *ga = unsmob_grob_array (s); for (int i = 0; i < ga->grobs_.size(); i++) scm_gc_mark (ga->grobs_[i]->self_scm ()); diff --git a/lily/grob-interface-scheme.cc b/lily/grob-interface-scheme.cc index f26c62c2b9..288d55a939 100644 --- a/lily/grob-interface-scheme.cc +++ b/lily/grob-interface-scheme.cc @@ -12,7 +12,8 @@ Protected_scm all_ifaces; -LY_DEFINE (ly_add_interface, "ly:add-interface", 3, 0, 0, (SCM a, SCM b, SCM c), +LY_DEFINE (ly_add_interface, "ly:add-interface", + 3, 0, 0, (SCM a, SCM b, SCM c), "Add an interface description.") { SCM_ASSERT_TYPE (scm_is_symbol (a), a, SCM_ARG1, __FUNCTION__, "symbol"); diff --git a/lily/grob-interface.cc b/lily/grob-interface.cc index 3ea894b2f6..baefab264f 100644 --- a/lily/grob-interface.cc +++ b/lily/grob-interface.cc @@ -12,9 +12,9 @@ #include "grob.hh" #include "warn.hh" -void add_interface (const char *symbol, - const char *descr, - const char *vars) +void add_interface (char const *symbol, + char const *descr, + char const *vars) { SCM s = ly_symbol2scm (symbol); SCM d = scm_makfrom0str (descr); diff --git a/lily/include/audio-element.hh b/lily/include/audio-element.hh index 39cd369d38..7004d5f27f 100644 --- a/lily/include/audio-element.hh +++ b/lily/include/audio-element.hh @@ -16,7 +16,7 @@ class Audio_element public: Audio_element (); virtual ~Audio_element (); - virtual const char *name () const; + virtual char const *name () const; protected: }; diff --git a/lily/include/engraver.hh b/lily/include/engraver.hh index 56a2fe44eb..f80da70d73 100644 --- a/lily/include/engraver.hh +++ b/lily/include/engraver.hh @@ -48,9 +48,9 @@ public: #define make_item(x, cause) make_item_from_properties (this, ly_symbol2scm (x), cause, x) #define make_spanner(x, cause) make_spanner_from_properties (this, ly_symbol2scm (x), cause, x) #define make_paper_column(x) make_paper_column_from_properties (this, ly_symbol2scm (x), x) -Grob *make_grob_from_properties (Engraver *tr, SCM symbol, SCM cause, const char *name); -Item *make_item_from_properties (Engraver *tg, SCM x, SCM cause, const char *name); -Spanner *make_spanner_from_properties (Engraver *tg, SCM x, SCM cause, const char *name); -Paper_column *make_paper_column_from_properties (Engraver *tg, SCM x, const char *name); +Grob *make_grob_from_properties (Engraver *tr, SCM symbol, SCM cause, char const *name); +Item *make_item_from_properties (Engraver *tg, SCM x, SCM cause, char const *name); +Spanner *make_spanner_from_properties (Engraver *tg, SCM x, SCM cause, char const *name); +Paper_column *make_paper_column_from_properties (Engraver *tg, SCM x, char const *name); #endif // ENGRAVER_HH diff --git a/lily/include/grob-interface.hh b/lily/include/grob-interface.hh index 82121e7b7f..fb90e2e2bc 100644 --- a/lily/include/grob-interface.hh +++ b/lily/include/grob-interface.hh @@ -22,9 +22,9 @@ } \ ADD_SCM_INIT_FUNC (cl ## ifaces, cl ## _init_ifaces); -void add_interface (const char *symbol, - const char *descr, - const char *vars); +void add_interface (char const *symbol, + char const *descr, + char const *vars); SCM ly_add_interface (SCM, SCM, SCM); SCM ly_all_grob_interfaces (); diff --git a/lily/include/translator.icc b/lily/include/translator.icc index 6cc1d79daf..6450793380 100644 --- a/lily/include/translator.icc +++ b/lily/include/translator.icc @@ -91,7 +91,7 @@ T::fetch_precomputable_methods (Translator_void_method_ptr ptrs[])\ } void add_acknowledger (Engraver_void_function_engraver_grob_info ptr, - const char *func_name, + char const *func_name, Array *ack_array); Engraver_void_function_engraver_grob_info diff --git a/lily/lexer.ll b/lily/lexer.ll index 130bd472eb..bb9ee2271a 100644 --- a/lily/lexer.ll +++ b/lily/lexer.ll @@ -278,7 +278,7 @@ BOM_UTF8 \357\273\277 exit (1); } {RESTNAME} { - const char *s = YYText (); + char const *s = YYText (); yylval.scm = scm_makfrom0str (s); return RESTNAME; } diff --git a/lily/lookup.cc b/lily/lookup.cc index 2e1164ce50..10dee7ad44 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -658,8 +658,7 @@ Lookup::accordion (SCM s, Real staff_space, Font_metric *fm) Stencil Lookup::repeat_slash (Real w, Real s, Real t) { -#if 0 - // TODO +#if 0 /* TODO */ Array points ; Real blotdiameter = 0.0; diff --git a/lily/mensural-ligature.cc b/lily/mensural-ligature.cc index a70eeaf113..f7396f582d 100644 --- a/lily/mensural-ligature.cc +++ b/lily/mensural-ligature.cc @@ -198,7 +198,7 @@ internal_brew_primitive (Grob *me) } } -#if 0 // what happend with the ledger lines? +#if 0 /* what happend with the ledger lines? */ int pos = Staff_symbol_referencer::get_rounded_position (me); if (primitive & MLP_FLEXA) { diff --git a/lily/note-heads-engraver.cc b/lily/note-heads-engraver.cc index 2827d69ce9..0e48ae90b6 100644 --- a/lily/note-heads-engraver.cc +++ b/lily/note-heads-engraver.cc @@ -77,10 +77,8 @@ Note_heads_engraver::process_music () Pitch *pit = unsmob_pitch (ev->get_property ("pitch")); -#if 0 - /* - TODO: should have a mechanism to switch off these warnings. - */ +#if 0 /* TODO: should have a mechanism to switch off these warnings. */ + if (!pit) { ev->origin ()->warning (_ ("NoteEvent without pitch")); diff --git a/lily/pango-font.cc b/lily/pango-font.cc index 386f7af172..0a4fc747fa 100644 --- a/lily/pango-font.cc +++ b/lily/pango-font.cc @@ -252,8 +252,7 @@ Pango_font::text_stencil (String str) const return Stencil (b, exp); } -#if 0 - // check extents. +#if 0 /* Check extents. */ if (!dest.extent_box ()[X_AXIS].is_empty ()) { Stencil frame = Lookup::frame (dest.extent_box (), 0.1, 0.1); diff --git a/lily/phrasing-slur-engraver.cc b/lily/phrasing-slur-engraver.cc index 322b560180..63b40dd7cf 100644 --- a/lily/phrasing-slur-engraver.cc +++ b/lily/phrasing-slur-engraver.cc @@ -1,6 +1,8 @@ /* phrasing-slur-engraver.cc -- implement Phrasing_slur_engraver + source file of the GNU LilyPond music typesetter + (c) 1997--2005 Han-Wen Nienhuys */ @@ -29,13 +31,14 @@ protected: virtual bool try_music (Music *); void acknowledge_extra_object (Grob_info); - DECLARE_ACKNOWLEDGER (note_column); DECLARE_ACKNOWLEDGER (accidental); + DECLARE_ACKNOWLEDGER (dynamic_line_spanner); DECLARE_ACKNOWLEDGER (fingering); + DECLARE_ACKNOWLEDGER (note_column); DECLARE_ACKNOWLEDGER (script); - DECLARE_ACKNOWLEDGER (tie); - DECLARE_ACKNOWLEDGER (text_script); DECLARE_ACKNOWLEDGER (slur); + DECLARE_ACKNOWLEDGER (text_script); + DECLARE_ACKNOWLEDGER (tie); void stop_translation_timestep (); virtual void finalize (); @@ -86,6 +89,7 @@ Phrasing_slur_engraver::acknowledge_note_column (Grob_info info) Slur::add_column (end_slurs_[i], e); } +/* FIXME: cut + paste job from Slur:: */ void Phrasing_slur_engraver::acknowledge_extra_object (Grob_info info) { @@ -99,7 +103,8 @@ Phrasing_slur_engraver::acknowledge_extra_object (Grob_info info) for (int i = end_slurs_.size (); i--;) Slur::add_extra_encompass (end_slurs_[i], e); } - else if (inside == SCM_BOOL_F) + else if (!to_boolean (inside) + && e->name () != "DynamicText") { Grob *slur = slurs_.size () ? slurs_[0] : 0; slur = (end_slurs_.size () && !slur) @@ -119,6 +124,11 @@ Phrasing_slur_engraver::acknowledge_accidental (Grob_info info) acknowledge_extra_object (info); } +void +Phrasing_slur_engraver::acknowledge_dynamic_line_spanner (Grob_info info) +{ + acknowledge_extra_object (info); +} void Phrasing_slur_engraver::acknowledge_fingering (Grob_info info) @@ -190,13 +200,14 @@ Phrasing_slur_engraver::stop_translation_timestep () #include "translator.icc" -ADD_ACKNOWLEDGER (Phrasing_slur_engraver,note_column); -ADD_ACKNOWLEDGER (Phrasing_slur_engraver,accidental); -ADD_ACKNOWLEDGER (Phrasing_slur_engraver,fingering) -ADD_ACKNOWLEDGER (Phrasing_slur_engraver,script); -ADD_ACKNOWLEDGER (Phrasing_slur_engraver,tie); -ADD_ACKNOWLEDGER (Phrasing_slur_engraver,text_script); -ADD_ACKNOWLEDGER (Phrasing_slur_engraver,slur); +ADD_ACKNOWLEDGER (Phrasing_slur_engraver, accidental); +ADD_ACKNOWLEDGER (Phrasing_slur_engraver, dynamic_line_spanner); +ADD_ACKNOWLEDGER (Phrasing_slur_engraver, fingering) +ADD_ACKNOWLEDGER (Phrasing_slur_engraver, note_column); +ADD_ACKNOWLEDGER (Phrasing_slur_engraver, script); +ADD_ACKNOWLEDGER (Phrasing_slur_engraver, slur); +ADD_ACKNOWLEDGER (Phrasing_slur_engraver, text_script); +ADD_ACKNOWLEDGER (Phrasing_slur_engraver, tie); ADD_TRANSLATOR (Phrasing_slur_engraver, /* descr */ "Print phrasing slurs. Similar to @ref{Slur_engraver}", diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index 65f124ce43..123d6a5a6c 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -95,7 +95,7 @@ Piano_pedal_engraver::initialize () { char *names [] = { "Sostenuto", "Sustain", "UnaCorda", 0 }; - info_list_ = new Pedal_info[sizeof (names) / sizeof (const char *)]; + info_list_ = new Pedal_info[sizeof (names) / sizeof (char const *)]; Pedal_info *p = info_list_; char **np = names; diff --git a/lily/pitched-trill-engraver.cc b/lily/pitched-trill-engraver.cc index a8d93cc022..b20219f037 100644 --- a/lily/pitched-trill-engraver.cc +++ b/lily/pitched-trill-engraver.cc @@ -21,18 +21,17 @@ class Pitched_trill_engraver : public Engraver { - public: TRANSLATOR_DECLARATIONS(Pitched_trill_engraver); protected: - DECLARE_ACKNOWLEDGER ( note_head); DECLARE_ACKNOWLEDGER ( dots); DECLARE_ACKNOWLEDGER ( text_spanner); void process_music (); virtual bool try_music (Music*); void stop_translation_timestep (); + private: Item *trill_head_; Item *trill_group_; @@ -70,16 +69,14 @@ Pitched_trill_engraver::acknowledge_text_spanner (Grob_info info) && mus->is_mus_type ("trill-span-event") && to_dir (mus->get_property ("span-direction")) == START && unsmob_pitch (mus->get_property ("trill-pitch"))) - { - make_trill (mus); - } + make_trill (mus); } void Pitched_trill_engraver::make_trill (Music *mus) { SCM scm_pitch = mus->get_property ("trill-pitch"); - Pitch * p = unsmob_pitch (scm_pitch); + Pitch *p = unsmob_pitch (scm_pitch); SCM keysig = get_property ("localKeySignature"); @@ -87,8 +84,8 @@ Pitched_trill_engraver::make_trill (Music *mus) scm_from_int (p->get_notename ())); SCM handle = scm_assoc (key, keysig); - bool print_acc = - (handle == SCM_BOOL_F) + bool print_acc + = (handle == SCM_BOOL_F) || p->get_alteration () == 0; if (trill_head_) @@ -129,9 +126,7 @@ Pitched_trill_engraver::stop_translation_timestep () { if (trill_group_) for (int i = 0; i < heads_.size (); i++) - { - Side_position_interface::add_support (trill_group_, heads_[i]); - } + Side_position_interface::add_support (trill_group_, heads_[i]); heads_.clear (); trill_head_ = 0; diff --git a/lily/slur-engraver.cc b/lily/slur-engraver.cc index 8b556267a0..32c233e581 100644 --- a/lily/slur-engraver.cc +++ b/lily/slur-engraver.cc @@ -1,6 +1,8 @@ /* slur-engraver.cc -- implement Slur_engraver + source file of the GNU LilyPond music typesetter + (c) 1997--2005 Han-Wen Nienhuys */ @@ -30,12 +32,13 @@ class Slur_engraver : public Engraver protected: virtual bool try_music (Music *); - DECLARE_ACKNOWLEDGER (note_column); DECLARE_ACKNOWLEDGER (accidental); DECLARE_ACKNOWLEDGER (fingering); + DECLARE_ACKNOWLEDGER (dynamic_line_spanner); + DECLARE_ACKNOWLEDGER (note_column); DECLARE_ACKNOWLEDGER (script); - DECLARE_ACKNOWLEDGER (tie); DECLARE_ACKNOWLEDGER (text_script); + DECLARE_ACKNOWLEDGER (tie); void acknowledge_extra_object (Grob_info); void stop_translation_timestep (); virtual void finalize (); @@ -89,7 +92,7 @@ Slur_engraver::acknowledge_note_column (Grob_info info) void Slur_engraver::acknowledge_extra_object (Grob_info info) { - Grob*e = info.grob (); + Grob *e = info.grob (); SCM inside = e->get_property ("inside-slur"); if (Tie::has_interface (e) || to_boolean (inside)) @@ -99,7 +102,8 @@ Slur_engraver::acknowledge_extra_object (Grob_info info) for (int i = end_slurs_.size (); i--;) Slur::add_extra_encompass (end_slurs_[i], e); } - else if (inside == SCM_BOOL_F) + else if (!to_boolean (inside) + && e->name () != "DynamicText") { Grob *slur = slurs_.size () ? slurs_[0] : 0; slur = (end_slurs_.size () && !slur) @@ -119,6 +123,11 @@ Slur_engraver::acknowledge_accidental (Grob_info info) acknowledge_extra_object (info); } +void +Slur_engraver::acknowledge_dynamic_line_spanner (Grob_info info) +{ + acknowledge_extra_object (info); +} void Slur_engraver::acknowledge_fingering (Grob_info info) @@ -144,9 +153,6 @@ Slur_engraver::acknowledge_tie (Grob_info info) acknowledge_extra_object (info); } - - - void Slur_engraver::finalize () { @@ -199,14 +205,15 @@ Slur_engraver::stop_translation_timestep () #include "translator.icc" -ADD_ACKNOWLEDGER (Slur_engraver,note_column); ADD_ACKNOWLEDGER (Slur_engraver,accidental); +ADD_ACKNOWLEDGER (Slur_engraver,dynamic_line_spanner); ADD_ACKNOWLEDGER (Slur_engraver,fingering) +ADD_ACKNOWLEDGER (Slur_engraver,note_column); ADD_ACKNOWLEDGER (Slur_engraver,script); -ADD_ACKNOWLEDGER (Slur_engraver,tie); ADD_ACKNOWLEDGER (Slur_engraver,text_script); +ADD_ACKNOWLEDGER (Slur_engraver,tie); ADD_TRANSLATOR (Slur_engraver, - /* descr */ "Build slurs grobs from slur events", + /* descr */ "Build slur grobs from slur events", /* creats*/ "Slur", /* accepts */ "slur-event", /* reads */ "slurMelismaBusy doubleSlurs", diff --git a/lily/slur.cc b/lily/slur.cc index 469b8414c0..11b340ff5f 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -28,6 +28,23 @@ #include "warn.hh" #include "slur-scoring.hh" +static Direction +get_default_dir (Grob *me) +{ + extract_grob_set (me, "note-columns", encompasses); + + Direction d = DOWN; + for (int i = 0; i < encompasses.size (); i++) + { + if (Note_column::dir (encompasses[i]) < 0) + { + d = UP; + break; + } + } + return d; +} + MAKE_SCHEME_CALLBACK (Slur, height, 2); SCM Slur::height (SCM smob, SCM ax) @@ -123,13 +140,14 @@ Slur::add_extra_encompass (Grob *me, Grob *n) me->add_dependency (n); } +#include "script-interface.hh" MAKE_SCHEME_CALLBACK (Slur, outside_slur_callback, 2); SCM Slur::outside_slur_callback (SCM grob, SCM axis) { Grob *script = unsmob_grob (grob); Axis a = Axis (scm_to_int (axis)); - (void) a; + (void) a; assert (a == Y_AXIS); Grob *slur = unsmob_grob (script->get_object ("slur")); @@ -137,6 +155,14 @@ Slur::outside_slur_callback (SCM grob, SCM axis) if (!slur) return scm_from_int (0); + Direction dir = get_grob_direction (script); + if (dir == CENTER) + return scm_from_int (0); + + /* FIXME: this dependency should be automatic. */ + if (scm_ilength (slur->get_property ("control-points")) < 4) + Slur::after_line_breaking (slur->self_scm ()); + Grob *cx = script->common_refpoint (slur, X_AXIS); Grob *cy = script->common_refpoint (slur, Y_AXIS); @@ -148,20 +174,18 @@ Slur::outside_slur_callback (SCM grob, SCM axis) Interval yext = robust_relative_extent (script, cy, Y_AXIS); Interval xext = robust_relative_extent (script, cx, X_AXIS); + /* FIXME: slur property, script property? */ Real slur_padding = robust_scm2double (script->get_property ("slur-padding"), - 0.0); // todo: slur property, script property? + 0.0); yext.widen (slur_padding); - Real EPS = 1e-3; - - Interval bezext (curve.control_[0][X_AXIS], - curve.control_[3][X_AXIS]); + Real EPS = 1e-3; + Interval bezext (curve.control_[0][X_AXIS], curve.control_[3][X_AXIS]); bool consider[] = { false, false, false }; Real ys[] = {0, 0, 0}; - int k = 0; bool do_shift = false; - for (int d = LEFT; d <= RIGHT; d++) + for (int d = LEFT, k = 0; d <= RIGHT; d++, k++) { Real x = xext.linear_combination ((Direction) d); consider[k] = bezext.contains (x); @@ -176,42 +200,23 @@ Slur::outside_slur_callback (SCM grob, SCM axis) : curve.get_other_coordinate (X_AXIS, x)); consider[k] = true; - if (yext.contains (ys[k])) + /* Request shift if slur is contained script's Y, or if + script is fully inside slur. */ + if (yext.contains (ys[k]) || dir * ys[k] > dir * yext[-dir]) do_shift = true; } } Real offset = 0.0; if (do_shift) { - k = 0; - Direction dir = get_grob_direction (script); - for (int d = LEFT; d <= RIGHT; d++) - { - offset = dir * (max (dir * offset, - dir * (ys[k] - yext[-dir] + dir * slur_padding))); - k++; - } + for (int d = LEFT, k = 0; d <= RIGHT; d++, k++) + offset = dir * (max (dir * offset, + dir * (ys[k] - yext[-dir] + dir * slur_padding))); } return scm_from_double (offset); } -static Direction -get_default_dir (Grob *me) -{ - extract_grob_set (me, "note-columns", encompasses); - - Direction d = DOWN; - for (int i = 0; i < encompasses.size (); i++) - { - if (Note_column::dir (encompasses[i]) < 0) - { - d = UP; - break; - } - } - return d; -} MAKE_SCHEME_CALLBACK (Slur, after_line_breaking, 1); SCM diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc index b49dc452e0..aee2c590d3 100644 --- a/lily/system-start-delimiter.cc +++ b/lily/system-start-delimiter.cc @@ -71,13 +71,14 @@ System_start_delimiter::after_line_breaking (SCM smob) int count = 0; Paper_column *left_column = me->get_bound (LEFT)->get_column (); +#if 1 /* slur-script.ly test */ /* Get all coordinates, to trigger Hara kiri. */ extract_grob_set (me, "elements", elts); Grob *common = common_refpoint_of_array (elts, me, Y_AXIS); - for (int i = elts.size(); i--;) + for (int i = elts.size (); i--;) { Spanner *staff = dynamic_cast (elts[i]); if (!staff || @@ -91,9 +92,8 @@ System_start_delimiter::after_line_breaking (SCM smob) } if (count <= 1) - { - me->suicide (); - } + me->suicide (); +#endif } return SCM_UNSPECIFIED; } diff --git a/lily/system.cc b/lily/system.cc index ab531db241..8ad56060e6 100644 --- a/lily/system.cc +++ b/lily/system.cc @@ -167,7 +167,7 @@ System::get_paper_systems () handle_broken_dependencies (); -#if 0 /* don't do this: strange side effects. */ +#if 0 /* FIXME: strange side effects. */ /* Because the this->get_property (all-elements) contains items in 3 versions, handle_broken_dependencies () will leave duplicated diff --git a/lily/translator.cc b/lily/translator.cc index 0c0c4da573..24d169857f 100644 --- a/lily/translator.cc +++ b/lily/translator.cc @@ -159,7 +159,7 @@ Translator::print_smob (SCM s, SCM port, scm_print_state *) void add_acknowledger (Engraver_void_function_engraver_grob_info ptr, - const char *func_name, + char const *func_name, Array *ack_array) { Acknowledge_information inf; diff --git a/lily/volta-bracket.cc b/lily/volta-bracket.cc index 3609470758..122167b6e1 100644 --- a/lily/volta-bracket.cc +++ b/lily/volta-bracket.cc @@ -53,7 +53,7 @@ Volta_bracket_interface::print (SCM smob) else str = "|"; - const char *cs = str.to_str0 (); + char const *cs = str.to_str0 (); no_vertical_end |= (strcmp (cs, ":|") != 0 && strcmp (cs, "|:") != 0 && strcmp (cs, "|.") != 0 && strcmp (cs, ":|:") != 0 && strcmp (cs, ".|") != 0); diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index 262d9e72b6..517a9e7ed9 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -48,12 +48,12 @@ displayMusic = (display-scheme-music music) music) -#(use-modules (scm display-lily)) -displayLilyMusic = -#(def-music-function (parser location music) (ly:music?) - (display-lily-init parser) - (display-lily-music music) - music) +%#(use-modules (scm display-lily)) +%displayLilyMusic = +%#(def-music-function (parser location music) (ly:music?) +% (display-lily-init parser) +% (display-lily-music music) +% music) applyoutput = #(def-music-function (parser location proc) (procedure?) diff --git a/scm/define-grob-interfaces.scm b/scm/define-grob-interfaces.scm index 65e4bb859e..30331c3c64 100644 --- a/scm/define-grob-interfaces.scm +++ b/scm/define-grob-interfaces.scm @@ -1,57 +1,49 @@ ;;;; interface-description.scm -- part of generated backend documentation ;;;; ;;;; source file of the GNU LilyPond music typesetter -;;;; +;;;; ;;;; (c) 1998--2005 Han-Wen Nienhuys ;;;; Jan Nieuwenhuizen -; should include default value? - - +;; should include default value? -(ly:add-interface - 'pitched-trill-interface - "A note head to indicate trill pitches" - '(accidental-grob) - ) (ly:add-interface 'accidental-suggestion-interface "An accidental, printed as a suggestion (typically: vertically over a note)" - '() - ) + '()) (ly:add-interface 'dynamic-interface "Any kind of loudness sign" - '() - ) + '()) + +(ly:add-interface + 'dynamic-line-spanner-interface + "Dynamic line spanner" + '()) (ly:add-interface 'finger-interface "A fingering instruction" - '() - ) + '()) (ly:add-interface 'string-number-interface "A string number instruction" - '() - ) + '()) (ly:add-interface 'fret-diagram-interface "A fret diagram" - '(align-dir barre-type dot-color dot-radius finger-code fret-count - label-dir number-type size string-count thickness) -) + '(align-dir barre-type dot-color dot-radius finger-code fret-count + label-dir number-type size string-count thickness)) (ly:add-interface 'ligature-interface "A ligature" - '() - ) + '()) (ly:add-interface 'ligature-bracket-interface @@ -76,16 +68,13 @@ (ly:add-interface 'metronome-mark-interface "a rehearsal mark" - '( - )) - + '()) (ly:add-interface 'multi-measure-interface "Multi measure rest, and the text or number that is printed over it." '()) - (ly:add-interface 'note-name-interface "Note name" @@ -101,19 +90,21 @@ "A piano pedal sign" '()) +(ly:add-interface + 'pitched-trill-interface + "A note head to indicate trill pitches" + '(accidental-grob)) (ly:add-interface 'rhythmic-grob-interface - "Any object with a rhythmic basis. Used to determine which grobs + "Any object with a rhythmic basis. Used to determine which grobs are interesting enough to maintain a hara-kiri staff." - '() - ) + '()) (ly:add-interface 'stanza-number-interface "A stanza number, to be put in from of a lyrics line" - '() - ) + '()) ;;; todo: this is not typesetting info. Move to interpretation. (ly:add-interface @@ -121,9 +112,8 @@ are interesting enough to maintain a hara-kiri staff." "An interface for any notes set in a tablature staff" '()) - (ly:add-interface - 'vertically-spaceable-interface + 'vertically-spaceable-interface "Objects that should be kept at constant vertical distances. Typically: @internalsref{VerticalAxisGroup} objects of @internalsref{Staff} contexts." '()) diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 5878e70354..6d88d78203 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -24,9 +24,9 @@ (cautionary-style . parentheses) (after-line-breaking-callback . ,Accidental_interface::after_line_breaking) (meta . ((class . Item) - (interfaces . (accidental-interface font-interface)))) - )) - + (interfaces . (accidental-interface + font-interface)))))) + (AccidentalSuggestion . ((print-function . ,Accidental_interface::print) (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent @@ -40,10 +40,12 @@ (staff-padding . 0.25) (script-priority . 0) (meta . ((class . Item) - (interfaces . (side-position-interface script-interface accidental-interface - accidental-suggestion-interface self-alignment-interface - font-interface)))) - )) + (interfaces . (side-position-interface + script-interface + accidental-interface + accidental-suggestion-interface + self-alignment-interface + font-interface)))))) (AccidentalPlacement . ((X-extent-callback . ,Axis_group_interface::group_extent_callback) (left-padding . 0.2) @@ -52,8 +54,7 @@ ;; accs closer to the previous note than to the next one. (right-padding . 0.15) (meta . ((class . Item) - (interfaces . (accidental-placement-interface)))) - )) + (interfaces . (accidental-placement-interface)))))) (Ambitus . ( (axes . (0 1)) @@ -64,15 +65,14 @@ (key-signature . (extra-space . 0.0)) (staff-bar . (extra-space . 0.0)) (time-signature . (extra-space . 0.0)) - (first-note . (fixed-space . 0.0)) - )) + (first-note . (fixed-space . 0.0)))) (breakable . #t) (break-align-symbol . ambitus) (break-visibility . ,begin-of-line-visible) (meta . ((class . Item) (interfaces . (axis-group-interface - break-aligned-interface ambitus-interface)))) - )) + break-aligned-interface + ambitus-interface)))))) (AmbitusLine . ( @@ -82,8 +82,9 @@ (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent)) (meta . ((class . Item) - (interfaces . (ambitus-interface staff-symbol-referencer-interface font-interface)))) - )) + (interfaces . (ambitus-interface + staff-symbol-referencer-interface + font-interface)))))) (AmbitusAccidental . ( (print-function . ,Accidental_interface::print) @@ -95,9 +96,10 @@ (after-line-breaking-callback . ,Accidental_interface::after_line_breaking) (meta . ((class . Item) (interfaces . (item-interface - accidental-interface break-aligned-interface - side-position-interface font-interface)))) - )) + accidental-interface + break-aligned-interface + side-position-interface + font-interface)))))) (AmbitusNoteHead . ( @@ -106,13 +108,12 @@ (glyph-name-procedure . ,find-notehead-symbol) (Y-offset-callbacks . (,Staff_symbol_referencer::callback)) (meta . ((class . Item) - (interfaces . (font-interface note-head-interface - ambitus-interface - staff-symbol-referencer-interface - rhythmic-head-interface - ledgered-interface - )))) - )) + (interfaces . (font-interface + note-head-interface + ambitus-interface + staff-symbol-referencer-interface + rhythmic-head-interface + ledgered-interface)))))) (Arpeggio . ( @@ -125,9 +126,9 @@ (staff-position . 0.0) (meta . ((class . Item) (interfaces . (arpeggio-interface - staff-symbol-referencer-interface side-position-interface - font-interface)))) - )) + staff-symbol-referencer-interface + side-position-interface + font-interface)))))) (BarLine . ( @@ -136,7 +137,7 @@ (break-glyph-function . ,default-break-barline) (layer . 0) (bar-size-procedure . ,Bar_line::get_staff_bar_size) - (print-function . ,Bar_line::print) + (print-function . ,Bar_line::print) (break-visibility . ,all-visible) (breakable . #t) (before-line-breaking-callback . ,Bar_line::before_line_breaking) @@ -148,8 +149,7 @@ (key-cancellation . (extra-space . 1.0)) (first-note . (fixed-space . 1.3)) (next-note . (semi-fixed-space . 1.3)) - (right-edge . (extra-space . 0.0)) - )) + (right-edge . (extra-space . 0.0)))) ;; ;; Ross. page 151 lists other values, we opt for a leaner look @@ -162,9 +162,8 @@ (thick-thickness . 6.0) (meta . ((class . Item) (interfaces . (bar-line-interface - break-aligned-interface font-interface)))) - )) - + break-aligned-interface + font-interface)))))) (BarNumber . ( @@ -184,8 +183,8 @@ (interfaces . (side-position-interface text-interface self-alignment-interface - font-interface break-aligned-interface)))) - + font-interface + break-aligned-interface)))) )) (BassFigure @@ -201,9 +200,10 @@ (kern . 0.2) (meta . ((class . Item) (interfaces . (text-interface - rhythmic-grob-interface bass-figure-interface - self-alignment-interface font-interface)))) - )) + rhythmic-grob-interface + bass-figure-interface + self-alignment-interface + font-interface)))))) (Beam . ( ;; todo: clean this up a bit: the list is getting @@ -215,8 +215,7 @@ ,Beam::check_concave ,Beam::slope_damping ,Beam::shift_region_to_valid - ,Beam::quanting - )) + ,Beam::quanting)) ;; TODO: should be in SLT. (thickness . 0.48) ; in staff-space @@ -224,7 +223,7 @@ (after-line-breaking-callback . ,Beam::after_line_breaking) (neutral-direction . -1) (dir-function . ,beam-dir-majority-median) - + ;; Whe have some unreferenced problems here. ;; ;; If we shorten beamed stems less than normal stems (1 staffspace), @@ -240,45 +239,63 @@ ;; isolated shortened beams look nice and a bit shortened, ;; sadly possibly breaking patterns with high order beams. (beamed-stem-shorten . (1.0 0.5 0.25)) - + (flag-width-function . ,beam-flag-width-function) (damping . 1) (auto-knee-gap . 5.5) ;; only for debugging. (font-family . roman) - + (space-function . ,Beam::space_function) (meta . ((class . Spanner) - (interfaces . (staff-symbol-referencer-interface beam-interface)))) - )) + (interfaces . (staff-symbol-referencer-interface + beam-interface)))))) (BreakAlignment . ( (breakable . #t) (stacking-dir . 1) - (break-align-orders . #(; end-of-line: - (instrument-name - left-edge ambitus breathing-sign - clef staff-bar key-cancellation key-signature - time-signature custos) - - ; unbroken - (instrument-name left-edge ambitus breathing-sign - clef staff-bar key-cancellation key-signature - staff - time-signature custos) - ; begin of line - (instrument-name left-edge ambitus breathing-sign - clef key-cancellation key-signature staff-bar - time-signature custos) - - )) + (break-align-orders . ;; end of line + #((instrument-name + left-edge + ambitus + breathing-sign + clef + staff-bar + key-cancellation + key-signature + time-signature + custos) + + ;; unbroken + (instrument-name + left-edge + ambitus + breathing-sign + clef + staff-bar + key-cancellation + key-signature + staff + time-signature custos) + + ;; begin of line + (instrument-name + left-edge + ambitus + breathing-sign + clef + key-cancellation + key-signature + staff-bar + time-signature + custos))) (axes . (0)) (X-extent-callback . ,Axis_group_interface::group_extent_callback) (meta . ((class . Item) - (interfaces . (break-alignment-interface axis-group-interface))))) - ) + (interfaces . (break-alignment-interface + axis-group-interface)))))) (BreakAlignGroup . ( @@ -286,8 +303,8 @@ (X-offset-callbacks . (,Break_align_interface::alignment_callback)) (X-extent-callback . ,Axis_group_interface::group_extent_callback) (meta . ((class . Item) - (interfaces . (break-aligned-interface axis-group-interface )))) - )) + (interfaces . (break-aligned-interface + axis-group-interface)))))) (BreathingSign . ( @@ -300,23 +317,23 @@ (staff-bar . (minimum-space . 1.5)) (clef . (minimum-space . 2.0)) (first-note . (fixed-space . 1.0)) ;huh? - (right-edge . (extra-space . 0.1)) - )) + (right-edge . (extra-space . 0.1)))) (print-function . ,Text_interface::print) (text . ,(make-musicglyph-markup "scripts.rcomma")) (Y-offset-callbacks . (,Breathing_sign::offset_callback)) (break-visibility . ,begin-of-line-invisible) (meta . ((class . Item) (interfaces . (break-aligned-interface - breathing-sign-interface text-interface font-interface )))) - )) + breathing-sign-interface + text-interface + font-interface)))))) (Clef . ( (print-function . ,Clef::print) (before-line-breaking-callback . ,Clef::before_line_breaking) (breakable . #t) - (font-family . music) + (font-family . music) (break-align-symbol . clef) (break-visibility . ,begin-of-line-visible) (space-alist . ((ambitus . (extra-space . 2.0)) @@ -326,34 +343,30 @@ (time-signature . (minimum-space . 4.2)) (first-note . (minimum-fixed-space . 5.0)) (next-note . (extra-space . 0.5)) - (right-edge . (extra-space . 0.5)) - )) + (right-edge . (extra-space . 0.5)))) (Y-offset-callbacks . (,Staff_symbol_referencer::callback)) (meta . ((class . Item) (interfaces . (clef-interface - staff-symbol-referencer-interface font-interface - break-aligned-interface )))) - )) + staff-symbol-referencer-interface + font-interface + break-aligned-interface)))))) (ClusterSpannerBeacon . ( (print-function . #f) (Y-extent-callback . ,Cluster_beacon::height) (meta . ((class . Item) - (interfaces . (cluster-beacon-interface)))) - )) + (interfaces . (cluster-beacon-interface)))))) (ClusterSpanner . ( (print-function . ,Cluster::print) - (spacing-procedure . ,Spanner::set_spacing_rods) + (spacing-procedure . ,Spanner::set_spacing_rods) (minimum-length . 0.0) (padding . 0.25) (style . ramp) (meta . ((class . Spanner) - (interfaces . (cluster-interface)))) - )) - + (interfaces . (cluster-interface)))))) (ChordName . ( @@ -364,9 +377,10 @@ (font-size . 1.5) (meta . ((class . Item) (interfaces . (font-interface - rhythmic-grob-interface text-interface chord-name-interface - item-interface)))) - )) + rhythmic-grob-interface + text-interface + chord-name-interface + item-interface)))))) (CombineTextScript . ( @@ -383,10 +397,10 @@ (font-series . bold) (meta . ((class . Item) (interfaces . (text-script-interface - text-interface side-position-interface - font-interface )))) - )) - + text-interface + side-position-interface + font-interface)))))) + (Custos . ( (break-align-symbol . custos) @@ -398,14 +412,13 @@ (Y-offset-callbacks . (,Staff_symbol_referencer::callback)) (space-alist . ( (first-note . (minimum-fixed-space . 0.0)) - (right-edge . (extra-space . 0.1)) - )) + (right-edge . (extra-space . 0.1)))) (meta . ((class . Item) (interfaces - . (custos-interface staff-symbol-referencer-interface - font-interface - break-aligned-interface )))) - )) + . (custos-interface + staff-symbol-referencer-interface + font-interface + break-aligned-interface)))))) (DotColumn . ( @@ -414,8 +427,8 @@ (X-extent-callback . ,Axis_group_interface::group_extent_callback) (X-offset-callbacks . (,Dot_column::side_position)) (meta . ((class . Item) - (interfaces . (dot-column-interface axis-group-interface )))) - )) + (interfaces . (dot-column-interface + axis-group-interface)))))) (Dots . ( @@ -423,8 +436,8 @@ (dot-count . 1) (meta . ((class . Item) (interfaces . (font-interface - staff-symbol-referencer-interface dots-interface )))) - )) + staff-symbol-referencer-interface + dots-interface)))))) (DoublePercentRepeat . ( @@ -439,35 +452,54 @@ (meta . ((class . Item) (interfaces . (font-interface break-aligned-interface - percent-repeat-interface )))) - )) - + percent-repeat-interface)))))) + + (DynamicLineSpanner + . ( + (axes . (1)) + (Y-extent-callback . ,Axis_group_interface::group_extent_callback) + (Y-offset-callbacks . (,Side_position_interface::aligned_side)) + (staff-padding . 0.1) + (padding . 0.6) + (slur-padding . 0.3) + (minimum-space . 1.2) + (direction . -1) + + (meta . ((class . Spanner) + (interfaces . (axis-group-interface + dynamic-interface + dynamic-line-spanner-interface + side-position-interface)))))) + (DynamicText . ( - (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self)) (print-function . ,Text_interface::print) + (before-line-breaking-callback . ,Script_interface::before_line_breaking) (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self)) (self-alignment-X . 0) - (no-spacing-rods . #t) - (script-priority . 100) + (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self)) + (self-alignment-Y . 0) (font-series . bold) (font-encoding . fetaDynamic) (font-shape . italic) - (self-alignment-Y . 0) + (no-spacing-rods . #t) + (script-priority . 100) (meta . ((class . Item) - (interfaces . (font-interface text-interface self-alignment-interface - dynamic-interface script-interface)))) - )) - + (interfaces . (font-interface + text-interface + self-alignment-interface + dynamic-interface + script-interface)))))) + (DynamicTextSpanner . ((print-function . ,Dynamic_text_spanner::print) - + ;; rather ugh with NCSB - ; (font-series . bold) + ;; (font-series . bold) (font-shape . italic) (style . dashed-line) - ; need to blend with dynamic texts. + ;; need to blend with dynamic texts. (font-size . 1) (bound-padding . 0.75) (dash-fraction . 0.2) @@ -475,23 +507,9 @@ (meta . ((class . Spanner) (interfaces . (font-interface text-interface - dynamic-interface dynamic-text-spanner-interface - spanner-interface)))) - )) - - (DynamicLineSpanner - . ( - (axes . (1)) - (Y-extent-callback . ,Axis_group_interface::group_extent_callback) - (Y-offset-callbacks . (,Side_position_interface::aligned_side)) - (staff-padding . 0.1) - (padding . 0.6) - (minimum-space . 1.2) - (direction . -1) - - (meta . ((class . Spanner) - (interfaces . (dynamic-interface axis-group-interface - side-position-interface)))))) + dynamic-interface + dynamic-text-spanner-interface + spanner-interface)))))) (Fingering . ( @@ -499,18 +517,22 @@ ; sync with TextScript (?) (padding . 0.5) + (slur-padding . 0.2) (staff-padding . 0.5) (self-alignment-X . 0) (self-alignment-Y . 0) (script-priority . 100) + (before-line-breaking-callback . ,Script_interface::before_line_breaking) (font-encoding . fetaNumber) (font-size . -5) ; don't overlap when next to heads. (meta . ((class . Item) (interfaces . (finger-interface - font-interface text-script-interface text-interface - side-position-interface self-alignment-interface - item-interface)))) - )) + font-interface + text-script-interface + text-interface + side-position-interface + self-alignment-interface + item-interface)))))) (Glissando . ( (style . line) @@ -518,20 +540,19 @@ (zigzag-width . 0.75) (breakable . #t) (X-extent-callback . #f) - (Y-extent-callback . #f) + (Y-extent-callback . #f) (after-line-breaking-callback . ,Line_spanner::after_line_breaking) (print-function . ,Line_spanner::print) (meta . ((class . Spanner) - (interfaces . (line-interface line-spanner-interface)))) - )) + (interfaces . (line-interface + line-spanner-interface)))))) (GridPoint . ( (X-extent . (0 . 0)) (Y-extent . (0 . 0)) (meta . ((class . Item) - (interfaces . (grid-point-interface)))) - )) + (interfaces . (grid-point-interface)))))) (GridLine . ( @@ -542,9 +563,9 @@ ,Self_alignment_interface::centered_on_parent)) (layer . 0) (meta . ((class . Item) - (interfaces . (self-alignment-interface grid-line-interface))) - ))) - + (interfaces . (self-alignment-interface + grid-line-interface)))))) + (Hairpin . ( (print-function . ,Hairpin::print) @@ -558,9 +579,10 @@ (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self)) (meta . ((class . Spanner) (interfaces . (hairpin-interface - line-interface self-alignment-interface dynamic-interface - spanner-interface)))) - )) + line-interface + self-alignment-interface + dynamic-interface + spanner-interface)))))) (HorizontalBracket . ( @@ -575,8 +597,7 @@ (interfaces . (horizontal-bracket-interface side-position-interface line-interface - spanner-interface)))) - )) + spanner-interface)))))) (InstrumentName . ( (breakable . #t) @@ -586,19 +607,19 @@ ;; (?) --hwn (direction . 0) (space-alist . ( - (left-edge . (extra-space . 1.0)) - )) + (left-edge . (extra-space . 1.0)))) (self-alignment-Y . 0) - (print-function . ,Text_interface::print) + (print-function . ,Text_interface::print) (break-align-symbol . instrument-name) (break-visibility . ,begin-of-line-visible) (baseline-skip . 2) (meta . ((class . Item) (interfaces . (font-interface - self-alignment-interface side-position-interface text-interface - break-aligned-interface )))) - )) + self-alignment-interface + side-position-interface + text-interface + break-aligned-interface)))))) (KeyCancellation . ( @@ -608,17 +629,16 @@ (staff-bar . (extra-space . 0.6)) (key-signature . (extra-space . 0.5)) (right-edge . (extra-space . 0.5)) - (first-note . (fixed-space . 2.5)) - )) + (first-note . (fixed-space . 2.5)))) (Y-offset-callbacks . (,Staff_symbol_referencer::callback)) (break-align-symbol . key-cancellation) (break-visibility . ,begin-of-line-invisible) (breakable . #t) - + (meta . ((class . Item) - (interfaces . (key-signature-interface font-interface - break-aligned-interface )))) - )) + (interfaces . (key-signature-interface + font-interface + break-aligned-interface)))))) (KeySignature . ( (print-function . ,Key_signature_interface::print) @@ -626,17 +646,16 @@ (time-signature . (extra-space . 1.25)) (staff-bar . (extra-space . 1.1)) (right-edge . (extra-space . 0.5)) - (first-note . (fixed-space . 2.5)) - )) + (first-note . (fixed-space . 2.5)))) (Y-offset-callbacks . (,Staff_symbol_referencer::callback)) (break-align-symbol . key-signature) (break-visibility . ,begin-of-line-visible) (breakable . #t) - + (meta . ((class . Item) - (interfaces . (key-signature-interface font-interface - break-aligned-interface )))) - )) + (interfaces . (key-signature-interface + font-interface + break-aligned-interface)))))) (LedgerLineSpanner . ( (print-function . ,Ledger_line_spanner::print) @@ -648,8 +667,7 @@ (print-function . ,Ledger_line_spanner::print) (layer . 0) (meta . ((class . Spanner) - (interfaces . (ledger-line-interface)))) - )) + (interfaces . (ledger-line-interface)))))) (LeftEdge . ( @@ -668,11 +686,9 @@ (right-edge . (extra-space . 0.0)) (key-signature . (extra-space . 0.0)) (key-cancellation . (extra-space . 0.0)) - )) (meta . ((class . Item) - (interfaces . (break-aligned-interface )))) - )) + (interfaces . (break-aligned-interface)))))) (LigatureBracket . ( @@ -687,8 +703,8 @@ (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking) (print-function . ,Tuplet_bracket::print) (meta . ((class . Spanner) - (interfaces . (tuplet-bracket-interface line-interface)))) - )) + (interfaces . (tuplet-bracket-interface + line-interface)))))) (LyricHyphen . ( @@ -702,9 +718,9 @@ (print-function . ,Hyphen_spanner::print) (Y-extent . (0 . 0)) (meta . ((class . Spanner) - (interfaces . (lyric-interface lyric-hyphen-interface - spanner-interface)))) - )) + (interfaces . (lyric-interface + lyric-hyphen-interface + spanner-interface)))))) (LyricExtender . ( @@ -714,8 +730,7 @@ (Y-extent . (0 . 0)) (meta . ((class . Spanner) (interfaces . (lyric-interface - lyric-extender-interface)))) - )) + lyric-extender-interface)))))) (LyricText . ((print-function . ,Text_interface::print) @@ -727,9 +742,9 @@ (meta . ((class . Item) (interfaces . (rhythmic-grob-interface lyric-syllable-interface - self-alignment-interface text-interface - font-interface )))) - )) + self-alignment-interface + text-interface + font-interface)))))) (MensuralLigature . ( @@ -738,20 +753,20 @@ (ligature-primitive-callback . ,Mensural_ligature::brew_ligature_primitive) (print-function . ,Mensural_ligature::print) (meta . ((class . Spanner) - (interfaces . (mensural-ligature-interface font-interface)))) - )) + (interfaces . (mensural-ligature-interface + font-interface)))))) (MetronomeMark . ( (print-function . ,Text_interface::print) - (Y-offset-callbacks . (,Side_position_interface::aligned_side)) + (Y-offset-callbacks . (,Side_position_interface::aligned_side)) (direction . 1) (padding . 0.8) (meta . ((class . Item) (interfaces . (text-interface - side-position-interface font-interface - metronome-mark-interface)))) - )) + side-position-interface + font-interface + metronome-mark-interface)))))) (MeasureGrouping . ( (Y-offset-callbacks . (,Side_position_interface::aligned_side)) @@ -763,8 +778,7 @@ (staff-padding . 3) (meta . ((class . Spanner) (interfaces . (side-position-interface - measure-grouping-interface)))) - )) + measure-grouping-interface)))))) (MultiMeasureRest . ( (spacing-procedure . ,Multi_measure_rest::set_spacing_rods) @@ -777,9 +791,10 @@ (padding . 1) (meta . ((class . Spanner) (interfaces . (multi-measure-rest-interface - multi-measure-interface rest-interface - font-interface staff-symbol-referencer-interface)))) - )) + multi-measure-interface + rest-interface + font-interface + staff-symbol-referencer-interface)))))) (MultiMeasureRestNumber . ( @@ -794,9 +809,10 @@ (font-encoding . fetaNumber) (meta . ((class . Spanner) (interfaces . (side-position-interface - multi-measure-interface self-alignment-interface - font-interface text-interface)))) - )) + multi-measure-interface + self-alignment-interface + font-interface + text-interface)))))) (MultiMeasureRestText . ( (print-function . ,Text_interface::print) @@ -809,27 +825,28 @@ (staff-padding . 0.25) (meta . ((class . Spanner) (interfaces . (side-position-interface - multi-measure-interface self-alignment-interface font-interface - text-interface)))) - )) + multi-measure-interface + self-alignment-interface + font-interface + text-interface)))))) (NoteCollision . ( (axes . (0 1)) (X-extent-callback . ,Axis_group_interface::group_extent_callback) - (Y-extent-callback . ,Axis_group_interface::group_extent_callback) + (Y-extent-callback . ,Axis_group_interface::group_extent_callback) (meta . ((class . Item) - (interfaces . (note-collision-interface axis-group-interface )))) - )) + (interfaces . (note-collision-interface + axis-group-interface)))))) (NoteColumn . ( (axes . (0 1)) (X-extent-callback . ,Axis_group_interface::group_extent_callback) - (Y-extent-callback . ,Axis_group_interface::group_extent_callback) + (Y-extent-callback . ,Axis_group_interface::group_extent_callback) (meta . ((class . Item) - (interfaces . (axis-group-interface note-column-interface )))) - )) + (interfaces . (axis-group-interface + note-column-interface)))))) (NoteHead . ( @@ -840,10 +857,11 @@ (stem-attachment-function . ,note-head-style->attachment-coordinates) (meta . ((class . Item) (interfaces . (rhythmic-grob-interface - rhythmic-head-interface font-interface note-head-interface + rhythmic-head-interface + font-interface + note-head-interface ledgered-interface - staff-symbol-referencer-interface )))) - )) + staff-symbol-referencer-interface)))))) (NoteSpacing . ( @@ -852,19 +870,18 @@ ;; Changed this from 0.75. ;; If you ever change this back, please document! --hwn (knee-spacing-correction . 1.0) - - (meta . ((class . Item) - (interfaces . (spacing-interface note-spacing-interface )))) - )) + (meta . ((class . Item) + (interfaces . (spacing-interface + note-spacing-interface)))))) (NoteName . ( (print-function . ,Text_interface::print) (meta . ((class . Item) (interfaces . (note-name-interface - text-interface font-interface )))) - )) + text-interface + font-interface)))))) (OctavateEight . ( @@ -881,9 +898,10 @@ (staff-padding . 0.2) (font-size . -4) (meta . ((class . Item) - (interfaces . (text-interface self-alignment-interface - side-position-interface font-interface )))) - )) + (interfaces . (text-interface + self-alignment-interface + side-position-interface + font-interface)))))) (OttavaBracket . ( @@ -899,9 +917,10 @@ (direction . 1) (meta . ((class . Spanner) (interfaces . (ottava-bracket-interface - line-interface side-position-interface - font-interface text-interface)))) - )) + line-interface + side-position-interface + font-interface + text-interface)))))) (PaperColumn . ( @@ -912,22 +931,22 @@ ;; debugging ;; (print-function . ,Paper_column::print) (font-size . -6) (font-name . "sans") (Y-extent-callback . #f) (meta . ((class . Paper_column) - (interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface )))) - )) + (interfaces . (paper-column-interface + axis-group-interface + spaceable-grob-interface)))))) (PhrasingSlur . ((slur-details . ,default-slur-details) (print-function . ,Slur::print) - (thickness . 1.1) - (spacing-procedure . ,Spanner::set_spacing_rods) + (thickness . 1.1) + (spacing-procedure . ,Spanner::set_spacing_rods) (minimum-length . 1.5) (after-line-breaking-callback . ,Slur::after_line_breaking) (Y-extent-callback . ,Slur::height) (height-limit . 2.0) (ratio . 0.333) (meta . ((class . Spanner) - (interfaces . (slur-interface)))) - )) + (interfaces . (slur-interface)))))) (NonMusicalPaperColumn . ( @@ -935,14 +954,14 @@ (X-extent-callback . ,Axis_group_interface::group_extent_callback) (before-line-breaking-callback . ,Paper_column::before_line_breaking) (breakable . #t) - + ;; debugging stuff: print column number. ;; (print-function . ,Paper_column::print) (font-size . -6) (font-name . "sans") (Y-extent-callback . #f) - (meta . ((class . Paper_column) - (interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface )))) - )) + (interfaces . (paper-column-interface + axis-group-interface + spaceable-grob-interface)))))) (PercentRepeat . ( @@ -953,8 +972,8 @@ (font-encoding . fetaMusic) (meta . ((class . Spanner) (interfaces . (multi-measure-rest-interface - font-interface percent-repeat-interface)))) - )) + font-interface + percent-repeat-interface)))))) ;; an example of a text spanner (PianoPedalBracket @@ -969,8 +988,8 @@ (thickness . 1.0) (meta . ((class . Spanner) (interfaces . (line-interface - piano-pedal-interface piano-pedal-bracket-interface)))) - )) + piano-pedal-interface + piano-pedal-bracket-interface)))))) (RehearsalMark . ( @@ -987,10 +1006,10 @@ (padding . 0.8) (meta . ((class . Item) (interfaces . (text-interface - side-position-interface font-interface mark-interface - self-alignment-interface )))) - )) - + side-position-interface + font-interface + mark-interface + self-alignment-interface)))))) (RemoveEmptyVerticalGroup . ( @@ -999,9 +1018,9 @@ (axes . (1)) (meta . ((class . Spanner) (interfaces . (axis-group-interface - vertically-spaceable-interface hara-kiri-group-interface - spanner-interface)))) - )) + vertically-spaceable-interface + hara-kiri-group-interface + spanner-interface)))))) (RepeatSlash . ( @@ -1009,32 +1028,28 @@ (thickness . 0.48) (slope . 1.7) (meta . ((class . Item) - (interfaces . (percent-repeat-interface )))) - )) + (interfaces . (percent-repeat-interface)))))) (Rest . ( (after-line-breaking-callback . ,Rest::after_line_breaking) (X-extent-callback . ,Rest::extent_callback) - (Y-extent-callback . ,Rest::extent_callback) + (Y-extent-callback . ,Rest::extent_callback) (print-function . ,Rest::print) (Y-offset-callbacks . (,Staff_symbol_referencer::callback - ,Rest::polyphonic_offset_callback - )) + ,Rest::polyphonic_offset_callback)) (minimum-distance . 0.25) (meta . ((class . Item) (interfaces . (font-interface rhythmic-head-interface rhythmic-grob-interface staff-symbol-referencer-interface - rest-interface )) - )))) + rest-interface)))))) (RestCollision . ( (minimum-distance . 0.75) (meta . ((class . Item) - (interfaces . (rest-collision-interface )))) - )) + (interfaces . (rest-collision-interface)))))) (Script . ( @@ -1045,43 +1060,43 @@ ;; space a away. (padding . 0.20) (staff-padding . 0.25) + (slur-padding . 0.5) ;; (script-priority . 0) priorities for scripts, see script.scm (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent)) (before-line-breaking-callback . ,Script_interface::before_line_breaking) (font-encoding . fetaMusic) (meta . ((class . Item) (interfaces . (script-interface - side-position-interface font-interface )))) - )) + side-position-interface + font-interface)))))) (ScriptColumn . ( (before-line-breaking-callback . ,Script_column::before_line_breaking) (meta . ((class . Item) - (interfaces . (script-column-interface )))) - )) - + (interfaces . (script-column-interface)))))) (SeparationItem . ( (X-extent-callback . #f) (Y-extent-callback . #f) (meta . ((class . Item) - (interfaces . (spacing-interface separation-item-interface )))) - )) + (interfaces . (spacing-interface + separation-item-interface)))))) (SeparatingGroupSpanner . ( (spacing-procedure . ,Separating_group_spanner::set_spacing_rods) (meta . ((class . Spanner) - (interfaces . (only-prebreak-interface spacing-interface separation-spanner-interface)))) - )) - + (interfaces . (only-prebreak-interface + spacing-interface + separation-spanner-interface)))))) + (Slur . ((slur-details . ,default-slur-details) (print-function . ,Slur::print) - (thickness . 1.0) - (spacing-procedure . ,Spanner::set_spacing_rods) + (thickness . 1.0) + (spacing-procedure . ,Spanner::set_spacing_rods) (minimum-length . 1.5) (after-line-breaking-callback . ,Slur::after_line_breaking) (Y-extent-callback . ,Slur::height) @@ -1089,8 +1104,7 @@ (height-limit . 2.0) (ratio . 0.25) (meta . ((class . Spanner) - (interfaces . (slur-interface)))) - )) + (interfaces . (slur-interface)))))) (SpacingSpanner . ( @@ -1100,8 +1114,8 @@ (spacing-increment . 1.2) (base-shortest-duration . ,(ly:make-moment 3 16)) (meta . ((class . Spanner) - (interfaces . (spacing-interface spacing-spanner-interface)))) - )) + (interfaces . (spacing-interface + spacing-spanner-interface)))))) (SpanBar . ( @@ -1123,20 +1137,21 @@ (hair-thickness . 1.6) (thick-thickness . 6.0) (meta . ((class . Item) - (interfaces . (span-bar-interface font-interface - bar-line-interface )))) - )) + (interfaces . (span-bar-interface + font-interface + bar-line-interface)))))) (StanzaNumber - . ((print-function . ,Text_interface::print) + . ((print-function . ,Text_interface::print) (font-series . bold) (padding . 1.0) (X-offset-callbacks . (,Side_position_interface::aligned_side)) (direction . ,LEFT) (meta . ((class . Item) (interfaces . (side-position-interface - stanza-number-interface text-interface font-interface )))) - )) + stanza-number-interface + text-interface + font-interface)))))) (StringNumber . ( @@ -1150,10 +1165,12 @@ (font-size . -5) ; don't overlap when next to heads. (meta . ((class . Item) (interfaces . (string-number-interface - font-interface text-script-interface text-interface - side-position-interface self-alignment-interface - item-interface)))) - )) + font-interface + text-script-interface + text-interface + side-position-interface + self-alignment-interface + item-interface)))))) (StaffSpacing . ( @@ -1161,8 +1178,8 @@ (stem-spacing-correction . 0.4) (meta . ((class . Item) - (interfaces . (spacing-interface staff-spacing-interface )))) - )) + (interfaces . (spacing-interface + staff-spacing-interface)))))) (SostenutoPedal . ( @@ -1175,23 +1192,22 @@ (self-alignment-X . 0) (meta . ((class . Item) (interfaces . (text-interface - self-alignment-interface font-interface)))) - )) + self-alignment-interface + font-interface)))))) (SostenutoPedalLineSpanner . ( (axes . (1)) - (Y-extent-callback . ,Axis_group_interface::group_extent_callback) + (Y-extent-callback . ,Axis_group_interface::group_extent_callback) (Y-offset-callbacks . (,Side_position_interface::aligned_side)) - (padding . 1.2) (minimum-space . 1.0) (direction . -1) (meta . ((class . Spanner) (interfaces . (piano-pedal-interface - axis-group-interface side-position-interface)))) - )) + axis-group-interface + side-position-interface)))))) (StaffSymbol . ( @@ -1200,9 +1216,8 @@ (ledger-line-thickness . (1.0 . 0.1)) (layer . 0) (meta . ((class . Spanner) - (interfaces . (staff-symbol-interface)))) - )) - + (interfaces . (staff-symbol-interface)))))) + (Stem . ( ;; this list is rather long. Trim --hwn @@ -1213,7 +1228,7 @@ ;; 3.5 (or 3 measured from note head) is standard length ;; 32nd, 64th flagged stems should be longer (lengths . (3.5 3.5 3.5 4.5 5.0)) - + ;; Stems in unnatural (forced) direction should be shortened by ;; one staff space, according to [Roush & Gourlay]. ;; Flagged stems we shorten only half a staff space. @@ -1222,8 +1237,6 @@ ;; default stem direction for note on middle line (neutral-direction . -1) - - ;; FIXME. 3.5 yields too long beams (according to Ross and ;; looking at Baerenreiter examples) for a number of common ;; boundary cases. Subtracting half a beam thickness fixes @@ -1232,24 +1245,24 @@ ;; FIXME this should come from 'lengths (beamed-lengths . (3.26 3.5 3.6)) - + ;; We use the normal minima as minimum for the ideal lengths, ;; and the extreme minima as abolute minimum length. - + ;; The 'normal' minima (beamed-minimum-free-lengths . (1.83 1.5 1.25)) ;(beamed-minimum-free-lengths . (2.0 1.83 1.25)) - + ;; The 'extreme case' minima (beamed-extreme-minimum-free-lengths . (2.0 1.25)) (X-offset-callbacks . (,Stem::offset_callback)) - (X-extent-callback . ,Stem::width_callback) + (X-extent-callback . ,Stem::width_callback) (Y-extent-callback . ,Stem::height) (Y-offset-callbacks . (,Staff_symbol_referencer::callback)) (meta . ((class . Item) - (interfaces . (stem-interface font-interface )))) - )) + (interfaces . (stem-interface + font-interface)))))) (StemTremolo . ( @@ -1260,8 +1273,7 @@ (beam-width . 1.6) ; staff-space (beam-thickness . 0.48) ; staff-space (meta . ((class . Item) - (interfaces . (stem-tremolo-interface )))) - )) + (interfaces . (stem-tremolo-interface)))))) (SustainPedal . ( @@ -1273,33 +1285,34 @@ (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self)) (meta . ((class . Item) (interfaces . (piano-pedal-interface - text-spanner-interface text-interface self-alignment-interface - font-interface)))) - )) + text-spanner-interface + text-interface + self-alignment-interface + font-interface)))))) (SustainPedalLineSpanner . ( (axes . (1)) (Y-extent-callback . ,Axis_group_interface::group_extent_callback) (Y-offset-callbacks . (,Side_position_interface::aligned_side)) - + (padding . 1.2) (staff-padding . 1.2) (minimum-space . 1.0) (direction . -1) (meta . ((class . Spanner) (interfaces . (piano-pedal-interface - axis-group-interface side-position-interface)))) - )) + axis-group-interface + side-position-interface)))))) (System . ( (axes . (0 1)) (X-extent-callback . ,Axis_group_interface::group_extent_callback) - (Y-extent-callback . ,Axis_group_interface::group_extent_callback) + (Y-extent-callback . ,Axis_group_interface::group_extent_callback) (meta . ((class . System) - (interfaces . (system-interface axis-group-interface)))) - )) + (interfaces . (system-interface + axis-group-interface)))))) (SystemStartBrace . ( @@ -1309,8 +1322,8 @@ (font-encoding . fetaBraces) (Y-extent-callback . #f) (meta . ((class . Spanner) - (interfaces . (system-start-delimiter-interface font-interface)))) - )) + (interfaces . (system-start-delimiter-interface + font-interface)))))) (SystemStartBracket . ( @@ -1321,9 +1334,8 @@ (collapse-height . 1) (thickness . 0.45) (meta . ((class . Spanner) - (interfaces . (font-interface system-start-delimiter-interface - )))) - )) + (interfaces . (font-interface + system-start-delimiter-interface)))))) (SystemStartBar . ( @@ -1333,9 +1345,7 @@ (thickness . 1.6) (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking) (meta . ((class . Spanner) - (interfaces . (system-start-delimiter-interface)))) - )) - + (interfaces . (system-start-delimiter-interface)))))) (TabNoteHead . ( @@ -1347,11 +1357,10 @@ (meta . ((class . Item) (interfaces . (rhythmic-head-interface - font-interface - note-head-interface staff-symbol-referencer-interface - text-interface )))) - )) - + font-interface + note-head-interface + staff-symbol-referencer-interface + text-interface)))))) (TextScript . ( @@ -1360,17 +1369,19 @@ (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self)) (direction . -1) - ; sync with Fingering ? + ;; sync with Fingering ? (padding . 0.5) (staff-padding . 0.5) + (before-line-breaking-callback . ,Script_interface::before_line_breaking) + (slur-padding . 0.5) (script-priority . 200) ;; todo: add X self alignment? (meta . ((class . Item) (interfaces . (text-script-interface - text-interface side-position-interface font-interface - )))) - )) - + text-interface + side-position-interface + font-interface)))))) + (TextSpanner . ( (print-function . ,Text_spanner::print) @@ -1382,10 +1393,9 @@ (direction . 1) (meta . ((class . Spanner) (interfaces . (text-spanner-interface - side-position-interface font-interface)))) - )) + side-position-interface + font-interface)))))) - (Tie . ( (print-function . ,Tie::print) @@ -1397,18 +1407,16 @@ (y-offset . 0.6) (minimum-length . 2.5) (meta . ((class . Spanner) - (interfaces . (tie-interface)))) - )) + (interfaces . (tie-interface)))))) (TieColumn . ( (after-line-breaking-callback . ,Tie_column::after_line_breaking) (before-line-breaking-callback . ,Tie_column::before_line_breaking) (X-extent-callback . #f) - (Y-extent-callback . #f) + (Y-extent-callback . #f) (meta . ((class . Spanner) - (interfaces . (tie-column-interface)))) - )) + (interfaces . (tie-column-interface)))))) (TimeSignature . ( @@ -1418,14 +1426,13 @@ (space-alist . ( (first-note . (fixed-space . 2.0)) (right-edge . (extra-space . 0.5)) - (staff-bar . (minimum-space . 2.0)) - )) + (staff-bar . (minimum-space . 2.0)))) (breakable . #t) (style . C) (meta . ((class . Item) - (interfaces . (time-signature-interface break-aligned-interface font-interface )))) - )) - + (interfaces . (time-signature-interface + break-aligned-interface + font-interface)))))) (TrillSpanner . ( @@ -1438,9 +1445,10 @@ (direction . 1) (Y-offset-callbacks . (,Side_position_interface::aligned_side)) (meta . ((class . Spanner) - (interfaces . (text-spanner-interface side-position-interface font-interface)))) - )) - + (interfaces . (text-spanner-interface + side-position-interface + font-interface)))))) + (TrillPitchAccidental . ((X-offset-callbacks . (,Side_position_interface::aligned_side)) (padding . 0.2) @@ -1450,8 +1458,8 @@ (meta . ((class . Item) (interfaces . (item-interface accidental-interface - side-position-interface font-interface)))) - )) + side-position-interface + font-interface)))))) (TrillPitchGroup . ((X-offset-callbacks . (,Side_position_interface::aligned_side)) @@ -1462,10 +1470,11 @@ (padding . 0.3) (meta . ((class . Item) (interfaces . (side-position-interface - note-head-interface rhythmic-head-interface - font-interface accidental-interface - axis-group-interface)))) - )) + note-head-interface + rhythmic-head-interface + font-interface + accidental-interface + axis-group-interface)))))) (TrillPitchHead . ((print-function . ,Note_head::print) @@ -1475,10 +1484,11 @@ (meta . ((class . Item) (interfaces . (item-interface rhythmic-head-interface - font-interface pitched-trill-interface - ledgered-interface staff-symbol-referencer-interface)))) - )) - + font-interface + pitched-trill-interface + ledgered-interface + staff-symbol-referencer-interface)))))) + (TupletBracket . ( (padding . 1.1) @@ -1492,10 +1502,10 @@ (font-size . -2) (meta . ((class . Spanner) - (interfaces . (text-interface line-interface - tuplet-bracket-interface - font-interface)))) - )) + (interfaces . (text-interface + line-interface + tuplet-bracket-interface + font-interface)))))) (UnaCordaPedal . ( @@ -1507,21 +1517,23 @@ (padding . 0.0) ;; padding relative to UnaCordaPedalLineSpanner (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self)) (meta . ((class . Item) - (interfaces . (text-interface self-alignment-interface font-interface )))) - )) + (interfaces . (text-interface + self-alignment-interface + font-interface)))))) (UnaCordaPedalLineSpanner . ( (axes . (1)) - (Y-extent-callback . ,Axis_group_interface::group_extent_callback) + (Y-extent-callback . ,Axis_group_interface::group_extent_callback) (Y-offset-callbacks . (,Side_position_interface::aligned_side)) (padding . 1.2) (staff-padding . 1.2) (minimum-space . 1.0) (direction . -1) (meta . ((class . Spanner) - (interfaces . (piano-pedal-interface axis-group-interface side-position-interface)))) - )) + (interfaces . (piano-pedal-interface + axis-group-interface + side-position-interface)))))) (VaticanaLigature . ( @@ -1530,9 +1542,8 @@ (ligature-primitive-callback . ,Vaticana_ligature::brew_ligature_primitive) (print-function . ,Vaticana_ligature::print) (meta . ((class . Spanner) - (interfaces . (vaticana-ligature-interface font-interface)))) - )) - + (interfaces . (vaticana-ligature-interface + font-interface)))))) (VerticalAlignment . ( @@ -1541,38 +1552,36 @@ (X-extent-callback . ,Axis_group_interface::group_extent_callback) (stacking-dir . -1) (meta . ((class . Spanner) - (interfaces . (align-interface axis-group-interface)))) - )) + (interfaces . (align-interface + axis-group-interface)))))) (VerticalAxisGroup . ( (axes . (1)) - (Y-extent-callback . ,Axis_group_interface::group_extent_callback) + (Y-extent-callback . ,Axis_group_interface::group_extent_callback) (X-extent-callback . ,Axis_group_interface::group_extent_callback) - + (meta . ((class . Spanner) (interfaces . (axis-group-interface - vertically-spaceable-interface)))) - )) + vertically-spaceable-interface)))))) (VocalName . ( (breakable . #t) (Y-offset-callbacks . (,Side_position_interface::aligned_on_support_refpoints)) (direction . 0) - (space-alist . ((left-edge . (extra-space . 1.0)) - )) + (space-alist . ((left-edge . (extra-space . 1.0)))) (break-align-symbol . instrument-name) - (print-function . ,Text_interface::print) + (print-function . ,Text_interface::print) (break-align-symbol . clef) (break-visibility . ,begin-of-line-visible) (baseline-skip . 2) (meta . ((class . Item) (interfaces . (font-interface self-alignment-interface - side-position-interface text-interface - break-aligned-interface)))) - )) + side-position-interface + text-interface + break-aligned-interface)))))) (VoltaBracket . ( @@ -1587,10 +1596,10 @@ (font-size . -4) (meta . ((class . Spanner) (interfaces . (volta-bracket-interface - line-interface text-interface - side-position-interface font-interface)))) - )) - + line-interface + text-interface + side-position-interface + font-interface)))))) (VoiceFollower . ( @@ -1598,26 +1607,24 @@ (gap . 0.5) (breakable . #t) (X-extent-callback . #f) - (Y-extent-callback . #f) + (Y-extent-callback . #f) (print-function . ,Line_spanner::print) (after-line-breaking-callback . ,Line_spanner::after_line_breaking) (meta . ((class . Spanner) - (interfaces . (line-spanner-interface line-interface)))) - )) - )) + (interfaces . (line-spanner-interface + line-interface)))))))) (define (completize-grob-entry x) - "transplant assoc key into 'name entry of 'meta of X. Set interfaces for Item, Spanner etc. + "Transplant assoc key into 'name entry of 'meta of X. Set interfaces for Item, Spanner etc. " -;; (display (car x)) -;; (newline) + ;; (display (car x)) + ;; (newline) (let* ((name-sym (car x)) (grob-entry (cdr x)) (meta-entry (cdr (assoc 'meta grob-entry))) (class (cdr (assoc 'class meta-entry))) (ifaces-entry - (cdr (assoc 'interfaces meta-entry))) - ) + (cdr (assoc 'interfaces meta-entry)))) (cond ((eq? 'Item class) @@ -1632,10 +1639,8 @@ (cons 'spanner-interface ifaces-entry)))) (else (ly:warning "Unknown class ~a" class))) - - (set! ifaces-entry (cons 'grob-interface ifaces-entry)) - + (set! meta-entry (assoc-set! meta-entry 'name name-sym)) (set! meta-entry (assoc-set! meta-entry 'interfaces ifaces-entry)) @@ -1644,7 +1649,6 @@ (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions)) - ;; (display (map pair? all-grob-descriptions)) ;; make sure that \property Foo.Bar =\turnOff doesn't complain @@ -1658,4 +1662,3 @@ (set! all-grob-descriptions (sort all-grob-descriptions alist