* scm/lily.scm (uniq-list): new implementation, O(1) stack.
* input/test/scales-greek.ly: use C as base, results in different
alterations at the clef.
* input/regression/pedal-ped.ly: new file.
* input/regression/pedal-bracket.ly: new file.
* lily/piano-pedal-bracket.cc (brew_molecule): new function;
replace after_line_breaking()
* lily/line-interface.cc (line): read thickness.
(line): dash-fraction = 0 always for dotted-line style.
* input/test/staff-lines.ly (lower): bugfix.
* scm/lily.scm: remove bla.scm load.
2004-01-22 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * scm/music-functions.scm (determine-split-list): bugfixes.
+
+ * scm/lily.scm (uniq-list): new implementation, O(1) stack.
+
+ * input/test/scales-greek.ly: use C as base, results in different
+ alterations at the clef.
+
+ * input/regression/pedal-ped.ly: new file.
+
+ * input/regression/pedal-bracket.ly: new file.
+
+ * lily/piano-pedal-bracket.cc (brew_molecule): new function;
+ replace after_line_breaking()
+
+ * lily/line-interface.cc (line): read thickness.
+ (line): dash-fraction = 0 always for dotted-line style.
+
+ * input/test/staff-lines.ly (lower): bugfix.
+
* ly/engraver-init.ly (AncientRemoveEmptyStaffContext): move
\accepts Devnull into Score.
@end lilypond
A third style of pedal notation is a mixture of text and brackets,
-obtained by setting @code{pedal-type} to @code{mixed}:
+obtained by setting the @code{pedalSustainStyle} style property to
+@code{mixed}:
@lilypond[fragment,verbatim]
\property Staff.pedalSustainStyle = #'mixed
@end lilypond
The default `*Ped' style for sustain and damper pedals corresponds to
-@code{\pedal-type = #'text}. However, @code{mixed} is the default style
-for a sostenuto pedal:
+style @code{#'text}. The sostenuto pedal uses @code{mixed} style by
+default.
@lilypond[fragment,verbatim]
c''4\sostenutoDown d''4 e''4 c'4 f'4 g'4 a'4\sostenutoUp
--- /dev/null
+
+\header {
+
+ texidoc = "Piano pedal brackets. Brackets should start and end at
+ the left side of the note. If a note is shared between two brackets,
+ the ends are flared.
+
+There are no vertical endings at a line-break. " }
+
+\score {
+ \notes \relative c'' {
+ \property Staff.pedalSustainStyle = #'bracket
+
+ c4 d e \sustainDown b c c, \sustainUp \sustainDown d8[ c] e8[
+ e \sustainUp \sustainDown] f4 d
+ \sustainUp g \sustainDown b b, \sustainUp c'
+
+ \property Staff.pedalUnaCordaStyle = #'mixed
+
+ c4 d \unaCorda e f g
+ b | \break c b c \treCorde c
+ }
+ \paper { raggedright = ##t }
+}
--- /dev/null
+\header
+{
+ texidoc = "Piano pedals: the standard style is with Ped symbols.
+The string can be tuned. This example shows the shorter tilde/P variant
+at the end of the melody."
+
+}
+
+
+\score{
+ \context Staff \notes\relative c'{
+
+ c4 d e f g
+ \sustainDown b c
+ c, d16[ c c c] e[ e \sustainUp \sustainDown e e ] f4 \sustainUp
+ g\sustainDown b \sustainUp c
+ \property Staff.pedalSustainStrings = #'("-" "-P" "P")
+ \property Staff.SustainPedal \override #'padding = #-2
+ c, \sustainDown d e \sustainUp \sustainDown f
+ \sustainUp g b c
+
+
+
+ }
+}
+++ /dev/null
-
-\version "2.1.7"
-
-\header{ texidoc = "@cindex Pedal
-Piano pedal symbols merge stop and start. The strings are configurable.
-Text style, bracket style, and a mixture of both are supported. "
-}
-
-\score{
- \context Staff \notes\relative c'{
-
- c4 d e f g
- \sustainDown b c
- c, d16[ c c c] e[ e \sustainUp \sustainDown e e ] f4 \sustainUp
- g\sustainDown b \sustainUp c
- \property Staff.pedalSustainStrings = #'("-" "-P" "P")
- \property Staff.SustainPedal \override #'padding = #-2
- c, \sustainDown d e \sustainUp \sustainDown f
- \sustainUp g b c
-
- \property Staff.pedalSustainStyle = #'bracket
-
- c4 d e \sustainDown b c c, \sustainUp \sustainDown d8[ c] e8[ e \sustainUp \sustainDown] f4 d
- \sustainUp g \sustainDown b b, \sustainUp c'
-
- \property Staff.pedalUnaCordaStyle = #'mixed
-
- c4 d \unaCorda e f g
- b \treCorde c
-
- }
-}
-
\version "2.1.7"
\header {
- texidoc = "@cindex Scales Greek
-Show different scales."
+ texidoc = "
+
+Show different greek scales. All these scales are in the key of C
+(major, ionian, phrygian, etc.)
+
+"
}
-voicedefault = \notes {
-\property Score.defaultBarType="empty"
+\score { \notes {
\key c \major c'8 -"major" d'8 e'8 f'8 g'8 a'8 b'8 c''8
\key c \ionian c'8 -"ionian" d'8 e'8 f'8 g'8 a'8 b'8 c''8
-\key d \dorian c'8 -"dorian" d'8 e'8 f'8 g'8 a'8 b'8 c''8
-
-\key e \phrygian c'8 -"phrygian" d'8 e'8 f'8 g'8 a'8 b'8 c''8
-
-\key f \lydian c'8 -"lydian" d'8 e'8 f'8 g'8 a'8 b'8 c''8
-
-\key g \mixolydian c'8 -"mixolydian" d'8 e'8 f'8 g'8 a'8 b'8 c''8
-
-\key a \minor c'8 -"minor" d'8 e'8 f'8 g'8 a'8 b'8 c''8
+\transpose d c { \key d \dorian c'8 -"dorian" d'8 e'8 f'8 g'8 a'8 b'8 c''8 }
-\key a \aeolian c'8 -"aeolian" d'8 e'8 f'8 g'8 a'8 b'8 c''8
+\transpose e c { \key e \phrygian c'8 -"phrygian" d'8 e'8 f'8 g'8 a'8 b'8 c''8 }
-\key b \locrian c'8 -"locrian" d'8 e'8 f'8 g'8 a'8 b'8 c''8
+\transpose f c { \key f \lydian c'8 -"lydian" d'8 e'8 f'8 g'8 a'8 b'8 c''8 }
-\key f \major c'8 -"major" d'8 e'8 f'8 g'8 a'8 bes'8 c''8
+\transpose g c { \key g \mixolydian c'8 -"mixolydian" d'8 e'8 f'8 g'8 a'8 b'8 c''8 }
-\key f \ionian c'8 -"ionian" d'8 e'8 f'8 g'8 a'8 bes'8 c''8
+\transpose a c' { \key a \minor c'8 -"minor" d'8 e'8 f'8 g'8 a'8 b'8 c''8 }
-\key g \dorian c'8 -"dorian" d'8 e'8 f'8 g'8 a'8 bes'8 c''8
+\transpose a c' { \key a \aeolian c'8 -"aeolian" d'8 e'8 f'8 g'8 a'8 b'8 c''8 }
-\key a \phrygian c'8 -"phrygian" d'8 e'8 f'8 g'8 a'8 bes'8 c''8
-
-\key bes \lydian c'8 -"lydian" d'8 e'8 f'8 g'8 a'8 bes'8 c''8
-
-\key c \mixolydian c'8 -"mixolydian" d'8 e'8 f'8 g'8 a'8 bes'8 c''8
-
-\key d \aeolian c'8 -"aeolian" d'8 e'8 f'8 g'8 a'8 bes'8 c''8
-
-\key d \minor c'8 -"minor" d'8 e'8 f'8 g'8 a'8 bes'8 c''8
-
-\key e \locrian c'8 -"locrian" d'8 e'8 f'8 g'8 a'8 bes'8 c''8
+\transpose b c' { \key b \locrian c'8 -"locrian" d'8 e'8 f'8 g'8 a'8 b'8 c''8 }
}
-
-\score{
- \voicedefault
+
\paper { }
\midi {}
}
\version "2.1.7"
-\header { texidoc="@cindex Staff Lines
-Set staff symbol property. "
+\header {
+
+ texidoc="@cindex Staff Lines Staff symbol properties may also be
+ set with @code{\\property}. "
+
}
\upper
>>
\new Staff {
- \property Staff.StaffSymbol \set #'line-count = #4 } <<
+ \property Staff.StaffSymbol \set #'line-count = #4
\clef bass
\lower
- >>
+ }
>>
\paper { raggedright=##t}
}
\version "2.1.7"
-% TODO: check about other ottava functions.
\header { texidoc = "@cindex text spanner
You can make LilyPond print text spanners. "
b c
a \stopTextSpan
- \property Voice.TextSpanner \revert #'style
- \property Voice.TextSpanner \override #'style = #'dotted-line
+ \property Voice.TextSpanner \override #'dash-period = #2
+ \property Voice.TextSpanner \override #'dash-fraction = #0.0
a \startTextSpan
b c
a \stopTextSpan
\version "2.1.7"
\header { texidoc="@cindex Trill
-Show trill line type. "
+Show trill line type.
+
+The extended trill is a TextSpanner in @code{trill} style.
+"
}
\context RhythmicStaff \notes {
\stemDown
\property Voice.Stem \override #'transparent = ##t
- \property Voice.TextSpanner \set #'style = #'dotted-line
+ \property Voice.TextSpanner \set #'dash-fraction = #0.0
+ \property Voice.TextSpanner \set #'dash-period = #1.0
\property Voice.TextSpanner \set #'edge-height = #'(0 . 1.5)
\property Voice.TextSpanner \set #'edge-text = #'("bla " . "")
- a#(ly:export (make-span-event 'TextSpanEvent START)) b c a #(ly:export (make-span-event 'TextSpanEvent STOP))
+ a\startTextSpan b c a\stopTextSpan
+
- %\property Voice.TextSpanner \set #'font-family = #'music
+ %% TODO: should have trill spanner.
\property Voice.TextSpanner \set #'style = #'trill
\property Voice.TextSpanner \set #'edge-height = #'(0 . 0)
\property Voice.TextSpanner \set #'edge-text
= #(cons (make-musicglyph-markup "scripts-trill") "")
- a#(ly:export (make-span-event 'TextSpanEvent START)) b c a #(ly:export (make-span-event 'TextSpanEvent STOP))
+ a\startTextSpan b c a\stopTextSpan
}
\paper { raggedright = ##t}
}
return Molecule (box, at);
}
-
-/*
- TODO: read THICK from ME
- */
Molecule
Line_interface::line (Grob *me, Offset from, Offset to)
{
- Real thick = Staff_symbol_referencer::line_thickness (me);
+ Real thick = Staff_symbol_referencer::line_thickness (me)
+ * robust_scm2double (me->get_grob_property ("thickness"),1);
+
SCM type = me->get_grob_property ("style");
SCM dash_fraction = me->get_grob_property ("dash-fraction");
if (gh_number_p (dash_fraction) || type == ly_symbol2scm ("dotted-line"))
{
- Real fraction =
- robust_scm2double (dash_fraction, (type == ly_symbol2scm ("dotted-line")) ? 0.0 : 0.4);
-
+
+ Real fraction
+ = type == ly_symbol2scm ("dotted-line")
+ ? 0.0
+ : robust_scm2double (dash_fraction, 0.4);
+
fraction = (fraction >? 0) <? 1.0;
Real period = Staff_symbol_referencer::staff_space (me)
* robust_scm2double (me->get_grob_property ("dash-period"), 1.0);
}
ADD_INTERFACE(Line_interface, "line-interface",
- "Generic line objects. Any object using lines supports this. ",
+ "Generic line objects. Any object using lines supports this. Normally,"
+ "you get a straight line. If dash-period is defined, a dashed line is "
+ "produced; the length of the dashes is tuned with"
+ "@code{dash-fraction}. If the latter is set to 0, a dotted line is "
+ "produced. If @code{dash-fraction} is negative, the line is set "
+ "transparent.",
+
"dash-period dash-fraction thickness style")
(c) 2003 Han-Wen Nienhuys <hanwen@xs4all.nl>
-based on smouldering remains by
-
- Chris Jackson <chris@fluffhouse.org.uk>
-
-
-*/
-/*
- Piano pedal brackets are a special case of a text spanner.
- Pedal up-down (restart) indicated by the angled right and left edges
- of consecutive pedals touching exactly to form an __/\__
-
*/
-
-/*
- TODO: this should be moved somewhere else (?).
-
- Perhaps make separate function for pedal-bracket.
- */
#include "molecule.hh"
#include "spanner.hh"
#include "item.hh"
-#include "paper-def.hh"
+#include "tuplet-bracket.hh"
struct Piano_pedal_bracket
{
- DECLARE_SCHEME_CALLBACK(after_line_breaking,(SCM));
+ DECLARE_SCHEME_CALLBACK(brew_molecule,(SCM));
static bool has_interface (Grob*);
};
-ADD_INTERFACE (Piano_pedal_bracket,"piano-pedal-bracket-interface",
- "",
- "pedal-text");
-MAKE_SCHEME_CALLBACK(Piano_pedal_bracket,after_line_breaking,1);
+MAKE_SCHEME_CALLBACK(Piano_pedal_bracket,brew_molecule,1);
SCM
-Piano_pedal_bracket::after_line_breaking (SCM smob)
+Piano_pedal_bracket::brew_molecule (SCM smob)
{
Spanner *me = dynamic_cast<Spanner*> (unsmob_grob (smob));
-
- Drul_array<bool> broken;
- Drul_array<Real> height(0,0), shorten(0,0);
-
- SCM eh = me->get_grob_property ("edge-height");
- SCM sp = me->get_grob_property ("shorten-pair");
+ Drul_array<bool> broken (false,false);
+ Drul_array<Real> height = robust_scm2drul
+ (me->get_grob_property ("edge-height"), Interval (0,0));
+ Drul_array<Real> shorten = robust_scm2drul
+ (me->get_grob_property ("shorten-pair"), Interval (0,0));
+ Drul_array<Real> flare = robust_scm2drul
+ (me->get_grob_property ("bracket-flare"), Interval (0,0));
+
+ Grob *common = me->get_bound (LEFT)
+ ->common_refpoint (me->get_bound (RIGHT), X_AXIS);
+ Grob *textbit = unsmob_grob (me->get_grob_property("pedal-text"));
+
+ if (textbit)
+ common = common->common_refpoint (textbit, X_AXIS);
+
+ Interval span_points (0,0);
Direction d = LEFT;
-
do
{
Item *b = me->get_bound (d);
broken[d] = b->break_status_dir () != CENTER;
+ if (broken[d])
+ height[d] = 0.0;
- if (!broken[d] && (is_number_pair (eh)))
- height[d] += gh_scm2double (index_get_cell (eh, d));
- if (is_number_pair (sp))
- shorten[d] += gh_scm2double (index_get_cell (sp, d));
+ Interval ext = b->extent (common, X_AXIS);
+ span_points[d] = ext [broken[d] ? RIGHT : LEFT];
}
while (flip (&d) != LEFT);
+
/* For 'Mixed' style pedals, i.e. a bracket preceded by text: Ped._____|
need to shorten by the extent of the text grob
-
-
- Urg. - why not hang bracket between text items? --hwn
*/
- if (Grob *textbit = unsmob_grob (me->get_grob_property("pedal-text")))
+ if (textbit)
{
height[LEFT] = 0;
- SCM pa = me->get_grob_property ("if-text-padding"); // UGH.
- Real padding =0.;
- if (gh_number_p (pa))
- padding = gh_scm2double (pa);
-
- shorten[LEFT] += padding + textbit->extent (textbit, X_AXIS)[RIGHT];
+
+ Real padding = robust_scm2double (me->get_grob_property ("if-text-padding"), 0);
+
+ span_points[LEFT] = padding
+ + textbit->extent (common, X_AXIS)[RIGHT];
}
- if (broken[LEFT])
+
+ Molecule m ;
+ if (!span_points.is_empty () &&
+ span_points.length () > 0.001)
{
- shorten[LEFT] -= me->get_broken_left_end_align () ;
+ m = Tuplet_bracket::make_bracket (me, Y_AXIS,
+ Offset (span_points.length (), 0),
+ height,
+ 0.0,
+ flare, shorten);
}
+ m.translate_axis (span_points[LEFT]
+ - me->relative_coordinate (common, X_AXIS), X_AXIS);
+ return m.smobbed_copy ();
+}
- // Also shorten so that it ends just before the spanned note.
- Grob *rb = me->get_bound (RIGHT);
- shorten[RIGHT] += rb->extent (rb, X_AXIS)[RIGHT];
-
- me->set_grob_property ("edge-height", ly_interval2scm (height));
- me->set_grob_property ("shorten-pair", ly_interval2scm (shorten));
- return SCM_UNSPECIFIED;
-}
+ADD_INTERFACE (Piano_pedal_bracket,"piano-pedal-bracket-interface",
+ "The bracket of the piano pedal. It can be tuned through the regular bracket properties (bracket-flare, edge-height, shorten-pair).",
+ "edge-height shorten-pair bracket-flare pedal-text");
#include "note-column.hh"
#include "warn.hh"
+/*
+ Urgh. This engraver is too complex. rewrite. --hwn
+
+*/
+
struct Pedal_info
{
char const * name_;
Event for currently running pedal.
*/
Music* current_bracket_ev_;
+
/*
Event for currently starting pedal, (necessary?
Link_array<Spanner> previous_;
-
-
void create_text_grobs (Pedal_info *p, bool);
void create_bracket_grobs (Pedal_info *p, bool);
void typeset_all ();
add_bound_item (p->line_spanner_,info.grob_);
}
if (p->bracket_)
- add_bound_item (p->bracket_,info.grob_);
-
+ add_bound_item (p->bracket_,info.grob_);
+ if (p->finished_bracket_)
+ add_bound_item (p->finished_bracket_,info.grob_);
}
}
}
String name = String (p->name_) + "PedalLineSpanner";
p->line_spanner_ = new Spanner (get_property (name.to_str0 ()));
-
Music * rq = (p->event_drul_[START] ? p->event_drul_[START] : p->event_drul_[STOP]);
announce_grob (p->line_spanner_, rq->self_scm ());
}
assert (!p->finished_bracket_);
Grob *cmc = unsmob_grob (get_property ("currentMusicalColumn"));
- p->bracket_->set_bound (RIGHT, cmc);
+
+ if (!p->bracket_->get_bound (RIGHT))
+ p->bracket_->set_bound (RIGHT, cmc);
/*
Set properties so that the molecule-creating function will
/*
Hmm.
*/
- if (p->name_ != String ("Sustain"))
+ if (p->name_ != String ("Sustain") && sustain)
{
- if (sustain)
- {
- Side_position_interface::add_support (p->item_,sustain);
- }
+ Side_position_interface::add_support (p->item_,sustain);
}
typeset_grob (p->item_);
p->item_ = 0;
}
typeset_grob (p->finished_bracket_);
+
p->finished_bracket_ =0;
}
}
else
{
- bool encl = to_boolean (me->get_grob_property ("enclose-bounds"));
- span_points[d] = b->extent (common, X_AXIS)[encl ? d : -d];
+ Real encl = robust_scm2double (me->get_grob_property ("enclose-bounds"), 0.0);
+ span_points[d] = b->extent (common, X_AXIS).linear_combination (d * encl);
if (is_number_pair (shorten))
span_points -= d * gh_scm2double (index_get_cell (shorten, d));
if (ties.size () == 1)
{
- Grob * t = ties[0];
- set_grob_direction (t,Tie::get_default_dir (t));
+ Grob * t = ties[0];
+ if (t->live ()
+ && !get_grob_direction (t))
+ set_grob_direction (t,Tie::get_default_dir (t));
return ;
}
Tie::head (Grob*me, Direction d)
{
SCM c = me->get_grob_property ("head-pair");
- c = index_get_cell (c, d);
- return unsmob_grob (c);
+ if (gh_pair_p)
+ return unsmob_grob (index_get_cell (c, d));
+ else
+ return 0;
}
Real
{
programming_error ("Tie without heads.");
me->suicide ();
- return SCM_UNSPECIFIED;
+ return SCM_EOL;
}
set_direction (me);
Grob*me = unsmob_grob (smob);
SCM cp = me->get_grob_property ("control-points");
- if (cp == SCM_EOL)
+ if (!gh_pair_p (cp)) // list is more accurate
{
cp = get_control_points (smob);
me->set_grob_property ("control-points", cp);
}
+
+ if (!gh_pair_p (cp))
+ return Molecule ().smobbed_copy ();
Real thick
= Staff_symbol_referencer::line_thickness (me)
(grob-property-description 'note-heads grob-list? "List of note head grobs")
(grob-property-description 'old-accidentals list? "list of (pitch, accidental) pairs.")
(grob-property-description 'oriscus boolean? "is this neume an oriscus?.")
-(grob-property-description 'enclose-bounds boolean? "whether a text spanner should extend to the outer edge of the spanned notes")
+
+(grob-property-description 'enclose-bounds number?
+"How much of the bound a spanner should enclose: +1 = completely, 0 = center, -1 not at all.")
+
(grob-property-description 'padding ly:dimension? "add this much extra space between objects that are next to each other.")
(grob-property-description 'pedal-text ly:grob? "Pointer to the text of a mixed-style piano pedal.")
(grob-property-description 'penalty number? "Penalty for breaking at
(PianoPedalBracket ;; an example of a text spanner
. (
- (molecule-callback . ,Text_spanner::brew_molecule)
- (after-line-breaking-callback . ,Piano_pedal_bracket::after_line_breaking)
+ (molecule-callback . ,Piano_pedal_bracket::brew_molecule)
(font-family . roman)
(style . line)
(if-text-padding . 1.0)
- (enclose-bounds . #t)
+ (enclose-bounds . -1.0)
(direction . -1)
(bracket-flare . (0.5 . 0.5))
(edge-height . (1.0 . 1.0))
(shorten-pair . (0.0 . 0.0))
(thickness . 1.0)
- (meta . ((interfaces . (text-spanner-interface piano-pedal-interface piano-pedal-bracket-interface spanner-interface))))
+ (meta . ((interfaces . (line-interface piano-pedal-interface piano-pedal-bracket-interface spanner-interface))))
))
(RepeatSlash
(shorten-pair . (0.0 . -0.6))
(staff-padding . 1.0)
(padding . 0.5)
- (enclose-bounds . #t)
+ (enclose-bounds . 1)
(minimum-length . 1.0)
(dash-fraction . 0.3)
(edge-height . (0 . 1.2))
;; TODO: use the srfi-1 partition function.
-(define-public (uniq-list list)
+(define-public (uniq-list l)
+
"Uniq LIST, assuming that it is sorted"
- (if (null? list) '()
- (if (null? (cdr list))
- list
- (if (equal? (car list) (cadr list))
- (uniq-list (cdr list))
- (cons (car list) (uniq-list (cdr list)))))))
+ (define (helper acc l)
+ (if (null? l)
+ acc
+ (if (null? (cdr l))
+ (cons (car l) acc)
+ (if (equal? (car l) (cadr l))
+ (helper acc (cdr l))
+ (helper (cons (car l) acc) (cdr l)))
+ )))
+ (reverse! (helper '() l) '()))
+
(define (split-at-predicate predicate l)
"Split L = (a_1 a_2 ... a_k b_1 ... b_k)
(ly:set-mus-property! m2 'property-operations props)
(ly:run-translator m2 part-combine-listener)
(ly:run-translator m1 part-combine-listener)
- (display noticed)
(ly:set-mus-property! m 'split-list
(determine-split-list (reverse (cdr (assoc "one" noticed)))
(reverse (cdr (assoc "two" noticed)))))
+;;
+;; due to a bug in the GUILE evaluator,
+;; stack traces result in core dumps.
+;; therefore we retain debugging code.
+;;
(define-public (determine-split-list evl1 evl2)
"EVL1 and EVL2 should be ascending"
(define result
(list->vector
(map (lambda (x)
- (cons x 'together))
+ (cons x '()))
(uniq-list
(merge (map car evl1) (map car evl2) ly:moment<?)))))
((name (ly:get-mus-property ev 'name))
(key (cond
((equal? name 'SlurEvent) 'slur)
- ((equal? name 'TieEvent) 'tie)
+ ((equal? name 'PhrasingSlurEvent) 'tie)
((equal? name 'Beam) 'beam)
(else #f)))
(sp (ly:get-mus-property ev 'span-direction)))
(set-cdr! (vector-ref result (if (pair? index)
(car index) ri)) x) )
-; (display (list ri i1 i2 active1 active2 "\n"))
+; (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))
((= i2 (vector-length ev2)) (put 'apart))
(else
(let*
- ((m1 (when ev1 i1))
+ (
+; (x (display (list "\nelse" (= i1 (vector-length ev1)) i2 (vector-length ev2) (= i2 (vector-length ev2)))))
+ (m1 (when ev1 i1))
(m2 (when ev2 i2))
+; (x (display "oked"))
(new-active1
(sort
(analyse-span-events active1 (map car (what ev1 i1)))
symbol<?))
(new-active2
- (sort (analyse-span-events active2 (map car (what ev2 i1)))
+ (sort (analyse-span-events active2 (map car (what ev2 i2)))
symbol<?)))
(if (not (or (equal? m1 (when result ri))
)
(cond
((equal? pitches1 pitches2) (put 'unisono))
+ ((= (length notes1) 0) (put 'solo2))
+ ((= (length notes2) 0) (put 'solo1))
((> (length notes1) 1) (put 'apart))
((> (length notes2) 1) (put 'apart))
(else
- (let* ((diff (ly:pitch-diff (car pitches1) (car pitches2))))
+ (let* (
+; (bla (display (list (length pitches1) (length pitches2))))
+ (diff (ly:pitch-diff (car pitches1) (car pitches2))))
(if (< (ly:pitch-steps diff) chord-threshold)
(put 'chords)
(put 'apart))
conversions.append (((2,1,13), conv, """set-staff-size -> set-global-staff-size"""))
+def conv (str):
+ str =re.sub (r"#'style\s*=\s*#'dotted-line",
+ r"#'dash-fraction = #0.0 ", str)
+ return str
+
+conversions.append (((2,1,14), conv, """style = dotted -> dash-fraction = 0"""))
################################
# END OF CONVERSIONS