From 89ca5f692cf26086441e85f3bfe87ac274d09581 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 5 Feb 2001 16:34:18 +0100 Subject: [PATCH] patch::: 1.3.128.jcn1 1.3.128.jcn1 ============ * Small doco fixes. * Added user control for devnull engravers. --- CHANGES | 8 ++ Documentation/user/fdl.itexi | 4 +- Documentation/user/refman.itely | 2 +- VERSION | 2 +- input/bugs/score-dynamics.ly | 113 +++++++----------- input/regression/allfontstyle.ly | 2 +- input/regression/bar-number.ly | 4 +- input/regression/bar-scripts.ly | 3 +- input/tutorial/orchestral-score.ly | 69 ++++++----- lily/thread-devnull-engraver.cc | 29 ++--- lily/voice-devnull-engraver.cc | 32 ++++- ly/engraver.ly | 8 +- mutopia/J.S.Bach/Duette/viola-part.ly | 4 +- mutopia/J.S.Bach/Duette/violino-part.ly | 4 +- mutopia/J.S.Bach/Duette/violoncello-part.ly | 4 +- .../Solo-Cello-Suites/solo-cello-suite-ii.ly | 2 +- scm/translator-property-description.scm | 21 +++- 17 files changed, 173 insertions(+), 138 deletions(-) diff --git a/CHANGES b/CHANGES index fc3f369537..31c283a9e7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,13 @@ +1.3.128.jcn1 +============ + +* Small doco fixes. + +* Added user control for devnull engravers. + 1.3.127.jcn3 ============ + * Mutopia preparations and Coriolan fixes. * Small beam cleanup, changed y-position-hs,height-hs user overrides to diff --git a/Documentation/user/fdl.itexi b/Documentation/user/fdl.itexi index 361f90f7bb..5ef0312bef 100644 --- a/Documentation/user/fdl.itexi +++ b/Documentation/user/fdl.itexi @@ -1,6 +1,8 @@ @node GNU Free Documentation License -@appendixsec GNU Free Documentation License +@c @appendixsec GNU Free Documentation License +@c Hmm, only have one section in appendix: move up to chapter level +@appendix GNU Free Documentation License @cindex FDL, GNU Free Documentation License @center Version 1.1, March 2000 diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 018f69c997..1072359261 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -1631,7 +1631,7 @@ This is a short-cut for doing @end example You are encouraged to use @code{\repeat} for repetitions. See -@ref{Repeat}, and the documentation of @code{whichBar} in +@ref{Repeats}, and the documentation of @code{whichBar} in @ref{(lilypond-internals)LilyPond context properties}. diff --git a/VERSION b/VERSION index 65caf5f0ed..a09032fb64 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 PATCH_LEVEL=128 -MY_PATCH_LEVEL= +MY_PATCH_LEVEL=jcn1 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/input/bugs/score-dynamics.ly b/input/bugs/score-dynamics.ly index 2c4a6500e1..9389c525a9 100644 --- a/input/bugs/score-dynamics.ly +++ b/input/bugs/score-dynamics.ly @@ -16,104 +16,79 @@ contrabasso = \notes\relative c'' { c2\pp c d1 e } -flautiStaff = \notes \context VoiceCombineStaff = flauti < - \context VoiceCombineVoice=oneBassi \End - \context VoiceCombineVoice=twoBassi \End - \context VoiceCombineVoice=Flauti \partcombine VoiceCombineVoice - \context VoiceCombineThread=oneFlauti \violoncello - \context VoiceCombineThread=twoFlauti \contrabasso +flautiStaff = \notes \context Staff = flauti < + \context Voice=oneBassi \End + \context Voice=twoBassi \End + \context Voice=Flauti \partcombine Voice + \context Thread=oneFlauti \violoncello + \context Thread=twoFlauti \contrabasso > +staffCombineProperties = { + \property Voice.devNullThread = #'unisolo + \property Voice.soloADue = ##t + \property Voice.soloText = #"" + \property Voice.soloIIText = #"" + % This is non-conventional, but currently it is + % the only way to tell the difference. + \property Voice.aDueText = #"\\`a2" + \property Voice.splitInterval = #'(1 . 0) + \property Voice.changeMoment = #`(,(make-moment 1 1) . ,(make-moment 1 1)) +} \score { < \flautiStaff \context PianoStaff = bassi_group \notes < - \context StaffCombineStaff=oneBassi \End - \context StaffCombineStaff=twoBassi \End + \context Staff=oneBassi \End + \context Staff=twoBassi \End - \context StaffCombineStaff=oneBassi \partcombine StaffCombineStaff - \context StaffCombineVoice=oneBassi \violoncello - \context StaffCombineVoice=twoBassi \contrabasso + \context Staff=oneBassi \partcombine Staff + \context Voice=oneBassi { \staffCombineProperties \violoncello } + \context Voice=twoBassi { \staffCombineProperties \contrabasso } > - > - \paper{ + > + \paper { % \paperSixteen - - %textheight = 290.0\mm; - %linewidth = 195.0\mm; - textheight = 285.0\mm; - linewidth = 190.0\mm; - - \translator{ \HaraKiriStaffContext } - % - % The Voice combine hierarchy - % + linewidth = 80 * \staffspace; + textheight = 200 * \staffspace; \translator{ \ThreadContext - \name "VoiceCombineThread"; \consists "Rest_engraver"; } \translator{ \VoiceContext - \name "VoiceCombineVoice"; + \remove "Rest_engraver"; + + % The staff combine (bassi part) needs a + % thread_devnull_engraver here. + % Instead of maintaining two separate hierarchies, + % we switch add it, but switch it off immideately. + % The staff combine parts switch it on. + devNullThread = #'never + \consists "Thread_devnull_engraver"; + soloText = #"I." soloIIText = #"II." - \remove "Rest_engraver"; - \accepts "VoiceCombineThread"; + soloADue = ##f } \translator{ \HaraKiriStaffContext \consists "Mark_engraver"; - \name "VoiceCombineStaff"; - \accepts "VoiceCombineVoice"; - } - - % - % The Staff combine hierarchy - % - \translator{ - \ThreadContext - \name "StaffCombineThread"; - } - \translator{ - \VoiceContext - \name "StaffCombineVoice"; - \accepts "StaffCombineThread"; - \consists "Thread_devnull_engraver"; - } - \translator { - \HaraKiriStaffContext - \name "StaffCombineStaff"; - \accepts "StaffCombineVoice"; - - soloADue = ##t - soloText = #"" - soloIIText = #"" - % This is non-conventional, but currently it is - % the only way to tell the difference. - aDueText = #"\\`a2" - splitInterval = #'(1 . 0) - changeMoment = #`(,(make-moment 1 1) . ,(make-moment 1 1)) } \translator { - \StaffGroupContext - \accepts "VoiceCombineStaff"; - \accepts "StaffCombineStaff"; - } - \translator{ \HaraKiriStaffContext } - - \translator { - %\ScoreContext \OrchestralScoreContext - \accepts "VoiceCombineStaff"; - \accepts "StaffCombineStaff"; - TimeSignature \override #'style = #'C - skipBars = ##t + skipBars = ##t + % Hmm + currentBarNumber = #218 BarNumber \override #'padding = #3 RestCollision \override #'maximum-rest-count = #1 + marginScriptHorizontalAlignment = #1 + TimeSignature \override #'style = #'C } + \translator { \HaraKiriStaffContext } } } + diff --git a/input/regression/allfontstyle.ly b/input/regression/allfontstyle.ly index 8c48cd1780..d25e2391c6 100644 --- a/input/regression/allfontstyle.ly +++ b/input/regression/allfontstyle.ly @@ -12,6 +12,6 @@ f4-\ff^""^"Largo" \mark "B"; g } \paper { linewidth = -1.0; - \translator { \BarNumberingStaffContext} + % \translator {\BarNumberingStaffContext} } } } diff --git a/input/regression/bar-number.ly b/input/regression/bar-number.ly index 502045ed54..e0617c0acc 100644 --- a/input/regression/bar-number.ly +++ b/input/regression/bar-number.ly @@ -12,8 +12,6 @@ texidoc="Bar number settable and padding adjustable."; } \paper { linewidth = 40*\staffspace; - \translator { - \BarNumberingStaffContext - } + % \translator { \BarNumberingStaffContext } } } diff --git a/input/regression/bar-scripts.ly b/input/regression/bar-scripts.ly index 644550de3f..7808e156f1 100644 --- a/input/regression/bar-scripts.ly +++ b/input/regression/bar-scripts.ly @@ -24,7 +24,8 @@ grstaff = \notes \context GrandStaff < > scpaper = \paper {\translator {\OrchestralScoreContext}} -stpaper = \paper{ \translator {\BarNumberingStaffContext }} +% stpaper = \paper{ \translator {\BarNumberingStaffContext }} +stpaper = \paper{ } scscore = \score { \grstaff \paper { \scpaper diff --git a/input/tutorial/orchestral-score.ly b/input/tutorial/orchestral-score.ly index 8926afb36d..0b0585013f 100644 --- a/input/tutorial/orchestral-score.ly +++ b/input/tutorial/orchestral-score.ly @@ -5,6 +5,30 @@ % #(set! point-and-click #t) #(define text-flat '((font-relative-size . -2) (music "accidentals--1"))) +staffCombineStaffProperties = { + \property Staff.devNullThread = #'unisolo + \property Staff.soloADue = ##t + \property Staff.soloText = #"" + \property Staff.soloIIText = #"" + % This is non-conventional, but currently it is + % the only way to tell the difference. + \property Staff.aDueText = #"\\`a2" + \property Staff.splitInterval = #'(1 . 0) + \property Staff.changeMoment = #`(,(make-moment 1 1) . ,(make-moment 1 1)) +} + +staffCombineVoiceProperties = { + \property Voice.devNullThread = #'unisolo + \property Voice.soloADue = ##t + \property Voice.soloText = #"" + \property Voice.soloIIText = #"" + % This is non-conventional, but currently it is + % the only way to tell the difference. + \property Voice.aDueText = #"\\`a2" + \property Voice.splitInterval = #'(1 . 0) + \property Voice.changeMoment = #`(,(make-moment 1 1) . ,(make-moment 1 1)) +} + % Coriolan 218-222 flautoI = \notes\relative c'' { @@ -190,17 +214,8 @@ contrabasso = \notes\relative c { \context Thread=two \violaII > \context GrandStaff=bass < - \property GrandStaff.soloADue = ##t - \property GrandStaff.soloText = #"" - \property GrandStaff.soloIIText = #"" - % This is non-conventional, but currently it is - % the only way to tell the difference. - \property GrandStaff.aDueText = #"\\`a2" - \property GrandStaff.splitInterval = #'(1 . 0) - \property GrandStaff.changeMoment = - #`(,(make-moment 1 1) . ,(make-moment 1 1)) - \context Staff=one < + %\staffCombineStaffProperties \property Staff.midiInstrument = #"cello" \property Staff.instrument = #'((kern . 0.5) (lines "Violoncello" (rows " e") (rows "Contrabasso"))) @@ -208,6 +223,7 @@ contrabasso = \notes\relative c { \clef bass; > \context Staff=two < + %\staffCombineStaffProperties \property Staff.midiInstrument = #"contrabass" \property Staff.instrument = "Contrabasso" \property Staff.instr = "C.B." @@ -215,8 +231,8 @@ contrabasso = \notes\relative c { \skip 1*4; % sustain clef > \context Staff=one \partcombine Staff - \context Voice=one \violoncello - \context Voice=two \contrabasso + \context Voice=one { \staffCombineVoiceProperties \violoncello } + \context Voice=two { \staffCombineVoiceProperties \contrabasso } > > > @@ -231,30 +247,26 @@ contrabasso = \notes\relative c { \translator{ \VoiceContext \remove "Rest_engraver"; - soloText = #"I." - soloIIText = #"II." - soloADue = ##f - % We must override the settings for Staff level - % with the default values, here. - aDueText = #"\\`a2" - splitInterval = #'(0 . 1) - changeMoment = #`(,(make-moment 0 0) . ,(make-moment 1 512)) + + % The staff combine (bassi part) needs a + % thread_devnull_engraver here. + % Instead of maintaining two separate hierarchies, + % we switch add it, but switch it off immideately. + % The staff combine parts switch it on. + devNullThread = #'never + \consists "Thread_devnull_engraver"; } \translator{ \HaraKiriStaffContext \consists "Mark_engraver"; - soloADue = ##t - soloText = #"" - soloIIText = #"" - % This is non-conventional, but currently it is - % the only way to tell the difference. - aDueText = #"\\`a2" - splitInterval = #'(1 . 0) - changeMoment = #`(,(make-moment 1 1) . ,(make-moment 1 1)) } \translator { \OrchestralScoreContext skipBars = ##t + + soloText = #"I." + soloIIText = #"II." + % Hmm currentBarNumber = #218 BarNumber \override #'padding = #3 @@ -262,7 +274,6 @@ contrabasso = \notes\relative c { marginScriptHorizontalAlignment = #1 TimeSignature \override #'style = #'C } - \translator { \HaraKiriStaffContext } } } diff --git a/lily/thread-devnull-engraver.cc b/lily/thread-devnull-engraver.cc index 4006c476a2..14f6754e0e 100644 --- a/lily/thread-devnull-engraver.cc +++ b/lily/thread-devnull-engraver.cc @@ -25,23 +25,18 @@ ADD_THIS_TRANSLATOR (Thread_devnull_engraver); void Thread_devnull_engraver::acknowledge_grob (Grob_info i) { - /* - FIXME: coriolan-fix hack -- ff geen inspiratie - - We should have at least three modes: - - 1. Never -- do nothing - 2. Allways -- junk everythingallways - 3. Regular: junk according to two/unison/unisilence/soloADue + SCM s = get_property ("devNullThread"); +#if 0 + /* No need */ + if (gh_equal_p (s, ly_symbol2scm ("never"))) + return; +#endif - but how shall we do that? - - Hmm, maybe just: threadDevNull = 'never|'allways|... - */ - if (!to_boolean (get_property ("disableDevNullThread")) - && daddy_trans_l_->id_str_.left_str (3) == "two" - && (to_boolean (get_property ("unison")) - || to_boolean (get_property ("unisilence"))) - && to_boolean (get_property ("soloADue"))) + if (gh_equal_p (s, ly_symbol2scm ("allways")) + || (gh_equal_p (s, ly_symbol2scm ("unisolo")) + && daddy_trans_l_->id_str_.left_str (3) == "two" + && (to_boolean (get_property ("unison")) + || to_boolean (get_property ("unisilence"))) + && to_boolean (get_property ("soloADue")))) i.elem_l_->suicide (); } diff --git a/lily/voice-devnull-engraver.cc b/lily/voice-devnull-engraver.cc index 63d1fde940..ed34540a4b 100644 --- a/lily/voice-devnull-engraver.cc +++ b/lily/voice-devnull-engraver.cc @@ -26,6 +26,7 @@ ADD_THIS_TRANSLATOR (Voice_devnull_engraver); static char const *eat_spanners[] = { "beam-interface", "slur", + "tie", "dynamic-interface", "crescendo-interface", 0 @@ -34,9 +35,18 @@ static char const *eat_spanners[] = { bool Voice_devnull_engraver::try_music (Music *m) { - if (daddy_trans_l_->id_str_.left_str (3) == "two" - && (to_boolean (get_property ("unison")) - || to_boolean (get_property ("unisilence")))) + SCM s = get_property ("devNullVoice"); +#if 0 + /* No need */ + if (gh_equal_p (s, ly_symbol2scm ("never"))) + return; +#endif + + if (gh_equal_p (s, ly_symbol2scm ("allways")) + || (gh_equal_p (s, ly_symbol2scm ("unisolo")) + &&daddy_trans_l_->id_str_.left_str (3) == "two" + && (to_boolean (get_property ("unison")) + || to_boolean (get_property ("unisilence"))))) { for (char const **p = eat_spanners; *p; p++) { @@ -69,9 +79,18 @@ static char const *junk_interfaces[] = { void Voice_devnull_engraver::acknowledge_grob (Grob_info i) { - if (daddy_trans_l_->id_str_.left_str (3) == "two" - && (to_boolean (get_property ("unison")) - || to_boolean (get_property ("unisilence")))) + SCM s = get_property ("devNullVoice"); +#if 0 + /* No need */ + if (gh_equal_p (s, ly_symbol2scm ("never"))) + return; +#endif + + if (gh_equal_p (s, ly_symbol2scm ("allways")) + || (gh_equal_p (s, ly_symbol2scm ("unisolo")) + && daddy_trans_l_->id_str_.left_str (3) == "two" + && (to_boolean (get_property ("unison")) + || to_boolean (get_property ("unisilence"))))) for (char const **p = junk_interfaces; *p; p++) if (i.elem_l_->has_interface (ly_symbol2scm (*p))) { @@ -79,3 +98,4 @@ Voice_devnull_engraver::acknowledge_grob (Grob_info i) return; } } + diff --git a/ly/engraver.ly b/ly/engraver.ly index 66664f7d28..01a00e1bb5 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -116,6 +116,7 @@ VoiceContext = \translator { \consists "Melisma_engraver"; \consists "Text_engraver"; \consists "A2_engraver"; + devNullVoice = #'unisolo \consists "Voice_devnull_engraver"; \consists "Script_engraver"; @@ -179,13 +180,15 @@ GraceContext=\translator { ThreadContext = \translator{ \type Engraver_group_engraver; + \name Thread; + + devNullThread = #'unisolo \consists "Thread_devnull_engraver"; \consists "Note_heads_engraver"; \consists "Note_head_line_engraver"; \consists "Output_property_engraver"; Generic_property_list = #generic-thread-properties \consists "Property_engraver"; - \name Thread; } GrandStaffContext=\translator{ @@ -355,6 +358,9 @@ ScoreContext = \translator { splitInterval = #'(0 . 1) changeMoment = #`(,(make-moment 0 0) . ,(make-moment 1 512)) + %devNullThread = #'unisolo + %devNullVoice = #'unisolo + StaffMinimumVerticalExtent = #(cons -4.0 4.0) barAuto = ##t diff --git a/mutopia/J.S.Bach/Duette/viola-part.ly b/mutopia/J.S.Bach/Duette/viola-part.ly index ef7760a61a..acec5f0502 100644 --- a/mutopia/J.S.Bach/Duette/viola-part.ly +++ b/mutopia/J.S.Bach/Duette/viola-part.ly @@ -18,7 +18,7 @@ copyright = "Public Domain"; \score{ \violaIStaff \paper{ - \translator { \BarNumberingStaffContext } + %\translator { \BarNumberingStaffContext } } \midi{ %urg, real/duration @@ -36,7 +36,7 @@ copyright = "Public Domain"; \violaIiStaff \paper{ % castingalgorithm=0.0; - \translator { \BarNumberingStaffContext } + %\translator { \BarNumberingStaffContext } %\translator { \ScoreContext skipBars = 1; } } \midi{ diff --git a/mutopia/J.S.Bach/Duette/violino-part.ly b/mutopia/J.S.Bach/Duette/violino-part.ly index 1e72b403be..4f535e7fd8 100644 --- a/mutopia/J.S.Bach/Duette/violino-part.ly +++ b/mutopia/J.S.Bach/Duette/violino-part.ly @@ -18,7 +18,7 @@ copyright = "Public Domain"; \score{ \violinoIStaff \paper{ - \translator { \BarNumberingStaffContext } + %\translator { \BarNumberingStaffContext } } \midi{ % \tempo 4. = 69; @@ -34,7 +34,7 @@ copyright = "Public Domain"; \score{ \violinoIiStaff \paper{ - \translator { \BarNumberingStaffContext } + %\translator { \BarNumberingStaffContext } % castingalgorith=0; } \midi{ diff --git a/mutopia/J.S.Bach/Duette/violoncello-part.ly b/mutopia/J.S.Bach/Duette/violoncello-part.ly index 26449b6eca..ba58376170 100644 --- a/mutopia/J.S.Bach/Duette/violoncello-part.ly +++ b/mutopia/J.S.Bach/Duette/violoncello-part.ly @@ -18,7 +18,7 @@ copyright = "Public Domain"; \score{ \violoncelloIStaff \paper{ - \translator { \BarNumberingStaffContext } + %\translator { \BarNumberingStaffContext } } \midi{ %urg, real/duration @@ -36,7 +36,7 @@ copyright = "Public Domain"; \violoncelloIiStaff \paper{ %castingalgorithm=0.; - \translator { \BarNumberingStaffContext } + %\translator { \BarNumberingStaffContext } } \midi{ % \tempo 2 = 96; diff --git a/mutopia/J.S.Bach/Solo-Cello-Suites/solo-cello-suite-ii.ly b/mutopia/J.S.Bach/Solo-Cello-Suites/solo-cello-suite-ii.ly index b592904068..04f1bf6d1f 100644 --- a/mutopia/J.S.Bach/Solo-Cello-Suites/solo-cello-suite-ii.ly +++ b/mutopia/J.S.Bach/Solo-Cello-Suites/solo-cello-suite-ii.ly @@ -2,7 +2,7 @@ \paper { linewidth = 180.\mm; -\translator { \BarNumberingStaffContext } +% \translator { \BarNumberingStaffContext } } % \include "prelude-" + \instr + ".ly"; diff --git a/scm/translator-property-description.scm b/scm/translator-property-description.scm index 7210e92b28..4e5ab9c7fd 100644 --- a/scm/translator-property-description.scm +++ b/scm/translator-property-description.scm @@ -116,7 +116,26 @@ arpeggios that cross staffs. (translator-property-description 'crescendoText string? "Text to print at start of non-hairpin crecscendo, ie: @samp{cresc.}") (translator-property-description 'crescendoSpanner symbol? "Type of spanner to be used for crescendi. One of: @samp{hairpin}, @samp{line}, @samp{dashed-line}, @samp{dotted-line}. If unset, hairpin type is used.") (translator-property-description 'decrescendoText string? "Text to print at start of non-hairpin decrecscendo, ie: @samp{dim.}") -(translator-property-description 'disableDevNullThread boolean? "temp hack: turn off thread-devnull-engraver") +(translator-property-description 'devNullThread symbol? "User control of Thread_devnull_engraver: one of +@table @samp +@item unisolo +Behave in normal way: remove one set of grobs when threads are in unisolo. +@item allways: +Remove any grob that comes along. +@item never: +Do nothing. +@end table +") +(translator-property-description 'devNullVoice symbol? "User control of Voice_devnull_engraver: one of +@table @samp +@item unisolo +Behave in normal way: remove spanners when in unisolo. +@item allways: +Remove any spanners that come along. +@item never: +Do nothing. +@end table +") (translator-property-description 'decrescendoSpanner symbol? "Type of spanner to be used for decrescendi. One of: @samp{hairpin}, @samp{line}, @samp{dashed-line}, @samp{dotted-line}. If unset, hairpin type is used.") (translator-property-description 'currentBarNumber integer? "Contains the current barnumber. This property is incremented at every barline. -- 2.39.5