From: hanwen Date: Thu, 5 Feb 2004 10:17:53 +0000 (+0000) Subject: * Documentation/user/refman.itely (Automatic note splitting): X-Git-Tag: release/2.1.19~10 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=890b1b3e12ef5a8dd5ee018c84f6dfca477466ff;p=lilypond.git * Documentation/user/refman.itely (Automatic note splitting): remove Thread references. * input/no-notation/pc-direction.ly: remove file. * ly/engraver-init.ly: remove Thread * input/regression/tie-chord-partial.ly: remove file. * scripts/convert-ly.py (conv): \harmonic rule * lily/new-fingering-engraver.cc (acknowledge_grob): add new notation for harmonic notes: * Documentation/user/refman.itely (Percussion staves): update doco. * ly/engraver-init.ly: add DrumStaff and DrumVoice contexts --- diff --git a/ChangeLog b/ChangeLog index 62a9524764..3e9478e5cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,19 @@ 2004-02-05 Han-Wen Nienhuys + * Documentation/user/refman.itely (Automatic note splitting): + remove Thread references. + + * input/no-notation/pc-direction.ly: remove file. + + * ly/engraver-init.ly: remove Thread + + * input/regression/tie-chord-partial.ly: remove file. + + * scripts/convert-ly.py (conv): \harmonic rule + + * lily/new-fingering-engraver.cc (acknowledge_grob): add new + notation for harmonic notes: + * lily/lily-guile.cc (alist_to_hashq): new function * scm/lily.scm (alist->hash-table): new function. @@ -12,7 +26,7 @@ * ly/engraver-init.ly: add DrumStaff and DrumVoice contexts -2004-02-05 Jan Nieuwenhuizen +2004-02-05 Jan Nieuwenhuizen * scripts/filter-lilypond-book.py (find_toplevel_snippets): Do not discard valid matches. diff --git a/Documentation/topdocs/NEWS.texi b/Documentation/topdocs/NEWS.texi index 254494e6ef..0961eb2f51 100644 --- a/Documentation/topdocs/NEWS.texi +++ b/Documentation/topdocs/NEWS.texi @@ -18,7 +18,15 @@ Version 2.1.13 @itemize @bullet -@item Drum notation is now supported natively: +@item The @code{Thread} context has been removed. Note heads and rests +are now constructed at @code{Voice} level. + +@item Harmonic notes can now be entered as +@example + +@end example + +@item Drum notation is now supported as a regular feature: percussion may be entered in @code{\drums} mode, and printed in a @code{DrumStaff} context: diff --git a/Documentation/user/internals.itely b/Documentation/user/internals.itely index 3fed2a848b..ac46967e20 100644 --- a/Documentation/user/internals.itely +++ b/Documentation/user/internals.itely @@ -228,9 +228,9 @@ music expressions. Consider the following example: @noindent The sequential music is interpreted by the Score context initially, but when a note is encountered, contexts are setup to accept that -note. In this case, a @code{Thread}, @code{Voice}, and @code{Staff} +note. In this case, a @code{Voice}, and @code{Staff} context are created. The rest of the sequential music is also -interpreted with the same @code{Thread}, @code{Voice}, and +interpreted with the same @code{Voice}, and @code{Staff} context, putting the notes on the same staff, in the same voice. @@ -262,7 +262,7 @@ contained contexts. This means that a property valid for the If you do not wish to specify the name of the context in the @code{\property}-expression itself, you can refer to the abstract context name, @code{Current}. The @code{Current} context is the latest -used context. This will typically mean the @internalsref{Thread} context, +used context. This will typically mean the @internalsref{Voice} context, but you can force another context with the @code{\property}-command. Hence the expressions @@ -301,6 +301,8 @@ from a higher context), then this has no effect. The syntax of @code{\unset} is asymmetric: @code{\property \unset} is not the inverse of @code{\property \set}. +The context @code{Current} is confusing. + @node Context evaluation @subsection Context evaluation diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 0d5fa6950c..a9094bb1d5 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -712,34 +712,17 @@ c d b bes a g c2 } Long notes can be converted automatically to tied notes. This is done by replacing the @internalsref{Note_heads_engraver} by the -@internalsref{Completion_heads_engraver}: +@internalsref{Completion_heads_engraver}. +In the following examples, notes crossing the barline are split and tied. -@example - \paper @{ \translator @{ - \ThreadContext - \remove "Note_heads_engraver" - \consists "Completion_heads_engraver" - @} @} -@end example - -which will make long notes tied in the following example: -@example - \time 2/4 - c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2 -@end example -@lilypond[noindent] -\score{ - \notes\relative c'{ - \time 2/4 - c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2 - } - \paper { \translator { - \ThreadContext +@lilypond[noindent,verbatim] +\new Voice \with { \remove "Note_heads_engraver" \consists "Completion_heads_engraver" - } } - } +} { + c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2 +} @end lilypond This engraver splits all running notes at the bar line, and inserts @@ -752,7 +735,11 @@ is off. Not all durations (especially those containing tuplets) can be represented exactly; the engraver will not insert tuplets. +@seealso + +Examples: @inputfileref{input/regression,completion-heads.ly} +Internals: @internalsref{Completion_heads_engraver} @node Staff notation diff --git a/input/no-notation/README b/input/no-notation/README index b832c119ca..d162aad83c 100644 --- a/input/no-notation/README +++ b/input/no-notation/README @@ -1,7 +1,5 @@ -These examples make lilypond crash or exit prematurely. - -Some are bugs that should be fixed to generate output, andd then -moved to ../bugs or ../regression. +These examples test various non-typesetting things. Since they +do not generate output, they are not in test/ or regression/ Some (notably parse*.ly) are just error/warning generation tests and should remain here. diff --git a/input/no-notation/pc-direction.ly b/input/no-notation/pc-direction.ly deleted file mode 100644 index 24df023967..0000000000 --- a/input/no-notation/pc-direction.ly +++ /dev/null @@ -1,141 +0,0 @@ -#(ly:set-option 'old-relative) -\version "2.1.7" - -% move to regtest once it works? - - -% still not workign ? --hwn. - -\header { -texidoc = " -On their own staff, staffcombined voices should be stemboth (not up/down) -while voicecombined threads should get their direction set (up/down) - -" -} - - -End = { \skip 1*8 } - -violaI = \notes\relative c'' { - c c e4. e8 -} -violaII = \notes\relative c'' { - c4 b a a -} - - -violoncello = \notes\relative c' { - c8 c c c c8 c c c\break - a1 -} - -contrabasso = \notes\relative c { - a4 a8 a a8 a a a\break - a1 -} - -violeStaff = \notes \context Staff = viole << - \context Voice=oneViole << - \property Staff.instrument = #"Viola" - \property Staff.instr = #"Vla." - - \End - >> - \context Voice=twoViole << - \property Staff.instrument = #"Viola II" - \property Staff.instr = #"Vla. II" - \End - >> - \context Voice=oneViole \partcombine Voice - \context Thread=oneViole \violaI - \context Thread=twoViole \violaII ->> - -staffCombinePianoStaffProperties = { - \property PianoStaff.devNullThread = #'() - \property PianoStaff.soloADue = ##t - \property PianoStaff.soloText = #"" - \property PianoStaff.soloIIText = #"" - % This is non-conventional, but currently it is - % the only way to tell the difference. - \property PianoStaff.aDueText = #"\\`a2" - \property PianoStaff.splitInterval = #'(1 . 0) - \property PianoStaff.changeMoment = #`(,(ly:make-moment 1 1) . ,(ly:make-moment 1 1)) - \property PianoStaff.noDirection = ##t -} - - -\score { - << - \context StaffGroup << - \violeStaff - - \context PianoStaff = bassi_group \notes << - \staffCombinePianoStaffProperties - \context Staff=oneBassi << \clef bass - \property Staff.instrument = #'(lines - "Violoncello" " e" "Contrabasso") - - \property Staff.instr = #"Vc." - \End >> - \context Staff=twoBassi << \clef bass - \property Staff.instrument = #"Contrabasso" - \property Staff.instr = #"Cb." - - \End >> - - \context Staff=oneBassi \partcombine Staff - \context Voice=oneBassi { \violoncello } - \context Voice=twoBassi { \contrabasso } - >> ->> - >> - \paper { - % \paperSixteen - linewidth = 80 * \staffspace - textheight = 200 * \staffspace - \translator{ - \ThreadContext - \consists "Rest_engraver" - - % Set value for engraver at thread level, - % to override the default that is set in ScoreContext - % for added engraver at Voice level - devNullThread = #'() - } - \translator{ - \VoiceContext - \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" - } - \translator{ - \RemoveEmptyStaffContext - \consists "Mark_engraver" - } - \translator { - \OrchestralScoreContext - skipBars = ##t - soloText = #"I." - soloIIText = #"II." - % By default, turn off the Thread_devnull_engraver - % at Voice level - devNullThread = #'never - - % Hmm - currentBarNumber = #218 - BarNumber \override #'padding = #3 - RestCollision \override #'maximum-rest-count = #1 - marginScriptHorizontalAlignment = #1 - TimeSignature \override #'style = #'C - } - } -} - diff --git a/input/no-notation/recording.ly b/input/no-notation/recording.ly index a9e2c47327..375979c5c9 100644 --- a/input/no-notation/recording.ly +++ b/input/no-notation/recording.ly @@ -1,4 +1,4 @@ -\version "2.1.7" +\version "2.1.19" \header { texidoc = "The @code{Recording_group_engraver} will record events @@ -15,7 +15,7 @@ theMusic = \context Staff \notes { c4 d8-. } listener = \paper { \translator { - \ThreadContext + \VoiceContext \type "Recording_group_engraver" recordEventSequence = #notice-the-events } diff --git a/input/regression/completion-heads-polyphony.ly b/input/regression/completion-heads-polyphony.ly index 343867fbb3..bed5eefaad 100644 --- a/input/regression/completion-heads-polyphony.ly +++ b/input/regression/completion-heads-polyphony.ly @@ -1,4 +1,4 @@ -\version "2.1.7" +\version "2.1.19" \header { texidoc = "Completion heads are broken across bar lines. This was @@ -16,7 +16,7 @@ Completion heads are not fooled by polyphony with a different rhythm. \paper { \translator{ - \ThreadContext + \VoiceContext \remove "Note_heads_engraver" \consists "Completion_heads_engraver" } diff --git a/input/regression/completion-heads.ly b/input/regression/completion-heads.ly index 7e129b0181..76c99c2756 100644 --- a/input/regression/completion-heads.ly +++ b/input/regression/completion-heads.ly @@ -1,11 +1,9 @@ -\version "2.1.7" +\version "2.1.19" \header{ texidoc=" -If the Note_heads_engraver is replaced by the -@code{Completion_heads_engraver}, notes that cross bar lines are split -into tied notes. +If the @code{Note_heads_engraver} is replaced by the @code{Completion_heads_engraver}, notes that cross bar lines are split into tied notes. " } @@ -22,7 +20,7 @@ into tied notes. } \paper{ \translator{ - \ThreadContext + \VoiceContext \remove "Note_heads_engraver" \consists "Completion_heads_engraver" } diff --git a/input/regression/note-head-chord.ly b/input/regression/note-head-chord.ly index 5be5123953..ee53a766aa 100644 --- a/input/regression/note-head-chord.ly +++ b/input/regression/note-head-chord.ly @@ -1,5 +1,5 @@ -\version "2.1.7" +\version "2.1.19" \header { texidoc = "Note heads are flipped on the stem to prevent collisions. @@ -11,7 +11,7 @@ It also works for whole heads that have invisible stems. \paper { raggedright= ##t } \score { \notes \relative c'' - \context Thread { + \context Voice { 4 diff --git a/input/regression/note-head-harmonic.ly b/input/regression/note-head-harmonic.ly index 9b6fd12fb2..2e49e43c8d 100644 --- a/input/regression/note-head-harmonic.ly +++ b/input/regression/note-head-harmonic.ly @@ -7,17 +7,13 @@ \version "2.1.9" \score { - \context Voice \notes { - << { c''4 } - \new Thread { - \property Thread.NoteHead \set #'style = #'harmonic - f''4 - } - >> + \notes { + < c'' f''\harmonic >4 + \stemUp + < c'' f''\harmonic > } \paper { - linewidth = 50.0\mm - indent = 0.0\mm + raggedright = ##t } } diff --git a/input/regression/note-head-style.ly b/input/regression/note-head-style.ly index f5eacc7211..b6f34f5928 100644 --- a/input/regression/note-head-style.ly +++ b/input/regression/note-head-style.ly @@ -1,13 +1,12 @@ -\version "2.1.7" +\version "2.1.19" \header{ texidoc=" Note head shapes are settable. The stem endings should be adjusted per note head. If you want different note head styles on one stem, -you must create a special context called Thread. +you must create a special context called Voice. Harmonic notes have a different shape and different -dimensions. Nevertheless, noteheads in both styles can be combined, on -either up or down stems. +dimensions. " } @@ -74,32 +73,6 @@ pattern = \notes << s1*0^\markup { "slash" } \pattern \break - - \new Voice << - \new Thread { - \property Thread.NoteHead \set #'style = #'cross - \property Voice.Stem \set #'direction = #1 - c'16 - } - \new Thread { - \property Thread.NoteHead \set #'style = #'default a16 - } - \new Thread { - \property Thread.NoteHead \set #'style = #'mensural d'16 - } - >> - \context Voice << - \new Thread { - \property Thread.NoteHead \set #'style = #'cross - c'4 c'4 c'4 c'4 - } - \new Thread { - \property Thread.NoteHead \set #'style = #'mensural - c''4 \stemDown c'' - \property Thread.NoteHead \set #'style = #'slash - \stemUp c''4 \stemDown c'' - } - >> } \paper { diff --git a/input/regression/tie-chord-partial.ly b/input/regression/tie-chord-partial.ly deleted file mode 100644 index c931a46010..0000000000 --- a/input/regression/tie-chord-partial.ly +++ /dev/null @@ -1,29 +0,0 @@ -\header { - -texidoc = "Tieing only parts of chords is possible. It requires -putting the Tie engraver at Thread level, and redirecting untied notes -to a different thread." - -} -\version "2.1.7" - \paper { raggedright= ##t } - -\score { - -\notes \context Thread \relative c' { - << c~ e \new Thread c' >> - << c, e c' >> -} - - -\paper { -\translator { - \ThreadContext - \consists "Tie_engraver" -} -\translator { \VoiceContext - \remove "Tie_engraver" -} -}} - - diff --git a/input/regression/voice-follower.ly b/input/regression/voice-follower.ly index bd62946056..c34be884e1 100644 --- a/input/regression/voice-follower.ly +++ b/input/regression/voice-follower.ly @@ -1,11 +1,11 @@ -\version "2.1.7" +\version "2.1.19" \header { texidoc= " Whenever a voice switches to another staff a line connecting the notes can be printed automatically. This is enabled if the property -@code{Thread.followVoice} is set to true. " +@code{Voice.followVoice} is set to true. " } \score { diff --git a/input/test/count-systems.ly b/input/test/count-systems.ly index 516e2b74f9..622dba0879 100644 --- a/input/test/count-systems.ly +++ b/input/test/count-systems.ly @@ -1,5 +1,5 @@ -\version "2.1.7" +\version "2.1.19" \header{ texidoc="@cindex Count Systems @@ -27,7 +27,7 @@ specified number of lines. \score{ \notes\relative c''{ - \property Thread.NoteHead \override #'after-line-breaking-callback + \property Voice.NoteHead \override #'after-line-breaking-callback % = #display-system-count = #display-systemno c1 diff --git a/input/test/engraver-one-by-one.ly b/input/test/engraver-one-by-one.ly index ac13389031..1a7ae23662 100644 --- a/input/test/engraver-one-by-one.ly +++ b/input/test/engraver-one-by-one.ly @@ -23,6 +23,7 @@ Staff context. } \paper { raggedright = ##t } + \include "engraver-example.lyinc" @@ -120,38 +121,18 @@ MyVoiceContext = \translator { \consists "Tie_engraver" \consists "Tie_engraver" \consists "Tuplet_engraver" - - \consists "Skip_event_swallow_translator" - \accepts Thread % bug if you leave out this! -} - -MyThreadContext = \translator{ - \type Engraver_group_engraver - \name Thread - localKeySignature = #'() -\description " - Handles note heads, and is contained in the Voice context. You - have to instantiate this explicitly if you want to adjust the - style of individual note heads. -" - \consists "Font_size_engraver" \consists "Note_heads_engraver" \consists "Rest_engraver" - % why here ? - \consists "Output_property_engraver" - + \consists "Skip_event_swallow_translator" } - - \score { \topVoice \paper { \translator { \MyStaffContext } \translator { \MyVoiceContext } - \translator { \MyThreadContext } } } @@ -166,8 +147,7 @@ MyStaffContext = \translator { \paper { \translator { \MyStaffContext } \translator { \MyVoiceContext } - \translator { \MyThreadContext } - } + } } MyStaffContext = \translator { @@ -181,8 +161,7 @@ MyStaffContext = \translator { \paper { \translator { \MyStaffContext } \translator { \MyVoiceContext } - \translator { \MyThreadContext } - } + } } MyVoiceContext = \translator { @@ -195,8 +174,7 @@ MyVoiceContext = \translator { \paper { \translator { \MyStaffContext } \translator { \MyVoiceContext } - \translator { \MyThreadContext } - } + } } MyVoiceContext = \translator { @@ -209,8 +187,7 @@ MyVoiceContext = \translator { \paper { \translator { \MyStaffContext } \translator { \MyVoiceContext } - \translator { \MyThreadContext } - } + } } MyVoiceContext= \translator { @@ -226,8 +203,7 @@ MyVoiceContext= \translator { \paper { \translator { \MyStaffContext } \translator { \MyVoiceContext } - \translator { \MyThreadContext } - } + } } MyStaffContext = \translator { @@ -242,8 +218,7 @@ MyStaffContext = \translator { \paper { \translator { \MyStaffContext } \translator { \MyVoiceContext } - \translator { \MyThreadContext } - } + } } MyStaffContext = \translator @@ -256,6 +231,5 @@ MyStaffContext = \translator \paper { \translator { \MyStaffContext } \translator { \MyVoiceContext } - \translator { \MyThreadContext } - } + } } diff --git a/input/test/follow-thread.ly b/input/test/follow-thread.ly deleted file mode 100644 index e02236c014..0000000000 --- a/input/test/follow-thread.ly +++ /dev/null @@ -1,29 +0,0 @@ -\version "2.1.7" -% MERGED: stuff from follow-break.ly to follow-thread.ly - -% followVoice: connect note heads with line when thread switches staff -\header{ texidoc="@cindex followVoice Thread -Threads can be traced automagically when they switch staves by setting -property @code{followVoice}. " } - - -\score { - \notes\relative c { - \new PianoStaff << - \property PianoStaff.followVoice = ##t - \context Staff=one \context Voice { - \property Voice.VoiceFollower \set #'style = #'dashed-line - c'1 - \change Staff=two - b2 a -% these lines from follow-break.ly: - \change Staff=one - a1 - } - \context Staff=two {\clef bass \skip 1*3 } - >> - } - - \paper { raggedright = ##t } -} - diff --git a/input/test/follow-voice.ly b/input/test/follow-voice.ly new file mode 100644 index 0000000000..5d41d941b0 --- /dev/null +++ b/input/test/follow-voice.ly @@ -0,0 +1,29 @@ +\version "2.1.19" +% MERGED: stuff from follow-break.ly to follow-thread.ly + +% followVoice: connect note heads with line when thread switches staff +\header{ texidoc="@cindex followVoice Voice +Voices can be traced automagically when they switch staves by setting +property @code{followVoice}. " } + + +\score { + \notes\relative c { + \new PianoStaff << + \property PianoStaff.followVoice = ##t + \context Staff=one \context Voice { + \property Voice.VoiceFollower \set #'style = #'dashed-line + c'1 + \change Staff=two + b2 a +% these lines from follow-break.ly: + \change Staff=one + a1 + } + \context Staff=two {\clef bass \skip 1*3 } + >> + } + + \paper { raggedright = ##t } +} + diff --git a/input/test/harmonic.ly b/input/test/harmonic.ly index fe8161e264..b151b24b82 100644 --- a/input/test/harmonic.ly +++ b/input/test/harmonic.ly @@ -1,17 +1,19 @@ -\version "2.1.7" +\version "2.1.19" \header { texidoc ="@cindex Artificial Harmonics -For stringed instruments, artificial harmonics are notated with -two different notehead styles on the same stem. " } -\score { -\notes { c'4 - << c'4 \new Thread { - \property Thread.NoteHead \set #'style = #'harmonic - g'4 - } >> - + +Artificial harmonics are notated with a different notehead style. This +achieved by marking the harmonic pitch with @code{\harmonic}." + +} + +\score { + \notes { + 4 + } + \paper { + raggedright=##t } - \paper {raggedright=##t} } diff --git a/input/test/separate-staccato.ly b/input/test/separate-staccato.ly index 3f840583c1..b0449c1b22 100644 --- a/input/test/separate-staccato.ly +++ b/input/test/separate-staccato.ly @@ -1,5 +1,5 @@ -\version "2.1.7" +\version "2.1.19" % possible rename. -gp \header { texidoc="@cindex Seperate Staccato @@ -12,7 +12,7 @@ staccatos = \notes { s4-. s-. s-. s s } music = \notes\relative c' { c4 d e f g a b c d e } \score { - \new Thread << + \context Voice << \music \repeat unfold 2 \staccatos >> diff --git a/lily/new-fingering-engraver.cc b/lily/new-fingering-engraver.cc index 6476234aab..6da6f33f75 100644 --- a/lily/new-fingering-engraver.cc +++ b/lily/new-fingering-engraver.cc @@ -87,6 +87,10 @@ New_fingering_engraver::acknowledge_grob (Grob_info inf) { add_script (inf.grob_, m, note_ev); } + else if (m->is_mus_type ("harmonic-event")) + { + inf.grob_->set_grob_property ("style", ly_symbol2scm ("harmonic")); + } } heads_.push (inf.grob_); @@ -317,7 +321,9 @@ New_fingering_engraver::New_fingering_engraver() } ENTER_DESCRIPTION(New_fingering_engraver, -/* descr */ "Create fingering-scripts for notes in a new chord.", +/* descr */ "Create fingering-scripts for notes in a new chord. " + "This engraver is ill-named, since it " + "also takes care of articulations and harmonic note heads", /* creats*/ "Fingering", /* accepts */ "", /* acks */ "rhythmic-head-interface stem-interface", diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index 4f3ac1a647..41bb81cf5d 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -185,6 +185,9 @@ \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" @@ -214,7 +217,6 @@ \consists "Tuplet_engraver" \consists "Skip_event_swallow_translator" - \accepts Thread % bug if you leave out this! } \translator { @@ -246,27 +248,8 @@ \consists "Tuplet_engraver" \consists "Skip_event_swallow_translator" - \denies Thread -} - -\translator{ - \type Engraver_group_engraver - \name Thread - localKeySignature = #'() - \description " - Handles note heads, and is contained in the Voice context. You - have to instantiate this explicitly if you want to adjust the - style of individual note heads. -" - \consists "Font_size_engraver" - \consists "Note_heads_engraver" - \consists "Rest_engraver" - - % why here ? - \consists "Output_property_engraver" } - \translator{ \type "Engraver_group_engraver" \name GrandStaff @@ -288,10 +271,11 @@ \GrandStaffContext \name "PianoStaff" \alias "GrandStaff" - \description " - Just like @code{GrandStaff} but with @code{minVerticalAlign} set - equal to @code{maxVerticalAlign} so that interstaff beaming and - slurring can be used." + + \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 VerticalAlignment \override #'forced-distance = #12 VerticalAlignment \override #'self-alignment-Y = #0 @@ -330,10 +314,9 @@ \description - " Groups staffs while adding a bracket on the left side, - grouping the staves together. The bar lines of the contained - staves are connected vertically. -" + "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" @@ -349,10 +332,8 @@ extraVerticalExtent = ##f verticalExtent = ##f - \description " - Corresponds to a voice with lyrics. Handles the printing of a - single line of lyrics. -" + \description " Corresponds to a voice with lyrics. Handles the +printing of a single line of lyrics. " \name LyricsVoice \consists "Separating_line_group_engraver" @@ -651,7 +632,6 @@ EasyNotation = \translator { \translator { \VoiceContext \name "TabVoice" - \denies "Thread" \consists "Tab_note_heads_engraver" \remove "Fingering_engraver" \remove "New_fingering_engraver" diff --git a/ly/script-init.ly b/ly/script-init.ly index a5be99f3f4..35fd6e86ee 100644 --- a/ly/script-init.ly +++ b/ly/script-init.ly @@ -9,6 +9,8 @@ dashLarger= "accent" dashDot= "staccato" dashUnderscore = "portato" +harmonic = #(make-music-by-name 'HarmonicEvent) + thumb = #(make-articulation "thumb") accent = #(make-articulation "accent") marcato = #(make-articulation "marcato") diff --git a/scm/define-music-types.scm b/scm/define-music-types.scm index 2c675c159a..878086a91c 100644 --- a/scm/define-music-types.scm +++ b/scm/define-music-types.scm @@ -181,6 +181,12 @@ c8-[ c c-] c8") (internal-class-name . "Event") (types . (general-music event note-grouping-event)) )) + (HarmonicEvent + . ( + (description . "Mark a note as harmonic") + (internal-class-name . "Event") + (types . (general-music event harmonic-event)) + )) (HyphenEvent . ( (description . "A hyphen between lyric syllables.") diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py index 596798627b..d70efaf4de 100644 --- a/scripts/convert-ly.py +++ b/scripts/convert-ly.py @@ -1774,6 +1774,7 @@ conversions.append (((2,1,18), conv, """\\newpartcombine -> \\partcombine, + def conv (str): str = re.sub (r'\\include "drumpitch-init.ly','', str) str = re.sub (r'\\pitchnames ','pitchnames = ', str) @@ -1785,9 +1786,22 @@ def conv (str): str = re.sub (r"""\\apply\s+#\(drums->paper\s+'([a-z]+)\)""", r"""\property DrumStaff.drumStyleTable = #\1-style""", str) + + if re.search ('Thread', str): + sys.stderr.write ("\nThread found. Check file manually!\n"); + + str = re.sub (r"""(\\once\s*)?\\property\s+Thread\s*\.\s*NoteHead\s*""" + + r"""\\(set|override)\s*#'style\s*=\s*#'harmonic""" + + r"""\s+([a-z]+[,'=]*)([0-9]*\.*)""" + ,r"""<\3\\harmonic>\4""", str) + + str = re.sub (r"""\\new Thread""", """\context Voice""", str) + str = re.sub (r"""Thread""", """Voice""", str) + return str -conversions.append (((2,1,19), conv, """Drum notation changes, Removing \chordmodifiers, \notenames .""")) +conversions.append (((2,1,19), conv, """Drum notation changes, Removing \chordmodifiers, \notenames. +Harmonic notes. Thread context removed.""")) ################################ # END OF CONVERSIONS