quote problem if for last note of quoted sequence.
* input/regression/part-combine-text.ly (comm): add expect strings.
+2004-10-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * lily/quote-iterator.cc (process): use <= for comparisons. Fixes
+ quote problem if for last note of quoted sequence.
+
+ * input/regression/part-combine-text.ly (comm): add expect strings.
+
2004-10-30 Werner Lemberg <wl@gnu.org>
* Documentation/user/examples.itely: Improved layout.
2004-10-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * lily/part-combine-iterator.cc (unisono): examine last_playing_
+ (not state_), this fixes a2 printing after chord.
+
+ * input/regression/no-staff.ly: fix octave, revise syntax.
+
+ * input/regression/lyrics-bar.ly (texidoc): fixes.
+
+ * input/regression/beam-dir-functions.ly (Module): remove from regtest
+
+ * input/regression/accidentals.ly (Module): remove from regtest.
+
* lily/parser.yy (Prefix_composite_music):
oops. Chords should be unrelativable, not bass figures untransposable.
+++ /dev/null
-\version "2.3.22"
-
-\header{
-texidoc="
-This shows how accidentals are handled.
-"
-}
-mel = { \key d \major \time 4/4
- d4 dis dis8 dis, d4 | d dis disis8 d, dis4 | d des disis8 dis, d4 | dis deses d dis ~ | dis dis ~ dis8 d, dis4 ~ | \break
- dis dis cis c | c cis cisis cis | c ces cisis c | cis ceses c cis ~ | cis cis ~ cis cis \bar "|." | \break
-}
-
-\score {
- <<
- \context Staff \transpose c c'' \mel
- \context NoteNames{
- \set printOctaveNames = ##f
- \mel
- }
- >>
-}
-
+++ /dev/null
-% junkme?
-\version "2.3.22"
-\header {
- texidoc = "@cindex Beam Dir Functions
-
-The direction of a beam may be calculated in several ways. As shown in
-the example, the beam are be below the notes if:
-@table @code
-@item majority
-of (individual) notes would have down stems,
-@item mean
-of note pitches is on the center line or below it, or
-@item median
-of note pithes (i.e. the centermost element of ordered pitches) is
-on the center line or below it.
-@end table
-
-If your favourite algorithm is not one of these, you can hook up your
-own one.
-(These beam direction functions are defined in @file{scm/beam.scm}.)
-"
-}
-
-\layout { raggedright = ##t}
-\score {
- \relative c'' {\time 3/4
- \override Beam #'dir-function = #beam-dir-majority
- c8[ g]
- \override Beam #'dir-function = #beam-dir-mean
- c[ g]
- \override Beam #'dir-function = #beam-dir-median
- c[ g]
-
- \time 3/8
- \override Beam #'dir-function = #beam-dir-majority
- c8[ c g]
- \override Beam #'dir-function = #beam-dir-mean
- c[ c g]
- \override Beam #'dir-function = #beam-dir-median
- c[ c g]
- }
-\layout{raggedright = ##t}
-}
-
-%% Local variables:
-%% LilyPond-indent-level:2
-%% End:
-
-
-
\header {
- texidoc = "A volta repeat may begin with a grace. Consecutive ending and
- starting repeat bars are into one @code{:||:}."
+ texidoc = "A volta repeat may begin with a grace. Consecutive
+ ending and starting repeat bars are merged into one @code{:||:}."
}
\version "2.3.22"
\header{
-texidoc="
-Grace notes are typeset as an encapsulated piece of music. You can
-have beams, notes, chords, stems etc. within a @code{\grace} section.
-Slurs that start within a grace section, but are not ended are attached
-to the next normal note. Grace notes have zero duration. If there
-are tuplets, the grace notes will not be under the brace. Grace notes
-can have accidentals, but they are (currently) spaced at a fixed
-distance. Grace notes (of course) come before the accidentals of the
-main note. Grace notes can also be positioned after the main note.
-Grace notes without beams should have a slash, if @code{flagStyle} is
-not set. Main note scripts do not end up on the grace note.
+ texidoc=" You can have beams, notes, chords, stems etc. within a
+@code{\grace} section. If there are tuplets, the grace notes will not
+be under the brace.
+
+Main note scripts do not end up on the grace note.
"
}
-\header { texidoc = "Cancellation are printed before the barline. The
+\header { texidoc = "Cancellation signs are printed by default. The
spacing of the natural signs depends on their vertical
positions. The stems should not clash graphically."
-
}
\version "2.3.22"
-\score {
- \relative c''
- {
- \set Staff.createKeyOnClefChange = ##t
+\paper {
+ raggedright = ##T
+}
+
+\relative
+{
+ \set Staff.createKeyOnClefChange = ##t
\key bes \major c2
-% \key c \major % \minor
+ % \key c \major % \minor
\key es \major % \minor
c2
\break
\key bes \major % \major
c2 \clef alto c2 \key d \major \clef treble c2
- \set Staff.keySignature = #'((2 . -1) (6 . 3) (4 . -2))
- e2
- }
+ \set Staff.keySignature = #'((2 . -1) (6 . 3) (4 . -2))
+ e2
}
\version "2.3.22"
\header{
- texidoc= "Lyrics can be set to a melody automatically. Excess lyrics will be
-discarded. Lyrics will not be set over rests. You can have melismata
-either by setting a property melismaBusy, or by setting
+
+ texidoc= "Lyrics can be set to a melody automatically. Excess
+lyrics will be discarded. Lyrics will not be set over rests. You can
+have melismata either by setting a property melismaBusy, or by setting
automaticMelismas (which will set melismas during slurs and ties). If
you want a different order than first Music, then Lyrics, you must
-precook a chord of staves/lyrics and label those. Of course,
-@code{\rhythm} ignores any other rhythms in the piece. Hyphens and
-extenders do not assume anything about lyric lengths, so they continue
-to work."
+precook a chord of staves/lyrics and label those. Of course, the
+lyrics ignores any other rhythms in the piece."
+
}
\layout { raggedright= ##t }
noise = \repeat unfold 6 \relative c'' { g16 g g g }
-textI = \context Lyrics = "middle-1" \lyricmode { la2 __ la -- la __ la la la la la }
-textII = \context Lyrics = "middle-1" \lyricmode { da -- da __ da -- da da da da da }
+textI = \lyricmode {
+ la2 __ la -- la __ la la la la la
+}
+
+textII = \lyricmode {
+ da -- da __ da -- da da da da da
+}
<< \context Staff = SA \noise
\context Lyrics = LB { s1 }
\context Staff = SC \noise
- \oldaddlyrics
- \context Staff = SB \context Voice="middle" \m
- << \context Lyrics = LA \textI
- \context Lyrics = LB \textII
- >>
-
+ \context Staff = SB \context Voice = middle \m
+ \context Lyrics = LA \lyricsto "middle" \textI
+ \context Lyrics = LB \lyricsto "middle" \textII
>>
"
}
-\score {
- \context StaffGroup <<
- \context Staff=foo {
- b1 \bar "|:" b1 \bar ":|"
- }
- \context LyricsWithBars \lyricmode {
-% thisContextHasBarEngraver1 added
- ThisContextCertainlyHasBarEngraverAddedButThereHasBeenSomethingFunnyBefore1. HereThereWhere.
- }
- \context Lyrics \lyricmode {
- this4 one has no BarEngraverAddedToContext1
- }
- \context Staff=bar { b1 b1 }
- >>
- \layout {
- raggedright = ##t
- \context {
- \StaffGroup
- \accepts "LyricsWithBars"
- }
- \context {
- \Lyrics
- \consists "Bar_engraver"
- \name "LyricsWithBars"
- }
- }
+\layout {
+ raggedright = ##t
}
+<<
+ \context Staff=foo \with
+ {
+% \remove "Bar_engraver"
+ }
+ {
+ b1 \bar "|:" b1 \bar ":|"
+ }
+ \context Lyrics \with {
+ \consists "Bar_engraver"
+ \override BarLine #'bar-size = #4
+ } \lyricmode {
+ looooooooooooooooooooooooooooooooooong1 syllable
+ }
+ \lyrics {
+ no Bar_Engraver_Bar_Engraver_Bar_Engraver
+ }
+ \context Staff=bar \with {
+% \remove "Bar_engraver"
+ } { b1 b1 }
+>>
+
+
\header
{
+
texidoc = "Music function are generic music transformation functions,
-which can be used to extend music syntax seamlessly."
+which can be used to extend music syntax seamlessly. Here we
+demonstrate a @code{\myBar} function, which works similar to
+@code{\bar}, but is implemented completely in Scheme."
}
\version "2.3.22"
(context-spec-music
(context-spec-music (make-property-set 'whichBar type) 'Timing)
'Score))
-
))
-\score{
- {
- d4 \myBar #"|:" d4
-
- }
+\layout { raggedright = ##t }
+
+{
+ d4 \myBar #"|:" d4
}
\header {
- texidoc = "Scoring based slur formatting."
+
+ texidoc = "Slur formatting is based on scoring. A large number of
+ slurs are generated. Each esthetic aspect gets demerits, the best
+ configuration (with least demerits) wins. This must be tested in
+ one big file, since changing one score parameter for one situation
+ may affect several other situations.
+
+ Tunable parameters are in @file{scm/slur.scm}.
+"
+
}
\version "2.3.22"
"
}
-\score {
- { c4 d4 e8 d8 }
- \layout {
+\layout {
raggedright = ##t
- \context {
- \Staff
- \remove Staff_symbol_engraver
- \consists Pitch_squash_engraver
- \remove Clef_engraver
- }
- }
}
+\relative \new Staff \with {
+ \remove Staff_symbol_engraver
+ \consists Pitch_squash_engraver
+ \remove Clef_engraver
+ } {
+ c4 d4 e8 d8
+ }
+
and only after chords, solo or polyphony."
}
-vone = \relative a' { R1*2 g2 r2 g2 r2 a4 r4 g
- }
+vone = \relative a' { R1*2 g2 r2 g2 r2 a4 r4 g }
vtwo = \relative a' { R1*2 g2 r2 g2 r2 f4 r4 g }
-\score {
- << \set Score.skipBars = ##t
+comment = \relative { s1*2 s2_"a2" s2 s2_"no a2" s2 s4 s4 s4_"a2" }
+
+\layout { raggedright = ##T }
+
+\new Staff << \set Score.skipBars = ##t
\partcombine \vone \vtwo
- >>
-}
+ \comment
+>>
\header {
texidoc = "SOLO is printed even if the solo voice ends before the
- other one. Unfortunately, the multi-rest does not get printed."
+ other one. Unfortunately, the multi-rest of the 1st voice (which
+ is 2 bars longer than the 2nd voice) does not get printed."
+
}
\version "2.3.22"
\version "2.3.22"
+\layout { raggedright= ##t }
+
vone = \relative a' { R1 a2 r4 r a a a a }
vtwo = \relative a' { R1 f4 f4 f4 f f f a a }
-
-\score {
- \partcombine \vone \vtwo
-}
+comm = { s1 s2 s4_"expect: solo 2" s4 s2 s4_"expect: a2" s4 }
+\new Staff <<
+ \partcombine \vone \vtwo
+ \comm
+>>
raggedright = ##t
}
-\addquote bla \relative c' {
- fis4 r16 a8.-> b-\ff }
-\relative c'' {
+quoteMe = \relative c' { fis4 r16 a8.-> b4-\ff }
- \set Staff.quotedEventTypes = #'(note-event articulation-event)
- c8 d8 <<
- s2
- \new Voice {
- \set fontSize = #-2
- \quote bla 2
+\addquote quoteMe \quoteMe
+original = \relative c'' { c8 d s2 es8 gis8 }
- } >>
- es8 gis
-
+<<
+ \new Staff {
+ \set Staff.instrument = "quoteMe"
+ \quoteMe
}
-
+ \new Staff {
+ \set Staff.instrument = "orig"
+ \original
+ }
+ \new Staff \relative c'' <<
+ \set Staff.quotedEventTypes = #'(note-event articulation-event)
+ \original
+ \new Voice {
+ s4
+ \set fontSize = #-4
+ \override Stem #'lengths = #'(2.5 2.5 3.0 3.0)
+ \quote quoteMe 2.
+ }
+ >>
+>>
if (!event)
event = make_music_by_name (ly_symbol2scm ("UnisonoEvent"));
- (state_ == SOLO2 ? second_iter_ : first_iter_)
+ (last_playing_ == SOLO2 ? second_iter_ : first_iter_)
->try_music_in_children (event);
playing_state_ = UNISONO;
}
programming_error (s);
}
}
-
+
if (first_iter_->ok ())
{
first_iter_->process (m);
{
public:
Quote_iterator ();
+ Moment vector_moment (int idx) const;
Moment start_moment_;
SCM event_vector_;
Moment
Quote_iterator::pending_moment () const
{
- SCM entry = SCM_VECTOR_REF (event_vector_, event_idx_);
- return *unsmob_moment (scm_caar (entry)) - start_moment_;
+ return vector_moment (event_idx_) - start_moment_;
}
+Moment
+Quote_iterator::vector_moment (int idx) const
+{
+ SCM entry = SCM_VECTOR_REF (event_vector_, idx);
+ return *unsmob_moment (scm_caar (entry));
+}
+
+
void
Quote_iterator::process (Moment m)
{
- SCM entry = SCM_EOL;
-
m += start_moment_;
- while (event_idx_ < end_idx_)
+ while (event_idx_ <= end_idx_)
{
- entry = SCM_VECTOR_REF (event_vector_, event_idx_);
-
- Moment em = *unsmob_moment (scm_caar (entry));
-
+ Moment em = vector_moment (event_idx_);
if (em > m)
return ;
event_idx_++;
}
- if (scm_is_pair (entry))
+ if (event_idx_ <= end_idx_)
{
+ SCM entry = SCM_VECTOR_REF (event_vector_, event_idx_);
Pitch * quote_pitch = unsmob_pitch (scm_cdar (entry));
/*
part-combine-listener))
(first-voice-handle (last-pair noticed)))
+ ; (display (last-pair noticed))
(if (pair? first-voice-handle)
(hash-set! tab name
;; cdr : skip name string