From b584147c940e9456c2e0819e5af0afb765ade992 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 11 Mar 2004 00:15:43 +0000 Subject: [PATCH] (accurate_boxes): enlarge Y-extent of flat to prevent aligned 6ths. --- ChangeLog | 3 ++ Documentation/user/cheatsheet.itely | 5 ++- VERSION | 4 +- input/regression/accidental-placement.ly | 42 +++++++++++-------- lily/accidental.cc | 5 +++ lily/ambitus.cc | 18 +++++++- lily/paper-book.cc | 52 ++++++++++++------------ lily/stem.cc | 4 +- ly/a3-init.ly | 2 +- ly/a4-init.ly | 2 +- ly/accordion-defs-init.ly | 2 +- ly/book-init-init.ly | 2 +- ly/catalan.ly | 2 +- ly/center-init.ly | 2 +- ly/chord-modifiers-init.ly | 2 +- ly/declarations-init.ly | 2 +- ly/deutsch.ly | 2 +- ly/drumpitch-init.ly | 2 +- ly/dynamic-scripts-init.ly | 2 +- ly/english.ly | 2 +- ly/engraver-init.ly | 6 +-- ly/espanol.ly | 2 +- ly/generate-documentation.ly | 2 +- ly/generate-interface-doc-init.ly | 2 +- ly/grace-init.ly | 2 +- ly/gregorian-init.ly | 2 +- ly/init.ly | 2 +- ly/italiano.ly | 2 +- ly/legal-init.ly | 2 +- ly/letter-init.ly | 2 +- ly/midi-init.ly | 2 +- ly/nederlands.ly | 2 +- ly/norsk.ly | 2 +- ly/params-init.ly | 2 +- ly/part-paper-init.ly | 2 +- ly/performer-init.ly | 2 +- ly/property-init.ly | 2 +- ly/scale-definitions-init.ly | 2 +- ly/script-init.ly | 2 +- ly/spanners-init.ly | 2 +- ly/suomi.ly | 2 +- ly/svenska.ly | 2 +- ly/tabloid-init.ly | 2 +- scm/clef.scm | 2 +- scm/define-context-properties.scm | 6 +-- scm/define-grob-properties.scm | 16 +++----- scm/define-grobs.scm | 19 ++++----- scm/define-markup-commands.scm | 12 +++--- scm/music-functions.scm | 22 +++++----- scm/new-markup.scm | 2 +- scm/output-lib.scm | 8 ++-- scm/stencil.scm | 6 +-- scm/to-xml.scm | 2 +- 53 files changed, 162 insertions(+), 140 deletions(-) diff --git a/ChangeLog b/ChangeLog index 25cae3f0ca..3d5ad1aafe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-03-11 Han-Wen Nienhuys + * lily/accidental.cc (accurate_boxes): enlarge Y-extent of flat to + prevent aligned 6ths. + * lily/custos.cc (print): remove neutral position. (print): remove adjust-if-on-staffline. diff --git a/Documentation/user/cheatsheet.itely b/Documentation/user/cheatsheet.itely index b47e200e30..ec9d1aa189 100644 --- a/Documentation/user/cheatsheet.itely +++ b/Documentation/user/cheatsheet.itely @@ -238,8 +238,9 @@ twinkle @tab lyric hyphen @tab @lilypond[fragment,relative=1] - \notes { g'4 g } - \lyricsto "" \new Lyrics \lyrics { twin -- kle } + << \notes { g'4 g } + \lyricsto "" \new Lyrics \lyrics { twin -- kle } + >> @end lilypond @item @code{\chords @{ c:dim f:maj7 @}} diff --git a/VERSION b/VERSION index d84cbb075a..19131d29c2 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=2 MINOR_VERSION=1 -PATCH_LEVEL=29 -MY_PATCH_LEVEL=hwn1 +PATCH_LEVEL=30 +MY_PATCH_LEVEL= diff --git a/input/regression/accidental-placement.ly b/input/regression/accidental-placement.ly index 3e3dbaf2f6..69712b8df6 100644 --- a/input/regression/accidental-placement.ly +++ b/input/regression/accidental-placement.ly @@ -11,24 +11,30 @@ flats in a sixth should be staggered. " } -\score { \notes \context Voice \relative c' { - cis4 - c4 - \transpose c c' { - 4 - - - - -} - 4 - - - - - +\score { + \notes \context Voice \relative c' + { + cis4 + c4 + \transpose c c' { + + 4 + + + + + } + 4 + + + + + + } + \paper { + raggedright = ##t + } + } -\paper { raggedright = ##t} - } diff --git a/lily/accidental.cc b/lily/accidental.cc index a5398a1573..3d2cdacf96 100644 --- a/lily/accidental.cc +++ b/lily/accidental.cc @@ -80,6 +80,11 @@ Accidental_interface::accurate_boxes (Grob *a,Grob**common) really close. */ stem[X_AXIS][RIGHT] *= .5; + + /* + To prevent vertical alignment for 6ths + */ + stem[Y_AXIS] *= 1.1; bulb[Y_AXIS][UP] *= .35; boxes.push (bulb); diff --git a/lily/ambitus.cc b/lily/ambitus.cc index b785223ebb..9e5b145557 100644 --- a/lily/ambitus.cc +++ b/lily/ambitus.cc @@ -16,6 +16,21 @@ #include "paper-def.hh" #include "lookup.hh" +/* + UGH UGH UGH + + This does 3 things at one: + + - acc positioning + - drawing accidentals + - drawing note heads + + It confuses interpretation & formatting. + + UGH. + --hwn. + */ + /* * TODO: note-head collision handling * @@ -238,6 +253,7 @@ Ambitus::print (SCM smob) { accidentals_style = String (""); } + int num_acc; num_acc = number_accidentals (key_signature, pitch_min, true, false); add_accidentals (me, &head_min, num_acc, pitch_min, @@ -255,4 +271,4 @@ Ambitus::print (SCM smob) ADD_INTERFACE (Ambitus, "ambitus-interface", "An object that represents the pitch range of a voice.", - "c0-position pitch-min pitch-max accidentals note-head-style join-heads"); + "c0-position pitch-min pitch-max accidentals note-head-style accidentals-style join-heads"); diff --git a/lily/paper-book.cc b/lily/paper-book.cc index 92a9191d56..d75befab14 100644 --- a/lily/paper-book.cc +++ b/lily/paper-book.cc @@ -42,15 +42,17 @@ public: Paper_def *paper_; int number_; - SCM lines_; - SCM protect_; - Stencil *header_; - Stencil *footer_; + Protected_scm lines_; + Protected_scm header_; + Protected_scm footer_; + + Stencil *get_header () { return unsmob_stencil (header_); } + Stencil *get_footer () { return unsmob_stencil (footer_); } /* actual height filled with text. */ Real height_; - //HMMM all this size stuff to paper/paper-outputter? + // HMMM all this size stuff to paper/paper-outputter? Real hsize_; Real vsize_; Real top_margin_; @@ -82,40 +84,36 @@ Page::Page (Paper_def *paper, int number) SCM make_header = scm_primitive_eval (ly_symbol2scm ("make-header")); SCM make_footer = scm_primitive_eval (ly_symbol2scm ("make-footer")); - header_ = unsmob_stencil (scm_call_2 (make_header, paper_->smobbed_copy (), - scm_int2num (number_))); - protect_ = SCM_EOL; - // ugh, how to protect a Stencil from the outside? - protect_ = scm_cons (header_->get_expr (), protect_); - if (header_) - header_->align_to (Y_AXIS, UP); + header_ = scm_call_2 (make_header, paper_->smobbed_copy (), + scm_int2num (number_)); + if (get_header ()) + get_header ()->align_to (Y_AXIS, UP); // FIXME: tagline/copyright - footer_ = unsmob_stencil (scm_call_2 (make_footer, paper_->smobbed_copy (), - scm_int2num (number_))); - // ugh, how to protect a Stencil from the outside? - protect_ = scm_cons (footer_->get_expr (), protect_); - if (footer_) - footer_->align_to (Y_AXIS, UP); + footer_ = scm_call_2 (make_footer, paper_->smobbed_copy (), + scm_int2num (number_)); + + if (get_footer ()) + get_footer ()->align_to (Y_AXIS, UP); } void Page::output (Paper_outputter *out, bool is_last) { - if (header_) + if (get_header ()) { - out->output_line (stencil2line (header_), false); + out->output_line (stencil2line (get_header ()), false); out->output_line (height2line (head_sep_), false); } out->output_scheme (scm_list_1 (ly_symbol2scm ("start-page"))); for (SCM s = lines_; gh_pair_p (s); s = ly_cdr (s)) out->output_line (ly_car (s), is_last && gh_pair_p (ly_cdr (s))); out->output_scheme (scm_list_2 (ly_symbol2scm ("stop-page"), - gh_bool2scm (is_last && !footer_))); - if (footer_) + gh_bool2scm (is_last && !get_footer ()))); + if (get_footer ()) { out->output_line (height2line (foot_sep_), false); - out->output_line (stencil2line (footer_), is_last); + out->output_line (stencil2line (get_footer ()), is_last); } } @@ -123,10 +121,10 @@ Real Page::text_height () { Real h = vsize_ - top_margin_ - bottom_margin_; - if (header_) - h -= header_->extent (Y_AXIS).length () + head_sep_; - if (footer_) - h -= footer_->extent (Y_AXIS).length () + foot_sep_; + if (get_header ()) + h -= get_header ()->extent (Y_AXIS).length () + head_sep_; + if (get_footer ()) + h -= get_footer ()->extent (Y_AXIS).length () + foot_sep_; return h; } diff --git a/lily/stem.cc b/lily/stem.cc index fdedb4d22a..1a80ca8199 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -592,7 +592,7 @@ Stem::flag (Grob*me) return Stencil (); } - bool adjust = to_boolean (me->get_property ("adjust-if-on-staffline")); + bool adjust = true; String staffline_offs; if (String::compare (flag_style, "mensural") == 0) @@ -984,7 +984,7 @@ ADD_INTERFACE (Stem,"stem-interface", , "tremolo-flag french-beaming " - "avoid-note-head adjust-if-on-staffline thickness " + "avoid-note-head thickness " "stem-info beamed-lengths beamed-minimum-free-lengths " "beamed-extreme-minimum-free-lengths lengths beam stem-shorten " "duration-log beaming neutral-direction stem-end-position " diff --git a/ly/a3-init.ly b/ly/a3-init.ly index 259eccc635..e1980fae81 100644 --- a/ly/a3-init.ly +++ b/ly/a3-init.ly @@ -1,4 +1,4 @@ -\version "2.1.28" +\version "2.1.30" % a3-init.ly hsize = 296.9 \mm diff --git a/ly/a4-init.ly b/ly/a4-init.ly index ecf51b9f73..2fb61d2a8f 100644 --- a/ly/a4-init.ly +++ b/ly/a4-init.ly @@ -1,4 +1,4 @@ -\version "2.1.28" +\version "2.1.30" % a4.ly hsize = 210.0 \mm diff --git a/ly/accordion-defs-init.ly b/ly/accordion-defs-init.ly index 8c432fc9b1..90b5edaf0d 100644 --- a/ly/accordion-defs-init.ly +++ b/ly/accordion-defs-init.ly @@ -1,4 +1,4 @@ -\version "2.1.28" +\version "2.1.30" % Symbols needed to print accordion music % % 2' = T diff --git a/ly/book-init-init.ly b/ly/book-init-init.ly index e9c4e2c602..d1466f8055 100644 --- a/ly/book-init-init.ly +++ b/ly/book-init-init.ly @@ -1,6 +1,6 @@ % Toplevel initialisation file. -\version "2.1.28" +\version "2.1.30" \include "declarations-init.ly" diff --git a/ly/catalan.ly b/ly/catalan.ly index 119184bfce..37452f06e6 100644 --- a/ly/catalan.ly +++ b/ly/catalan.ly @@ -73,4 +73,4 @@ pitchnamesCatalan = #`( pitchnames = \pitchnamesCatalan -\version "2.1.28" +\version "2.1.30" diff --git a/ly/center-init.ly b/ly/center-init.ly index 82a8ea52aa..ca26b5caea 100644 --- a/ly/center-init.ly +++ b/ly/center-init.ly @@ -1,6 +1,6 @@ % Toplevel initialisation file. -\version "2.1.28" +\version "2.1.30" \include "declarations-init.ly" diff --git a/ly/chord-modifiers-init.ly b/ly/chord-modifiers-init.ly index d780d3ff9d..2f72eea818 100644 --- a/ly/chord-modifiers-init.ly +++ b/ly/chord-modifiers-init.ly @@ -1,4 +1,4 @@ -\version "2.1.28" +\version "2.1.30" chordmodifiers = #default-chord-modifier-list diff --git a/ly/declarations-init.ly b/ly/declarations-init.ly index 4cbadfea83..0a119daeb7 100644 --- a/ly/declarations-init.ly +++ b/ly/declarations-init.ly @@ -1,6 +1,6 @@ #(ly:set-option 'old-relative) -\version "2.1.29" +\version "2.1.30" breve = #(ly:make-duration -1 0) longa = #(ly:make-duration -2 0 ) maxima = #(ly:make-duration -3 0) diff --git a/ly/deutsch.ly b/ly/deutsch.ly index b967c5e7c0..548929f549 100644 --- a/ly/deutsch.ly +++ b/ly/deutsch.ly @@ -49,4 +49,4 @@ pitchnamesDeutsch = #`( pitchnames = \pitchnamesDeutsch -\version "2.1.28" +\version "2.1.30" diff --git a/ly/drumpitch-init.ly b/ly/drumpitch-init.ly index 3f35910f8a..61929346cd 100644 --- a/ly/drumpitch-init.ly +++ b/ly/drumpitch-init.ly @@ -1,5 +1,5 @@ -\version "2.1.28" +\version "2.1.30" drumPitchNames = #'((acousticbassdrum . acousticbassdrum) diff --git a/ly/dynamic-scripts-init.ly b/ly/dynamic-scripts-init.ly index b4c85955b1..8bfcac5086 100644 --- a/ly/dynamic-scripts-init.ly +++ b/ly/dynamic-scripts-init.ly @@ -1,4 +1,4 @@ -\version "2.1.28" +\version "2.1.30" % % declare the standard dynamic identifiers. diff --git a/ly/english.ly b/ly/english.ly index b1a06f7086..af754fa53a 100644 --- a/ly/english.ly +++ b/ly/english.ly @@ -87,5 +87,5 @@ pitchnamesEnglish = #`( pitchnames = \pitchnamesEnglish -\version "2.1.28" +\version "2.1.30" diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index 2c1469b1f4..c43a03166e 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -1,4 +1,4 @@ -\version "2.1.29" +\version "2.1.30" \context { \name Global @@ -452,7 +452,7 @@ AncientRemoveEmptyStaffContext = \context { clefGlyph = #"clefs-G" clefPosition = #-2 - centralCPosition = #-6 + middleCPosition = #-6 defaultBarType = #"|" barNumberVisibility = #default-bar-number-visibility @@ -711,7 +711,7 @@ EasyNotation = \context { % Choose vaticana do clef on 3rd line as default. clefGlyph = #"clefs-vaticana_do" - centralCPosition = #1 + middleCPosition = #1 clefPosition = #1 clefOctavation = #0 diff --git a/ly/espanol.ly b/ly/espanol.ly index 31e39e4d8f..ecdc1492f5 100644 --- a/ly/espanol.ly +++ b/ly/espanol.ly @@ -58,4 +58,4 @@ pitchnamesEspanol = #`( pitchnames = \pitchnamesEspanol -\version "2.1.28" +\version "2.1.30" diff --git a/ly/generate-documentation.ly b/ly/generate-documentation.ly index 9ea349a254..7cd7d60fb1 100644 --- a/ly/generate-documentation.ly +++ b/ly/generate-documentation.ly @@ -1,4 +1,4 @@ -\version "2.1.28" +\version "2.1.30" % % Running LilyPond on this file generates the documentation diff --git a/ly/generate-interface-doc-init.ly b/ly/generate-interface-doc-init.ly index 29f1ea4167..fd1b270727 100644 --- a/ly/generate-interface-doc-init.ly +++ b/ly/generate-interface-doc-init.ly @@ -1,4 +1,4 @@ -\version "2.1.28" +\version "2.1.30" % % Running LilyPond on this file generates the short interface doc diff --git a/ly/grace-init.ly b/ly/grace-init.ly index 9b3502d5bf..03a5df28fa 100644 --- a/ly/grace-init.ly +++ b/ly/grace-init.ly @@ -1,4 +1,4 @@ -\version "2.1.28" +\version "2.1.30" startGraceMusic = \notes { diff --git a/ly/gregorian-init.ly b/ly/gregorian-init.ly index c8fd5007eb..8b4c01ad66 100644 --- a/ly/gregorian-init.ly +++ b/ly/gregorian-init.ly @@ -1,4 +1,4 @@ -\version "2.1.28" +\version "2.1.30" %%%%%%%% %%%%%%%% shortcuts common for all styles of gregorian chant notation diff --git a/ly/init.ly b/ly/init.ly index a0505d8eea..a86ad966a7 100644 --- a/ly/init.ly +++ b/ly/init.ly @@ -4,7 +4,7 @@ #(define-public midi-debug #f) -\version "2.1.28" +\version "2.1.30" \include "declarations-init.ly" diff --git a/ly/italiano.ly b/ly/italiano.ly index c40a756d6d..e59f8fc78f 100644 --- a/ly/italiano.ly +++ b/ly/italiano.ly @@ -86,4 +86,4 @@ pitchnamesItaliano = #`( pitchnames = \pitchnamesItaliano -\version "2.1.28" +\version "2.1.30" diff --git a/ly/legal-init.ly b/ly/legal-init.ly index 70939cc4e5..2b02f8fc02 100644 --- a/ly/legal-init.ly +++ b/ly/legal-init.ly @@ -1,4 +1,4 @@ -\version "2.1.28" +\version "2.1.30" % legal-init.ly hsize = 8.5 \in diff --git a/ly/letter-init.ly b/ly/letter-init.ly index 9d3a192543..fcc13b5973 100644 --- a/ly/letter-init.ly +++ b/ly/letter-init.ly @@ -1,4 +1,4 @@ -\version "2.1.28" +\version "2.1.30" % letter-init.ly hsize = 8.5 \in diff --git a/ly/midi-init.ly b/ly/midi-init.ly index 30999086cf..95f012d188 100644 --- a/ly/midi-init.ly +++ b/ly/midi-init.ly @@ -1,4 +1,4 @@ -\version "2.1.28" +\version "2.1.30" \midi { \tempo 4=60 \include "performer-init.ly" diff --git a/ly/nederlands.ly b/ly/nederlands.ly index 4454a9fbf7..c3e2a96306 100644 --- a/ly/nederlands.ly +++ b/ly/nederlands.ly @@ -1,4 +1,4 @@ -\version "2.1.28" +\version "2.1.30" %{ common dutch names for notes. es means flat, is means sharp %} diff --git a/ly/norsk.ly b/ly/norsk.ly index 3a7b303f92..96f5333e30 100644 --- a/ly/norsk.ly +++ b/ly/norsk.ly @@ -105,4 +105,4 @@ pitchnamesNorsk = #`( pitchnames =\pitchnamesNorsk -\version "2.1.28" +\version "2.1.30" diff --git a/ly/params-init.ly b/ly/params-init.ly index 9b1307d2d5..f2a6f6f794 100644 --- a/ly/params-init.ly +++ b/ly/params-init.ly @@ -1,2 +1,2 @@ -\version "2.1.28" +\version "2.1.30" diff --git a/ly/part-paper-init.ly b/ly/part-paper-init.ly index 9d70875f87..e0eb32ecc3 100644 --- a/ly/part-paper-init.ly +++ b/ly/part-paper-init.ly @@ -1,4 +1,4 @@ -\version "2.1.29" +\version "2.1.30" % JUNKME %part-paper-init.ly diff --git a/ly/performer-init.ly b/ly/performer-init.ly index 7d550b7ed6..27d041644f 100644 --- a/ly/performer-init.ly +++ b/ly/performer-init.ly @@ -1,4 +1,4 @@ -\version "2.1.29" +\version "2.1.30" % % setup for Request->Element conversion. Guru-only diff --git a/ly/property-init.ly b/ly/property-init.ly index e150bdd5dd..81378b7628 100644 --- a/ly/property-init.ly +++ b/ly/property-init.ly @@ -1,6 +1,6 @@ % property-init.ly -\version "2.1.28" +\version "2.1.30" stemUp = \override Stem #'direction = #1 stemDown = \override Stem #'direction = #-1 diff --git a/ly/scale-definitions-init.ly b/ly/scale-definitions-init.ly index d768109d9c..633c15a307 100644 --- a/ly/scale-definitions-init.ly +++ b/ly/scale-definitions-init.ly @@ -1,4 +1,4 @@ -\version "2.1.28" +\version "2.1.30" major = #`( diff --git a/ly/script-init.ly b/ly/script-init.ly index 8ba8e15207..366bb2abb9 100644 --- a/ly/script-init.ly +++ b/ly/script-init.ly @@ -1,4 +1,4 @@ -\version "2.1.28" +\version "2.1.30" dashHat= "marcato" diff --git a/ly/spanners-init.ly b/ly/spanners-init.ly index b41dff50d6..3e1eae9c7d 100644 --- a/ly/spanners-init.ly +++ b/ly/spanners-init.ly @@ -1,4 +1,4 @@ -\version "2.1.28" +\version "2.1.30" startGroup = #(make-span-event 'NoteGroupingEvent START) stopGroup = #(make-span-event 'NoteGroupingEvent STOP) diff --git a/ly/suomi.ly b/ly/suomi.ly index e28135a7f9..22813ee100 100644 --- a/ly/suomi.ly +++ b/ly/suomi.ly @@ -48,4 +48,4 @@ pitchnamesSuomi = #`( pitchnames = \pitchnamesSuomi -\version "2.1.28" +\version "2.1.30" diff --git a/ly/svenska.ly b/ly/svenska.ly index fd24d97ae0..897433120f 100644 --- a/ly/svenska.ly +++ b/ly/svenska.ly @@ -42,4 +42,4 @@ pitchnamesSvenska = #`( ) pitchnames = \pitchnamesSvenska -\version "2.1.28" +\version "2.1.30" diff --git a/ly/tabloid-init.ly b/ly/tabloid-init.ly index 0377eb7ed6..2cc637e301 100644 --- a/ly/tabloid-init.ly +++ b/ly/tabloid-init.ly @@ -1,4 +1,4 @@ -\version "2.1.28" +\version "2.1.30" % tabloid-init.ly diff --git a/scm/clef.scm b/scm/clef.scm index 8c21a4f304..bfddb1644c 100644 --- a/scm/clef.scm +++ b/scm/clef.scm @@ -110,7 +110,7 @@ (if (pair? e) (let* ((musics (map make-prop-set `(((symbol . clefGlyph) (value . ,(cadr e))) - ((symbol . centralCPosition) + ((symbol . middleCPosition) (value . ,(+ oct (caddr e) (cdr (assoc (cadr e) c0-pitch-alist))))) diff --git a/scm/define-context-properties.scm b/scm/define-context-properties.scm index 1f2533d1f5..ffa54d5939 100644 --- a/scm/define-context-properties.scm +++ b/scm/define-context-properties.scm @@ -293,7 +293,7 @@ sustain pedals: @code{text}, @code{bracket} or @code{mixed} (both).") (pedalSostenutoStyle ,symbol? "see @code{pedalSustainStyle}.") (printOctaveNames ,boolean? "Print octave marks for the NoteNames context.") (rehearsalMark ,integer? "The last rehearsal mark printed.") - (repeatCommands ,list? "This property is read to find any command of the form @{code(volta . @var{x})}, where @var{x} is a string or @code{#f}") + (repeatCommands ,list? "This property is read to find any command of the form @code{(volta . @var{x})}, where @var{x} is a string or @code{#f}") (restNumberThreshold ,number? "If a multimeasure rest takes less @@ -388,7 +388,7 @@ is a pair of dimensions, for example, this sets the sizes of a staff to 10 (5+5) staffspaces high. @example -\set Staff.verticalExtent = #'(-5.0 . 5.0) +\\set Staff.verticalExtent = #'(-5.0 . 5.0) @end example @@ -481,7 +481,7 @@ Script_engraver for typesetting note-super/subscripts. See ") (quotes ,hash-table? "Hash table, mapping names to music-event vectors.") (stavesFound ,grob-list? "list of all staff-symbols found.") - (instrumentSupport ,ly:grob-list? "list of grobs to attach instrument name + (instrumentSupport ,grob-list? "list of grobs to attach instrument name to.") (tieMelismaBusy ,boolean? "Signal whether a tie is present.") ) diff --git a/scm/define-grob-properties.scm b/scm/define-grob-properties.scm index 6ed99f8c9e..577deb64c3 100644 --- a/scm/define-grob-properties.scm +++ b/scm/define-grob-properties.scm @@ -153,14 +153,6 @@ line).") center of the staff.") ;; todo: why is this tunable? - (neutral-position ,number? "Position (in half staff spaces) where -to flip the direction of stems: by default, custodes above this -position get their stems downwards; custodes below this position get -their stems upwards. A value of 0 designates the center of the staff. -Use property neutral-direction to control the behaviour of stems on -the neutral position itself. (Note: currently, neutral-position is -supported only for custodes; for stems of note heads, neutral-position -is currently fixed to 0, i.e. the middle of the staff.)") (dir-function ,procedure? "The function to determine the direction of a beam. Choices include: @@ -338,8 +330,8 @@ this column. 10000 or more means forbid linebreak, -10000 or less means force linebreak. Other values influence linebreaking decisions as a real penalty.") - (pitch-max ,ly:pitch? "FIXME, JUNKME") - (pitch-min ,ly:pitch? "FIXME, JUNKME") + (pitch-max ,ly:pitch? "Top pitch for ambitus.") + (pitch-min ,ly:pitch? "Bottom pitch for ambitus.") (positions ,pair? "Pair of staff coordinates @code{(@var{left} @@ -471,7 +463,7 @@ zigzag, relative to @code{zigzag-width}. A value of 1 gives 60-degree zigzags.") (zigzag-width ,ly:dimension? "The width of one zigzag-squiggle. This number will be adjusted slightly so that the -line can be constructed from a whole number of squiggles.") +glissando line can be constructed from a whole number of squiggles.") (avoid-note-head ,boolean? "If set, the stem of a chord does not pass through all note heads, but starts at the last note head. ") @@ -638,6 +630,8 @@ than a whole rest.") ;; end ancient notation + ; ugh. + (accidentals-style ,symbol? "style for ambitus.") ))) diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index cbbb9c3806..1920f4a57c 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -892,15 +892,6 @@ (meta . ((interfaces . (spacing-interface note-spacing-interface item-interface )))) )) - (StaffSymbol - . ( - (print-function . ,Staff_symbol::print) - (line-count . 5) - (ledger-line-thickness . (1.0 . 0.1)) - (layer . 0) - (meta . ((interfaces . (staff-symbol-interface spanner-interface)))) - )) - (SostenutoPedal . ( (print-function . ,Text_item::print) @@ -926,6 +917,15 @@ (direction . -1) (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface)))) )) + + (StaffSymbol + . ( + (print-function . ,Staff_symbol::print) + (line-count . 5) + (ledger-line-thickness . (1.0 . 0.1)) + (layer . 0) + (meta . ((interfaces . (staff-symbol-interface spanner-interface)))) + )) (Stem . ( @@ -972,7 +972,6 @@ (X-extent-callback . ,Stem::dim_callback) (Y-extent-callback . ,Stem::height) (Y-offset-callbacks . (,Staff_symbol_referencer::callback)) - (adjust-if-on-staffline . #t) (font-family . music) (meta . ((interfaces . (stem-interface font-interface item-interface )))) )) diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index 06a05f5f99..e714adba72 100644 --- a/scm/define-markup-commands.scm +++ b/scm/define-markup-commands.scm @@ -37,7 +37,7 @@ markups)) (text-width (apply + (map interval-length (map (lambda (x) - (ly:stencil-get-extent x X)) + (ly:stencil-extent x X)) stencils)))) (word-count (length markups)) (word-space (cdr (chain-assoc 'word-space props))) @@ -312,8 +312,8 @@ and/or @code{extra-offset} properties. " (m2 (interpret-markup paper props arg2))) (ly:stencil-align-to! m1 X CENTER) (ly:stencil-align-to! m2 X CENTER) - (let* ((x1 (ly:stencil-get-extent m1 X)) - (x2 (ly:stencil-get-extent m2 X)) + (let* ((x1 (ly:stencil-extent m1 X)) + (x2 (ly:stencil-extent m2 X)) (line (ly:round-filled-box (interval-union x1 x2) '(-0.05 . 0.05) 0.0)) ;; should stack mols separately, to maintain LINE on baseline (stack (stack-lines -1 0.2 0.6 (list m1 line m2)))) @@ -338,7 +338,7 @@ and/or @code{extra-offset} properties. " (stemth 0.13) (stemy (* dir stemlen)) (attachx (if (> dir 0) - (- (cdr (ly:stencil-get-extent headgl X)) stemth) + (- (cdr (ly:stencil-extent headgl X)) stemth) 0)) (attachy (* dir 0.28)) (stemgl (and (> log 0) @@ -348,7 +348,7 @@ and/or @code{extra-offset} properties. " (max stemy attachy)) (/ stemth 3)))) (dot (ly:find-glyph-by-name font "dots-dot")) - (dotwid (interval-length (ly:stencil-get-extent dot X))) + (dotwid (interval-length (ly:stencil-extent dot X))) (dots (and (> dot-count 0) (apply ly:stencil-add (map (lambda (x) @@ -375,7 +375,7 @@ and/or @code{extra-offset} properties. " (* 1.5 dotwid) 0) ;; huh ? why not necessary? - ;;(cdr (ly:stencil-get-extent headgl X)) + ;;(cdr (ly:stencil-extent headgl X)) dotwid) X) stemgl))) diff --git a/scm/music-functions.scm b/scm/music-functions.scm index 5011a0a0ee..5f7d361988 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -75,7 +75,7 @@ (display ": { ") (let ((es (ly:music-property music 'elements)) (e (ly:music-property music 'element))) - (display (ly:get-mutable-properties music)) + (display (ly:mutable-music-properties music)) (if (pair? es) (begin (display "\nElements: {\n") (map display-music es) @@ -275,25 +275,25 @@ a property set for MultiMeasureRestNumber." (define-public (make-ottava-set octavation) (let ((m (make-music 'ApplyContext))) (define (ottava-modify context) - "Either reset centralCPosition to the stored original, or remember -old centralCPosition, add OCTAVATION to centralCPosition, and set + "Either reset middleCPosition to the stored original, or remember +old middleCPosition, add OCTAVATION to middleCPosition, and set OTTAVATION to `8va', or whatever appropriate." - (if (number? (ly:context-property context 'centralCPosition)) + (if (number? (ly:context-property context 'middleCPosition)) (if (= octavation 0) - (let ((where (ly:context-property-where-defined context 'centralCPosition)) + (let ((where (ly:context-property-where-defined context 'middleCPosition)) (oc0 (ly:context-property context 'originalCentralCPosition))) - (ly:context-set-property! context 'centralCPosition oc0) + (ly:context-set-property! context 'middleCPosition oc0) (ly:unset-context-property where 'originalCentralCPosition) (ly:unset-context-property where 'ottavation)) - (let* ((where (ly:context-property-where-defined context 'centralCPosition)) - (c0 (ly:context-property context 'centralCPosition)) + (let* ((where (ly:context-property-where-defined context 'middleCPosition)) + (c0 (ly:context-property context 'middleCPosition)) (new-c0 (+ c0 (* -7 octavation))) (string (cdr (assoc octavation '((2 . "15ma") (1 . "8va") (0 . #f) (-1 . "8va bassa") (-2 . "15ma bassa")))))) - (ly:context-set-property! context 'centralCPosition new-c0) + (ly:context-set-property! context 'middleCPosition new-c0) (ly:context-set-property! context 'originalCentralCPosition c0) (ly:context-set-property! context 'ottavation string))))) (set! (ly:music-property m 'procedure) ottava-modify) @@ -523,7 +523,7 @@ without context specification. Called from parser." (define-public (set-start-grace-properties context) (define (execute-1 x) - (let ((tr (ly:translator-find context (car x)))) + (let ((tr (ly:context-find context (car x)))) (if (ly:context? tr) (ly:context-pushpop-property tr (cadr x) (caddr x) (cadddr x))))) @@ -533,7 +533,7 @@ without context specification. Called from parser." (define-public (set-stop-grace-properties context) (define (execute-1 x) - (let ((tr (ly:translator-find context (car x)))) + (let ((tr (ly:context-find context (car x)))) (if (ly:context? tr) (ly:context-pushpop-property tr (cadr x) (caddr x))))) diff --git a/scm/new-markup.scm b/scm/new-markup.scm index b3f3d6d046..7c455a5f4d 100644 --- a/scm/new-markup.scm +++ b/scm/new-markup.scm @@ -419,7 +419,7 @@ Also set markup-signature and markup-keyword object properties." (ly:stencil? (cadr stencils))) (let* ((tail (stack-stencil-line space (cdr stencils))) (head (car stencils)) - (xoff (+ space (cdr (ly:stencil-get-extent head X))))) + (xoff (+ space (cdr (ly:stencil-extent head X))))) (ly:stencil-add head (ly:stencil-translate-axis tail xoff X))) (car stencils)) diff --git a/scm/output-lib.scm b/scm/output-lib.scm index d21ccf6520..1f70e44e62 100644 --- a/scm/output-lib.scm +++ b/scm/output-lib.scm @@ -50,8 +50,8 @@ (let ((slur (Slur::print grob)) (text (fontify-text (ly:get-default-font grob) letter))) - (let ((x (/ (- (cdr (ly:stencil-get-extent slur 0)) - (/ (cdr (ly:stencil-get-extent text 0)) 2.0) + (let ((x (/ (- (cdr (ly:stencil-extent slur 0)) + (/ (cdr (ly:stencil-extent text 0)) 2.0) ) -2.0))) @@ -75,8 +75,8 @@ (let* ( (mol (callback grob)) - (x-ext (interval-widen (ly:stencil-get-extent mol 0) x-padding)) - (y-ext (interval-widen (ly:stencil-get-extent mol 1) y-padding)) + (x-ext (interval-widen (ly:stencil-extent mol 0) x-padding)) + (y-ext (interval-widen (ly:stencil-extent mol 1) y-padding)) (x-rule (make-filled-box-stencil (interval-widen x-ext line-thick) (cons 0 line-thick))) (y-rule (make-filled-box-stencil (cons 0 line-thick) y-ext)) diff --git a/scm/stencil.scm b/scm/stencil.scm index 1e88d6c4dc..bad27138e5 100644 --- a/scm/stencil.scm +++ b/scm/stencil.scm @@ -33,7 +33,7 @@ (define-public (bracketify-stencil stil axis thick protusion padding) "Add brackets around STIL, producing a new stencil." - (let* ((ext (ly:stencil-get-extent stil axis)) + (let* ((ext (ly:stencil-extent stil axis)) (lb (ly:bracket axis ext thick (- protusion))) (rb (ly:bracket axis ext thick protusion))) (set! stil @@ -68,8 +68,8 @@ encloses the contents. ;; TODO merge this and prev function. (define-public (box-stencil stil thick padding) "Add a box around STIL, producing a new stencil." - (let* ((x-ext (interval-widen (ly:stencil-get-extent stil 0) padding)) - (y-ext (interval-widen (ly:stencil-get-extent stil 1) padding)) + (let* ((x-ext (interval-widen (ly:stencil-extent stil 0) padding)) + (y-ext (interval-widen (ly:stencil-extent stil 1) padding)) (y-rule (make-filled-box-stencil (cons 0 thick) y-ext)) (x-rule (make-filled-box-stencil (interval-widen x-ext thick) (cons 0 thick)))) diff --git a/scm/to-xml.scm b/scm/to-xml.scm index d88649315a..d97f2682ac 100644 --- a/scm/to-xml.scm +++ b/scm/to-xml.scm @@ -116,7 +116,7 @@ is then separated. (let* ((name (ly:music-property music 'name)) (e (ly:music-property music 'element)) (es (ly:music-property music 'elements)) - (mprops (ly:get-mutable-properties music)) + (mprops (ly:mutable-music-properties music)) (d (ly:music-property music 'duration)) (p (ly:music-property music 'pitch)) (ignore-props '(origin elements duration pitch element))) -- 2.39.2