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: <c' g''\harmonic>
* Documentation/user/refman.itely (Percussion staves): update doco.
* ly/engraver-init.ly: add DrumStaff and DrumVoice contexts
2004-02-05 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * 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: <c' g''\harmonic>
+
* lily/lily-guile.cc (alist_to_hashq): new function
* scm/lily.scm (alist->hash-table): new function.
* ly/engraver-init.ly: add DrumStaff and DrumVoice contexts
-2004-02-05 Jan Nieuwenhuizen <janneke@gnua.org>
+2004-02-05 Jan Nieuwenhuizen <janneke@gnu.org>
* scripts/filter-lilypond-book.py (find_toplevel_snippets): Do not
discard valid matches.
@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
+ <c' g''\harmonic>
+@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:
@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.
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
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
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
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
-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.
+++ /dev/null
-#(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
- }
- }
-}
-
-\version "2.1.7"
+\version "2.1.19"
\header {
texidoc = "The @code{Recording_group_engraver} will record events
listener = \paper {
\translator {
- \ThreadContext
+ \VoiceContext
\type "Recording_group_engraver"
recordEventSequence = #notice-the-events
}
-\version "2.1.7"
+\version "2.1.19"
\header {
texidoc = "Completion heads are broken across bar lines. This was
\paper {
\translator{
- \ThreadContext
+ \VoiceContext
\remove "Note_heads_engraver"
\consists "Completion_heads_engraver"
}
-\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.
"
}
}
\paper{
\translator{
- \ThreadContext
+ \VoiceContext
\remove "Note_heads_engraver"
\consists "Completion_heads_engraver"
}
-\version "2.1.7"
+\version "2.1.19"
\header {
texidoc = "Note heads are flipped on the stem to prevent collisions.
\paper { raggedright= ##t }
\score { \notes \relative c''
- \context Thread {
+ \context Voice {
<g a c>4
<c d g a>
<c d e >
\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
}
}
-\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.
"
}
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 {
+++ /dev/null
-\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"
-}
-}}
-
-
-\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 {
-\version "2.1.7"
+\version "2.1.19"
\header{
texidoc="@cindex Count Systems
\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
}
\paper { raggedright = ##t }
+
\include "engraver-example.lyinc"
\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 }
}
}
\paper {
\translator { \MyStaffContext }
\translator { \MyVoiceContext }
- \translator { \MyThreadContext }
- }
+ }
}
MyStaffContext = \translator {
\paper {
\translator { \MyStaffContext }
\translator { \MyVoiceContext }
- \translator { \MyThreadContext }
- }
+ }
}
MyVoiceContext = \translator {
\paper {
\translator { \MyStaffContext }
\translator { \MyVoiceContext }
- \translator { \MyThreadContext }
- }
+ }
}
MyVoiceContext = \translator {
\paper {
\translator { \MyStaffContext }
\translator { \MyVoiceContext }
- \translator { \MyThreadContext }
- }
+ }
}
MyVoiceContext= \translator {
\paper {
\translator { \MyStaffContext }
\translator { \MyVoiceContext }
- \translator { \MyThreadContext }
- }
+ }
}
MyStaffContext = \translator {
\paper {
\translator { \MyStaffContext }
\translator { \MyVoiceContext }
- \translator { \MyThreadContext }
- }
+ }
}
MyStaffContext = \translator
\paper {
\translator { \MyStaffContext }
\translator { \MyVoiceContext }
- \translator { \MyThreadContext }
- }
+ }
}
+++ /dev/null
-\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 }
-}
-
--- /dev/null
+\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 }
+}
+
-\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 {
+ <c' g'\harmonic>4
+ }
+ \paper {
+ raggedright=##t
}
- \paper {raggedright=##t}
}
-\version "2.1.7"
+\version "2.1.19"
% possible rename. -gp
\header { texidoc="@cindex Seperate Staccato
music = \notes\relative c' { c4 d e f g a b c d e }
\score {
- \new Thread <<
+ \context Voice <<
\music
\repeat unfold 2 \staccatos
>>
{
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_);
}
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",
\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 "Tuplet_engraver"
\consists "Skip_event_swallow_translator"
- \accepts Thread % bug if you leave out this!
}
\translator {
\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
\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
\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"
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"
\translator {
\VoiceContext
\name "TabVoice"
- \denies "Thread"
\consists "Tab_note_heads_engraver"
\remove "Fingering_engraver"
\remove "New_fingering_engraver"
dashDot= "staccato"
dashUnderscore = "portato"
+harmonic = #(make-music-by-name 'HarmonicEvent)
+
thumb = #(make-articulation "thumb")
accent = #(make-articulation "accent")
marcato = #(make-articulation "marcato")
(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.")
+
def conv (str):
str = re.sub (r'\\include "drumpitch-init.ly','', str)
str = re.sub (r'\\pitchnames ','pitchnames = ', 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