* configure: substitute full path for perl and guile in scripts.
-1.3.25.jcn1
-===========
-
* Added ascii slur and volta. There seems to be a Lily bug in volta placement.
-* Bugfix: print identification string 'GNU LilyPond ...' onto stderr
-
* Bugfix: default font now user settable
* as2text: handle plain ascii font, read from stdin, you can now do:
echo "\time 4/4; g''1 g2 g4. g8" | lilypond -f as -i init-as.fly - | as2text
-1.3.24.jcn4
+1.3.25.hwn1
===========
-* as2text: catch missing font/character errors, added default font, set text.
+* Bugfix: second half of broken ties now are displayed again.
-1.3.24.jcn3
-===========
+* Bugfix: add clef to the support of 8 text in the G_8 clefs. Center
+it horizontally on the clef.
-* New ascii fonts: as5 as-numeral4 as-braces9
+* Added Tie_column spanner. Ties in tied chords now get proper directionsa.
-* Fixes to as2text.scm
+* Bugfix: unbroken repeat barlines now work, eg. |:
-* Added lots of ascii glyphs
+* Added Request_iterator to make more flexible constructions possible.
-1.3.24.jcn2
-===========
+1.3.25
+======
+* as2text: catch missing font/character errors, added default font, set text.
+
+* New ascii fonts and glyphs: as5 as-numeral4 as-braces9
* Ascii output, minimal support:
- AsciiScript Fonts: mf/*.af
slurs and beams are PS @code{\special} commands.
-subsubsection My symbols are all messed up after I upgraded, I get the wrong symbols and dvi-checksum errors!
+@subsubsection My symbols are all messed up after I upgraded, I get the wrong symbols and dvi-checksum errors!
We obviously mucked with the fonts in the upgrade. Remove @emph{all}
previous fonts, including the @file{.pk} and @file{.tfm} fonts in
@mudelafile{tie.ly}
+When tieing chords, the outer slurs point outwards, the inner slurs
+point away from the center of the staff. Override with
+@code{tieVerticalDirection}.
+
+@mudelafile{tie-chord.ly}
+
When tieing notes with accidentals across a bar boundary, the accidental
must not be drawn on the note in the new bar. Instead, the next note of
the same pitch in this bar should always show the accidental (even if
@top
-@unnumbered LilyPond -- The GNU Project Music Typesetter
+@unnumberedsec LilyPond -- The GNU Project Music Typesetter
@html
@c something breaks on 3.12 f
+@unnumberedsec What is LilyPond?
+
LilyPond is a music typesetter. It produces beautiful sheet music using
a high level description file as input. It excels at typesetting
classical music, but you can also print pop-songs. With LilyPond we
hope to make music publication software available to anyone on the
internet.
-The program also has limited MIDI functionality: you can write MIDI
-files with lilypond, and we have a simple MIDI to lilypond conversion
-tool, @file{midi2ly}.
-
-LilyPond is free software. It is licensed under GNU General Public
-License, and it is part of the @uref{http://www.gnu.org/,GNU Project}.
+@unnumberedsec Why should I use it?
+The input to LilyPond is plain text. So you can use your favorite text
+editor to edit it, you can put it in mail or embed it in an article like
+this:
@quotation
-@mudela[fragment]
+@mudela[fragment,verbatim]
\relative c'' { \key es; r8 [c16 b] [c8 g] [as c16 b] [c8 d] | g,4 }
@end mudela
@end quotation
-
+The output looks very good: the font and the layout algorithms were
+inspired by engraved music, so you can expect that same clear and
+elegant look from your LilyPond output. And if you don't like the
+looks, you can tweak almost everything.
+
+The program also has limited MIDI functionality: you can write MIDI
+files with lilypond, and we have a simple MIDI to lilypond conversion
+tool, @file{midi2ly}.
+
+LilyPond is free software. It is licensed under GNU General Public
+License, so you can use, modify and redistribute the program almost no
+restrictions. LilyPond is part of the @uref{http://www.gnu.org/,GNU
+Project}.
The version numbers are in Linux-kernel style: even unnumbered versions
are `stable'. The webpages for the stable version reside at GNU, here:
@end mudela
@end quotation
+@item @code{breakAlignOrder}@indexcode{breakAlignOrder} @propertytype{list of string}
+
+ Defines the order in which prefatory matter (clefs, key signatures) appears, eg. this puts the key signatures after the bar lines:
+@example
+ \property Score.breakAlignOrder = #'(
+ "Span_bar"
+ "Breathing_sign"
+ "Clef_item"
+ "Staff_bar"
+ "Key_item"
+ "Time_signature"
+ )
+@end example
@end table
. * junk -M ?
. * mudela-book doco
. * bracket pdf hack
+. * Added StaffContents and RhythmicStaffContents context, they are
+between Staff (which groups the elements), and generates the Staff
+level elements (key, clef, meter, etc). This construction makes
+\consistsend redundant
+
. * Mondrup:
- if I change the property minVerticalAlign in a multi staff score with
lyrics the change affects the lyrics too. I would like the change to
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=3
-PATCH_LEVEL=25
-MY_PATCH_LEVEL=jcn2
+PATCH_LEVEL=26
+MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
warn_b=yes
fi
+ # Extract the first word of "guile", so it can be a program name with args.
+set dummy guile; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2660: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_GUILE'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$GUILE" in
+ /*)
+ ac_cv_path_GUILE="$GUILE" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_GUILE="$GUILE" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_GUILE="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_GUILE" && ac_cv_path_GUILE="error"
+ ;;
+esac
+fi
+GUILE="$ac_cv_path_GUILE"
+if test -n "$GUILE"; then
+ echo "$ac_t""$GUILE" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:2661: checking for 8-bit clean memcmp" >&5
+echo "configure:2698: checking for 8-bit clean memcmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
-#line 2669 "configure"
+#line 2706 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit(int);
}
EOF
-if { (eval echo configure:2682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:2700: checking for vprintf" >&5
+echo "configure:2737: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2705 "configure"
+#line 2742 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */
; return 0; }
EOF
-if { (eval echo configure:2731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vprintf=yes"
else
if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:2755: checking for _doprnt" >&5
+echo "configure:2792: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2760 "configure"
+#line 2797 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */
; return 0; }
EOF
-if { (eval echo configure:2786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func__doprnt=yes"
else
for ac_func in memmem snprintf vsnprintf gettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2813: checking for $ac_func" >&5
+echo "configure:2850: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2818 "configure"
+#line 2855 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2883: checking for $ac_word" >&5
+echo "configure:2920: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
done
test -n "$MAKEINFO" || MAKEINFO="error"
-for ac_prog in perl
-do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2918: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
+echo "configure:2953: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$PERL"; then
- ac_cv_prog_PERL="$PERL" # Let the user override the test.
-else
+ case "$PERL" in
+ /*)
+ ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
+ ;;
+ *)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
+ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
- ac_cv_prog_PERL="$ac_prog"
+ ac_cv_path_PERL="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="error"
+ ;;
+esac
fi
-fi
-PERL="$ac_cv_prog_PERL"
+PERL="$ac_cv_path_PERL"
if test -n "$PERL"; then
echo "$ac_t""$PERL" 1>&6
else
echo "$ac_t""no" 1>&6
fi
-test -n "$PERL" && break
-done
-test -n "$PERL" || PERL="error"
-
s%@TEX_TFMDIR@%$TEX_TFMDIR%g
s%@GUILE_CFLAGS@%$GUILE_CFLAGS%g
s%@GUILE_LDFLAGS@%$GUILE_LDFLAGS%g
+s%@GUILE@%$GUILE%g
s%@LIBOBJS@%$LIBOBJS%g
s%@MAKEINFO@%$MAKEINFO%g
s%@PERL@%$PERL%g
--- /dev/null
+t = \notes \relative c' { <c e g> ~ <c e g> }
+
+ \score {
+\notes \context Voice {
+ \t
+ \transpose g' \t
+ \property Voice.tieVerticalDirection = #-1
+ \t
+
+ }
+}
Bar::do_pre_processing ()
{
SCM g = get_elt_property ("glyph");
- SCM breakdir = gh_int2scm (break_status_dir ());
-
+ Direction bsd = break_status_dir ();
if (gh_string_p (g))
{
- g = scm_eval (gh_list (ly_symbol2scm ("break-barline"),
- g,
- breakdir,
- SCM_UNDEFINED));
+ if (bsd)
+ {
+ SCM breakdir = gh_int2scm (bsd);
+ g = scm_eval (gh_list (ly_symbol2scm ("break-barline"),
+ g,
+ breakdir,
+ SCM_UNDEFINED));
+ }
}
else
{
g = SCM_UNDEFINED;
}
-#if 0
- if (remove_elt_property ("at-line-start") == SCM_BOOL_T // UGR.
- && (break_status_dir () == RIGHT) && (type_str_ == ""))
- {
- type_str_ = "|";
- }
-#endif
-
if (!gh_string_p (g))
{
set_elt_property ("transparent", SCM_BOOL_T);
#include "paper-score.hh"
#include "dimension-cache.hh"
#include "side-position-interface.hh"
+#include "warn.hh"
void
Clef_item::do_pre_processing()
s = "clefs-" + s;
set_elt_property ("glyph", ly_str02scm (s.ch_C()));
}
+ else
+ {
+ set_elt_property ("transparent", SCM_BOOL_T);
+ }
if (style == "transparent") // UGH. JUNKME
{
pscore_l_->typeset_element (g);
+ spi.add_support (this);
g->set_elt_property ("text", ly_str02scm ( "8"));
g->set_elt_property ("style", gh_str02scm ("italic"));
g->set_parent (this, Y_AXIS);
- g->set_parent (this, X_AXIS);
+ g->set_parent (this, X_AXIS);
+
+ g->set_elt_property ("self-alignment-X", gh_int2scm (0));
+ g->dim_cache_[X_AXIS]->off_callbacks_.push (Side_position_interface::aligned_on_self);
+ g->dim_cache_[X_AXIS]->off_callbacks_.push (Side_position_interface::centered_on_parent);
+
g->set_elt_property ("direction", octave_dir);
add_dependency (g); // just to be sure.
}
}
+Group_interface
+group (Score_element*s,String n)
+{
+ Group_interface gi (s,n);
+ return gi;
+}
+
Group_interface
group (Score_element*s)
{
};
Group_interface group (Score_element*);
+Group_interface group (Score_element*, String);
/*
template<class T>
--- /dev/null
+/*
+ request-iterator.hh -- declare Request_iterator
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#ifndef REQUEST_ITERATOR_HH
+#define REQUEST_ITERATOR_HH
+
+#include "music-iterator.hh"
+
+class Request_iterator : public Music_iterator
+{
+public:
+ Request_iterator ();
+protected:
+ virtual void do_process_and_next (Moment );
+};
+
+#endif /* REQUEST_ITERATOR_HH */
+
public:
Side_position_interface (Score_element const*);
static Real side_position (Dimension_cache const *);
- static Real self_alignment (Dimension_cache const *);
+ static Real aligned_on_self (Dimension_cache const *);
static Real aligned_side (Dimension_cache const *);
static Real quantised_position (Dimension_cache const*);
+ static Real centered_on_parent (Dimension_cache const*);
void set_axis (Axis);
void set_quantised (Axis);
Axis get_axis () const;
{
public:
VIRTUAL_COPY_CONS (Score_element);
- void add_tie (Score_element*);
+ void add_tie (Tie*);
Tie_column ();
protected:
virtual void do_post_processing ();
#ifndef CTIE_ENGRAVER_HH
#define CTIE_ENGRAVER_HH
-
-#include "pqueue.hh"
-#include "engraver.hh"
-
-struct CHead_melodic_tuple {
- Melodic_req *req_l_ ;
- Note_head *head_l_;
- Moment end_;
- CHead_melodic_tuple ();
- CHead_melodic_tuple (Note_head*, Melodic_req*, Moment);
- static int pitch_compare (CHead_melodic_tuple const &, CHead_melodic_tuple const &);
- static int time_compare (CHead_melodic_tuple const &, CHead_melodic_tuple const &);
-};
-
-inline int compare (CHead_melodic_tuple const &a, CHead_melodic_tuple const &b)
-{
- return CHead_melodic_tuple::time_compare (a,b);
-}
-
-
-/**
- Manufacture ties. Acknowledge noteheads, and put them into a
- priority queue. If we have a Tie_req, connect the notes that finish
- just at this time, and note that start at this time.
-
- TODO: should share code with Beam_engraver, Extender_engraver?
- */
-class Tie_engraver : public Engraver
-{
- PQueue<CHead_melodic_tuple> past_notes_pq_;
- Tie_req *req_l_;
- Array<CHead_melodic_tuple> now_heads_;
- Array<CHead_melodic_tuple> stopped_heads_;
- Link_array<Tie> tie_p_arr_;
-
- void set_melisma (bool);
-protected:
- virtual void do_post_move_processing ();
- virtual void do_pre_move_processing ();
- virtual void acknowledge_element (Score_element_info);
- virtual bool do_try_music (Music*);
- virtual void do_process_requests ();
- virtual void process_acknowledged ();
-
-public:
- VIRTUAL_COPY_CONS(Translator);
- Tie_engraver();
-};
-
#endif /* CTIE_ENGRAVER_HH */
VIRTUAL_COPY_CONS(Score_element);
Note_head* head (Direction) const;
+ Real position_f () const;
+
+ virtual Direction get_default_dir() const;
protected:
virtual Molecule* do_brew_molecule_p () const;
virtual void do_add_processing ();
virtual void do_post_processing ();
- virtual Direction get_default_dir() const;
virtual Array<Rod> get_rods () const;
typedef void (Translator::*Method_pointer)(void);
typedef void (Translator::*Const_method_pointer)(void) const;
-/** Make some kind of #Element#s from Requests. Elements are made by
- hierarchically grouped #Translator#s
+/** Make some kind of Elements from Requests. Elements are made by
+ hierarchically grouped Translators
*/
class Translator_group : public virtual Translator {
Array<String> consists_str_arr_;
- Array<String> consists_end_str_arr_;
Array<String> accepts_str_arr_;
+ Array<String> consists_end_str_arr_;
Scheme_hash_table properties_dict_;
int iterator_count_;
String id_str_;
+ void add_last_element (String s);
VIRTUAL_COPY_CONS(Translator);
void set_acceptor (String accepts, bool add);
void set_element (String elt, bool add);
- void add_last_element (String elt);
Translator_group(Translator_group const &);
Translator_group();
#include "lyric-combine-music-iterator.hh"
#include "auto-change-music.hh"
#include "auto-change-iterator.hh"
+#include "request.hh"
+#include "request-iterator.hh"
void
Music_iterator::do_print() const
else
p = new Unfolded_repeat_iterator;
}
+ else if (Request const * r = dynamic_cast<Request const* > (m))
+ {
+ p = new Request_iterator ;
+ }
else
assert (0);
-
p->music_l_ = m;
return p;
}
Request_chord_iterator::Request_chord_iterator ()
{
last_b_ = false;
- // cursor_ = elt_l ()->music_p_list_p_->head_;
cursor_ = 0;
}
--- /dev/null
+/*
+ request-iterator.cc -- implement
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+#include "request-iterator.hh"
+#include "music.hh"
+
+Request_iterator::Request_iterator()
+{
+}
+
+
+void
+Request_iterator::do_process_and_next (Moment m)
+{
+ if (first_b_)
+ {
+ bool g= try_music (music_l_);
+ if (!g)
+ music_l_->warning (_f ("Junking request: `%s'", classname(music_l_)));
+
+ first_b_ = false;
+ }
+ Music_iterator::do_process_and_next (m);
+}
if (get_elt_property ("self-alignment-X") != SCM_UNDEFINED
&& !dim_cache_[X_AXIS]->off_callback_l_)
{
- dim_cache_[X_AXIS]->off_callbacks_.push (Side_position_interface::self_alignment);
+ dim_cache_[X_AXIS]->off_callbacks_.push (Side_position_interface::aligned_on_self);
}
if (get_elt_property ("self-alignment-Y") != SCM_UNDEFINED
&& !dim_cache_[X_AXIS]->off_callback_l_)
{
- dim_cache_[Y_AXIS]->set_offset_callback (Side_position_interface::self_alignment);
+ dim_cache_[Y_AXIS]->set_offset_callback (Side_position_interface::aligned_on_self);
}
#endif
return DOWN;
}
-/**
- Callback that does the aligning.
+/*
+ Callback that does the aligning. Puts the element next to the support
*/
+
Real
Side_position_interface::side_position (Dimension_cache const * c)
{
- Score_element * me = dynamic_cast<Score_element*> (c->element_l ());
+ Score_element * me = (c->element_l ());
Interval dim;
Axis axis = c->axis ();
return total_off;
}
+/*
+ callback that centers the element on itself
+ */
Real
-Side_position_interface::self_alignment (Dimension_cache const *c)
+Side_position_interface::aligned_on_self (Dimension_cache const *c)
{
String s ("self-alignment-");
Axis ax = c->axis ();
s += (ax == X_AXIS) ? "X" : "Y";
- Score_element *elm = dynamic_cast<Score_element*> (c->element_l ());
+ Score_element *elm = c->element_l ();
SCM align (elm->get_elt_property (s));
if (isdir_b (align))
{
return 0.0;
}
-
Real
directed_round (Real f, Direction d)
{
return ceil (f);
}
+/*
+ Callback that quantises in staff-spaces, rounding in the direction
+ of the elements "direction" elt property. */
Real
Side_position_interface::quantised_position (Dimension_cache const *c)
{
- Score_element * me = dynamic_cast<Score_element*> (c->element_l ());
+ Score_element * me = (c->element_l ());
Side_position_interface s(me);
Direction d = s.get_direction ();
Staff_symbol_referencer_interface si (me);
return 0.0;
}
+/*
+ Position next to support, taking into account my own dimensions and padding.
+ */
Real
Side_position_interface::aligned_side (Dimension_cache const *c)
{
- Score_element * me = dynamic_cast<Score_element*> (c->element_l ());
+ Score_element * me = (c->element_l ());
Side_position_interface s(me);
Direction d = s.get_direction ();
Axis ax = c->axis ();
return o;
}
+/*
+ Position centered on parent.
+ */
+Real
+Side_position_interface::centered_on_parent (Dimension_cache const *c)
+{
+
+ Score_element *me = c->element_l ();
+ Axis a = c->axis ();
+ Score_element *him = me->parent_l (a);
+
+ return him->extent (a).center ();
+}
+
+
void
Side_position_interface::add_staff_support ()
{
#include "tie-column.hh"
#include "group-interface.hh"
+#include "tie.hh"
+#include "directional-element-interface.hh"
+#include "note-head.hh"
Tie_column::Tie_column ()
{
set_elt_property ("ties", SCM_EOL);
+ set_empty (X_AXIS);
+ set_empty (Y_AXIS);
+ set_elt_property ("transparent", SCM_BOOL_T);
}
void
-Tie_column::add_tie (Score_element *s)
+Tie_column::add_tie (Tie *s)
{
- group (s).add_element (s);
+ Group_interface g (this, "ties");
+ if (!g.count ())
+ {
+ set_bounds (LEFT, s->head (LEFT));
+ set_bounds (RIGHT, s->head (RIGHT));
+ }
+
+ group (this, "ties").add_element (s);
s->add_dependency (this);
}
+
+int
+tie_compare (Tie* const & s1,
+ Tie* const & s2)
+{
+ return sign (s1->position_f () - s2->position_f());
+}
+
+/*
+ See [Ross p. 138].
+
+
+ In normal chord cases, the outer ties point outwards, and the
+ direction of the rest is determined by their staff position.
+
+ Ross forgets about the tie that is *on* the middle staff line. We
+ assume it goes UP. (TODO: make this settable) */
void
Tie_column::set_directions ()
{
- Link_array<Score_element> s =
- Group_interface__extract_elements (this, (Score_element*)0, "ties");
+ Link_array<Tie> s =
+ Group_interface__extract_elements (this, (Tie*)0, "ties");
+
+
+ Direction d = directional_element (this).get ();
+
+ if (d)
+ {
+ for (int i = s.size (); i--;)
+ directional_element (s[i]).set (d);
+ return;
+ }
+
+ if (s.size () == 1)
+ {
+ directional_element (s[0]).set (s[0]->get_default_dir ());
+ return;
+ }
+
+ s.sort (tie_compare);
+ directional_element (s[0]).set (DOWN);
+ s.del (0);
+ directional_element (s.pop ()).set (UP);
+
+ for (int i=s.size(); i--; )
+ {
+ Real p = s[i]->position_f ();
+ Direction d = (Direction) sign (p);
+ if (!d)
+ d = UP;
+
+ directional_element (s[i]).set (d);
+ }
+
}
void
#include "musical-request.hh"
#include "tie.hh"
#include "translator-group.hh"
+#include "tie-column.hh"
+#include "pqueue.hh"
+#include "engraver.hh"
+
+struct CHead_melodic_tuple {
+ Melodic_req *req_l_ ;
+ Note_head *head_l_;
+ Moment end_;
+ CHead_melodic_tuple ();
+ CHead_melodic_tuple (Note_head*, Melodic_req*, Moment);
+ static int pitch_compare (CHead_melodic_tuple const &, CHead_melodic_tuple const &);
+ static int time_compare (CHead_melodic_tuple const &, CHead_melodic_tuple const &);
+};
+
+inline int compare (CHead_melodic_tuple const &a, CHead_melodic_tuple const &b)
+{
+ return CHead_melodic_tuple::time_compare (a,b);
+}
+
+
+/**
+ Manufacture ties. Acknowledge noteheads, and put them into a
+ priority queue. If we have a Tie_req, connect the notes that finish
+ just at this time, and note that start at this time.
+
+ TODO: should share code with Beam_engraver, Extender_engraver?
+ */
+class Tie_engraver : public Engraver
+{
+ PQueue<CHead_melodic_tuple> past_notes_pq_;
+ Tie_req *req_l_;
+ Array<CHead_melodic_tuple> now_heads_;
+ Array<CHead_melodic_tuple> stopped_heads_;
+ Link_array<Tie> tie_p_arr_;
+
+ Tie_column * tie_column_p_;
+
+ void set_melisma (bool);
+
+protected:
+ virtual void do_post_move_processing ();
+ virtual void do_pre_move_processing ();
+ virtual void acknowledge_element (Score_element_info);
+ virtual bool do_try_music (Music*);
+ virtual void do_process_requests ();
+ virtual void process_acknowledged ();
+
+public:
+ VIRTUAL_COPY_CONS(Translator);
+ Tie_engraver();
+};
+
+
Tie_engraver::Tie_engraver()
{
req_l_ = 0;
+ tie_column_p_ = 0;
}
{
req_l_->warning (_ ("No ties were created!"));
}
-
+ else if (tie_p_arr_.size () > 1 && !tie_column_p_)
+ {
+ tie_column_p_ = new Tie_column;
+ for (int i = tie_p_arr_.size (); i--; )
+ tie_column_p_->add_tie (tie_p_arr_ [i]);
+ announce_element (Score_element_info (tie_column_p_, 0));
+ }
}
}
typeset_element (tie_p_arr_[i]);
}
tie_p_arr_.clear ();
+ if (tie_column_p_)
+ {
+ typeset_element (tie_column_p_);
+ tie_column_p_ =0;
+ }
}
void
return dynamic_cast<Note_head*> (unsmob_element (c));
}
+Real
+Tie::position_f () const
+{
+ return head (LEFT)
+ ? staff_symbol_referencer (head (LEFT)).position_f ()
+ : staff_symbol_referencer (head (RIGHT)).position_f () ;
+}
+
/*
ugh: direction of the Tie is more complicated. See [Ross] p136 and further
} while (flip(&d) != LEFT);
index_set_cell (get_elt_property ("heads"), LEFT, new_head_drul[LEFT]->self_scm_ );
- index_set_cell (get_elt_property ("heads"), RIGHT, new_head_drul[LEFT]->self_scm_ );
-
+ index_set_cell (get_elt_property ("heads"), RIGHT, new_head_drul[RIGHT]->self_scm_ );
}
void
*/
- Real ypos = head (LEFT)
- ? staff_symbol_referencer (head (LEFT)).position_f ()
- : staff_symbol_referencer (head (RIGHT)).position_f () ;
+ Real ypos = position_f ();
Real y_f = half_staff_space * ypos;
int ypos_i = int (ypos);
return c;
}
-
Array<Offset>
Tie::get_encompass_offset_arr () const
{
Begin3
Title: LilyPond
-Version: 1.3.25
-Entered-date: 21FEB00
+Version: 1.3.26
+Entered-date: 23FEB00
Description:
Keywords: music notation typesetting midi fonts engraving
Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
janneke@gnu.org (Jan Nieuwenhuizen)
Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
- 1000k lilypond-1.3.25.tar.gz
+ 1000k lilypond-1.3.26.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 1000k lilypond-1.3.25.tar.gz
+ 1000k lilypond-1.3.26.tar.gz
Copying-policy: GPL
End
Name: lilypond
-Version: 1.3.25
+Version: 1.3.26
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.25.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.26.tar.gz
Summary: A program for printing sheet music.
URL: http://www.cs.uu.nl/~hanwen/lilypond
# get Packager from (undocumented?) ~/.rpmmacros!
(list 'tieVerticalDirection dir? 'direction)
(list 'verticalDirection dir? 'direction)
)))
+(define generic-tie-column-properties
+ (cons "Tie_column" (list
+ (list 'tieVerticalDirection dir? 'direction)
+ (list 'verticalDirection dir? 'direction)
+ )))
(define generic-note-column-properties
generic-stem-properties
generic-breathing-sign-properties
generic-tie-properties
+ generic-tie-column-properties
generic-tuplet-spanner-properties
generic-rest-properties
generic-slur-properties
;;
;;
-;; (Measured in interlines? -- jcn)
+;; (Measured in staff space)
(define space-alist
'(
(("" "Clef_item") . (minimum-space 1.0))