From 56efe0dc2799eaa46a9dfcec593c1ac3aeef7161 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sat, 9 Apr 2005 14:31:56 +0000 Subject: [PATCH] * ly/engraver-init.ly: reindent. Add CueVoice. * scm/music-functions.scm (music-pretty-string): handle moments too. (music-pretty-string): only print non-empty lists. (cue-substitute): create CueVoice context, which has smaller type. * lily/moment-scheme.cc (LY_DEFINE): new methods ly:moment-grace-{numerator,denominator} * lily/context-handle.cc: remove quit() method. --- ChangeLog | 13 + VERSION | 2 +- input/regression/quote-cue-during.ly | 35 +- lily/auto-change-iterator.cc | 1 + lily/context-handle.cc | 10 - lily/include/interpretation-context-handle.hh | 1 - lily/moment-scheme.cc | 20 + lily/music-iterator.cc | 2 +- lily/quote-iterator.cc | 9 + ly/engraver-init.ly | 1218 ++++++++--------- scm/music-functions.scm | 31 +- 11 files changed, 692 insertions(+), 650 deletions(-) diff --git a/ChangeLog b/ChangeLog index bb7f327a23..7af7665c86 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,18 @@ 2005-04-09 Han-Wen Nienhuys + * ly/engraver-init.ly: reindent. + Add CueVoice. + + * scm/music-functions.scm (music-pretty-string): handle moments + too. + (music-pretty-string): only print non-empty lists. + (cue-substitute): create CueVoice context, which has smaller type. + + * lily/moment-scheme.cc (LY_DEFINE): new methods + ly:moment-grace-{numerator,denominator} + + * lily/context-handle.cc: remove quit() method. + * lily/font-config.cc (init_fontconfig): be verbose about font path. (init_fontconfig): success is 0, not !0 diff --git a/VERSION b/VERSION index 9656b31c0f..c2761f25cb 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=2 MINOR_VERSION=5 -PATCH_LEVEL=18 +PATCH_LEVEL=19 MY_PATCH_LEVEL= diff --git a/input/regression/quote-cue-during.ly b/input/regression/quote-cue-during.ly index 36ea22f6c7..8e7d0032a7 100644 --- a/input/regression/quote-cue-during.ly +++ b/input/regression/quote-cue-during.ly @@ -4,32 +4,32 @@ texidoc = " The @code{cueDuring} form of quotation will set stem directions on both quoted and main voice, and deliver the quoted voice in the @code{cue} @code{Voice}. The music function @code{\killCues} -can be remove all cue notes." +can remove all cue notes. + +Spanners run to the end of a cue section, and are not started on the +last note." + +} - } \version "2.5.0" \layout { raggedright = ##t } - -quoteMe = \relative c' { fis4 r16 a8.-> b4-\ff c4 } +quoteMe = \relative c' { fis4 r16 a8.-> b4(-\ff~ b16 c8. b) } \addquote quoteMe \quoteMe -original = \relative c'' { c8 d s2 es8 gis8 } +original = \relative c'' { + c8 d + \cueDuring #"quoteMe" #1 { r2 } + es8 gis8 + \cueDuring #"quoteMe" #1 { r4 } +} cueStaff = \relative c'' << - % setup cue note layout. - \context Voice = cue { - \set fontSize = #-4 - \override Stem #'lengths = #'(2.5 2.5 3.0 3.0) - \skip 1 - } - \set Staff.quotedEventTypes = #'(note-event articulation-event) \original - { s4 \cueDuring #"quoteMe" #1 { r2 } } >> << @@ -38,16 +38,11 @@ cueStaff = \relative c'' << \quoteMe } \new Staff { - \set Staff.instrument = "orig" - \original + \set Staff.instrument = "orig (killCues)" + \killCues \original } \new Staff { \set Staff.instrument = "orig+quote" \cueStaff } - \new Staff { - \set Staff.instrument = "killCues" - \killCues \cueStaff - - } >> diff --git a/lily/auto-change-iterator.cc b/lily/auto-change-iterator.cc index 64698e441c..76286042f0 100644 --- a/lily/auto-change-iterator.cc +++ b/lily/auto-change-iterator.cc @@ -144,4 +144,5 @@ Auto_change_iterator::do_quit () up_.set_context (0); down_.set_context (0); } + IMPLEMENT_CTOR_CALLBACK (Auto_change_iterator); diff --git a/lily/context-handle.cc b/lily/context-handle.cc index ae0821054f..2af07a4c5e 100644 --- a/lily/context-handle.cc +++ b/lily/context-handle.cc @@ -47,16 +47,6 @@ Interpretation_context_handle::down () outlet_ = 0; } -void -Interpretation_context_handle::quit () -{ - if (outlet_) - { - outlet_->iterator_count_--; - outlet_ = 0; - } -} - bool Interpretation_context_handle::try_music (Music *m) { diff --git a/lily/include/interpretation-context-handle.hh b/lily/include/interpretation-context-handle.hh index 83b11c9cf2..c2aa89734e 100644 --- a/lily/include/interpretation-context-handle.hh +++ b/lily/include/interpretation-context-handle.hh @@ -27,7 +27,6 @@ public: Context *get_outlet () const; int get_count () const; - void quit (); private: Context *outlet_; void down (); diff --git a/lily/moment-scheme.cc b/lily/moment-scheme.cc index 0450259135..9c924a90cf 100644 --- a/lily/moment-scheme.cc +++ b/lily/moment-scheme.cc @@ -75,6 +75,26 @@ LY_DEFINE (ly_div_moment, "ly:div-moment", return (*ma / * mb).smobbed_copy (); } + +LY_DEFINE (ly_moment_grace_numerator, "ly:moment-grace-numerator", + 1, 0, 0, (SCM mom), + "Extract numerator from grace timing.") +{ + Moment *ma = unsmob_moment (mom); + SCM_ASSERT_TYPE (ma, mom, SCM_ARG1, __FUNCTION__, "moment"); + + return scm_from_int (ma->grace_part_.numerator ()); +} + +LY_DEFINE (ly_moment_grace_denominator, "ly:moment-grace-denominator", + 1, 0, 0, (SCM mom), + "Extract denominator from grace timing.") +{ + Moment *ma = unsmob_moment (mom); + SCM_ASSERT_TYPE (ma, mom, SCM_ARG1, __FUNCTION__, "moment"); + + return scm_from_int (ma->grace_part_.denominator ()); +} LY_DEFINE (ly_moment_main_numerator, "ly:moment-main-numerator", 1, 0, 0, (SCM mom), "Extract numerator from main timing.") diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index 6e836ea933..bd7dcee4eb 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -220,7 +220,7 @@ void Music_iterator::quit () { do_quit (); - handle_.quit (); + handle_.set_context (0); } void diff --git a/lily/quote-iterator.cc b/lily/quote-iterator.cc index 5755d1d0c8..7e561c6bc3 100644 --- a/lily/quote-iterator.cc +++ b/lily/quote-iterator.cc @@ -31,14 +31,23 @@ public: DECLARE_SCHEME_CALLBACK (constructor, ()); bool quote_ok () const; bool accept_music_type (Music *) const; + protected: virtual void derived_mark () const; virtual void construct_children (); virtual Moment pending_moment () const; virtual void process (Moment); + virtual void do_quit (); virtual bool ok () const; }; +void +Quote_iterator::do_quit () +{ + Music_wrapper_iterator::do_quit (); + quote_outlet_.set_context (0); +} + bool Quote_iterator::accept_music_type (Music *mus) const { diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index a398346a0c..94fed640aa 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -1,145 +1,148 @@ \version "2.4.0" \context { - \name Global + \name Global - \accepts Score - \description "Hard coded entry point for LilyPond. Cannot be tuned." - \grobdescriptions #all-grob-descriptions + \accepts Score + \description "Hard coded entry point for LilyPond. Cannot be tuned." + \grobdescriptions #all-grob-descriptions } \context { - \type "Engraver_group_engraver" - \name Staff - - \consists "Output_property_engraver" - \consists "Bar_engraver" -% Bar_engraver must be first so default bars aren't overwritten -% with empty ones. - - \consists "Font_size_engraver" - \consists "Volta_engraver" - \consists "Separating_line_group_engraver" - \consists "Dot_column_engraver" - - % perhaps move to Voice context? - \consists "Ottava_spanner_engraver" - \consists "Clef_engraver" - \consists "Key_engraver" - \consists "Time_signature_engraver" - \consists "Ledger_line_engraver" - \consists "Staff_symbol_engraver" - \consists "Collision_engraver" - \consists "Rest_collision_engraver" - \consists "Accidental_engraver" - \consists "Piano_pedal_engraver" - \consists "Instrument_name_engraver" - \consists "String_number_engraver" - \consists "Axis_group_engraver" - - minimumVerticalExtent = #'(-4 . 4) - extraVerticalExtent = ##f - verticalExtent = ##f - localKeySignature = #'() - createSpacing = ##t - - % explicitly set instrument, so we don't get - % weird effects when doing instrument names for - % piano staves - - instrument = #'() - instr = #'() - - \accepts "Voice" - \description "Handles clefs, bar lines, keys, accidentals. It can contain + \type "Engraver_group_engraver" + \name Staff + + \consists "Output_property_engraver" + \consists "Bar_engraver" + %% Bar_engraver must be first so default bars aren't overwritten + %% with empty ones. + + \consists "Font_size_engraver" + \consists "Volta_engraver" + \consists "Separating_line_group_engraver" + \consists "Dot_column_engraver" + + %% perhaps move to Voice context? + \consists "Ottava_spanner_engraver" + \consists "Clef_engraver" + \consists "Key_engraver" + \consists "Time_signature_engraver" + \consists "Ledger_line_engraver" + \consists "Staff_symbol_engraver" + \consists "Collision_engraver" + \consists "Rest_collision_engraver" + \consists "Accidental_engraver" + \consists "Piano_pedal_engraver" + \consists "Instrument_name_engraver" + \consists "String_number_engraver" + \consists "Axis_group_engraver" + + minimumVerticalExtent = #'(-4 . 4) + extraVerticalExtent = ##f + verticalExtent = ##f + localKeySignature = #'() + createSpacing = ##t + + %% explicitly set instrument, so we don't get + %% weird effects when doing instrument names for + %% piano staves + + instrument = #'() + instr = #'() + + \accepts "Voice" + \accepts "CueVoice" + + \description "Handles clefs, bar lines, keys, accidentals. It can contain @code{Voice} contexts." } \context { - \Staff - \type "Engraver_group_engraver" - \name DrumStaff - \alias Staff - - \remove "Accidental_engraver" - \remove "Ottava_spanner_engraver" - \remove "Key_engraver" - \remove "Piano_pedal_engraver" - \remove "String_number_engraver" - - \description "Handles typesetting for percussion." - - \denies Voice - \accepts DrumVoice - - clefGlyph = #"clefs.percussion" - clefPosition = #0 - \override Script #'staff-padding = #0.75 + \Staff + \type "Engraver_group_engraver" + \name DrumStaff + \alias Staff + + \remove "Accidental_engraver" + \remove "Ottava_spanner_engraver" + \remove "Key_engraver" + \remove "Piano_pedal_engraver" + \remove "String_number_engraver" + + \description "Handles typesetting for percussion." + + \denies Voice + \accepts DrumVoice + + clefGlyph = #"clefs.percussion" + clefPosition = #0 + \override Script #'staff-padding = #0.75 } \context { - \type "Engraver_group_engraver" - \name InnerChoirStaff - \consists "System_start_delimiter_engraver" - systemStartDelimiter = #'SystemStartBracket - - \accepts "Staff" - \accepts "DrumStaff" - \accepts "RhythmicStaff" - \accepts "GrandStaff" - \accepts "PianoStaff" - \accepts "Lyrics" - \accepts "ChordNames" + \type "Engraver_group_engraver" + \name InnerChoirStaff + \consists "System_start_delimiter_engraver" + systemStartDelimiter = #'SystemStartBracket + + \accepts "Staff" + \accepts "DrumStaff" + \accepts "RhythmicStaff" + \accepts "GrandStaff" + \accepts "PianoStaff" + \accepts "Lyrics" + \accepts "ChordNames" } \context { - \InnerChoirStaff - \name ChoirStaff - - \accepts "InnerChoirStaff" - \accepts "InnerStaffGroup" - \description "Identical to @code{StaffGroup} except that the - contained staves are not connected vertically." - + \InnerChoirStaff + \name ChoirStaff + + \accepts "InnerChoirStaff" + \accepts "InnerStaffGroup" + \description "Identical to @code{StaffGroup} except that the +contained staves are not connected vertically." + } \context{ - \type "Engraver_group_engraver" - - \consists "Output_property_engraver" - - minimumVerticalExtent = ##f - extraVerticalExtent = ##f - verticalExtent = ##f - localKeySignature = #'() - - \consists "Pitch_squash_engraver" - squashedPosition = #0 - \consists "Separating_line_group_engraver" - \name RhythmicStaff - \alias "Staff" - - \override BarLine #'bar-size = #4 - \override VoltaBracket #'minimum-space = #15 - \override VoltaBracket #'padding = #5 - \override StaffSymbol #'line-count = #1 - - \override Stem #'neutral-direction = #1 - \override Beam #'neutral-direction = #1 - % \consists "Repeat_engraver" - \consists "Dot_column_engraver" - \consists "Volta_engraver" - \consists "Bar_engraver" - \consists "Time_signature_engraver" - \consists "Staff_symbol_engraver" - \consists "Ledger_line_engraver" - \consists "Instrument_name_engraver" - \consists "Axis_group_engraver" - \accepts "Voice" - \description " + \type "Engraver_group_engraver" + + \consists "Output_property_engraver" + + minimumVerticalExtent = ##f + extraVerticalExtent = ##f + verticalExtent = ##f + localKeySignature = #'() + + \consists "Pitch_squash_engraver" + squashedPosition = #0 + \consists "Separating_line_group_engraver" + \name RhythmicStaff + \alias "Staff" + + \override BarLine #'bar-size = #4 + \override VoltaBracket #'minimum-space = #15 + \override VoltaBracket #'padding = #5 + \override StaffSymbol #'line-count = #1 + + \override Stem #'neutral-direction = #1 + \override Beam #'neutral-direction = #1 + %% \consists "Repeat_engraver" + \consists "Dot_column_engraver" + \consists "Volta_engraver" + \consists "Bar_engraver" + \consists "Time_signature_engraver" + \consists "Staff_symbol_engraver" + \consists "Ledger_line_engraver" + \consists "Instrument_name_engraver" + \consists "Axis_group_engraver" + \accepts "Voice" + \accepts "CueVoice" + \description " A context like @code{Staff} but for printing rhythms. Pitches are ignored; the notes are printed on one line. " @@ -147,10 +150,10 @@ \context { - \type "Engraver_group_engraver" - \name Voice + \type "Engraver_group_engraver" + \name Voice - \description " + \description " Corresponds to a voice on a staff. This context handles the conversion of dynamic signs, stems, beams, super- and subscripts, slurs, ties, and rests. @@ -158,236 +161,245 @@ You have to instantiate this explicitly if you want to have multiple voices on the same staff." - localKeySignature = #'() - \consists "Font_size_engraver" - - \consists "Output_property_engraver" - \consists "Arpeggio_engraver" - \consists "Multi_measure_rest_engraver" - \consists "Text_spanner_engraver" - \consists "Trill_spanner_engraver" - \consists "Grob_pq_engraver" - \consists "Forbid_line_break_engraver" - - \consists "Note_head_line_engraver" - \consists "Glissando_engraver" - \consists "Ligature_bracket_engraver" - \consists "Breathing_sign_engraver" - % \consists "Rest_engraver" - \consists "Note_heads_engraver" - \consists "Rest_engraver" - - \consists "Stem_engraver" - \consists "Beam_engraver" - \consists "Grace_beam_engraver" - \consists "Auto_beam_engraver" - \consists "New_fingering_engraver" - \consists "Chord_tremolo_engraver" - \consists "Percent_repeat_engraver" - \consists "Slash_repeat_engraver" - \consists "Melisma_translator" - \consists "Part_combine_engraver" - - \consists "Text_engraver" - \consists "Dynamic_engraver" - \consists "Fingering_engraver" - - \consists "Script_engraver" - \consists "Script_column_engraver" - \consists "Rhythmic_column_engraver" - \consists "Phrasing_slur_engraver" - \consists "Cluster_spanner_engraver" - \consists "Slur_engraver" - \consists "Tie_engraver" - \consists "Tuplet_engraver" - \consists "Grace_engraver" - - \consists "Skip_event_swallow_translator" + localKeySignature = #'() + \consists "Font_size_engraver" + + \consists "Output_property_engraver" + \consists "Arpeggio_engraver" + \consists "Multi_measure_rest_engraver" + \consists "Text_spanner_engraver" + \consists "Trill_spanner_engraver" + \consists "Grob_pq_engraver" + \consists "Forbid_line_break_engraver" + + \consists "Note_head_line_engraver" + \consists "Glissando_engraver" + \consists "Ligature_bracket_engraver" + \consists "Breathing_sign_engraver" + %% \consists "Rest_engraver" + \consists "Note_heads_engraver" + \consists "Rest_engraver" + + \consists "Stem_engraver" + \consists "Beam_engraver" + \consists "Grace_beam_engraver" + \consists "Auto_beam_engraver" + \consists "New_fingering_engraver" + \consists "Chord_tremolo_engraver" + \consists "Percent_repeat_engraver" + \consists "Slash_repeat_engraver" + \consists "Melisma_translator" + \consists "Part_combine_engraver" + + \consists "Text_engraver" + \consists "Dynamic_engraver" + \consists "Fingering_engraver" + + \consists "Script_engraver" + \consists "Script_column_engraver" + \consists "Rhythmic_column_engraver" + \consists "Phrasing_slur_engraver" + \consists "Cluster_spanner_engraver" + \consists "Slur_engraver" + \consists "Tie_engraver" + \consists "Tuplet_engraver" + \consists "Grace_engraver" + + \consists "Skip_event_swallow_translator" +} + +\context{ + \Voice + + \name CueVoice + \alias Voice + fontSize = #-4 + \override Stem #'lengths = #'(2.5 2.5 3.0 3.0) } \context { - \Voice - \name DrumVoice - \alias Voice - - \description "A voice on a percussion staff." - \remove "Arpeggio_engraver" - \consists "Multi_measure_rest_engraver" - \consists "Text_spanner_engraver" - \consists "Grob_pq_engraver" - - \remove "Note_head_line_engraver" - \remove "Glissando_engraver" - \remove "Ligature_bracket_engraver" - \remove "Note_heads_engraver" - \consists "Rest_engraver" - \consists "Drum_notes_engraver" - \remove "New_fingering_engraver" - - \remove "Fingering_engraver" - - \remove "Cluster_spanner_engraver" - \consists "Tuplet_engraver" - - \consists "Skip_event_swallow_translator" + \Voice + \name DrumVoice + \alias Voice + + \description "A voice on a percussion staff." + \remove "Arpeggio_engraver" + \consists "Multi_measure_rest_engraver" + \consists "Text_spanner_engraver" + \consists "Grob_pq_engraver" + + \remove "Note_head_line_engraver" + \remove "Glissando_engraver" + \remove "Ligature_bracket_engraver" + \remove "Note_heads_engraver" + \consists "Rest_engraver" + \consists "Drum_notes_engraver" + \remove "New_fingering_engraver" + + \remove "Fingering_engraver" + + \remove "Cluster_spanner_engraver" + \consists "Tuplet_engraver" + + \consists "Skip_event_swallow_translator" } \context{ - \type "Engraver_group_engraver" - \name GrandStaff - localKeySignature = #'() - - \description " A group of staffs, with a brace on the left + \type "Engraver_group_engraver" + \name GrandStaff + localKeySignature = #'() + + \description " A group of staffs, with a brace on the left side, grouping the staves together. The bar lines of the contained staves are connected vertically. " - \consists "Span_bar_engraver" - \consists "Span_arpeggio_engraver" - \consists "System_start_delimiter_engraver" - systemStartDelimiter = #'SystemStartBrace + \consists "Span_bar_engraver" + \consists "Span_arpeggio_engraver" + \consists "System_start_delimiter_engraver" + systemStartDelimiter = #'SystemStartBrace - \accepts "Staff" + \accepts "Staff" } \context{ - \GrandStaff - \name "PianoStaff" - \alias "GrandStaff" + \GrandStaff + \name "PianoStaff" + \alias "GrandStaff" - \description - "Just like @code{GrandStaff} but with a forced distance between + \description + "Just like @code{GrandStaff} but with a forced distance between the staves, so cross staff beaming and slurring can be used." - - verticalAlignmentChildCallback = #Align_interface::fixed_distance_alignment_callback - \override VerticalAlignment #'forced-distance = #12 - \override VerticalAlignment #'self-alignment-Y = #0 - - \consists "Vertical_align_engraver" - \consists "Instrument_name_engraver" - - instrument = #'() - instr = #'() + + verticalAlignmentChildCallback = #Align_interface::fixed_distance_alignment_callback + \override VerticalAlignment #'forced-distance = #12 + \override VerticalAlignment #'self-alignment-Y = #0 + + \consists "Vertical_align_engraver" + \consists "Instrument_name_engraver" + + instrument = #'() + instr = #'() } \context { - \type "Engraver_group_engraver" - \name InnerStaffGroup - - \consists "Span_bar_engraver" - \consists "Span_arpeggio_engraver" - \consists "Output_property_engraver" - systemStartDelimiter = #'SystemStartBracket - - \consists "System_start_delimiter_engraver" - \accepts "Staff" - \accepts "RhythmicStaff" - \accepts "DrumStaff" - \accepts "GrandStaff" - \accepts "PianoStaff" - \accepts "TabStaff" - \accepts "Lyrics" - \accepts "ChordNames" + \type "Engraver_group_engraver" + \name InnerStaffGroup + + \consists "Span_bar_engraver" + \consists "Span_arpeggio_engraver" + \consists "Output_property_engraver" + systemStartDelimiter = #'SystemStartBracket + + \consists "System_start_delimiter_engraver" + \accepts "Staff" + \accepts "RhythmicStaff" + \accepts "DrumStaff" + \accepts "GrandStaff" + \accepts "PianoStaff" + \accepts "TabStaff" + \accepts "Lyrics" + \accepts "ChordNames" } \context { - \InnerStaffGroup - \name StaffGroup - - \description + \InnerStaffGroup + \name StaffGroup + + \description - "Groups staffs while adding a bracket on the left side, grouping + "Groups staffs while adding a bracket on the left side, grouping the staves together. The bar lines of the contained staves are connected vertically. " - - \accepts "InnerChoirStaff" - \accepts "ChoirStaff" - \accepts "InnerStaffGroup" - \accepts "FiguredBass" + + \accepts "InnerChoirStaff" + \accepts "ChoirStaff" + \accepts "InnerStaffGroup" + \accepts "FiguredBass" } \context{ - \type "Engraver_group_engraver" - minimumVerticalExtent = #'(-1.2 . 2.4) - extraVerticalExtent = ##f - verticalExtent = ##f + \type "Engraver_group_engraver" + minimumVerticalExtent = #'(-1.2 . 2.4) + extraVerticalExtent = ##f + verticalExtent = ##f - \description " Corresponds to a voice with lyrics. Handles the + \description " Corresponds to a voice with lyrics. Handles the printing of a single line of lyrics. " - - \name Lyrics - \consists "Separating_line_group_engraver" - \consists "Lyric_engraver" - \consists "Extender_engraver" - \consists "Hyphen_engraver" - \consists "Stanza_number_engraver" - \consists "Vocal_name_engraver" - \consists "Skip_event_swallow_translator" - \consists "Font_size_engraver" - \consists "Hara_kiri_engraver" - \override SeparationItem #'padding = #0.2 + + \name Lyrics + \consists "Separating_line_group_engraver" + \consists "Lyric_engraver" + \consists "Extender_engraver" + \consists "Hyphen_engraver" + \consists "Stanza_number_engraver" + \consists "Vocal_name_engraver" + \consists "Skip_event_swallow_translator" + \consists "Font_size_engraver" + \consists "Hara_kiri_engraver" + \override SeparationItem #'padding = #0.2 } \context { - \type "Engraver_group_engraver" - \name NoteNames - \consists "Axis_group_engraver" - - minimumVerticalExtent = ##f - extraVerticalExtent = ##f - verticalExtent = ##f - - - \consists "Rest_swallow_translator" - \consists "Skip_event_swallow_translator" - \consists "Tie_engraver" - \consists "Note_name_engraver" - \consists "Separating_line_group_engraver" + \type "Engraver_group_engraver" + \name NoteNames + \consists "Axis_group_engraver" + + minimumVerticalExtent = ##f + extraVerticalExtent = ##f + verticalExtent = ##f + + + \consists "Rest_swallow_translator" + \consists "Skip_event_swallow_translator" + \consists "Tie_engraver" + \consists "Note_name_engraver" + \consists "Separating_line_group_engraver" } \context { - \type "Engraver_group_engraver" - \name ChordNames - \description "Typesets chord names." - - \consists "Volta_engraver" - - \consists "Rest_swallow_translator" - \consists "Output_property_engraver" - \consists "Separating_line_group_engraver" - \consists "Chord_name_engraver" - \consists "Skip_event_swallow_translator" - \consists "Hara_kiri_engraver" - - voltaOnThisStaff = ##f - minimumVerticalExtent = #'(0 . 2.5) - extraVerticalExtent = ##f - \override SeparatingGroupSpanner #'padding = #0.8 - verticalExtent = ##f + \type "Engraver_group_engraver" + \name ChordNames + \description "Typesets chord names." + + \consists "Volta_engraver" + + \consists "Rest_swallow_translator" + \consists "Output_property_engraver" + \consists "Separating_line_group_engraver" + \consists "Chord_name_engraver" + \consists "Skip_event_swallow_translator" + \consists "Hara_kiri_engraver" + + voltaOnThisStaff = ##f + minimumVerticalExtent = #'(0 . 2.5) + extraVerticalExtent = ##f + \override SeparatingGroupSpanner #'padding = #0.8 + verticalExtent = ##f } RemoveEmptyStaffContext= \context { - \Staff - \remove "Axis_group_engraver" - \consists "Hara_kiri_engraver" - \override Beam #'auto-knee-gap = #'() + \Staff + \remove "Axis_group_engraver" + \consists "Hara_kiri_engraver" + \override Beam #'auto-knee-gap = #'() } AncientRemoveEmptyStaffContext = \context { - %% why not add by default? - - \RemoveEmptyStaffContext - \accepts "VaticanaVoice" - \accepts "GregorianTranscriptionVoice" - \accepts "MensuralVoice" +%% why not add by default? + + \RemoveEmptyStaffContext + \accepts "VaticanaVoice" + \accepts "GregorianTranscriptionVoice" + \accepts "MensuralVoice" } \context { - \type Score_engraver - \name Score + \type Score_engraver + \name Score - \description "This is the top level notation context. No + \description "This is the top level notation context. No other context can contain a @code{Score} context. This context handles the administration of time signatures. It also makes sure that items such as clefs, time signatures, and key-signatures are @@ -397,270 +409,258 @@ AncientRemoveEmptyStaffContext = \context { not contained in any other context). It is instantiated automatically when an output definition (a @code{\score} or @code{\layout} block) is processed." + + \consists "Repeat_acknowledge_engraver" + \consists "Staff_collecting_engraver" + + %% move the alias along with the engraver. + + \consists "Timing_engraver" + + \consists "Output_property_engraver" + \consists "System_start_delimiter_engraver" + \consists "Mark_engraver" + \consists "Metronome_mark_engraver" + \consists "Break_align_engraver" + \consists "Spacing_engraver" + \consists "Vertical_align_engraver" + \consists "Stanza_number_align_engraver" + \consists "Bar_number_engraver" + \consists "Span_arpeggio_engraver" + + \accepts "Staff" + \accepts "TabStaff" + \accepts "VaticanaStaff" + \accepts "GregorianTranscriptionStaff" + \accepts "MensuralStaff" + \accepts "StaffGroup" + \accepts "RhythmicStaff" + \accepts "DrumStaff" + \accepts "Lyrics" + \accepts "ChordNames" + \accepts "GrandStaff" + \accepts "ChoirStaff" + \accepts "PianoStaff" + \accepts "Devnull" + \accepts "NoteNames" + \accepts "FiguredBass" + + soloText = #"Solo" + soloIIText = #"Solo II" + aDueText = #"a2" + printPartCombineTexts = ##t + systemStartDelimiter =#'SystemStartBar + + drumStyleTable = #drums-style + + melismaBusyProperties = #default-melisma-properties + tieWaitForNote = ##f + clefGlyph = #"clefs.G" + clefPosition = #-2 + middleCPosition = #-6 + + defaultBarType = #"|" + barNumberVisibility = #default-bar-number-visibility + automaticBars = ##t + + explicitClefVisibility = #all-visible + explicitKeySignatureVisibility = #all-visible + autoBeamSettings = #default-auto-beam-settings + autoBeaming = ##t + scriptDefinitions = #default-script-alist + + verticalAlignmentChildCallback = #Align_interface::alignment_callback + + pedalSustainStrings = #'("Ped." "*Ped." "*") + pedalSustainStyle = #'text + pedalUnaCordaStrings = #'("una corda" "" "tre corde") + pedalUnaCordaStyle = #'text + +%% These are in ordinary italic font, including the *, +%% but they are unlikely to be used, +%% as the default pedal-style for SostenutoPedal is 'mixed': +%% i.e. Sost. Ped_____________________ + pedalSostenutoStrings = #'("Sost. Ped." "*Sost. Ped." "*") + pedalSostenutoStyle = #'mixed + + + harmonicAccidentals = ##t + fingeringOrientations = #'(up down) + stringNumberOrientations = #'(up down) + tupletNumberFormatFunction = #denominator-tuplet-formatter + markFormatter = #format-mark-letters + rehearsalMark = #1 + subdivideBeams = ##f + allowBeamBreak = ##f + extraNatural = ##t + autoAccidentals = #'(Staff (same-octave . 0)) + autoCautionaries = #'() + + printKeyCancellation = ##t + keyAccidentalOrder = #`( + (6 . ,FLAT) (2 . ,FLAT) (5 . ,FLAT ) (1 . ,FLAT) (4 . ,FLAT) (0 . ,FLAT) (3 . ,FLAT) + (3 . ,SHARP) (0 . ,SHARP) (4 . ,SHARP) (1 . ,SHARP) (5 . ,SHARP) (2 . ,SHARP) (6 . ,SHARP) + (6 . ,DOUBLE-FLAT) (2 . ,DOUBLE-FLAT) (5 . ,DOUBLE-FLAT ) (1 . ,DOUBLE-FLAT) (4 . ,DOUBLE-FLAT) (0 . ,DOUBLE-FLAT) (3 . ,DOUBLE-FLAT) + (3 . ,DOUBLE-SHARP) (0 . ,DOUBLE-SHARP) (4 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (5 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (6 . ,DOUBLE-SHARP) + ) + + barCheckSynchronize = ##f + +%% chord names: + chordNameFunction = #ignatzek-chord-names + majorSevenSymbol = #whiteTriangleMarkup + chordNameSeparator = #(make-simple-markup "/") + chordNameExceptions = #ignatzekExceptions + chordNoteNamer = #'() + chordRootNamer = #note-name->markup + chordNameExceptionsFull = #fullJazzExceptions + chordNameExceptionsPartial = #partialJazzExceptions + + + bassStaffProperties = #'((assign clefGlyph "clefs.F") + (assign clefPosition 2) + (assign middleCPosition 6)) +%% tablature: + stringOneTopmost = ##t + highStringOne = ##t + +%% One may change the strings tuning as following : +%% The lenght of the list must be equal to the number of string + stringTunings = #guitar-tuning + tablatureFormat = #fret-number-tablature-format + +%% + bassFigureFormatFunction = #format-bass-figure + metronomeMarkFormatter = #format-metronome-markup + graceSettings = #`( + (Voice Stem direction 1) + ;; TODO: should take from existing definition. + ;; c&p from define-grobs.scm - \consists "Repeat_acknowledge_engraver" - \consists "Staff_collecting_engraver" - - % move the alias along with the engraver. - - \consists "Timing_engraver" - - \consists "Output_property_engraver" - \consists "System_start_delimiter_engraver" - \consists "Mark_engraver" - \consists "Metronome_mark_engraver" - \consists "Break_align_engraver" - \consists "Spacing_engraver" - \consists "Vertical_align_engraver" - \consists "Stanza_number_align_engraver" - \consists "Bar_number_engraver" - \consists "Span_arpeggio_engraver" - - \accepts "Staff" - \accepts "TabStaff" - \accepts "VaticanaStaff" - \accepts "GregorianTranscriptionStaff" - \accepts "MensuralStaff" - \accepts "StaffGroup" - \accepts "RhythmicStaff" - \accepts "DrumStaff" - \accepts "Lyrics" - \accepts "ChordNames" - \accepts "GrandStaff" - \accepts "ChoirStaff" - \accepts "PianoStaff" - \accepts "Devnull" - \accepts "NoteNames" - \accepts "FiguredBass" - - soloText = #"Solo" - soloIIText = #"Solo II" - aDueText = #"a2" - printPartCombineTexts = ##t - systemStartDelimiter =#'SystemStartBar - - drumStyleTable = #drums-style - - melismaBusyProperties = #default-melisma-properties - tieWaitForNote = ##f - clefGlyph = #"clefs.G" - clefPosition = #-2 - middleCPosition = #-6 - - defaultBarType = #"|" - barNumberVisibility = #default-bar-number-visibility - automaticBars = ##t - - explicitClefVisibility = #all-visible - explicitKeySignatureVisibility = #all-visible - autoBeamSettings = #default-auto-beam-settings - autoBeaming = ##t - scriptDefinitions = #default-script-alist - - verticalAlignmentChildCallback = #Align_interface::alignment_callback - - pedalSustainStrings = #'("Ped." "*Ped." "*") - pedalSustainStyle = #'text - pedalUnaCordaStrings = #'("una corda" "" "tre corde") - pedalUnaCordaStyle = #'text - - %% These are in ordinary italic font, including the *, - %% but they are unlikely to be used, - %% as the default pedal-style for SostenutoPedal is 'mixed': - %% i.e. Sost. Ped_____________________ - pedalSostenutoStrings = #'("Sost. Ped." "*Sost. Ped." "*") - pedalSostenutoStyle = #'mixed - - - harmonicAccidentals = ##t - fingeringOrientations = #'(up down) - stringNumberOrientations = #'(up down) - tupletNumberFormatFunction = #denominator-tuplet-formatter - markFormatter = #format-mark-letters - rehearsalMark = #1 - subdivideBeams = ##f - allowBeamBreak = ##f - extraNatural = ##t - autoAccidentals = #'(Staff (same-octave . 0)) - autoCautionaries = #'() - - printKeyCancellation = ##t - keyAccidentalOrder = #`( - (6 . ,FLAT) (2 . ,FLAT) (5 . ,FLAT ) (1 . ,FLAT) (4 . ,FLAT) (0 . ,FLAT) (3 . ,FLAT) - (3 . ,SHARP) (0 . ,SHARP) (4 . ,SHARP) (1 . ,SHARP) (5 . ,SHARP) (2 . ,SHARP) (6 . ,SHARP) - (6 . ,DOUBLE-FLAT) (2 . ,DOUBLE-FLAT) (5 . ,DOUBLE-FLAT ) (1 . ,DOUBLE-FLAT) (4 . ,DOUBLE-FLAT) (0 . ,DOUBLE-FLAT) (3 . ,DOUBLE-FLAT) - (3 . ,DOUBLE-SHARP) (0 . ,DOUBLE-SHARP) (4 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (5 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (6 . ,DOUBLE-SHARP) - ) - - %{ - - this order is more complex, see wansek p254 and further. - - for instance, order of clef and :|: depends on function of the clef - - (clef of start-repeat) :|: (change-clef) - - is the proper order. - - %} - - barCheckSynchronize = ##f - - %% chord names: - chordNameFunction = #ignatzek-chord-names - majorSevenSymbol = #whiteTriangleMarkup - chordNameSeparator = #(make-simple-markup "/") - chordNameExceptions = #ignatzekExceptions - chordNoteNamer = #'() - chordRootNamer = #note-name->markup - chordNameExceptionsFull = #fullJazzExceptions - chordNameExceptionsPartial = #partialJazzExceptions - - - bassStaffProperties = #'((assign clefGlyph "clefs.F") - (assign clefPosition 2) - (assign middleCPosition 6)) - %% tablature: - stringOneTopmost = ##t - highStringOne = ##t - - %% One may change the strings tuning as following : - %% The lenght of the list must be equal to the number of string - stringTunings = #guitar-tuning - tablatureFormat = #fret-number-tablature-format - - %% - bassFigureFormatFunction = #format-bass-figure - metronomeMarkFormatter = #format-metronome-markup - graceSettings = #`( - (Voice Stem direction 1) - ;; TODO: should take from existing definition. - ;; c&p from define-grobs.scm - - (Voice Stem lengths ,(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0))) - (Voice Stem stem-shorten (0.4 0.4)) - (Voice Stem font-size -3) - (Voice NoteHead font-size -3) - (Voice Dots font-size -3) - (Voice Stem beamed-lengths - ,(map (lambda (x) (* 0.8 x)) '(3.3 3.3 4.0))) - (Voice Stem beamed-minimum-free-lengths - ,(map (lambda (x) (* 0.8 x)) '(2.5 2.0 1.5))) - (Voice Stem beamed-extreme-minimum-free-lengths - ,(map (lambda (x) (* 0.8 x)) '(1.83 1.5))) - - (Voice Stem no-stem-extend #t) - (Voice Beam thickness 0.384) - (Voice Beam space-function ,(lambda (beam mult) - (* 0.8 (Beam::space_function - beam mult)))) - (Voice Accidental font-size -4) - (Voice Slur direction -1) - ) - - quotedEventTypes = #'(note-event rest-event time-scaled-music tie-event) - instrumentTransposition = #(ly:make-pitch 0 0 0) - - verticallySpacedContexts = #'(Staff) + (Voice Stem lengths ,(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0))) + (Voice Stem stem-shorten (0.4 0.4)) + (Voice Stem font-size -3) + (Voice NoteHead font-size -3) + (Voice Dots font-size -3) + (Voice Stem beamed-lengths + ,(map (lambda (x) (* 0.8 x)) '(3.3 3.3 4.0))) + (Voice Stem beamed-minimum-free-lengths + ,(map (lambda (x) (* 0.8 x)) '(2.5 2.0 1.5))) + (Voice Stem beamed-extreme-minimum-free-lengths + ,(map (lambda (x) (* 0.8 x)) '(1.83 1.5))) + + (Voice Stem no-stem-extend #t) + (Voice Beam thickness 0.384) + (Voice Beam space-function ,(lambda (beam mult) + (* 0.8 (Beam::space_function + beam mult)))) + (Voice Accidental font-size -4) + (Voice Slur direction -1) + ) + + quotedEventTypes = #'(note-event rest-event time-scaled-music tie-event) + instrumentTransposition = #(ly:make-pitch 0 0 0) + + verticallySpacedContexts = #'(Staff) } -EasyNotation = \context { % TODO: why \context override? - \Score - \override NoteHead #'print-function = #Note_head::brew_ez_stencil - \override NoteHead #'Y-extent-callback = #'() - \override NoteHead #'X-extent-callback = #'() +EasyNotation = \context { %% TODO: why \context override? + \Score + \override NoteHead #'print-function = #Note_head::brew_ez_stencil + \override NoteHead #'Y-extent-callback = #'() + \override NoteHead #'X-extent-callback = #'() } \context { - \type "Engraver_group_engraver" - \name FiguredBass - \consists "Figured_bass_engraver" - \consists "Rest_swallow_translator" - \consists "Note_swallow_translator" - \consists "Skip_event_swallow_translator" - \consists "Separating_line_group_engraver" - - \consists "Hara_kiri_engraver" + \type "Engraver_group_engraver" + \name FiguredBass + \consists "Figured_bass_engraver" + \consists "Rest_swallow_translator" + \consists "Note_swallow_translator" + \consists "Skip_event_swallow_translator" + \consists "Separating_line_group_engraver" + + \consists "Hara_kiri_engraver" } \context { - \name "Devnull" - \type "Engraver_group_engraver" + \name "Devnull" + \type "Engraver_group_engraver" - %% don't want to route anything out of here: - \alias "Staff" - \alias "Voice" - \consists "Swallow_engraver" - \description "Silently discards all musical information given to this context. " - } +%% don't want to route anything out of here: + \alias "Staff" + \alias "Voice" + \consists "Swallow_engraver" + \description "Silently discards all musical information given to this context. " +} \context { - \Voice - \name "TabVoice" - \consists "Tab_note_heads_engraver" - \remove "Note_heads_engraver" - \remove "Fingering_engraver" - \remove "New_fingering_engraver" - - \description "Context for drawing notes in a Tab staff. " - \override Slur #'font-family = #'roman - \override Slur #'print-function = #hammer-print-function - \override Slur #'direction = #-1 - - % Draws all stems/beams out of the staff (and not in the middle of the staff !) - % This feature is now disabled because most of the tab does not use it. - %\override Beam #'damping = #100000 - %\override Stem #'up-to-staff = ##t - - % TabStaff increase the staff-space, which in turn - % increases beam thickness and spacing; beams are - % too big. We have to adjust the beam settings: - \override Beam #'thickness = #0.32 - \override Beam #'space-function = - #(lambda (beam mult) (* 0.62 (Beam::space_function beam mult))) - - % No accidental in tablature ! - \remove Accidental_engraver + \Voice + \name "TabVoice" + \consists "Tab_note_heads_engraver" + \remove "Note_heads_engraver" + \remove "Fingering_engraver" + \remove "New_fingering_engraver" + + \description "Context for drawing notes in a Tab staff. " + \override Slur #'font-family = #'roman + \override Slur #'print-function = #hammer-print-function + \override Slur #'direction = #-1 + + %% Draws all stems/beams out of the staff (and not in the middle of the staff !) + %% This feature is now disabled because most of the tab does not use it. + %%\override Beam #'damping = #100000 + %%\override Stem #'up-to-staff = ##t + + %% TabStaff increase the staff-space, which in turn + %% increases beam thickness and spacing; beams are + %% too big. We have to adjust the beam settings: + \override Beam #'thickness = #0.32 + \override Beam #'space-function = + #(lambda (beam mult) (* 0.62 (Beam::space_function beam mult))) + + %% No accidental in tablature ! + \remove Accidental_engraver } \context { - \Staff - \alias "Staff" - \name "TabStaff" - \denies "Voice" - \remove "Staff_symbol_engraver" - \consists "Tab_staff_symbol_engraver" - - \description "Context for generating tablature. [DOCME]" - - \accepts "TabVoice" - - % 6 strings - \override StaffSymbol #'staff-space = #1.5 - - % Don't draw stems over the tablature figures ! - \override Stem #'avoid-note-head = ##t - - % No accidental in tablature ! - \remove "Accidental_engraver" - \remove "Key_engraver" - \remove "String_number_engraver" - % Special "TAB" clef - clefGlyph = #"clefs.tab" - clefPosition = #0 + \Staff + \alias "Staff" + \name "TabStaff" + \denies "Voice" + \remove "Staff_symbol_engraver" + \consists "Tab_staff_symbol_engraver" + + \description "Context for generating tablature. [DOCME]" + + \accepts "TabVoice" + + %% 6 strings + \override StaffSymbol #'staff-space = #1.5 + + %% Don't draw stems over the tablature figures ! + \override Stem #'avoid-note-head = ##t + + %% No accidental in tablature ! + \remove "Accidental_engraver" + \remove "Key_engraver" + \remove "String_number_engraver" + %% Special "TAB" clef + clefGlyph = #"clefs.tab" + clefPosition = #0 } -% TODO: Gregorian Chant contexts should be moved to gregorian-init.ly, -% but this does not work (is this a bug or intended behaviour?): -% -% If I try to do so, I get "error: unknown escaped string: -% `\VaticanaStaff'" in params-init.ly. If I also move -% "\context { \Vaticana*Context }" from params-init.ly to the end -% of gregorian-init.ly, then I get "error: parse error, unexpected -% TRANSLATOR: \context { \VaticanaStaff }" in -% gregorian-init.ly. --jr +%% TODO: Gregorian Chant contexts should be moved to gregorian-init.ly, +%% but this does not work (is this a bug or intended behaviour?): +%% +%% If I try to do so, I get "error: unknown escaped string: +%% `\VaticanaStaff'" in params-init.ly. If I also move +%% "\context { \Vaticana*Context }" from params-init.ly to the end +%% of gregorian-init.ly, then I get "error: parse error, unexpected +%% TRANSLATOR: \context { \VaticanaStaff }" in +%% gregorian-init.ly. --jr \context { \Voice @@ -673,25 +673,25 @@ EasyNotation = \context { % TODO: why \context override? \remove "Ligature_bracket_engraver" \consists "Vaticana_ligature_engraver" - % Set default head for notes outside of \[ \]. + %% Set default head for notes outside of \[ \]. \override NoteHead #'style = #'vaticana.punctum - % Put some space before and after divisiones. - % FIXME: This does not seem to show any effect. + %% Put some space before and after divisiones. + %% FIXME: This does not seem to show any effect. \override Script #'padding = #0.5 - % There are no beams in Gregorian Chant notation. + %% There are no beams in Gregorian Chant notation. autoBeaming = ##f - % Prepare TextSpanner for \episem{Initium|Finis} use. - % - % N.B.: dash-fraction MUST be unset; otherwise, TextSpanner will - % always produce dashed lines, regardless of the style property. - % - % FIXME: The line @code{\override TextSpanner #'padding = #-0.1} is - % required to force the articulation signs being placed vertically - % tightly to the correpsonding note heads. - % + %% Prepare TextSpanner for \episem{Initium|Finis} use. + %% + %% N.B.: dash-fraction MUST be unset; otherwise, TextSpanner will + %% always produce dashed lines, regardless of the style property. + %% + %% FIXME: The line @code{\override TextSpanner #'padding = #-0.1} is + %% required to force the articulation signs being placed vertically + %% tightly to the correpsonding note heads. + %% \override TextSpanner #'dash-fraction = #'() \override TextSpanner #'style = #'line \override TextSpanner #'edge-height = #'(0 . 0) @@ -700,9 +700,9 @@ EasyNotation = \context { % TODO: why \context override? \override TextSpanner #'edge-text = #'("" . "") } -% FIXME: need something like -% \remove "Bar_number_engraver" (which lives on score level) -% for vaticana and gregorian transcription staves +%% FIXME: need something like +%% \remove "Bar_number_engraver" (which lives on score level) +%% for vaticana and gregorian transcription staves \context { \Staff @@ -715,32 +715,32 @@ EasyNotation = \context { % TODO: why \context override? \remove "Time_signature_engraver" \consists "Custos_engraver" - % We can not remove Bar_engraver; otherwise clefs and custodes will - % not show up any more among other line breaking issues. - % Instead, we make the grob transparent. + %% We can not remove Bar_engraver; otherwise clefs and custodes will + %% not show up any more among other line breaking issues. + %% Instead, we make the grob transparent. \override BarLine #'transparent = ##t \override StaffSymbol #'line-count = #4 \override StaffSymbol #'thickness = #0.6 - % FIXME: unit on StaffSymbol's width should be \linewidth. - % \override StaffSymbol #'width = #60.0 + %% FIXME: unit on StaffSymbol's width should be \linewidth. + %% \override StaffSymbol #'width = #60.0 - % Choose vaticana do clef on 3rd line as default. + %% Choose vaticana do clef on 3rd line as default. clefGlyph = #"clefs.vaticana.do" middleCPosition = #1 clefPosition = #1 clefOctavation = #0 - % Select vaticana style font. + %% Select vaticana style font. \override KeySignature #'style = #'vaticana \override Accidental #'style = #'vaticana \override Custos #'style = #'vaticana \override Custos #'neutral-position = #3 \override Custos #'neutral-direction = #-1 - % Score.timing = ##f - % Score.barAlways = ##t + %% Score.timing = ##f + %% Score.barAlways = ##t } \context { @@ -748,28 +748,28 @@ EasyNotation = \context { % TODO: why \context override? \name "GregorianTranscriptionVoice" \alias "Voice" - % Removing ligature bracket engraver without replacing it by some - % other ligature engraver would cause a "Junking event: `LigatureEvent'" - % warning for every "\[" and "\]". Therefore, we make the grob - % transparent instead. + %% Removing ligature bracket engraver without replacing it by some + %% other ligature engraver would cause a "Junking event: `LigatureEvent'" + %% warning for every "\[" and "\]". Therefore, we make the grob + %% transparent instead. \override LigatureBracket #'transparent = ##t - % Put some space before and after divisiones. - % FIXME: This does not seem to show any effect. + %% Put some space before and after divisiones. + %% FIXME: This does not seem to show any effect. \override Script #'padding = #0.5 - % There are no beams in Gregorian Chant notation. + %% There are no beams in Gregorian Chant notation. autoBeaming = ##f - % Prepare TextSpanner for \episem{Initium|Finis} use. - % - % N.B.: dash-fraction MUST be unset; otherwise, TextSpanner will - % always produce dashed lines, regardless of the style property. - % - % FIXME: The line @code{\override TextSpanner #'padding = #-0.1} is - % required to force the articulation signs being placed vertically - % tightly to the correpsonding note heads. - % + %% Prepare TextSpanner for \episem{Initium|Finis} use. + %% + %% N.B.: dash-fraction MUST be unset; otherwise, TextSpanner will + %% always produce dashed lines, regardless of the style property. + %% + %% FIXME: The line @code{\override TextSpanner #'padding = #-0.1} is + %% required to force the articulation signs being placed vertically + %% tightly to the correpsonding note heads. + %% \override TextSpanner #'dash-fraction = #'() \override TextSpanner #'style = #'line \override TextSpanner #'edge-height = #'(0 . 0) @@ -777,16 +777,16 @@ EasyNotation = \context { % TODO: why \context override? \override TextSpanner #'enclose-bounds = #1 \override TextSpanner #'edge-text = #'("" . "") } - \context { +\context { \Staff \name "GregorianTranscriptionStaff" \alias "Staff" \denies "Voice" \accepts "GregorianTranscriptionVoice" - % We can not remove Bar_engraver; otherwise clefs and custodes will - % not show up any more among other line breaking issues. - % Instead, we make the grob transparent. + %% We can not remove Bar_engraver; otherwise clefs and custodes will + %% not show up any more among other line breaking issues. + %% Instead, we make the grob transparent. \override BarLine #'transparent = ##t } @@ -800,10 +800,10 @@ EasyNotation = \context { % TODO: why \context override? \remove "Ligature_bracket_engraver" \consists "Mensural_ligature_engraver" - % Set default head for notes outside of \[ \]. + %% Set default head for notes outside of \[ \]. \override NoteHead #'style = #'mensural - % There are no beams in mensural notation. + %% There are no beams in mensural notation. autoBeaming = ##f } @@ -817,23 +817,23 @@ EasyNotation = \context { % TODO: why \context override? \consists "Custos_engraver" - % We can not remove Bar_engraver; otherwise clefs and custodes will - % not show up any more among other line breaking issues. - % Instead, we make the grob transparent. + %% We can not remove Bar_engraver; otherwise clefs and custodes will + %% not show up any more among other line breaking issues. + %% Instead, we make the grob transparent. \override BarLine #'transparent = ##t \override StaffSymbol #'thickness = #0.6 - % FIXME: unit on StaffSymbol's width should be \linewidth. - % \override StaffSymbol #'width = #60.0 + %% FIXME: unit on StaffSymbol's width should be \linewidth. + %% \override StaffSymbol #'width = #60.0 - % Choose petrucci g clef on 2nd line as default. + %% Choose petrucci g clef on 2nd line as default. clefGlyph = #"clefs.petrucci.g" middleCPosition = #-6 clefPosition = #-2 clefOctavation = #0 - % Select mensural style font. + %% Select mensural style font. \override TimeSignature #'style = #'mensural \override KeySignature #'style = #'mensural \override Accidental #'style = #'mensural @@ -841,13 +841,13 @@ EasyNotation = \context { % TODO: why \context override? \override Custos #'neutral-position = #3 \override Custos #'neutral-direction = #-1 - % Score.timing = ##f - % Score.barAlways = ##t + %% Score.timing = ##f + %% Score.barAlways = ##t } RemoveEmptyRhythmicStaffContext= \context { - \RhythmicStaff - \remove "Axis_group_engraver" - \consists "Hara_kiri_engraver" + \RhythmicStaff + \remove "Axis_group_engraver" + \consists "Hara_kiri_engraver" } diff --git a/scm/music-functions.scm b/scm/music-functions.scm index 04975f5774..42da650a65 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -134,8 +134,9 @@ will be printed as: (make-music 'MusicType 'property ...)" (cond (;; property is a markup expression (markup? (cdr prop)) (music-pretty-string (cdr prop) (1+ depth))) - (;; property is a list - (list? (cdr prop)) + (;; property is a non-empty list + (and (list? (cdr prop)) + (pair? (cdr prop))) (format #f "(list ~{~a~})" (map (lambda (mus) (format #f "~%~v_~a" @@ -152,6 +153,13 @@ will be printed as: (make-music 'MusicType 'property ...)" (ly:music-mutable-properties obj))))) (;; symbol (symbol? obj) (format #f "'~a" obj)) + (;; moment + (ly:moment? obj) + (format #f "(ly:make-moment ~a ~a ~a ~a)" + (ly:moment-main-numerator obj) + (ly:moment-main-denominator obj) + (ly:moment-grace-numerator obj) + (ly:moment-grace-denominator obj))) (;; note duration (ly:duration? obj) (format #f "(ly:make-duration ~a ~a ~a ~a)" (ly:duration-log obj) @@ -170,9 +178,13 @@ will be printed as: (make-music 'MusicType 'property ...)" (define-public (display-scheme-music obj) "Displays `obj', typically a music expression, in a friendly fashion, -which often can be read back in order to generate an equivalent expression." +which often can be read back in order to generate an equivalent expression. + +Returns `obj'. +" (display (music-pretty-string obj)) - (newline)) + (newline) + obj) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -678,9 +690,9 @@ Syntax: ;; for the quotes is determined in the iterator. (make-sequential-music (list - (context-spec-music (make-voice-props-set cue-voice) 'Voice "cue") + (context-spec-music (make-voice-props-set cue-voice) 'CueVoice "cue") quote-music - (context-spec-music (make-voice-props-revert) 'Voice "cue")))) + (context-spec-music (make-voice-props-revert) 'CueVoice "cue")))) (set! main-music (make-sequential-music (list @@ -737,7 +749,6 @@ Syntax: (define-public toplevel-music-functions (list - ;; check-start-chords ; ; no longer needed with chord syntax. (lambda (music parser) (voicify-music music)) (lambda (x parser) (music-map glue-mm-rest-texts x)) (lambda (x parser) (music-map music-check-error x)) @@ -745,8 +756,12 @@ Syntax: (lambda (music parser) (music-map (quote-substitute (ly:parser-lookup parser 'musicQuotes)) music)) + ;; switch-on-debugging - (lambda (x parser) (music-map cue-substitute x)))) + (lambda (x parser) (music-map cue-substitute x)) +; (lambda (x parser) (music-map display-scheme-music x)) + + )) ;;;;;;;;;;;;;;;;; ;; lyrics -- 2.39.5