From 867530093ed5374d6e28d2c11a933f3b991c226e Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Mon, 30 Oct 2000 20:16:17 +0100 Subject: [PATCH] release: 1.3.101 ======= * Custodes (patch by Juergen Reuter), mods by hwn. * Font initialisation and markup translation fixes. (99.jcn2) * Remove staffspace calls. Removed markScriptPadding. Fixes some problems with tuplet, brace and volta spanners. * make Font_interface::font_alist_chain (), and use default font settings. Fixes too large time sigs. 1.3. --- AUTHORS.txt | 2 + CHANGES | 22 +- DEDICATION | 10 +- Documentation/topdocs/AUTHORS.texi | 3 +- Documentation/topdocs/index.tely | 11 +- NEWS | 4 +- VERSION | 4 +- input/scarlatti-paper.ly | 12 +- input/test/custos.ly | 7 + input/trip.ly | 2 +- lily/align-interface.cc | 2 +- lily/align-note-column-engraver.cc | 2 +- lily/all-font-metrics.cc | 4 +- lily/bar-engraver.cc | 8 +- lily/beam.cc | 18 +- lily/break-align-item.cc | 2 - lily/chord-name.cc | 2 +- lily/clef-engraver.cc | 45 +-- lily/collision.cc | 3 +- lily/crescendo.cc | 4 +- lily/cross-staff.cc | 2 +- lily/custos-engraver.cc | 147 ++++++++++ lily/custos.cc | 180 ++++++++++++ lily/font-interface.cc | 23 +- lily/font-metric.cc | 3 +- lily/hyphen-spanner.cc | 7 +- lily/include/custos.hh | 21 ++ lily/include/font-interface.hh | 1 + lily/line-of-score.cc | 6 +- lily/lyric-engraver.cc | 2 +- lily/lyric-extender.cc | 4 +- lily/mark-engraver.cc | 13 - lily/multi-measure-rest.cc | 11 +- lily/rest-collision.cc | 2 +- lily/score-element.cc | 11 +- lily/script.cc | 2 +- lily/slur.cc | 4 +- lily/spacing-spanner.cc | 4 +- lily/staff-symbol-referencer.cc | 7 +- lily/staff-symbol.cc | 2 +- lily/syllable-group.cc | 2 +- lily/system-start-delimiter-engraver.cc | 2 +- lily/system-start-delimiter.cc | 16 +- lily/text-spanner.cc | 5 +- lily/tie.cc | 2 +- lily/time-signature.cc | 6 +- lily/translator-group.cc | 3 + lily/tuplet-spanner.cc | 16 +- lily/volta-spanner.cc | 9 +- ly/engraver.ly | 3 +- make/out/lilypond.lsm | 6 +- make/out/lilypond.spec | 4 +- make/toplevel.make.in | 2 +- mf/feta-custodes.mf | 273 +++++++++++++++++++ mf/feta-generic.mf | 1 + mutopia/E.Satie/petite-ouverture-a-danser.ly | 2 +- scm/basic-properties.scm | 3 + scm/element-descriptions.scm | 36 ++- scm/font.scm | 14 +- scm/interface.scm | 38 ++- 60 files changed, 874 insertions(+), 188 deletions(-) create mode 100644 input/test/custos.ly create mode 100644 lily/custos-engraver.cc create mode 100644 lily/custos.cc create mode 100644 lily/include/custos.hh create mode 100644 mf/feta-custodes.mf diff --git a/AUTHORS.txt b/AUTHORS.txt index a0c085fed6..7890866810 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -69,6 +69,8 @@ list is alphabetically ordered. * Roy R. Rankin , major extension, fixes to abc2ly, lilypond bug fixes + * Juergen Reuter Custos support. + * Jeffrey B. Reed , Windows-NT support. * Shay Rojanski Some mudela source. diff --git a/CHANGES b/CHANGES index 6dbcffe5f0..0c45c08fa7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,10 +1,19 @@ -1.3.99.jcn2 -=========== -* Font initialisation and markup translation fixes. +1.3.101 +======= -1.3.99.hwn2 -=========== +* Custodes (patch by Juergen Reuter), mods by hwn. + +* Font initialisation and markup translation fixes. (99.jcn2) + +* Remove staffspace calls. Removed markScriptPadding. Fixes some +problems with tuplet, brace and volta spanners. + +* make Font_interface::font_alist_chain (), and use default font +settings. Fixes too large time sigs. + +1.3.100 +======= * Tweaks of .scm font-selection. @@ -19,9 +28,6 @@ outputscale. Prepare to deprecate staffspace internally. Rewrote * Made several font size and initialisation fixes. -1.3.98.jcn2 -=========== - * Renamed all occurrences of font-size to font-relative-size * Renamed all occurrences of font-point to font-point-size diff --git a/DEDICATION b/DEDICATION index f6647fe0f1..d889d1fa0c 100644 --- a/DEDICATION +++ b/DEDICATION @@ -5,9 +5,10 @@ met through music. - Those deserving special mentioning (in no particular order): Esther, -Marijke, Heike, Inge, Judith, Hannah, Auke, Ilse, Evelyn, Maartje, Suzanne, -Ilse (gee, again?), Irene and last (but certainly not least) Janneke! + Those deserving special mentioning (in no particular order): +Esther, Marijke, Heike, Inge, Judith, Hannah, Auke, Ilse, Evelyn, +Maartje, Suzanne, Ilse (gee, again?), Marieke, Irene and last (but +certainly not least) Janneke! HWN @@ -20,7 +21,6 @@ Eva, Roos, Judith, Tim, and, of course, Wendy! Of course, our other friends in the `Eindhovens Jongeren Ensemble' -cannot go unmentioned either. - +(http://www.dse.nl/eje/ ) cannot go unmentioned either. --- * --- diff --git a/Documentation/topdocs/AUTHORS.texi b/Documentation/topdocs/AUTHORS.texi index 32b03ca22a..c1fa015491 100644 --- a/Documentation/topdocs/AUTHORS.texi +++ b/Documentation/topdocs/AUTHORS.texi @@ -68,9 +68,10 @@ list is alphabetically ordered. minor bug fixes, lyric-phrasing. @item @email{Roy.Rankin@@alcatel.com.au, Roy R. Rankin}, major extension, fixes to abc2ly, lilypond bug fixes +@item @email{reuterj@@ira.uka.de, Juergen Reuter} + Custos support. @item @email{daboys@@austin.rr.com, Jeffrey B. Reed}, Windows-NT support. - @item Shay Rojanski Some mudela source. @item @email{august@@infran.ru, August S.Sigov} diff --git a/Documentation/topdocs/index.tely b/Documentation/topdocs/index.tely index 548e23c16f..41261c7836 100644 --- a/Documentation/topdocs/index.tely +++ b/Documentation/topdocs/index.tely @@ -81,10 +81,10 @@ Sankey}, harpsichordist to the internet, is typesetting the complete @uref{http://www.geocities.com/Vienna/Studio/1714/scarlattidwn.html,sonatas by Scarlatti}. Jeff Covey, guitar player and overall nice guy, is putting @uref{http://www4.smart.net/~jcovey/scores/,guitar music} on the -net. The @uref{http://sca.uwaterloo.ca/Mutopia/,Mutopia project} is a -large archive of public domain sheet music under construction. Dirk -Lattermann also put some works -@uref{http://www.alqualonde.de/lilypond.html,on the web}. +net. The @uref{http://sca.uwaterloo.ca/Mutopia/,Mutopia project} is an +archive of public domain sheet music under construction. Dirk Lattermann +also put some works @uref{http://www.alqualonde.de/lilypond.html,on the +web}. @html @@ -133,7 +133,8 @@ Testing} @unnumberedsec Mailing lists If you have questions, do write to the mailing lists! - (But don't forget to read the @uref{Documentation/out-www/faq.html, + (But don't forget to read the +@uref{http://appel.dyndns.org/wiki?LilyPondFaqs, Frequently Asked Questions} first.) diff --git a/NEWS b/NEWS index f83626e69a..2f2f4347ae 100644 --- a/NEWS +++ b/NEWS @@ -15,9 +15,9 @@ internals: LilyPond is smaller, cleaner, more flexible, etc. - Improved robustness: Lily almost never crashes. -* Rewritten font selection, Latex-NFSS like +* New font selection scheme similar to Latex-NFSS. -* Piano pedal support, Arpeggios +* Piano pedal support, Arpeggios, Custodes * MIDI: dynamics, tempo changes diff --git a/VERSION b/VERSION index d21cd4af30..f45f6ae029 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 -PATCH_LEVEL=100 -MY_PATCH_LEVEL=jcn1 +PATCH_LEVEL=101 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/input/scarlatti-paper.ly b/input/scarlatti-paper.ly index 983c51bfdb..1675adfd8c 100644 --- a/input/scarlatti-paper.ly +++ b/input/scarlatti-paper.ly @@ -1,7 +1,12 @@ \paper{ %my standard paper block - 0=\font "feta19" - -1=\font "feta16" + + % figure out a way to do this cleanly. + +% 0=\font "feta19" +% -1=\font "feta16" +% \stylesheet #(make-style-sheet 'paper19) + arithmetic_multiplier=7.\pt; indent=0.; linewidth=188.\mm; @@ -15,7 +20,8 @@ minVerticalAlign=8.4; } \translator{\StaffContext - timeSignatureStyle="C";} + TimeSignature \push #'style = #"C" + } \translator{\VoiceContext noStemExtend = ##t tupletVisibility = ##f diff --git a/input/test/custos.ly b/input/test/custos.ly new file mode 100644 index 0000000000..0bb2995c0d --- /dev/null +++ b/input/test/custos.ly @@ -0,0 +1,7 @@ + +\score { \notes { c'1 \break < d'1 f' a'> } +\paper {\translator { \StaffContext +\consists Custos_engraver; +}} + +} diff --git a/input/trip.ly b/input/trip.ly index a8062f7e62..f5503fd7c9 100644 --- a/input/trip.ly +++ b/input/trip.ly @@ -178,7 +178,7 @@ fugaIIPedal = \notes \relative c { \property Score.midiInstrument = "church organ" \praeludiumRight - r1 \mark "B"; + \times 4/3 { c4 c4 c4 } \mark "B"; \fugaIIRight } \context Staff = bass { \property Staff.instrument = #"left" diff --git a/lily/align-interface.cc b/lily/align-interface.cc index c05787c168..7f31bb0314 100644 --- a/lily/align-interface.cc +++ b/lily/align-interface.cc @@ -88,7 +88,7 @@ Align_interface::do_side_processing (Score_element * me, Axis a) SCM thr = me->get_elt_property ("threshold"); if (gh_pair_p (thr)) { - Real ss = me->paper_l ()-> get_var ("staffspace"); + Real ss = 1.0; threshold[SMALLER] = ss *gh_scm2double (gh_car (thr)); threshold[BIGGER] = ss * gh_scm2double (gh_cdr (thr)); } diff --git a/lily/align-note-column-engraver.cc b/lily/align-note-column-engraver.cc index 431e013fad..426ec31c9b 100644 --- a/lily/align-note-column-engraver.cc +++ b/lily/align-note-column-engraver.cc @@ -104,7 +104,7 @@ Align_note_column_engraver::process_acknowledged () ugh. */ Real extra_space = gh_scm2double(grsp); - SCM e = gh_cons (gh_double2scm (-extra_space * paper_l ()->get_var ("staffspace")), + SCM e = gh_cons (gh_double2scm (-extra_space), gh_double2scm (0.0)); now_column_l_->set_elt_property ("extra-space", e); } diff --git a/lily/all-font-metrics.cc b/lily/all-font-metrics.cc index 2d3f73140e..3a8b325a68 100644 --- a/lily/all-font-metrics.cc +++ b/lily/all-font-metrics.cc @@ -43,7 +43,7 @@ All_font_metrics::find_afm (String name) { SCM sname = ly_symbol2scm (name.ch_C ()); - SCM name_str = gh_str02scm (name.ch_C ()); + SCM name_str = ly_str02scm (name.ch_C ()); SCM val; @@ -86,7 +86,7 @@ Tex_font_metric * All_font_metrics::find_tfm (String name) { SCM sname = ly_symbol2scm (name.ch_C ()); - SCM name_str = gh_str02scm (name.ch_C ()); + SCM name_str = ly_str02scm (name.ch_C ()); SCM val; if (!tfm_p_dict_->try_retrieve (sname, &val)) diff --git a/lily/bar-engraver.cc b/lily/bar-engraver.cc index e5eafb06e3..9240449235 100644 --- a/lily/bar-engraver.cc +++ b/lily/bar-engraver.cc @@ -18,8 +18,14 @@ #include "item.hh" #include "engraver.hh" -/** +/* generate bars. Either user ("|:"), or default (new measure) + + TODO + + - document this + + - document how barlines and line breaks interact. */ class Bar_engraver : public Engraver { diff --git a/lily/beam.cc b/lily/beam.cc index 9bbb4f794c..776ea32631 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -396,10 +396,9 @@ Beam::suspect_slope_b (Score_element*me, Real y, Real dy) /* steep slope running against lengthened stem is suspect */ - Real ss = me->paper_l ()->get_var ("staffspace"); Real first_ideal = Stem::calc_stem_info (first_visible_stem (me)).idealy_f_; Real last_ideal = Stem::calc_stem_info (last_visible_stem (me)).idealy_f_; - Real lengthened = gh_scm2double (me->get_elt_property ("outer-stem-length-limit")) * ss; + Real lengthened = gh_scm2double (me->get_elt_property ("outer-stem-length-limit")); Real steep = gh_scm2double (me->get_elt_property ("slope-limit")); // ugh -> use commonx @@ -443,13 +442,11 @@ Beam::calc_stem_y_f (Score_element*me,Item* s, Real y, Real dy) int beam_multiplicity = get_multiplicity (me); int stem_multiplicity = (Stem::flag_i (s) - 2) >? 0; - Real staffspace = me->paper_l ()->get_var ("staffspace"); - SCM space_proc = me->get_elt_property ("space-function"); SCM space = gh_call1 (space_proc, gh_int2scm (beam_multiplicity)); - Real thick = gh_scm2double (me->get_elt_property ("thickness")) *staffspace; - Real interbeam_f = gh_scm2double (space) * staffspace; + Real thick = gh_scm2double (me->get_elt_property ("thickness")) ; + Real interbeam_f = gh_scm2double (space) ; // ugh -> use commonx Real x0 = first_visible_stem (me)->relative_coordinate (0, X_AXIS); @@ -553,7 +550,7 @@ Beam::quantise_dy_f (Score_element*me,Real dy) SCM proc = me->get_elt_property ("height-quants"); SCM quants = gh_call2 (proc, me->self_scm (), gh_double2scm (me->paper_l ()->get_var ("stafflinethickness") - / me->paper_l ()->get_var ("staffspace"))); + / 1.0)); for (SCM s = quants; gh_pair_p (s); s = gh_cdr (s)) @@ -651,13 +648,12 @@ Beam::stem_beams (Score_element*me,Item *here, Item *next, Item *prev) Real staffline_f = me->paper_l ()->get_var ("stafflinethickness"); int multiplicity = get_multiplicity (me); - Real staffspace =me->paper_l ()->get_var ("staffspace"); SCM space_proc = me->get_elt_property ("space-function"); SCM space = gh_call1 (space_proc, gh_int2scm (multiplicity)); - Real thick = gh_scm2double (me->get_elt_property ("thickness")) *staffspace; - Real interbeam_f = gh_scm2double (space) * staffspace; + Real thick = gh_scm2double (me->get_elt_property ("thickness")) ; + Real interbeam_f = gh_scm2double (space) ; Real bdy = interbeam_f; Real stemdx = staffline_f; @@ -680,7 +676,7 @@ Beam::stem_beams (Score_element*me,Item *here, Item *next, Item *prev) SCM proc = me->get_elt_property ("flag-width-function"); SCM result = gh_call1 (proc, gh_int2scm (t)); - nw_f = gh_scm2double (result) * staffspace; + nw_f = gh_scm2double (result); } diff --git a/lily/break-align-item.cc b/lily/break-align-item.cc index 5eed84b17c..6a9e6eca09 100644 --- a/lily/break-align-item.cc +++ b/lily/break-align-item.cc @@ -79,7 +79,6 @@ Break_align_interface::do_alignment (Score_element *me) Item * item = dynamic_cast (me); Item *column = item->column_l (); - Real interline= me->paper_l ()->get_var ("staffspace"); Link_array elems; Link_array all_elems = Pointer_group_interface__extract_elements (me, (Score_element*)0, @@ -137,7 +136,6 @@ Break_align_interface::do_alignment (Score_element *me) SCM symbol = gh_car (extra_space); Real spc = gh_scm2double (gh_cadr(extra_space)); - spc *= interline; dists.push(spc); symbol_list = gh_cons (symbol, symbol_list); diff --git a/lily/chord-name.cc b/lily/chord-name.cc index 2b17c561b3..4e6f87cdc4 100644 --- a/lily/chord-name.cc +++ b/lily/chord-name.cc @@ -60,7 +60,7 @@ Chord_name::brew_molecule (SCM smob) SCM func = me->get_elt_property (ly_symbol2scm ("chord-name-function")); SCM text = gh_call3 (func, style, pitches, gh_cons (inversion, bass)); - SCM properties = gh_list (me->mutable_property_alist_, me->immutable_property_alist_, SCM_UNDEFINED); + SCM properties = Font_interface::font_alist_chain (me); Molecule mol = Text_item::text2molecule (me, text, properties); SCM space = me->get_elt_property ("word-space"); diff --git a/lily/clef-engraver.cc b/lily/clef-engraver.cc index 97cbe20492..c867a0a4ef 100644 --- a/lily/clef-engraver.cc +++ b/lily/clef-engraver.cc @@ -1,5 +1,4 @@ /* - clef-engraver.cc -- implement Clef_engraver source file of the GNU LilyPond music typesetter @@ -23,6 +22,7 @@ #include "direction.hh" #include "side-position-interface.hh" #include "item.hh" +#include "custos.hh" /// where is c-0 in the staff? class Clef_engraver : public Engraver @@ -51,7 +51,6 @@ private: bool set_type (String); }; - Clef_engraver::Clef_engraver () { first_b_ = true; @@ -89,33 +88,29 @@ Clef_engraver::set_type (String s) SCM glyph = gh_cadr (found); SCM pos = gh_caddr (found); - daddy_trans_l_->set_property ("glyph", glyph); - daddy_trans_l_->set_property ("position", pos); + daddy_trans_l_->set_property ("clefGlyph", glyph); + daddy_trans_l_->set_property ("clefPosition", pos); found = scm_assoc (glyph, p); if (found == SCM_BOOL_F) return false; int c0_position = gh_scm2int (pos) + gh_scm2int (gh_cdr (found)); - daddy_trans_l_->set_property ("c0-position", gh_int2scm (c0_position)); + daddy_trans_l_->set_property ("clefCentralCPosition", gh_int2scm (c0_position)); } - int c0_position = gh_scm2int (get_property ("c0-position")); + int c0_position = gh_scm2int (get_property ("clefCentralCPosition")); c0_position -= (int)octave_dir_ * 7; - daddy_trans_l_->set_property ("c0-position", gh_int2scm (c0_position)); + daddy_trans_l_->set_property ("clefCentralCPosition", gh_int2scm (c0_position)); SCM basic = ly_symbol2scm ("Clef"); - SCM c0 = ly_symbol2scm ("c0-position"); SCM gl = ly_symbol2scm ("glyph"); daddy_trans_l_->execute_single_pushpop_property (basic, gl, SCM_UNDEFINED); - daddy_trans_l_->execute_single_pushpop_property (basic, c0, SCM_UNDEFINED); daddy_trans_l_->execute_single_pushpop_property (basic, gl, - get_property ("glyph")); - daddy_trans_l_->execute_single_pushpop_property (basic, c0, - get_property ("c0_position") - ); + get_property ("clefGlyph")); + return true; } @@ -130,20 +125,28 @@ Clef_engraver::acknowledge_element (Score_element_info info) if (item) { if (Bar::has_interface (info.elem_l_) - && gh_string_p (get_property ("glyph"))) + && gh_string_p (get_property ("clefGlyph"))) create_clef (); if (Note_head::has_interface (item) - || Local_key_item::has_interface (item)) + || Local_key_item::has_interface (item) + || Custos::has_interface (item) + ) { int p = int (Staff_symbol_referencer::position_f (item)) - + gh_scm2int (get_property ("c0-position")); + + gh_scm2int (get_property ("clefCentralCPosition")); Staff_symbol_referencer::set_position (item, p); } else if (Key_item::has_interface (item)) { - item->set_elt_property ("c0-position", get_property ("c0-position")); + /* + Key_item adapts its formatting to make sure that the + accidentals stay in the upper half of the staff. It needs + to know c0-pos for this. (?) + */ + + item->set_elt_property ("c0-position", get_property ("clefCentralCPosition")); } } } @@ -151,9 +154,9 @@ Clef_engraver::acknowledge_element (Score_element_info info) void Clef_engraver::do_creation_processing () { - daddy_trans_l_->set_property ("position", gh_int2scm (0)); - daddy_trans_l_->set_property ("glyph", SCM_EOL); - daddy_trans_l_->set_property ("c0-position", gh_int2scm (0)); + daddy_trans_l_->set_property ("clefPosition", gh_int2scm (0)); + daddy_trans_l_->set_property ("clefGlyph", SCM_EOL); + daddy_trans_l_->set_property ("clefCentralCPosition", gh_int2scm (0)); SCM def = get_property ("defaultClef"); if (gh_string_p (def)) @@ -189,7 +192,7 @@ Clef_engraver::create_clef () clef_p_ = c; } Staff_symbol_referencer::set_position (clef_p_, - gh_scm2int (get_property ("position") + gh_scm2int (get_property ("clefPosition") )); if (octave_dir_) { diff --git a/lily/collision.cc b/lily/collision.cc index 14c0e4fe82..5bfac10d1c 100644 --- a/lily/collision.cc +++ b/lily/collision.cc @@ -47,8 +47,7 @@ Collision::do_shifts(Score_element* me) Link_array done; Real wid - = gh_scm2double (me->get_elt_property ("note-width")) - * me->paper_l ()->get_var ("staffspace"); + = gh_scm2double (me->get_elt_property ("note-width")); for (; gh_pair_p (hand); hand =gh_cdr (hand)) { diff --git a/lily/crescendo.cc b/lily/crescendo.cc index be54a96e62..4ef0ef6ce5 100644 --- a/lily/crescendo.cc +++ b/lily/crescendo.cc @@ -22,7 +22,7 @@ Crescendo::brew_molecule (SCM smob) { Score_element *me= unsmob_element (smob); Spanner *span = dynamic_cast(me); - Real staff_space = me->paper_l ()->get_var ("staffspace"); + Real line = me->paper_l ()->get_var ("stafflinethickness"); Real broken_left = span->get_broken_left_end_align (); @@ -56,7 +56,7 @@ Crescendo::brew_molecule (SCM smob) while (flip (&d) != LEFT); bool continued = broken[Direction (-grow_dir)]; - Real height = staff_space * gh_scm2double (me->get_elt_property ("height")); + Real height = gh_scm2double (me->get_elt_property ("height")); Real thick = line * gh_scm2double (me->get_elt_property ("thickness")); const char* type = (grow_dir < 0) ? "decrescendo" : "crescendo"; diff --git a/lily/cross-staff.cc b/lily/cross-staff.cc index ccd424ce8e..d8a535af1b 100644 --- a/lily/cross-staff.cc +++ b/lily/cross-staff.cc @@ -23,7 +23,7 @@ calc_interstaff_dist (Item *item, Spanner *span) - interstaff = item->paper_l ()->get_var ("staffspace"); + interstaff = 1.0; if (gh_pair_p (threshold)) interstaff = gh_scm2double (gh_car (threshold)) * interstaff; diff --git a/lily/custos-engraver.cc b/lily/custos-engraver.cc new file mode 100644 index 0000000000..5f15194535 --- /dev/null +++ b/lily/custos-engraver.cc @@ -0,0 +1,147 @@ +/* + custos-engraver.cc -- implement Custos_engraver + + source file of the GNU LilyPond music typesetter + + (C) 2000 Juergen Reuter , + + Han-Wen Nienhuys + +*/ + +#include "engraver.hh" +#include "bar.hh" +#include "item.hh" +#include "note-head.hh" +#include "staff-symbol-referencer.hh" +#include "warn.hh" +#include "musical-request.hh" + +/* + This class implements an engraver for custos symbols. +*/ +class Custos_engraver : public Engraver +{ +public: + Custos_engraver(); + virtual void do_post_move_processing(); + virtual void acknowledge_element(Score_element_info); + virtual void do_process_music (); + virtual void process_acknowledged (); + virtual void do_pre_move_processing (); + virtual void do_removal_processing (); + VIRTUAL_COPY_CONS(Translator); + +private: + Item * create_custos(); + bool custos_permitted; + Link_array custos_arr_; + Array pitches_; +}; + +Custos_engraver::Custos_engraver () +{ + custos_permitted = false; +} + + +void +Custos_engraver::do_pre_move_processing() +{ + /* + delay typeset until we're at the next moment, so we can silence custodes at the end of the piece. + */ +} + +void +Custos_engraver::do_post_move_processing () +{ + for (int i = custos_arr_.size (); i--;) + { + typeset_element (custos_arr_[i]); + } + custos_arr_.clear (); + pitches_.clear (); + + custos_permitted = false; +} + + +/* + TODO check if this works with forced bar lines? + */ +void +Custos_engraver::do_process_music () +{ + if (gh_string_p (get_property( "whichBar"))) + custos_permitted = true; +} + +void +Custos_engraver::acknowledge_element (Score_element_info info) +{ + Item *item = dynamic_cast (info.elem_l_); + if (item) + { + if (Bar::has_interface (info.elem_l_)) + custos_permitted = true; + else if (Note_head::has_interface (info.elem_l_)) + { + + /* + ideally, we'd do custos->set_parent (Y_AXIS, notehead), + but since the note head lives on the other system, we can't + + So we copy the position from the note head pitch. We + don't look at the staff-position, since we can't be sure + whether Clef_engraver already applied a vertical shift. + */ + + pitches_.push (dynamic_cast (info.req_l_)->pitch_); + } + } +} + +void +Custos_engraver::process_acknowledged () +{ + if (custos_permitted) + { + for (int i = pitches_.size (); i--;) + { + Item *c = create_custos (); + + c->set_elt_property ("staff-position", + gh_int2scm (pitches_[i].steps ())); + + } + + pitches_.clear (); + } +} + +Item* +Custos_engraver::create_custos() +{ + SCM basicProperties = get_property ("Custos"); + Item* custos = new Item (basicProperties); + + announce_element (custos, 0); + custos_arr_.push (custos); + + return custos; +} + +void +Custos_engraver::do_removal_processing () +{ + for (int i = custos_arr_.size (); i--;) + { + custos_arr_[i]->suicide (); + typeset_element (custos_arr_[i]); + } + custos_arr_.clear (); +} + +ADD_THIS_TRANSLATOR (Custos_engraver); + diff --git a/lily/custos.cc b/lily/custos.cc new file mode 100644 index 0000000000..24091d6646 --- /dev/null +++ b/lily/custos.cc @@ -0,0 +1,180 @@ +/* + custos.cc -- implement Custos + + source file of the GNU LilyPond music typesetter + + (C) 2000 Juergen Reuter +*/ + +/* TODO: + + - merge create_ledger_line () and Note_head::create_ledger_line() + + + - rewrite create_ledger_line() to support short and thin ledger lines + + - do not show if a clef change immediately follows in the next line + + - make custos direction control configurable + + - decide: do or do not print custos if the next line starts with a rest + +*/ + + +#include +#include "staff-symbol-referencer.hh" +#include "custos.hh" +#include "molecule.hh" +#include "lookup.hh" +#include "debug.hh" +#include "note-head.hh" +#include "item.hh" +#include "font-interface.hh" + +/* + This function is a patched and hopefully much more understandable + rewrite of Note_head::ledger_line(). It still has some + bugs/limitations: + * + (1) The term thick/2 probably should be thick*2 (probably a bug, + see the code below). + * + (2) The minimal width of the resulting ledger line equals the width + of the noteheads-ledgerending symbol (a limitation): + * + (---- left ledger ending + ----) right ledger ending + (---) resulting ledger line (just ok) + * + If x_extent ("xwid" in Note_head) is less than the width of the + ledger ending, the width of the total ledger line is even *greater* + than the width of a ledger ending (I would call this a bug). In + the below code, the condition "if (x_extent.length() > + slice_x_extent.length())" avoids outputting the left ending in such + cases (rather a silly workaround, but better than nothing). + * + (---- left ledger ending + ----) right ledger ending + (-) desired ledger line + ------- resulting ledger line (too long) + ----) resulting ledger line with additional "if" (still too long) + * + The algorithm works properly only for a desired ledger line width + greater than the width of the ledger ending: + * + (---- left ledger ending + ----) right ledger ending + (------) desired ledger line + (------) resulting ledger line (ok) + * + * (3) The thickness of the ledger line is fixed (limitation). + */ +Molecule create_ledger_line (Interval x_extent, Score_element *me) +{ + Molecule line; + Molecule slice = Font_interface::get_default_font (me)->find_by_name ("noteheads-ledgerending"); + Interval slice_x_extent = slice.extent(X_AXIS); + Interval slice_y_extent = slice.extent(Y_AXIS); + + // Create left ending of ledger line. + Molecule left_ending = slice; + left_ending.translate_axis (x_extent[LEFT] - slice_x_extent[LEFT], X_AXIS); + if (x_extent.length() > slice_x_extent.length()) + line.add_molecule (left_ending); + + // Create right ending of ledger line. + Molecule right_ending = slice; + right_ending.translate_axis (x_extent[RIGHT] - slice_x_extent[RIGHT], + X_AXIS); + line.add_molecule (right_ending); + + // Fill out space between left and right ending of ledger line by + // lining up a series of slices in a row between them. + Molecule fill_out_slice = left_ending; + Real thick = slice_y_extent.length(); + Real delta_x = slice_x_extent.length () - thick; + Real xpos = x_extent [LEFT] + 2*delta_x + thick/2; // TODO: check: thick*2? + while (xpos <= x_extent[RIGHT]) + { + fill_out_slice.translate_axis (delta_x, X_AXIS); + line.add_molecule (fill_out_slice); + xpos += delta_x; + } + + return line; +} + +void add_streepjes(Score_element* me, + int pos, + int interspaces, + Molecule* custos_p_) +{ + // TODO: This is (almost) duplicated code (see + // Note_head::brew_molecule). Junk me. + Real inter_f = Staff_symbol_referencer::staff_space (me)/2; + int streepjes_i = abs (pos) < interspaces + ? 0 + : (abs(pos) - interspaces) /2; + if (streepjes_i) + { + Direction dir = (Direction)sign (pos); + Molecule ledger_line (create_ledger_line (custos_p_->extent (X_AXIS), + me)); + ledger_line.set_empty (true); + Real offs = (Staff_symbol_referencer::on_staffline (me)) + ? 0.0 + : -dir * inter_f; + for (int i = 0; i < streepjes_i; i++) + { + Molecule streep (ledger_line); + streep.translate_axis (-dir * inter_f * i * 2 + offs, + Y_AXIS); + custos_p_->add_molecule (streep); + } + } +} + +MAKE_SCHEME_CALLBACK(Custos,brew_molecule,1); +SCM +Custos::brew_molecule (SCM smob) +{ + Item *me = (Item *)unsmob_element (smob); + SCM scm_style = me->get_elt_property ("style"); + + if (gh_string_p (scm_style)) + { + String style = ly_scm2string (scm_style); + + String idx = "custodes-"; + int interspaces = Staff_symbol_referencer::line_count (me)-1; + + Real pos = Staff_symbol_referencer::position_f (me); + + if (pos > (interspaces/2 + 1)) // TODO: make this rule configurable + idx += "r"; + idx += style; + Molecule molecule + = Font_interface::get_default_font (me)->find_by_name (idx); + if (molecule.empty_b()) + { + String message = "unknown custos style: `" + style + "'"; + warning(_ (message.ch_C())); + return SCM_EOL; + } + else + { + add_streepjes(me, (int)pos, interspaces, &molecule); + SCM result = molecule.create_scheme(); + return result; + } + } + else + return SCM_EOL; +} + +bool +Custos::has_interface (Score_element*m) +{ + return m && m->has_interface (ly_symbol2scm ("custos-interface")); +} diff --git a/lily/font-interface.cc b/lily/font-interface.cc index 3255c8bd8f..01d9c5e1b7 100644 --- a/lily/font-interface.cc +++ b/lily/font-interface.cc @@ -13,8 +13,23 @@ #include "score-element.hh" #include "paper-def.hh" + +SCM +Font_interface::font_alist_chain (Score_element *me) +{ + SCM defaults = gh_cdr (scm_assoc (ly_symbol2scm ("font-defaults"), + me->paper_l ()->style_sheet_ )); + + SCM ch = gh_list (me->mutable_property_alist_, + me->immutable_property_alist_, + defaults, + SCM_UNDEFINED); + + return ch; +} + /* - todO : split up this func, reuse in text_item? + todo: split up this func, reuse in text_item? */ Font_metric * Font_interface::get_default_font (Score_element*me) @@ -33,11 +48,7 @@ Font_interface::get_default_font (Score_element*me) ss)); assert (gh_procedure_p (proc)); - SCM font_name = gh_call2 (proc, fonts, - gh_list (me->mutable_property_alist_, - me->immutable_property_alist_, - defaults, - SCM_UNDEFINED)); + SCM font_name = gh_call2 (proc, fonts, font_alist_chain (me)); fm = me->paper_l ()->find_font (font_name, 1.0); me->set_elt_property ("font", fm->self_scm ()); diff --git a/lily/font-metric.cc b/lily/font-metric.cc index 6eb97a0c01..8821332985 100644 --- a/lily/font-metric.cc +++ b/lily/font-metric.cc @@ -115,7 +115,8 @@ IMPLEMENT_TYPE_P (Font_metric, "font-metric?"); Molecule Font_metric::find_by_name (String) const { - assert (false); + Molecule m ; + return m; } diff --git a/lily/hyphen-spanner.cc b/lily/hyphen-spanner.cc index a45a246a88..7827102e91 100644 --- a/lily/hyphen-spanner.cc +++ b/lily/hyphen-spanner.cc @@ -41,16 +41,15 @@ Hyphen_spanner::brew_molecule (SCM smob) } while (flip (&d) != LEFT); - Real ss = sp->paper_l ()->get_var ("staffspace"); Real lt = sp->paper_l ()->get_var ("stafflinethickness"); Real th = gh_scm2double (sp->get_elt_property ("thickness")) * lt ; - Real h = gh_scm2double (sp->get_elt_property ("height")) * ss; - Real l = gh_scm2double (sp->get_elt_property ("minimum-length")) * ss; + Real h = gh_scm2double (sp->get_elt_property ("height")); + Real l = gh_scm2double (sp->get_elt_property ("minimum-length")); // The hyphen can exist in the word space of the left lyric ... SCM space = sp->get_bound (LEFT)->get_elt_property ("word-space"); if (gh_number_p (space)) { - bounds[LEFT] -= gh_scm2double (space)*ss; + bounds[LEFT] -= gh_scm2double (space); } Real w = bounds.length (); /* for length, use a geometric mean of the available space and some minimum diff --git a/lily/include/custos.hh b/lily/include/custos.hh new file mode 100644 index 0000000000..d962ef975f --- /dev/null +++ b/lily/include/custos.hh @@ -0,0 +1,21 @@ +/* + custos.hh + + source file of the GNU LilyPond music typesetter + + (C) 2000 Juergen Reuter +*/ + +#ifndef CUSTOS_HH +#define CUSTOS_HH + +#include "lily-guile.hh" + +struct Custos +{ + DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM )); + static bool has_interface (Score_element*); +}; + +#endif // CUSTOS_HH + diff --git a/lily/include/font-interface.hh b/lily/include/font-interface.hh index 0ce2620c87..34f72a6a6b 100644 --- a/lily/include/font-interface.hh +++ b/lily/include/font-interface.hh @@ -15,6 +15,7 @@ struct Font_interface { + static SCM font_alist_chain (Score_element*); static Font_metric * get_default_font (Score_element*); }; diff --git a/lily/line-of-score.cc b/lily/line-of-score.cc index df4ba207ea..14a37b1d23 100644 --- a/lily/line-of-score.cc +++ b/lily/line-of-score.cc @@ -322,8 +322,6 @@ Line_of_score::post_processing (bool last_line) gh_double2scm (height), SCM_UNDEFINED)); - Real il = paper_l ()->get_var ("staffspace"); - /* all elements. */ @@ -338,8 +336,8 @@ Line_of_score::post_processing (bool last_line) SCM e = sc->get_elt_property ("extra-offset"); if (gh_pair_p (e)) { - o[X_AXIS] += il * gh_scm2double (gh_car (e)); - o[Y_AXIS] += il * gh_scm2double (gh_cdr (e)); + o[X_AXIS] += gh_scm2double (gh_car (e)); + o[Y_AXIS] += gh_scm2double (gh_cdr (e)); } output_molecule (m.get_expr (), o); diff --git a/lily/lyric-engraver.cc b/lily/lyric-engraver.cc index 8ff83dafd8..09e9fc9ee9 100644 --- a/lily/lyric-engraver.cc +++ b/lily/lyric-engraver.cc @@ -52,7 +52,7 @@ Lyric_engraver::do_process_music() (UGH UGH, pulled amount of space out of thin air) */ - text_p_->translate_axis (paper_l()->get_var ("staffspace")*0.66, X_AXIS); + text_p_->translate_axis (0.66, X_AXIS); announce_element (text_p_, req_l_); } diff --git a/lily/lyric-extender.cc b/lily/lyric-extender.cc index 91a0d17f78..cd207ce9ca 100644 --- a/lily/lyric-extender.cc +++ b/lily/lyric-extender.cc @@ -25,9 +25,9 @@ Lyric_extender::brew_molecule (SCM smob) // ugh: refp Real leftext = sp->get_bound (LEFT)->extent (sp->get_bound (LEFT), X_AXIS).length (); - Real ss = sp->paper_l ()->get_var ("staffspace"); + Real ss = 1.0; Real sl = sp->paper_l ()->get_var ("stafflinethickness"); - Real righttrim = 0.5; // default to half a staffspace gap on the right + Real righttrim = 0.5; // default to half a space gap on the right SCM righttrim_scm = sp->get_elt_property("right-trim-amount"); if (gh_number_p (righttrim_scm)) { righttrim = gh_scm2double (righttrim_scm); diff --git a/lily/mark-engraver.cc b/lily/mark-engraver.cc index 629870d6c3..bab3d1d145 100644 --- a/lily/mark-engraver.cc +++ b/lily/mark-engraver.cc @@ -118,19 +118,6 @@ Mark_engraver::create_items (Request *rq) prop = gh_int2scm (UP); } text_p_->set_elt_property ("direction", prop); - - SCM padding = get_property ("markScriptPadding"); - if (gh_number_p(padding)) - { - text_p_->set_elt_property ("padding", padding); - } - else - { - text_p_ - ->set_elt_property ("padding", - gh_double2scm(paper_l ()->get_var ("staffspace"))); - } - announce_element (text_p_, rq); } diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index ceb5657642..e3748f89f8 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -131,13 +131,10 @@ Multi_measure_rest::brew_molecule (SCM smob) if (measures > 1) { - SCM properties = gh_list (me->mutable_property_alist_, - me->immutable_property_alist_, - SCM_UNDEFINED); - Molecule s = - Text_item::text2molecule (me, - ly_str02scm (to_str (measures).ch_C ()), - properties); + SCM properties = Font_interface::font_alist_chain (me); + Molecule s = Text_item::text2molecule (me, + ly_str02scm (to_str (measures).ch_C ()), + properties); s.align_to (X_AXIS, CENTER); s.translate_axis (3.0 * staff_space, Y_AXIS); mol.add_molecule (s); diff --git a/lily/rest-collision.cc b/lily/rest-collision.cc index b09bf84258..efb217c73e 100644 --- a/lily/rest-collision.cc +++ b/lily/rest-collision.cc @@ -189,7 +189,7 @@ Rest_collision::do_shift (Score_element *me, SCM elts) return SCM_UNSPECIFIED; // staff ref'd? - Real staff_space = me->paper_l()->get_var ("staffspace"); + Real staff_space = 1.0; /* FIXME staff_space = rcol->rests[0]->staff_space (); diff --git a/lily/score-element.cc b/lily/score-element.cc index 453b166e04..fbd44eb4f4 100644 --- a/lily/score-element.cc +++ b/lily/score-element.cc @@ -202,8 +202,6 @@ Score_element::preset_extent (SCM element_smob, SCM scm_axis) { Real l = gh_scm2double (gh_car (ext)); Real r = gh_scm2double (gh_cdr (ext)); - l *= s->paper_l ()->get_var ("staffspace"); - r *= s->paper_l ()->get_var ("staffspace"); return ly_interval2scm (Interval (l, r)); } @@ -579,11 +577,10 @@ Score_element::extent (Score_element * refp, Axis a) const /* signs ? */ - Real s = paper_l ()->get_var ("staffspace"); if (gh_pair_p (extra)) { - ext[BIGGER] += s * gh_scm2double (gh_cdr (extra)); - ext[SMALLER] += s * gh_scm2double (gh_car (extra)); + ext[BIGGER] += gh_scm2double (gh_cdr (extra)); + ext[SMALLER] += gh_scm2double (gh_car (extra)); } extra = get_elt_property (a == X_AXIS @@ -591,8 +588,8 @@ Score_element::extent (Score_element * refp, Axis a) const : "minimum-extent-Y"); if (gh_pair_p (extra)) { - ext.unite (Interval (s * gh_scm2double (gh_car (extra)), - s * gh_scm2double (gh_cdr (extra)))); + ext.unite (Interval (gh_scm2double (gh_car (extra)), + gh_scm2double (gh_cdr (extra)))); } ext.translate (x); diff --git a/lily/script.cc b/lily/script.cc index c49e37cd0c..9670115c55 100644 --- a/lily/script.cc +++ b/lily/script.cc @@ -30,7 +30,7 @@ Script::get_molecule(Score_element * me, Direction d) } else if (key == ly_symbol2scm ("accordion")) { - return Lookup::accordion (gh_cdr (s), me->paper_l()->get_var("staffspace"), Font_interface::get_default_font (me)); + return Lookup::accordion (gh_cdr (s), 1.0, Font_interface::get_default_font (me)); } else assert (false); diff --git a/lily/slur.cc b/lily/slur.cc index 07c7fd6843..b7b0c68769 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -403,7 +403,7 @@ Slur::encompass_offset (Score_element*me, leave a gap: slur mustn't touch head/stem */ o[Y_AXIS] += dir * gh_scm2double (me->get_elt_property ("y-free")) * - me->paper_l ()->get_var ("staffspace"); + 1.0; return o; } @@ -490,7 +490,7 @@ Slur::set_spacing_rods (SCM smob) r.item_l_drul_[RIGHT] = sp->get_bound (RIGHT); r.distance_f_ = gh_scm2double (me->get_elt_property ("minimum-length")) - * me->paper_l ()->get_var ("staffspace"); + * 1.0; r.add_to_cols (); return SCM_UNSPECIFIED; diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index 71178a0004..c477bd17c2 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -233,7 +233,7 @@ Spacing_spanner::get_duration_space (Score_element*me, Moment d, Moment shortest Real k = gh_scm2double (me->get_elt_property ("arithmetic-basicspace")) - log; - return (log_2 (d) + k) * gh_scm2double (me->get_elt_property ("arithmetic-multiplier")) * me->paper_l ()->get_var ("staffspace"); + return (log_2 (d) + k) * gh_scm2double (me->get_elt_property ("arithmetic-multiplier")); } @@ -313,8 +313,6 @@ Spacing_spanner::stem_dir_correction (Score_element*me, Score_element*l, Score_e Real correction = 0.0; Real ssc = gh_scm2double (me->get_elt_property("stem-spacing-correction")); - ssc *= me->paper_l ()->get_var ("staffspace"); - if (d1 && d2 && d1 * d2 == -1) { correction = d1 * ssc; diff --git a/lily/staff-symbol-referencer.cc b/lily/staff-symbol-referencer.cc index 9fb2b2bc0d..327ff2141e 100644 --- a/lily/staff-symbol-referencer.cc +++ b/lily/staff-symbol-referencer.cc @@ -52,10 +52,9 @@ Staff_symbol_referencer::staff_space (Score_element*me) Score_element * st = staff_symbol_l (me); if (st) return Staff_symbol::staff_space (st); - else if (me->pscore_l_ && me->paper_l ()) - return me->paper_l ()->get_var ("staffspace"); - - return 0.0; + + + return 1.0; } diff --git a/lily/staff-symbol.cc b/lily/staff-symbol.cc index ff2bfe4a86..e7754b799b 100644 --- a/lily/staff-symbol.cc +++ b/lily/staff-symbol.cc @@ -70,7 +70,7 @@ Staff_symbol::line_count (Score_element*me) Real Staff_symbol::staff_space (Score_element*me ) { - Real ss = me->paper_l ()->get_var ("staffspace"); + Real ss = 1.0; SCM s = me->get_elt_property ("staff-space"); if (gh_number_p (s)) diff --git a/lily/syllable-group.cc b/lily/syllable-group.cc index 66dc8830c4..c03b26a4b6 100644 --- a/lily/syllable-group.cc +++ b/lily/syllable-group.cc @@ -88,7 +88,7 @@ Syllable_group::add_extender(Score_element * extender) // extender->set_elt_property("right-trim-amount", gh_double2scm(0.0)); // Right: - Real ss = extender->paper_l ()->get_var ("staffspace"); + Real ss = 1.0; extender->set_elt_property("right-trim-amount", gh_double2scm(-notehead_l_->extent(notehead_l_, X_AXIS).length()/ss)); } diff --git a/lily/system-start-delimiter-engraver.cc b/lily/system-start-delimiter-engraver.cc index e5abe9cdf4..628ad64fe7 100644 --- a/lily/system-start-delimiter-engraver.cc +++ b/lily/system-start-delimiter-engraver.cc @@ -52,7 +52,7 @@ System_start_delimiter_engraver::acknowledge_element (Score_element_info inf) */ if (gh_symbol_p (gl) && gl == ly_symbol2scm ("brace") && gh_symbol_p (my_gl) && my_gl == ly_symbol2scm ("bracket")) - inf.elem_l_->translate_axis ( -paper_l ()->get_var ("staffspace"), X_AXIS); // ugh + inf.elem_l_->translate_axis ( -1.0, X_AXIS); // ugh } } diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc index 5c345fb3e9..1ad12f6d0c 100644 --- a/lily/system-start-delimiter.cc +++ b/lily/system-start-delimiter.cc @@ -21,22 +21,20 @@ Molecule System_start_delimiter::staff_bracket (Score_element*me,Real height) { Paper_def* p= me->paper_l (); - SCM scmss = p->get_scmvar ("staffspace"); - Real ss = gh_scm2double (scmss); - Real arc_height = gh_scm2double (me->get_elt_property("arch-height")) * ss ; + Real arc_height = gh_scm2double (me->get_elt_property("arch-height")) ; SCM at = gh_list (ly_symbol2scm ("bracket"), - scm_product (me->get_elt_property ("arch-angle"), scmss), - scm_product (me->get_elt_property ("arch-width"), scmss), + me->get_elt_property ("arch-angle"), + me->get_elt_property ("arch-width"), gh_double2scm (arc_height), - scm_product (me->get_elt_property ("bracket-width"),scmss), + me->get_elt_property ("bracket-width"), gh_double2scm (height), - scm_product (me->get_elt_property ("arch-thick"),scmss), - scm_product (me->get_elt_property ("bracket-thick"),scmss), + me->get_elt_property ("arch-thick"), + me->get_elt_property ("bracket-thick"), SCM_UNDEFINED); Real h = height + 2 * arc_height; - Box b (Interval (0, 1.5 * ss), Interval (-h/2, h/2)); + Box b (Interval (0, 1.5), Interval (-h/2, h/2)); Molecule mol (b, at); mol.align_to (X_AXIS, CENTER); return mol; diff --git a/lily/text-spanner.cc b/lily/text-spanner.cc index c74400fe79..dafd1b975e 100644 --- a/lily/text-spanner.cc +++ b/lily/text-spanner.cc @@ -55,9 +55,8 @@ Text_spanner::brew_molecule (SCM smob) text_style = ly_scm2string (s); #endif - SCM properties = gh_list (me->mutable_property_alist_, - me->immutable_property_alist_, - SCM_UNDEFINED); + SCM properties = Font_interface::font_alist_chain (me); + SCM edge_text = me->get_elt_property ("edge-text"); Drul_array edge; if (gh_pair_p (edge_text)) diff --git a/lily/tie.cc b/lily/tie.cc index c68d2ebe20..80363adcec 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -295,7 +295,7 @@ Tie::set_spacing_rods (SCM smob) r.distance_f_ = gh_scm2double (me->get_elt_property ("minimum-length")) - * me->paper_l ()->get_var ("staffspace"); + * 1.0; r.add_to_cols (); return SCM_UNSPECIFIED; } diff --git a/lily/time-signature.cc b/lily/time-signature.cc index 4e3f7e2057..77cc1ab699 100644 --- a/lily/time-signature.cc +++ b/lily/time-signature.cc @@ -52,6 +52,10 @@ Time_signature::special_time_signature (Score_element*me, String s, int n, int d { // First guess: s contains only the signature style String symbolname = "timesig-" + s + to_str (n) + "/" + to_str (d); + + /* + Randomly probing the font sucks? + */ Molecule m = Font_interface::get_default_font (me)->find_by_name (symbolname); if (!m.empty_b()) @@ -70,7 +74,7 @@ Time_signature::special_time_signature (Score_element*me, String s, int n, int d Molecule Time_signature::time_signature (Score_element*me,int num, int den) { - SCM chain = gh_list (me->mutable_property_alist_, me->immutable_property_alist_, SCM_UNDEFINED); + SCM chain = Font_interface::font_alist_chain (me); Molecule n = Text_item::text2molecule (me, ly_str02scm (to_str (num).ch_C ()), diff --git a/lily/translator-group.cc b/lily/translator-group.cc index 7d40cc0734..cf813de963 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -281,6 +281,9 @@ Translator_group::where_defined (SCM sym) const return (daddy_trans_l_) ? daddy_trans_l_->where_defined (sym) : 0; } +/* + TODO: return SCM_EOL iso. SCM_UNDEFINED when not found. +*/ SCM Translator_group::get_property (SCM sym) const { diff --git a/lily/tuplet-spanner.cc b/lily/tuplet-spanner.cc index 739a179bc2..312bb37b96 100644 --- a/lily/tuplet-spanner.cc +++ b/lily/tuplet-spanner.cc @@ -70,16 +70,13 @@ Tuplet_spanner::brew_molecule (SCM smob) Real ncw = column_arr.top ()->extent(column_arr.top (), X_AXIS).length (); Real w = dynamic_cast(me)->spanner_length () + ncw; - Real staff_space = me->paper_l ()->get_var ("staffspace"); + Real staff_space = 1.0; Direction dir = Directional_element_interface::get (me); Real dy = gh_scm2double (me->get_elt_property ("delta-y")); SCM number = me->get_elt_property ("text"); if (gh_string_p (number) && number_visibility) { - SCM properties = gh_list ( me->mutable_property_alist_, - me->immutable_property_alist_, - - SCM_UNDEFINED); + SCM properties = Font_interface::font_alist_chain (me); Molecule num = Text_item::text2molecule (me, number, properties); num.align_to (X_AXIS, CENTER); num.translate_axis (w/2, X_AXIS); @@ -93,18 +90,17 @@ Tuplet_spanner::brew_molecule (SCM smob) if (bracket_visibility) { - SCM ss = me->paper_l ()->get_scmvar ("staffspace"); - SCM lt = me->paper_l ()->get_scmvar ("stafflinethickness"); + Real lt = me->paper_l ()->get_var ("stafflinethickness"); SCM thick = me->get_elt_property ("thick"); SCM gap = me->get_elt_property ("number-gap"); SCM at =gh_list(ly_symbol2scm ("tuplet"), - ss, - scm_product (gap, ss), + gh_double2scm (1.0), + gap, gh_double2scm (w), gh_double2scm (dy), - scm_product (thick, lt), + gh_double2scm (gh_scm2double (thick)* lt), gh_int2scm (dir), SCM_UNDEFINED); diff --git a/lily/volta-spanner.cc b/lily/volta-spanner.cc index 7dde58677c..7db9f65936 100644 --- a/lily/volta-spanner.cc +++ b/lily/volta-spanner.cc @@ -60,9 +60,8 @@ Volta_spanner::brew_molecule (SCM smob) no_vertical_end = false; #endif - Real staff_space = me->paper_l ()->get_var ("staffspace"); Real staff_thick = me->paper_l ()->get_var ("stafflinethickness"); - Real half_space = staff_space / 2; + Real half_space = 0.5; /* the volta spanner is attached to the bar-line, which is moved @@ -70,8 +69,8 @@ Volta_spanner::brew_molecule (SCM smob) */ Real left = 0.0; Real w = dynamic_cast(me)->spanner_length () - left - half_space; - Real h = staff_space * gh_scm2double (me->get_elt_property ("height")); - Real t = staff_thick * gh_scm2double (me->get_elt_property ("thickness")); + Real h = gh_scm2double (me->get_elt_property ("height")); + Real t = staff_thick * gh_scm2double (me->get_elt_property ("thickness")); /* ugh: should build from line segments. @@ -91,7 +90,7 @@ Volta_spanner::brew_molecule (SCM smob) Molecule num = Text_item::text2molecule (me, text, properties); mol.add_at_edge (X_AXIS, LEFT, num, - num.extent (X_AXIS).length () - - staff_space); + - 1.0); mol.translate_axis (left, X_AXIS); return mol.create_scheme(); } diff --git a/ly/engraver.ly b/ly/engraver.ly index acfd960192..c66da4a831 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -372,7 +372,7 @@ ScoreContext = \translator { barAuto = ##t voltaVisibility = ##t - % name, glyph id, c0 position + % name, glyph id, clef position supportedClefTypes = #'( ("treble" . ("clefs-G" -2)) ("violin" . ("clefs-G" -2)) @@ -431,6 +431,7 @@ ScoreContext = \translator { Key_item Staff_bar Time_signature + Custos Stanza_number ) diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index d8fdac84c6..94b0d50660 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,6 +1,6 @@ Begin3 Title: LilyPond -Version: 1.3.100 +Version: 1.3.101 Entered-date: 30OCT00 Description: Keywords: music notation typesetting midi fonts engraving @@ -8,8 +8,8 @@ Author: hanwen@cs.uu.nl (Han-Wen Nienhuys) janneke@gnu.org (Jan Nieuwenhuizen) Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys) Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert - 1000k lilypond-1.3.100.tar.gz + 1000k lilypond-1.3.101.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.3.100.tar.gz + 1000k lilypond-1.3.101.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index fed023f61c..c07cbf0e55 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 1.3.100 +Version: 1.3.101 Release: 1 License: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.100.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.101.tar.gz Summary: A program for printing sheet music. URL: http://www.cs.uu.nl/~hanwen/lilypond # Icon: lilypond-icon.gif diff --git a/make/toplevel.make.in b/make/toplevel.make.in index 13019ee8f2..3e980b979f 100644 --- a/make/toplevel.make.in +++ b/make/toplevel.make.in @@ -8,7 +8,7 @@ depth = . # descent order into subdirectories: # -SUBDIRS = scripts buildscripts flower lily mf midi2ly po debian \ +SUBDIRS = buildscripts scripts flower lily mf midi2ly po debian \ Documentation ly input tex make mutopia intl $(builddir)/stepmake\ ps scm # diff --git a/mf/feta-custodes.mf b/mf/feta-custodes.mf new file mode 100644 index 0000000000..ad405ad4b1 --- /dev/null +++ b/mf/feta-custodes.mf @@ -0,0 +1,273 @@ +% -*-Fundamental-*- +% feta-custodes.mf -- implement custos symbols +% +% source file of LilyPond's pretty-but-neat music font +% +% (C) 2000 Juergen Reuter +% + +save black_notehead_width; +numeric black_notehead_width; + +fet_begingroup("custodes"); + +noteheight#:=staff_space#+ (1 + overdone_heads) *stafflinethickness#; +define_pixels(noteheight); + + +%%%%%%%% +% +% Hufnagel style +% + +% stem up +fet_beginchar("Custos Hufnagel", "hufnagel", "hufnagel") + save b_h,a_w; + a_b:=1.54; % b_h*a_b/a_w = wd/ht + b_h:=0.85; + a_w:=1.09; + + save a, beta, ht, wd; + ht# =noteheight#; + 2beta#=ht#*b_h; + a# = beta#*a_b; + wd# = 2a# / a_w; + set_char_box(0, wd#, ht#/2, ht#/2); + black_notehead_width# := wd#; + + save rh_width, rh_height, rh_edge; % rhombus dimensions + rh_width#=0.7ht#; % ht*tan(35) + rh_height#=1.0ht#; + rh_edge#=0.61ht#; % (ht/2)/cos(35) + + define_pixels(rh_width, rh_height, rh_edge); + pickup pencircle + xscaled stafflinethickness + yscaled rh_edge rotated -35; + z1=(0.5rh_width,+0.25rh_height); + z2=(1.0rh_width,-0.25rh_height); + z3=(2.0rh_width,+0.50rh_height); + draw z1 -- z2 -- z3; +fet_endchar; + +% stem down +fet_beginchar("Reverse Custos Hufnagel", "rhufnagel", "rhufnagel") + save b_h,a_w; + a_b:=1.54; % b_h*a_b/a_w = wd/ht + b_h:=0.85; + a_w:=1.09; + + save a, beta, ht, wd; + ht# =noteheight#; + 2beta#=ht#*b_h; + a# = beta#*a_b; + wd# = 2a# / a_w; + set_char_box(0, wd#, ht#/2, ht#/2); + black_notehead_width# := wd#; + + save rh_width, rh_height, rh_edge; % rhombus dimensions + rh_width#=0.7ht#; % ht*tan(35) + rh_height#=1.0ht#; + rh_edge#=0.61ht#; % (ht/2)/cos(35) + + define_pixels(rh_width, rh_height, rh_edge); + pickup pencircle + xscaled stafflinethickness + yscaled rh_edge rotated +35; + z1=(0.5rh_width,-0.25rh_height); + z2=(1.0rh_width,+0.25rh_height); + z3=(2.0rh_width,-0.50rh_height); + draw z1 -- z2 -- z3; +fet_endchar; + + +%%%%%%%% +% +% Medicaea style +% + +% stem up +fet_beginchar("Custos Med.", "medicaea", "medicaea") + save b_h, a_w; + a_b := 1.54; % b_h*a_b/a_w = wd/ht + b_h := 0.85; + a_w := 1.09; + + save a, beta, ht, wd; + ht# = noteheight# * mag; + 2beta# = ht# * b_h; + a# = beta# * a_b; + wd# = 0.4a# / a_w; + set_char_box(0, wd#, ht#/2, ht#/2); % width intentionally too small + black_notehead_width# := wd#; + + define_pixels(ht, wd); + pickup pencircle scaled stafflinethickness; + + z1 = (0.0wd, +0.0ht); + z2 = (1.0wd + 0.5stafflinethickness, +0.0ht); + penpos1(1.0ht, 90); + penpos2(1.0ht, 90); + penstroke z1e{z2 - z1} .. {right}z2e; + + z3=(1.0wd, +0.0ht); + z4=(1.0wd, +1.0ht); + draw z3 -- z4; +fet_endchar; + + +% stem down +fet_beginchar("Reverse Custos Med.", "rmedicaea", "rmedicaea") + save b_h, a_w; + a_b := 1.54; % b_h*a_b/a_w = wd/ht + b_h := 0.85; + a_w := 1.09; + + save a, beta, ht, wd; + ht# = noteheight# * mag; + 2beta# = ht# * b_h; + a# = beta# * a_b; + wd# = 0.4a# / a_w; + set_char_box(0, wd#, ht#/2, ht#/2); % width intentionally too small + black_notehead_width# := wd#; + + define_pixels(ht, wd); + pickup pencircle scaled stafflinethickness; + + z1 = (0.0wd, +0.0ht); + z2 = (1.0wd + 0.5stafflinethickness, -0.0ht); + penpos1(1.0ht, 90); + penpos2(1.0ht, 90); + penstroke z1e{z2 - z1} .. {right}z2e; + + z3=(1.0wd, -0.0ht); + z4=(1.0wd, -1.0ht); + draw z3 -- z4; +fet_endchar; + + +%%%%%%%% +% +% Editio Vaticana style +% + +% stem up +fet_beginchar("Custos Ed. Vat.", "vaticana", "vaticana") + save b_h, a_w; + a_b := 1.54; % b_h*a_b/a_w = wd/ht + b_h := 0.85; + a_w := 1.09; + + save a, beta, ht, wd; + ht# = noteheight# * mag; + 2beta# = ht# * b_h; + a# = beta# * a_b; + wd# = 0.4a# / a_w; + set_char_box(0, wd#, ht#/2, ht#/2); + black_notehead_width# := wd#; + + define_pixels(ht, wd); + pickup pencircle scaled stafflinethickness; + + z1 = (0.0wd, +0.05ht); + z2 = (1.0wd + 0.5stafflinethickness, 0.0ht); + penpos1(0.5ht, 90); + penpos2(0.5ht, 90); + penstroke z1e{z2 - z1} .. {right}z2e; + + z3=(1.0wd, +0.0ht); + z4=(1.0wd, +1.0ht); + draw z3 -- z4; +fet_endchar; + + +% stem down +fet_beginchar("Reverse Custos Ed. Vat.", "rvaticana", "rvaticana") + save b_h, a_w; + a_b := 1.54; % b_h*a_b/a_w = wd/ht + b_h := 0.85; + a_w := 1.09; + + save a, beta, ht, wd; + ht# = noteheight# * mag; + 2beta# = ht# * b_h; + a# = beta# * a_b; + wd# = 0.4a# / a_w; + set_char_box(0, wd#, ht#/2, ht#/2); + black_notehead_width# := wd#; + + define_pixels(ht, wd); + pickup pencircle scaled stafflinethickness; + + z1 = (0.0wd, -0.05ht); + z2 = (1.0wd + 0.5stafflinethickness, -0.0ht); + penpos1(0.5ht, 90); + penpos2(0.5ht, 90); + penstroke z1e{z2 - z1} .. {right}z2e; + + z3=(1.0wd, -0.0ht); + z4=(1.0wd, -1.0ht); + draw z3 -- z4; +fet_endchar; + + +%%%%%%%% +% +% Mensural style +% + +% stem up +fet_beginchar("Custos Mensural", "mensural", "mensural") + save b_h,a_w; + a_b:=1.54; % b_h*a_b/a_w = wd/ht + b_h:=0.85; + a_w:=1.09; + + save a, beta, ht, wd; + ht# =noteheight#; + 2beta#=ht#*b_h; + a# = beta#*a_b; + wd# = 2a# / a_w; + set_char_box(0, wd#, ht#/2, ht#/2); % width intentionally too small + black_notehead_width# := wd#; + + define_pixels(ht, wd); + pickup pencircle xscaled stafflinethickness yscaled 0.4ht rotated -35; + z1=(0.0wd,-0.2ht); + z2=(0.2wd,+0.2ht); + z3=(0.4wd,-0.2ht); + z4=(0.6wd,+0.2ht); + z5=(0.8wd,-0.2ht); + z6=(1.6wd,+1.4ht); + draw z1 -- z2 -- z3 -- z4 -- z5 -- z6; +fet_endchar; + +% stem down +fet_beginchar("Reverse Custos Mensural", "rmensural", "rmensural") + save b_h,a_w; + a_b:=1.54; % b_h*a_b/a_w = wd/ht + b_h:=0.85; + a_w:=1.09; + + save a, beta, ht, wd; + ht# =noteheight#; + 2beta#=ht#*b_h; + a# = beta#*a_b; + wd# = 2a# / a_w; + set_char_box(0, wd#, ht#/2, ht#/2); % width intentionally too small + black_notehead_width# := wd#; + + define_pixels(ht, wd); + pickup pencircle xscaled stafflinethickness yscaled 0.4ht rotated +35; + z1=(0.0wd,+0.2ht); + z2=(0.2wd,-0.2ht); + z3=(0.4wd,+0.2ht); + z4=(0.6wd,-0.2ht); + z5=(0.8wd,+0.2ht); + z6=(1.6wd,-1.4ht); + draw z1 -- z2 -- z3 -- z4 -- z5 -- z6; +fet_endchar; + +fet_endgroup("custodes"); +define_pixels(black_notehead_width); + diff --git a/mf/feta-generic.mf b/mf/feta-generic.mf index 365f26c54c..32e4749708 100644 --- a/mf/feta-generic.mf +++ b/mf/feta-generic.mf @@ -35,6 +35,7 @@ if test = 0: input feta-timesig; input feta-pendaal; input feta-accordion; + input feta-custodes; else: % input feta-bolletjes; % input feta-banier; diff --git a/mutopia/E.Satie/petite-ouverture-a-danser.ly b/mutopia/E.Satie/petite-ouverture-a-danser.ly index 160993ac28..b7ec74559c 100644 --- a/mutopia/E.Satie/petite-ouverture-a-danser.ly +++ b/mutopia/E.Satie/petite-ouverture-a-danser.ly @@ -34,7 +34,7 @@ global = \notes { \bar "||"; \time 2/4; s2*18 - \bar ".|"; + \bar "|."; } i = \context Staff \notes\relative c''{ diff --git a/scm/basic-properties.scm b/scm/basic-properties.scm index 7955f6a630..89efe54dae 100644 --- a/scm/basic-properties.scm +++ b/scm/basic-properties.scm @@ -2,6 +2,7 @@ ;; See documentation of Item::visibility_lambda_ (define (begin-of-line-visible d) (if (= d 1) '(#f . #f) '(#t . #t))) +(define (end-of-line-visible d) (if (= d -1) '(#f . #f) '(#t . #t))) (define (spanbar-begin-of-line-invisible d) (if (= d -1) '(#t . #t) '(#f . #f))) (define (all-visible d) '(#f . #f)) (define (all-invisible d) '(#t . #t)) @@ -203,6 +204,8 @@ ;; (Measured in staff space) (define default-break-align-space-alist '( + ((Staff_bar Custos) . (minimum-space 2.0)) + ((Custos begin-of-note) . (minimum-space 0.0)) ((none Instrument_name) . (extra-space 1.0)) ((Instrument_name Left_edge_item) . (extra-space 1.0)) ((Left_edge_item Clef_item) . (extra-space 1.0)) diff --git a/scm/element-descriptions.scm b/scm/element-descriptions.scm index 4ea382e3e7..0a92527b7f 100644 --- a/scm/element-descriptions.scm +++ b/scm/element-descriptions.scm @@ -1,4 +1,3 @@ - ; distances are given in stafflinethickness (thicknesses) and ; staffspace (distances) @@ -93,14 +92,16 @@ (meta . ,(element-description "ChordNames" font-interface text-interface chord-name-interface)) )) - (NoteCollision . ( - (axes 0 1) - (note-width . 1.65) - (meta . ,(element-description "NoteCollision" - note-collision-interface axis-group-interface - )) - )) - + (Custos . ( + (break-align-symbol . Custos) + (breakable . #t ) + (molecule-callback . ,Custos::brew_molecule) + (visibility-lambda . ,end-of-line-visible) + (style . "vaticana") + (Y-offset-callbacks . (,Staff_symbol_referencer::callback)) + (meta . ,(element-description "Custos" custos-interface staff-symbol-interface break-aligned-interface) ) + )) + (Crescendo . ( (molecule-callback . ,Crescendo::brew_molecule) (thickness . 1.0) @@ -139,8 +140,8 @@ (DynamicLineSpanner . ( (axes . ( 1)) - (padding . 3) - (minimum-space . 6) + (padding . 0.6) + (minimum-space . 1.2) (meta . ,(element-description "DynamicLineSpanner" dynamic-interface axis-group-interface side-position-interface)) )) @@ -154,7 +155,7 @@ (Fingering . ( (molecule-callback . ,Text_item::brew_molecule) (X-offset-callbacks . (,Side_position::centered_on_parent ,Side_position::aligned_on_self)) - (padding . 3.0) + (padding . 0.6) (self-alignment-X . 0) (font-family . number) (font-relative-size . -3) @@ -246,7 +247,7 @@ (font-family . number) (font-relative-size . 1) (visibility-lambda . ,end-of-line-invisible) - (padding . 4.0) + (padding . 0.8) (meta . ,(element-description "RehearsalMark" mark-interface side-position-interface)) )) @@ -261,6 +262,13 @@ (font-relative-size . 1) (meta . ,(element-description "MultiMeasureRest" multi-measure-rest-interface font-interface )) )) + (NoteCollision . ( + (axes 0 1) + (note-width . 1.65) + (meta . ,(element-description "NoteCollision" + note-collision-interface axis-group-interface + )) + )) (NoteColumn . ( (axes . (0 1)) @@ -532,7 +540,7 @@ (Y-offset-callbacks . (,Side_position::aligned_side)) (thickness . 1.6) ; stafflinethickness (height . 2.0) ; staffspace; - (minimum-space . 25) + (minimum-space . 5) (font-family . number) (font-relative-size . -2) (meta . ,(element-description "VoltaBracket" volta-bracket-interface side-position-interface font-interface)) diff --git a/scm/font.scm b/scm/font.scm index 2a7d64910b..fc59fcdfad 100644 --- a/scm/font.scm +++ b/scm/font.scm @@ -67,6 +67,8 @@ ((-3 medium upright roman cmr 6) . "cmr6" ) ((-4 medium upright roman cmr 5) . "cmr5" ) ((-5 medium upright roman cmr 4) . "cmr4" ) + ((-3 medium italic roman cmti 5) . "cmti6") + ((-2 medium italic roman cmti 6) . "cmti7") ((-1 medium italic roman cmti 8) . "cmti8") ((0 medium italic roman cmti 10) . "cmti10") ((1 medium italic roman cmti 12) . "cmti12") @@ -94,13 +96,14 @@ ((-3 bold italic dynamic feta 10) . "feta-din6") ((-4 bold italic dynamic feta 10) . "feta-din5") ((-5 bold italic dynamic feta 10) . "feta-din4") + ((2 medium upright music feta 26) . "feta26") + ((1 medium upright music feta 23) . "feta23") ((0 medium upright music feta 20) . "feta20") + ((-0.5 medium upright music feta 20) . "feta19") ((-1 medium upright music feta 16) . "feta16") ((-2 medium upright music feta 13) . "feta13") ((-3 medium upright music feta 13) . "feta11") ((-4 medium upright music feta 13) . "feta11") - ((1 medium upright music feta 23) . "feta23") - ((2 medium upright music feta 26) . "feta26") ((-1 medium upright math msam 10) . "msam10") ((-2 medium upright math msam 10) . "msam10") ((-3 medium upright math msam 10) . "msam10") @@ -135,9 +138,10 @@ (define font-list-alist (map-alist-vals (lambda (x) (change-style-sheet-relative-size paper20-style-sheet-alist x)) - '((paper11 . -3) - (paper13 . -2) - (paper16 . -1) + '((paper11 . -4) + (paper13 . -3) + (paper16 . -2) + (paper19 . -1) (paper20 . 0) (paper23 . 1) (paper26 . 2) diff --git a/scm/interface.scm b/scm/interface.scm index dfbe409892..99ea918bc7 100644 --- a/scm/interface.scm +++ b/scm/interface.scm @@ -61,7 +61,14 @@ same as setting molecule-callback to #f, but this retains the dimensions of this element, which means that you can erase elements individually. ") - (property-description 'molecule-callback procedure? "Function taking graphical element as argument, returning a Scheme encoded Molecule") + (property-description 'molecule-callback procedure? "Function taking graphical element as argument, returning a Scheme encoded Molecule + +This function can be called more than once (for instance once for +computing dimensions, and once for computing the output). Therefore, +this function should have no side-effects on its argument. +Caching of computed values is permissible, and generally useful, though. + +") )) ) @@ -379,12 +386,41 @@ Align_interface::center_on_element). ") (list (property-description 'note-width 'number? "unit for horizontal translation, measured in staff-space.") ) ) ) + + +(define custos-interface + (lily-interface + 'custos-interface + "A custos is a staff context symbol that appears at the end of a + staff line with monophonic musical contents (i.e. with a single + voice). It anticipates the pitch of the first note of the following + line and thus helps the player or singer to manage line breaks + during performance, thus enhancing readability of a score. + + Custodes were frequently used in music notation until the 16th + century. There were different appearences for different notation + styles. Nowadays, they have survived only in special forms of + musical notation such as via the editio vaticana dating back to the + beginning of the 20th century. + +[TODO: add to glossary]" + + (list + (property-description 'style string? "a string determining what glyph is +typeset. Current choices are mensural, +hufnagel, vaticana and medicaea [TODO: should use symbol] ") + )) + ) + + + (define dot-interface (lily-interface 'dots-interface "The dots to go with a notehead/rest. A separate interface, since they are a party in collision resolution." (list + (property-description 'direction dir? "Direction to handle staff-line collisions in.") (property-description 'dot-count integer? "number of dots") ))) -- 2.39.2