* lily/tie-engraver.cc (struct Head_event_tuple): add end_moment_
to Head_event_tuple, so we deal gracefully with ties on
cue-endings.
* lily/pango-font.cc (pango_item_string_stencil): type correctness
for FcChar8*
+2006-06-08 Han-Wen Nienhuys <hanwen@lilypond.org>
+
+ * input/regression/quote-tie.ly: new file.
+
+ * lily/tie-engraver.cc (struct Head_event_tuple): add end_moment_
+ to Head_event_tuple, so we deal gracefully with ties on
+ cue-endings.
+
+ * lily/pango-font.cc (pango_item_string_stencil): type correctness
+ for FcChar8*
+
2006-06-08 Graham Percival <gpermus@gmail.com>
* input/test/ smart-transpose.ly, reverse-music.ly:
2006-06-08 Graham Percival <gpermus@gmail.com>
* input/test/ smart-transpose.ly, reverse-music.ly:
--- /dev/null
+\version "2.9.7"
+
+\header {
+
+ texidoc = " Voices from different cues must not be tied together. In
+this example, the first note has a tie. This note should not be tied
+to the 2nd note. "
+
+}
+
+\paper {
+ ragged-right = ##t
+}
+
+cueI = \relative c'' {
+ a1 ~ | a | a |
+}
+\addquote "cueI" { \cueI }
+
+cueII = \relative c' {
+ R1 | e | a |
+}
+\addquote "cueII" { \cueII }
+
+\new Staff {
+ \cueDuring "cueI" #UP { R1 } |
+ R1
+ \cueDuring "cueII" #UP { R1 } |
+}
+++ /dev/null
-\version "2.7.39"
-\header {
-
- texidoc = "Tie engraver uses @code{busyGrobs} to keep track of
-note heads. By throwing many mixed tuplets on the queue,
-one may have collisions between ties and beams.
-"
-
-}
-
-\layout {
- ragged-right = ##t
-}
-
-
-\context Staff \relative c''
-<<
- { \times 2/3 { c'8~ c8~ c8~ c8~ c8~ c8 } }
- \\
- { \voiceTwo \times 2/5 { a,4 ~a4 ~a4~ a4~ a4 }}
- \\
- { \voiceThree { b,8 ~ b8 ~ b8 ~ b8 }}
->>
-
-
-
-
/* create */ "VerticalAxisGroup",
/* accept */ "",
/* read */
/* create */ "VerticalAxisGroup",
/* accept */ "",
/* read */
- "verticalExtent "
- "minimumVerticalExtent "
- "extraVerticalExtent ",
+ "currentCommandColumn ",
b.scale (scale_);
char const *ps_name_str0 = FT_Get_Postscript_Name (ftface);
FcPattern *fcpat = fcfont->font_pattern;
b.scale (scale_);
char const *ps_name_str0 = FT_Get_Postscript_Name (ftface);
FcPattern *fcpat = fcfont->font_pattern;
- char *file_name_as_ptr = 0;
- FcPatternGetString (fcpat, FC_FILE, 0, (FcChar8 **) & file_name_as_ptr);
+ FcChar8 *file_name_as_ptr = 0;
+ FcPatternGetString (fcpat, FC_FILE, 0, &file_name_as_ptr);
string file_name;
if (file_name_as_ptr)
{
/* Normalize file name. */
string file_name;
if (file_name_as_ptr)
{
/* Normalize file name. */
- file_name = File_name (file_name_as_ptr).to_string ();
+ file_name = File_name ((char const *)file_name_as_ptr).to_string ();
}
SCM glyph_exprs = SCM_EOL;
}
SCM glyph_exprs = SCM_EOL;
struct Head_event_tuple
{
Grob *head_;
struct Head_event_tuple
{
Grob *head_;
SCM tie_definition_;
Music *event_;
SCM tie_definition_;
Music *event_;
- }
- Head_event_tuple (Grob *h, Music *m, SCM def)
- {
- head_ = h;
- event_ = m;
- tie_definition_ = def;
+ event_ = 0;
+ head_ = 0;
+ tie_definition_ = SCM_EOL;
{
context ()->set_property ("tieMelismaBusy",
ly_bool2scm (heads_to_tie_.size ()));
{
context ()->set_property ("tieMelismaBusy",
ly_bool2scm (heads_to_tie_.size ()));
+
+
+ if (!to_boolean (get_property ("tieWaitForNote")))
+ {
+ Moment now = now_mom ();
+ for (vsize i = heads_to_tie_.size (); i--; )
+ {
+ if (now > heads_to_tie_[i].end_moment_)
+ heads_to_tie_.erase (heads_to_tie_.begin () + i);
+ }
+ }
for (vsize i = 0; i < now_heads_.size (); i++)
{
for (vsize i = 0; i < now_heads_.size (); i++)
{
- heads_to_tie_.push_back (Head_event_tuple (now_heads_[i], event_,
- start_definition));
+ Grob *head = now_heads_[i];
+ Music *left_mus = unsmob_music (head->get_property ("cause"));
+ if (left_mus)
+ {
+ Head_event_tuple event_tup;
+
+ event_tup.head_ = head;
+ event_tup.tie_definition_ = start_definition;
+ event_tup.event_ = event_;
+
+ Moment end = now_mom ();
+ if (end.grace_part_)
+ {
+ end.grace_part_ += left_mus->get_length ().main_part_;
+ }
+ else
+ {
+ end += left_mus->get_length ();
+ }
+ event_tup.end_moment_ = end;
+
+ heads_to_tie_.push_back (event_tup);
+ }
+
+
+
+resetRelativeOctave =
+#(define-music-function
+ (parser location reference-note)
+ (ly:music?)
+ "Set the octave inside a \\relative section."
+
+ (let*
+ ((notes (ly:music-property reference-note 'elements))
+ (pitch (ly:music-property (car notes) 'pitch)))
+
+ (set! (ly:music-property reference-note 'elements) '())
+ (set! (ly:music-property reference-note
+ 'to-relative-callback)
+ (lambda (music last-pitch)
+ pitch))
+
+ reference-note))
+