+2004-01-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * scm/music-functions.scm (determine-split-list): bugfix: only use
+ new-active for both voices if both indexes advance. This fixes the
+ biggest outstanding problem with new-pc.
+
+ * lily/new-part-combine-iterator.cc (construct_children): set more
+ directions.
+
2004-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
* scripts/convert-ly.py (conv): add instrument rule.
-vone = \notes \relative a' { g2 g g g4 g f' c c( c) c c c ~ c }
-vtwo = \notes \relative a' { f2 f4 f f2 g4 g c, f f f f f~ f ~ f }
+vone = \notes \relative a' { g2 g g g4 g f' c c( c) c c c ~ c
+ c2. c4 c
+ }
+vtwo = \notes \relative a' { f2 f4 f f2 g4 g c, f f f f f~ f ~ f
+ f4 f2. ~ f4
+
+ }
\score {
\newpartcombine \vone \vtwo
invisible = \property Voice.NoteHead \override #'transparent = ##t
visible = \property Voice.NoteHead \revert #'transparent
-% Ugly hack to get reasonable position of the pincé and Cheute
-startHorizScript = {
- \property Voice.scriptHorizontal = ##t
- \property Voice.Script \override #'padding = #0.3
- \property Voice.Script \override #'extra-offset = #'(-.6 . 0)
- % Avoid collision with the dots of dotted notes
- \property Voice.Dots \override #'extra-X-extent = #'(-0.7 . 0)
-}
-endHorizScript = {
- \property Voice.scriptHorizontal \unset
- \property Voice.Dots \revert #'padding
- \property Voice.Script \revert #'padding
- \property Voice.Script \revert #'extra-offset
-}
\score {
{
\property Voice.Script \override #'extra-offset = #'(-0.8 . 2.0)
b_\turn}>>
- \startHorizScript
%{ FIXME \comma does not exist
+ \startHorizScript
c^\comma
\time 3/8
b8 c4_\comma
c8 b4_\comma
b8 c4^\comma _\comma
-%}
\endHorizScript
+%}
\time 2/2 \slurDown
<<{c2}{s4 \invisible d1*1/4 ( \visible }>> e2)
<<{a,2}{s4 \invisible b1*1/4 ( \visible }>> d2)
#include "grob.hh"
#include "warn.hh"
+/*
+ TODO: should junk this engraver.
+ */
+
struct Grob_mom
{
Grob * grob_ ;
return Moment::compare (a.end_, b.end_);
}
+/****************/
class Grob_pq_engraver: public Engraver
{
{
Music * m = gi.music_cause ();
- if (m)
+ if (m
+ && !gi.grob_->internal_has_interface (ly_symbol2scm ("multi-measure-interface")))
{
Moment n = now_mom ();
Moment l = m->get_length ();
if (text_->get_grob_property ("text") != txt)
text_->set_grob_property ("text", txt);
-}
+ announce_grob (text_, SCM_EOL);
+ }
void
Instrument_name_engraver::acknowledge_grob (Grob_info i)
if (text_->get_grob_property ("text") != txt)
text_->set_grob_property ("text", txt);
+ announce_grob (text_, SCM_EOL);
}
"one", props);
one_.set_translator (one);
- one->execute_pushpop_property (ly_symbol2scm ("Stem"),
- ly_symbol2scm ("direction"), gh_int2scm (1));
set_translator (one);
first_iter_ = unsmob_iterator (get_iterator (unsmob_music (gh_car (lst))));
Translator_group *two = tr->find_create_translator (ly_symbol2scm ("Voice"),
"two", props);
two_.set_translator (two);
- two_.report_to ()->execute_pushpop_property (ly_symbol2scm ("Stem"),
- ly_symbol2scm ("direction"), gh_int2scm (-1));
set_translator (two);
second_iter_ = unsmob_iterator (get_iterator (unsmob_music (gh_cadr (lst))));
set_translator (tr);
+
+
+ char const * syms[] = {
+ "Stem",
+ "DynamicLineSpanner",
+ "Tie",
+ "Dots",
+ "Slur",
+ "TextScript",
+ "Script",
+ 0
+ };
+
+ for (char const**p = syms; *p; p++)
+ {
+ SCM sym = ly_symbol2scm (*p);
+ one->execute_pushpop_property (sym,
+ ly_symbol2scm ("direction"), gh_int2scm (1));
+
+ two->execute_pushpop_property (sym,
+ ly_symbol2scm ("direction"), gh_int2scm (-1));
+ }
+
}
void
'(
))
+
+(ly:add-interface
+ 'multi-measure-interface
+ "Multi measure rest, and friends (mmrest number, mmrest text)."
+ '())
+
+
(ly:add-interface
'note-name-interface
"Note name"
(meta . ((interfaces . (font-interface self-alignment-interface side-position-interface text-interface break-aligned-interface item-interface ))))
))
- (InstrumentName
+ (VocalName
. (
(breakable . #t)
(Y-offset-callbacks . (,Side_position_interface::aligned_on_support_refpoints))
(space-alist . ((left-edge . (extra-space . 1.0))
))
(molecule-callback . ,Text_item::brew_molecule)
- (break-align-symbol . instrument-name)
+ (break-align-symbol . clef)
(break-visibility . ,begin-of-line-visible)
(baseline-skip . 2)
(font-family . roman)
(thick-thickness . 6.6)
(hair-thickness . 2.0)
(padding . 1)
- (meta . ((interfaces . (multi-measure-rest-interface rest-interface font-interface staff-symbol-referencer-interface))))
+ (meta . ((interfaces . (multi-measure-rest-interface multi-measure-interface rest-interface font-interface staff-symbol-referencer-interface))))
))
(MultiMeasureRestNumber
(padding . 1.3)
(staff-padding . 1.3)
(font-family . number)
- (meta . ((interfaces . (side-position-interface self-alignment-interface font-interface spanner-interface text-interface))))
+ (meta . ((interfaces . (side-position-interface multi-measure-interface self-alignment-interface font-interface spanner-interface text-interface))))
))
(MultiMeasureRestText
. (
(padding . 1.5)
(staff-padding . 1.5)
(font-family . roman)
- (meta . ((interfaces . (side-position-interface self-alignment-interface font-interface spanner-interface text-interface))))
+ (meta . ((interfaces . (side-position-interface multi-measure-interface self-alignment-interface font-interface spanner-interface text-interface))))
))
(NoteCollision
. (
(if (equal? (ly:get-mus-property ev 'name) 'NoteEvent)
(assoc-remove! active 'tie)
active) )
+
(define (active<? a b)
(cond
((symbol<? (car a) (car b)) #t)
))
-; (display (list i1 i2 ri active1 active2 (vector-length ev1) (vector-length ev2) (vector-length result) "\n"))
(cond
((= ri (vector-length result)) '())
((= i1 (vector-length ev1)) (put 'apart))
; (x (display "oked"))
(evs1 (map car (what ev1 i1)))
(evs2 (map car (what ev2 i2)))
-
(new-active1 (analyse-events active1 evs1))
(new-active2 (analyse-events active2 evs2))
)
+
+
+ (or #t (display (list (when result ri) i1 i2 ri
+ active1 "->" new-active1
+ active2 "->" new-active2
+ (vector-length ev1) (vector-length ev2) (vector-length result) "\n")))
+
(if (not (or (equal? m1 (when result ri))
(equal? m2 (when result ri))))
((ly:moment<? m1 m2)
(put 'apart)
(if (> ri 0) (put 'apart (1- ri)))
- (analyse-time-step (1+ i1) i2 (1+ ri) new-active1 new-active2))
+ (analyse-time-step (1+ i1) i2 (1+ ri) new-active1 active2))
((ly:moment<? m2 m1)
(put 'apart)
(if (> ri 0) (put 'apart (1- ri)))
- (analyse-time-step i1 (1+ i2) (1+ ri) new-active1 new-active2))
+ (analyse-time-step i1 (1+ i2) (1+ ri) active1 new-active2))
(else
(if (and (equal? active1 active2) (equal? new-active2 new-active1))
(let*
((notes1 (get-note-evs ev1 i1))
+ (durs1 (sort (map (lambda (x) (ly:get-mus-property x 'duration)) notes1) ly:duration<?))
(pitches1 (sort
(map (lambda (x) (ly:get-mus-property x 'pitch)) notes1) ly:pitch<?))
(notes2 (get-note-evs ev2 i2))
+ (durs2 (sort (map (lambda (x) (ly:get-mus-property x 'duration)) notes2) ly:duration<?))
(pitches2 (sort
(map (lambda (x) (ly:get-mus-property x 'pitch)) notes2) ly:pitch<?))
)
(cond
((> (length notes1) 1) (put 'apart))
((> (length notes2) 1) (put 'apart))
+ ((and
+ (= (length durs1) 1)
+ (= (length durs2) 1)
+ (not (equal? (car durs1) (car durs2))))
+
+ (put 'apart))
(else
(if
(and (= (length pitches1) 1) (= (length pitches2) 1)