* Anthony Fok <foka@debian.org>, debian package: debian/*
+ * James Hammons <jlhamm@pacificnet.net>, american chord names,
+ gnu-windows testing
+
* Bjoern Jacke <bjoern.jacke@gmx.de> german glossary stuff.
* Neil Jerram <nj104@cus.cam.ac.uk>. parts of
-1.3.85.jcn5
+1.3.85.hwn2
===========
-* Modified part-combiner to use new get_music ()/next () music iterator
- functionality.
+* Added side-position-interface as an interface identifier, in stead
+of checking side-support-elements. This fixes a problem with stacked
+text scripts.
-1.3.85.jcn4
-===========
+* Removed spurious set_elt_property ("XX", SCM_EOL) calls.
-* Added clone () to music iterators, so that we can do next () on a copy.
+* Added \property squashedPosition for Pitch_squash_engraver: the
+staff-position number to squash noteheads to.
-1.3.85.jcn3
-===========
+* Added FAQ entry for script on bar, updated description of mailing
+lists.
+
+* Fixed bug with \translator { basicXXXProperties \push ... }
+
+* Updated and revised call for help in hacking.texi.
-* Added get_music () and next () to music iterators.
+* Bugfix: don't remember accidental if it is tied from the previous note.
1.3.85
======
@subsubsection I've got a simple question, but this FAQ doesn't help!
-Please have a look in the searchable mail achives of
-@uref{http://www.mail-archive.com/gnu-music-discuss@@gnu.org/,
-gnu-music-discuss} and
-@uref{http://www.mail-archive.com/help-gnu-music@@gnu.org/, help-gnu-music}.
-Your question may well have been answered before.
+Please have a look in the searchable mail archives of gnu-music-discuss
+and help-gnu-music (see next FAQ entry). Your question may well have
+been answered before.
+
+@subsubsection Are there archives of the mailing list?
+
+Yes. Currently, all information on the mailing lists is available at
+gnu.org:
+
+@itemize
+@item @uref{http://mail.gnu.org/mailman/listinfo/gnu-music-discuss}
+@item @uref{http://mail.gnu.org/mailman/listinfo/info-gnu-music}
+@item @uref{http://mail.gnu.org/mailman/listinfo/bug-gnu-music}
+@item @uref{http://mail.gnu.org/mailman/listinfo/help-gnu-music}
+@end itemize
+
+Archives of mail before September 12, 2000 are at
+@code{mail-archive.com}:
+
+@itemize
+@item @uref{http://www.mail-archive.com/info-gnu-music@@gnu.org}
+@item @uref{http://www.mail-archive.com/help-gnu-music@@gnu.org}
+@item @uref{http://www.mail-archive.com/bug-gnu-music@@gnu.org})
+@item @uref{http://www.mail-archive.com/gnu-music-discuss@@gnu.org}
+@end itemize
@node Installing,, ,top
@section Installing
@end example
+@subsubsection How do I get a fermata on a barline
+
+The trick is to specify the fermata as a \mark. Use the following macro
+before the bar line where you want the fermata:
+
+@example
+barFermata = \mark "\\font\\fetafont=feta20\\fetafont\\char40";
+@end example
+
+The problem is that marks that occur at a line break are typeset only at
+the beginning of the next line, opposite to what you want for the
+fermata. This can be corrected by the following code
+
+@example
+ \property basicMarkProperties \push #'visibility-lambda = #begin-of-line-i\nvisible
+@end example
+
+You can use a similar trick to put coda signs and comma's on barline.
+
@subsubsection How do I combine multiple pieces into one document?
There are several solutions:
@unnumberedsubsec Users
Mutopia needs your help. The mutopia project is a collection of public
-domain sheet music. You can help the project by entering music and
-submitting. Point your browser to the
-@uref{http://sca.uwaterloo.ca/Mutopia, Mutopia webpage}
+domain sheet music. You can help the project by entering music (either
+by hand, or by converting from scans or MIDI) and submitting it. Point
+your browser to the @uref{http://sca.uwaterloo.ca/Mutopia, Mutopia
+webpage}.
@unnumberedsubsec Font designers
-Our set of glyphs (the Feta font) is far from complete. If you know a
-little MetaFont you can contribute a glyph
+Our set of glyphs (the Feta font) is far from complete. We need the
+following glyphs: segno, coda. The fonts have been coded in MetaFont,
+so you will need to know MetaFont if you want to contribute a glyph.
@unnumberedsubsec Writers
-The documentation of LilyPond and related utilities needs a lot of work.
+The documentation of LilyPond and related utilities needs a lot of
+work. The documentation is written in
+@uref{http://www.gnu.org/software/texinfo,texinfo}. The documentation of
+LilyPond is sorely lacking in terms of completeness, depth and
+organisation.
+
+Write if you know how to write english documentation in texinfo, and
+know about music and music notation. You must also know how to use
+LilyPond (or be prepared to learn using it). The task is not especially
+hard, but it is a lot of work, and you must be familiar with LilyPond.
@unnumberedsubsec Translators
LilyPond is completely ready for internationalized messages, but there
-are only three translations so far.
+are only a few translations so far (dutch, italian, german, japanese,
+french, russian). Translation involves writing a .po file, which is
+relatively easy, and does not even require running LilyPond.
@unnumberedsubsec Hackers
-There are lots of possibilities of improving the program itself. There are
-both small projects and big ones. Most of them are listed in the TODO
-file. A interesting and very big project is writing a GUI frontend to
-LilyPond.
+There are lots of possibilities of improving the program itself. There
+are both small projects and big ones. Most of them are listed in our
+TODO file, listed on the homepage of Jan and
+@uref{http://www.cs.uu.nl/~hanwen/lily-devel,Han-Wen}. Modifying
+LilyPond almost always requires patches to the C++ part.
+
+There are also numerous other interesting projects that are more or less
+related to LilyPond
+
+@itemize @bullet
+@item Writing convertors, eg. from NIFF and MIDI (we tried writing one with
+limited success: midi2ly, included with lilypond.)
+
+We found that writing them in Python is the easiest.
+
+@item Writing a GUI frontend to
+LilyPond. At the moment @uref{denemo,denemo.sourceforge.net} is the most
+advanced.
+
+@item Helping write @uref{ http://solfege.sourceforge.net/,solfege
+tools}
+
+@item Helping @uref{primrose.sourceforge.net,primrose}, a tool for
+scanning sheet music.
+@end itemize
@chapter LilyPond internals
This documents some aspects of the internals of GNU LilyPond. Some of
this stuff comes from e-mail I wrote, some from e-mail others wrote,
-some are large comments taken away from the headers. This page may be
-a little incoherent. Unfortunately, it is also quite outdated. A
-more thorough and understandable document is in the works.
+some are large comments taken away from the headers. This page may be a
+little incoherent. Unfortunately, it is also quite outdated. A more
+thorough and understandable document is in the works.
You should use @code{doc++} to take a peek at the sources.
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}.
+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}. Conversion tools for PMX, MUP, ABC, Finale and Musedata are
+also included.
LilyPond is free software. It is licensed under GNU General Public
License, so you can use, modify and redistribute the program with
@itemize @bullet
-@item @samp{info-gnu-music@@gnu.org} (@uref{http://www.mail-archive.com/info-gnu-music@@gnu.org,archive})
- is a moderated list for information on the GNU Music project, to
- subscribe: send mail with subject "subscribe" to
- info-gnu-music-request@@gnu.org.
+@item @uref{http://mail.gnu.org/mailman/listinfo/info-gnu-music,info-gnu-music@@gnu.org}
+is a low-volume list for information on the GNU Music project.
This list is moderated; ask
@email{drl@@gnu.org, David R. Linn} or
- @email{hanwen@@cs.uu.nl, Han-Wen} to send announcements for this
-list.
+ @email{hanwen@@cs.uu.nl, Han-Wen} to send announcements for this list.
+@item @uref{http://mail.gnu.org/mailman/listinfo/help-gnu-music,@samp{help-gnu-music@@gnu.org}}
+ For help with using LilyPond.
+@item @uref{http://mail.gnu.org/mailman/listinfo/bug-gnu-music,bug-gnu-music@@gnu.org}
+If you have bugreports, you should send them to this list.
-@item @samp{help-gnu-music@@gnu.org} (@uref{http://www.mail-archive.com/help-gnu-music@@gnu.org,archive}).
- For help with LilyPond music project. To subscribe: send
- mail with subject "subscribe" to
- @email{help-gnu-music-request@@gnu.org}
-
-@item @samp{bug-gnu-music@@gnu.org} (@uref{http://www.mail-archive.com/bug-gnu-music@@gnu.org,archive})
- If you have bugreports, you should send them to this list. If you
-want to know about bugs, subscribe: send mail with subject "subscribe"
-to @email{bug-gnu-music-request@@gnu.org}.
-
Please include in your bugreport the version of LilyPond that
you experience the problem with, a description of your system and sample
they tend to be very big and don't help with describing the problem.
-@item @samp{gnu-music-discuss@@gnu.org} (@uref{http://www.mail-archive.com/gnu-music-discuss@@gnu.org,archive})
- For discussions concerning LilyPond, to subscribe: send
- mail with subject "subscribe" to
- @email{gnu-music-discuss-request@@gnu.org}.
-
-
+@item @uref{http://mail.gnu.org/mailman/listinfo/gnu-music-discuss,gnu-music-discuss@@gnu.org}
+ For discussions concerning LilyPond.
@end itemize
If you want to unsubscribe use the same procedure as subscribing, but
@cindex properties!Voice
-@table @samp
+@table @samp
@item @code{abbrev}@indexcode{abbrev} @propertytype{integer}
Set length for tremolo to be used if no length is explicitly
specified.
Note that the notes move, but the locations of accidentals stay
the same.
+ Vertical position of squashing can be controlled through
+@indexcode{squashedPosition}.
+
@item @code{Priority_horizontal_align_engraver}
@indexcode{Priority_horizontal_align_engraver}
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=3
-PATCH_LEVEL=85
-MY_PATCH_LEVEL=jcn5
+PATCH_LEVEL=86
+MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
--- /dev/null
+\score {
+ \notes \context Thread {
+ c1 \< c1 \break c1 c1 \! c1
+ }
+}
+++ /dev/null
-\score {
- \context Voice \notes\relative c {
- %c''4^|^.^"foo"^"klap"
- c''4^|^.^"foo"^"klap"^"puk"^\fermata^\stopped
- c4_|_._"foo"_"klap"_"puk"_\fermata_\stopped
-
- }
- \paper { }
- \midi { }
-}
\ No newline at end of file
--- /dev/null
+\score {
+ \notes {
+ c2_"geen gedonder"_"jij gaat onder"
+ c2^^^.^|^"down"^"up"
+ }
+ \paper { linewidth = -1. ; }
+}
--- /dev/null
+%{
+
+Kludge for half-assed tab notation (you need to fill the numbers
+yourself.)
+
+%}
+
+bla = \notes \relative c' { <c4 e g> <c4. e g> <c8 f a> <c4 f a> <c1 e g> }
+
+\score { \notes
+<
+ \context Voice = BLA \bla
+ \context TabStaff \context Thread \bla
+>
+
+\paper {
+ \translator {
+ \StaffContext
+ \name TabStaff;
+ basicStaffSymbolProperties \push #'line-count = #6
+ \remove "Clef_engraver";
+ \remove "Time_signature_engraver";
+ \consists "Pitch_squash_engraver";
+ basicNoteHeadProperties \push #'transparent = ##t
+ basicNoteHeadProperties \push #'staff-position = #-6
+ basicDotsProperties \push #'transparent = ##t
+ squashedPosition = #-4
+ basicStemProperties \push #'length = #12
+}
+\translator {
+\ScoreContext
+\accepts TabStaff;
+}
+}
+}
void
Dot_column::set_interface (Score_element* me)
{
- me->set_elt_property ("dots", SCM_EOL);
+
Directional_element_interface::set (me, RIGHT);
Axis_group_interface::set_interface (me);
{
if (!has_interface ())
{
- elt_l_->set_elt_property (name_.ch_C (), SCM_EOL);
+
}
}
void
Hara_kiri_group_spanner::set_interface (Score_element*me)
{
- me->set_elt_property ("items-worth-living", SCM_EOL);
me->add_offset_callback (force_hara_kiri_callback, Y_AXIS);
me->set_interface (ly_symbol2scm ("hara-kiri-spanner-interface"));
me->set_extent_callback (Hara_kiri_group_spanner::y_extent, Y_AXIS);
#include "music-wrapper-iterator.hh"
#include "direction.hh"
-class Auto_change_iterator : public Music_wrapper_iterator
+class Auto_change_iterator : public Music_wrapper_iterator
{
-public:
- VIRTUAL_COPY_CONS (Music_iterator);
- Auto_change_iterator ();
+ Direction where_dir_;
+ void change_to (Music_iterator* , String, String);
protected:
virtual void do_process_and_next (Moment);
-
-private:
- Direction where_dir_;
- void change_to (Music_iterator* , String, String);
+public:
+ Auto_change_iterator ();
};
#endif /* AUTO_CHANGE_ITERATOR_HH */
class Change_iterator : public Music_iterator
{
-public:
- VIRTUAL_COPY_CONS (Music_iterator);
- /*
- CTOR is public
- */
+ void error (String);
protected:
virtual void do_process_and_next (Moment);
-private:
- void error (String);
+public:
+ /*
+ CTOR is public
+ */
};
#endif
class Chord_tremolo_iterator : public Music_iterator
{
+ Moment factor_;
+ Music_iterator * child_iter_p_;
+
public:
- VIRTUAL_COPY_CONS (Music_iterator);
Chord_tremolo_iterator ();
protected:
virtual void do_print () const;
virtual void do_process_and_next (Moment) ;
virtual Music_iterator *try_music_in_children (Music *) const;
-
-private:
- Moment factor_;
- Music_iterator * child_iter_p_;
};
*/
class Folded_repeat_iterator : public Music_iterator
{
+ Music_iterator * main_iter_p_;
+ Music_iterator * alternative_iter_p_;
+ int count_;
+ Moment main_length_mom_;
public:
- VIRTUAL_COPY_CONS (Music_iterator);
Folded_repeat_iterator ();
~Folded_repeat_iterator ();
virtual void do_process_and_next (Moment);
virtual Music_iterator *try_music_in_children (Music *) const;
-
-private:
- Music_iterator * main_iter_p_;
- Music_iterator * alternative_iter_p_;
- int count_;
- Moment main_length_mom_;
};
#endif /* FOLDED_REPEAT_ITERATOR_HH */
class Grace_iterator : public Music_wrapper_iterator
{
public:
- VIRTUAL_COPY_CONS (Music_iterator);
~Grace_iterator ();
virtual void construct_children () ;
virtual void do_process_and_next (Moment);
class Interpretation_context_handle
{
+ Translator_group * report_to_l_;
+ void down ();
+ void up (Translator_group*);
public:
~Interpretation_context_handle ();
Interpretation_context_handle ();
- Interpretation_context_handle* clone () const;
void set_translator (Translator_group*);
bool try_music (Music *);
void operator =(Interpretation_context_handle const&);
Interpretation_context_handle (Interpretation_context_handle const&);
Translator_group * report_to_l () const;
-
-private:
- Translator_group * report_to_l_;
- void down ();
- void up (Translator_group*);
};
#endif /* INTERPRETATION_CONTEXT_HANDLE_HH */
class Lyric_combine_music_iterator : public Music_iterator
{
-public:
- VIRTUAL_COPY_CONS (Music_iterator);
- Lyric_combine_music_iterator ();
-
+ Music_iterator * music_iter_p_;
+ Music_iterator * lyric_iter_p_;
+
protected:
virtual void construct_children ();
virtual Moment next_moment () const;
virtual bool ok () const;
virtual void do_print () const;
virtual ~Lyric_combine_music_iterator ();
-
-private:
- Music_iterator * music_iter_p_;
- Music_iterator * lyric_iter_p_;
+public:
+ Lyric_combine_music_iterator ();
};
#endif /* LYRIC_COMBINE_MUSIC_ITERATOR_HH */
void translate_axis (Real,Axis);
Interval extent (Axis) const;
+ Box extent_box () const;
/**
codify THIS into a Scheme expression.
*/
#include "lily-proto.hh"
#include "lily-guile.hh"
#include "rod.hh"
+/*
+ properties:
+ columns -- list of paper-columns
+ */
class Multi_measure_rest
{
public:
The state of an iterator would be the intersection of the particular music
construct with one point in musical time.
*/
-class Music_iterator
-{
-public:
- VIRTUAL_COPY_CONS (Music_iterator);
+class Music_iterator {
+ Interpretation_context_handle handle_;
+
+protected:
+ Music * music_l_;
+
+ /// ugh. JUNKME
+ bool first_b_;
- Music_iterator ();
- Music_iterator (Music_iterator const&);
- virtual ~Music_iterator ();
+ /**
+ Do the actual printing. This should be overriden in derived classes. It
+ is called by #print#, in the public interface
+ */
+ virtual void do_print() const;
+
+ /**
+ Find a bottom notation context to deliver requests to.
+ */
+ virtual Translator_group* get_req_translator_l();
+
+ /**
+ Get an iterator for MUS, inheriting the translation unit from THIS.
+ */
+ Music_iterator* get_iterator_p (Music *mus) const;
+
+ /** Do the actual move. This should be overriden in derived
+ classes. It is called by #process_and_next#, the public interface
+ */
+ virtual void do_process_and_next (Moment until);
+
+
+ virtual Music_iterator* try_music_in_children (Music *) const;
+
+public:
/**
Do the reporting. Will try MUSIC_L_ in its own translator first,
/**
The translation unit that we this iterator is reporting to now.
*/
- Translator_group*report_to_l () const;
+ Translator_group*report_to_l() const;
void set_translator (Translator_group*);
static Music_iterator* static_get_iterator_p (Music * mus);
void init_translator (Music *, Translator_group *);
+ Music_iterator();
+
/// Find the next interesting point in time.
- virtual Moment next_moment () const;
+ virtual Moment next_moment() const;
///Are we finished with this piece of music?
- virtual bool ok () const;
+ virtual bool ok() const;
+
+ virtual ~Music_iterator();
- virtual Music* get_music ();
- virtual bool next ();
///Report all musical information that occurs between now and UNTIL
void process_and_next (Moment until);
Construct sub-iterators, and set the translator to
report to.
*/
- virtual void construct_children ();
- void print () const;
-
-protected:
- Music * music_l_;
-
- /// ugh. JUNKME
- bool first_b_;
-
- /**
- Do the actual printing. This should be overriden in derived classes. It
- is called by #print#, in the public interface
- */
- virtual void do_print () const;
-
- /**
- Find a bottom notation context to deliver requests to.
- */
- virtual Translator_group* get_req_translator_l ();
-
- /**
- Get an iterator for MUS, inheriting the translation unit from THIS.
- */
- Music_iterator* get_iterator_p (Music *) const;
-
- /** Do the actual move. This should be overriden in derived
- classes. It is called by #process_and_next#, the public interface
- */
- virtual void do_process_and_next (Moment until);
-
- virtual Music_iterator* try_music_in_children (Music *) const;
-
-private:
- Interpretation_context_handle handle_;
+ virtual void construct_children();
+ void print() const;
};
#endif // MUSIC_ITERATOR_HH
class Music_wrapper_iterator : public Music_iterator
{
public:
- VIRTUAL_COPY_CONS (Music_iterator);
Music_wrapper_iterator ();
- Music_wrapper_iterator (Music_wrapper_iterator const&);
~Music_wrapper_iterator ();
virtual void construct_children () ;
virtual Moment next_moment () const;
virtual bool ok () const;
- virtual Music* get_music ();
- virtual bool next ();
protected:
virtual void do_print () const;
class Part_combine_music_iterator : public Music_iterator
{
public:
- VIRTUAL_COPY_CONS (Music_iterator);
Part_combine_music_iterator ();
protected:
Music_iterator * first_iter_p_;
Music_iterator * second_iter_p_;
+ Moment now_;
Moment first_until_;
Moment second_until_;
+
+ bool combined_b_;
};
#endif /* PART_COMBINE_MUSIC_ITERATOR_HH */
class Property_iterator : public Music_iterator
{
public:
- VIRTUAL_COPY_CONS (Music_iterator);
// construction
protected:
virtual void do_process_and_next (Moment);
class Push_property_iterator : public Music_iterator
{
-public:
- VIRTUAL_COPY_CONS (Music_iterator);
protected:
virtual void do_process_and_next (Moment);
};
class Pop_property_iterator : public Music_iterator
{
-public:
- VIRTUAL_COPY_CONS (Music_iterator);
protected:
virtual void do_process_and_next (Moment);
};
/**
Walk through a Request_chord
*/
-class Request_chord_iterator : public Music_iterator
-{
+class Request_chord_iterator : public Music_iterator {
Request_chord * elt_l () const;
/**
cache elt_l ()->length_mom ().
bool last_b_;
public:
- VIRTUAL_COPY_CONS (Music_iterator);
Request_chord_iterator ();
- Request_chord_iterator (Request_chord_iterator const&);
- virtual bool next ();
- virtual bool ok () const;
protected:
virtual void do_process_and_next (Moment);
virtual Moment next_moment() const;
virtual void construct_children();
+ virtual bool ok() const;
virtual void do_print() const;
};
+/*
+ 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 Simple_music_iterator : public Music_iterator
+{
+public:
+protected:
+ virtual void do_process_and_next (Moment );
+};
+
+#endif /* REQUEST_ITERATOR_HH */
+
#include "lily-proto.hh"
#include "lily-guile.hh"
+/*
+ properties:
+
+ elements -- list of elts (both rests and notes) participating in the
+ collision.
+
+*/
class Rest_collision // interface
{
class Sequential_music_iterator : public Music_iterator
{
public:
- VIRTUAL_COPY_CONS (Music_iterator);
Sequential_music_iterator ();
- Sequential_music_iterator (Sequential_music_iterator const&);
virtual ~Sequential_music_iterator ();
virtual void construct_children ();
virtual Moment next_moment () const;
virtual bool ok () const;
- virtual Music* get_music ();
- virtual bool next ();
protected:
virtual void do_print() const;
+++ /dev/null
-/*
- simple-music-iterator.hh -- declare Simple_music_iterator
-
- source file of the GNU LilyPond music typesetter
-
- (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
- */
-
-#ifndef SIMPLE_MUSIC_ITERATOR_HH
-#define SIMPLE_MUSIC_ITERATOR_HH
-
-#include "music-iterator.hh"
-
-class Simple_music_iterator : public Music_iterator
-{
-public:
- VIRTUAL_COPY_CONS (Music_iterator);
- Simple_music_iterator ();
- Simple_music_iterator (Simple_music_iterator const &);
-
-protected:
- virtual void do_process_and_next (Moment );
-};
-
-#endif /* SIMPLE_MUSIC_ITERATOR_HH */
-
class Simultaneous_music_iterator : public Music_iterator
{
public:
- VIRTUAL_COPY_CONS (Music_iterator);
/// make a new context for every child.
bool separate_contexts_b_;
#include "lily-guile.hh"
#include "lily-proto.hh"
+/*
+ properties :
+ minimum-distances -- list of rods (ie. (OBJ . DIST) pairs)
+
+ ideal-distances -- (OBJ . (DIST . STRENGTH)) pairs
+
+ dir-list -- list of stem directions.
+ */
struct Spaceable_element
{
#include "lily-proto.hh"
#include "lily-guile.hh"
+/*
+ stem -- pointer to the stem object.
+ */
class Stem_tremolo
{
public:
#include "lily-guile.hh"
#include "lily-proto.hh"
+
+/*
+ heads -- pair of element pointers, pointing to the two heads of the
+ tie. */
class Tie
{
public:
class Time_scaled_music_iterator : public Music_wrapper_iterator
{
public:
- VIRTUAL_COPY_CONS (Music_iterator);
// construction
protected:
virtual void do_process_and_next (Moment);
#include "smobs.hh"
#include "input.hh"
+/*
+ The definition of a interpretation context as given in the
+ input. The lists are stored in order of definition.
+*/
struct Translator_def : public Input
{
+private:
+ /*
+ these lists store the definition, in opposite order of entry
+ */
+
SCM consists_name_list_;
SCM end_consists_name_list_;
SCM accepts_name_list_;
SCM property_ops_;
+public:
SCM type_name_;
SCM translator_group_type_;
SCM modify_definition (SCM, SCM, bool);
+ SCM default_child_context_name ();
void set_acceptor (SCM accepts, bool add);
void add_element (SCM name);
static void apply_pushpop_property (Translator_group*, SCM syms, SCM eprop, SCM val);
SCM clone_scm ()const;
- DECLARE_SMOBS(Translator_def,foo);
-private:
+ void apply_property_operations (Translator_group*);
+private:
+ DECLARE_SMOBS(Translator_def,foo);
Translator_def ();
Translator_def (Translator_def const&);
(or should we be above staff?)
todo: handle breaking elegantly.
+properties:
+
+ beams -- list of beam ptrs.
+
+ columns -- list of note-columns.
+
*/
+
class Tuplet_spanner
{
public:
class Unfolded_repeat_iterator : public Music_iterator
{
public:
- VIRTUAL_COPY_CONS (Music_iterator);
/**
How often have we done the body (assuming bodies are interspersed.)?
*/
#include "spanner.hh"
-/** Volta bracket with number */
+/** Volta bracket with number
+
+properties:
+
+bars -- list of barline ptrs.
+
+*/
class Volta_spanner
{
#include "interpretation-context-handle.hh"
#include "translator-group.hh"
-Interpretation_context_handle::Interpretation_context_handle()
-{
- report_to_l_ =0;
-}
-
-Interpretation_context_handle::Interpretation_context_handle (Interpretation_context_handle const&s)
-{
- report_to_l_ =0;
- if (s.report_to_l_)
- up (s.report_to_l_ );
-}
-
-Interpretation_context_handle*
-Interpretation_context_handle::clone () const
-{
- Interpretation_context_handle* handle = new Interpretation_context_handle;
- handle->report_to_l_ = this->report_to_l_;
- return handle;
-}
-
-Interpretation_context_handle::~Interpretation_context_handle ()
-{
- if (report_to_l_)
- down ();
-}
-
void
Interpretation_context_handle::up (Translator_group*t)
{
return report_to_l_->try_music (m);
}
+Interpretation_context_handle::Interpretation_context_handle (Interpretation_context_handle const&s)
+{
+ report_to_l_ =0;
+ if (s.report_to_l_)
+ up (s.report_to_l_ );
+}
+
void
Interpretation_context_handle::operator = (Interpretation_context_handle const &s)
{
return report_to_l_;
}
+Interpretation_context_handle::Interpretation_context_handle()
+{
+ report_to_l_ =0;
+}
+
+Interpretation_context_handle::~Interpretation_context_handle ()
+{
+ if (report_to_l_)
+ down ();
+}
events. Due to interaction with ties (which don't come together
with note heads), this needs to be in a context higher than Tie_engraver.
(FIXME).
- */
+
+ FIXME: should not compute vertical positioning of accidentals, but
+ get them from the noteheads
+
+*/
+
+
struct Local_key_engraver : Engraver {
Item *key_item_p_;
protected:
Side_position::add_support (key_item_p_,support_l);
}
- if (!forget)
+ /*
+ We should not record the accidental if it is the first
+ note and it is tied from the previous measure.
+
+ Checking whether it is tied also works mostly, but will it
+ always do the correct thing?
+
+ */
+ if (!forget && !tie_changes)
{
/*
not really really correct if there are more than one
gh_int2scm (n)),
gh_int2scm (a));
-#if 0
- /*
- TESTME!
- */
- if (!tied_l_arr_.find_l (support_l))
- {
- local_key_.clear_internal_forceacc (note_l->pitch_);
- }
- else if (tie_changes)
- {
- local_key_.set_internal_forceacc (note_l->pitch_);
- }
-#endif
}
}
gh_cons (ly_interval2scm (dim_[X_AXIS]),
ly_interval2scm (dim_[Y_AXIS])));
}
+
+Box
+Molecule::extent_box () const
+{
+ return dim_;
+}
void
Multi_measure_rest_engraver::do_post_move_processing ()
{
- Moment now (now_mom ());
-
SCM smp = get_property ("measurePosition");
Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
void
Multi_measure_rest::set_interface (Score_element*me)
{
- me->set_elt_property ("columns", SCM_EOL);
+ me->set_interface (ly_symbol2scm ("multi-measure-rest-interface"));
}
-/*
+bool
+Multi_measure_rest::has_interface (Score_element*me)
+{
+ return me->has_interface (ly_symbol2scm ("multi-measure-rest-interface"));
+}
+
+ /*
[TODO] 17
* variable-sized multi-measure rest symbol: |====| ??
*/
#include "part-combine-music.hh"
#include "part-combine-music-iterator.hh"
#include "request.hh"
-#include "simple-music-iterator.hh"
+#include "request-iterator.hh"
#include "output-property.hh"
#include "chord-tremolo-iterator.hh"
-Music_iterator::Music_iterator ()
-{
- first_b_ = true;
-}
-
-Music_iterator::Music_iterator (Music_iterator const& src)
-{
- first_b_ = src.first_b_;
- handle_ = *src.handle_.clone ();
- music_l_ = src.music_l_;
-}
-
-Music_iterator::~Music_iterator()
-{
-}
-
void
Music_iterator::do_print() const
{
{
}
+Music_iterator::~Music_iterator()
+{
+}
+
Moment
Music_iterator::next_moment() const
{
}
bool
-Music_iterator::ok () const
+Music_iterator::ok() const
{
return first_b_;
}
-Music*
-Music_iterator::get_music ()
-{
- if (ok ())
- return music_l_;
- return 0;
-}
-
-bool
-Music_iterator::next ()
-{
- first_b_ = false;
- return ok ();
-}
-
Music_iterator*
Music_iterator::static_get_iterator_p (Music *m)
{
return p;
}
+Music_iterator::Music_iterator()
+{
+ first_b_ = true;
+}
+
Music_iterator*
Music_iterator::try_music (Music *m) const
{
child_iter_p_ =0;
}
-Music_wrapper_iterator::Music_wrapper_iterator (Music_wrapper_iterator const &src)
- : Music_iterator (src)
-{
- child_iter_p_ = src.child_iter_p_->clone ();
-}
-Music_wrapper_iterator::~Music_wrapper_iterator ()
-{
- delete child_iter_p_;
-}
void
Music_wrapper_iterator::do_print () const
get_iterator_p (dynamic_cast<Music_wrapper const*> (music_l_)->element ());
}
+Music_wrapper_iterator::~Music_wrapper_iterator ()
+{
+ delete child_iter_p_;
+}
+
+
bool
Music_wrapper_iterator::ok () const
{
Music_iterator::do_process_and_next (m);
}
-Music*
-Music_wrapper_iterator::get_music ()
-{
- return child_iter_p_->get_music ();
-}
-
-bool
-Music_wrapper_iterator::next ()
-{
- return child_iter_p_->next ();
-}
Moment
Music_wrapper_iterator::next_moment () const
SCM style = me->get_elt_property ("style");
if (!gh_symbol_p (style))
{
- style = ly_symbol2scm("default");
+ return SCM_EOL;
}
-
// ugh: use gh_call ()
Molecule out = me->lookup_l()->afm_find (String ("noteheads-") +
#include "part-combine-music-iterator.hh"
#include "translator-group.hh"
#include "musical-request.hh"
-#include "music-sequence.hh"
#include "warn.hh"
Part_combine_music_iterator::Part_combine_music_iterator ()
{
+ combined_b_ = true;
+
+ now_ = 0;
first_iter_p_ = 0;
second_iter_p_ = 0;
first_until_ = 0;
error (_f ("none of these in my family: `%s'", to_id.ch_C ()));
}
+Pitch_interrogate_req* first_spanish_inquisition; // nobody expects it
+Pitch_interrogate_req* second_spanish_inquisition; // won't strike twice
+
+Rhythm_interrogate_req* first_rhythmic_inquisition;
+Rhythm_interrogate_req* second_rhythmic_inquisition;
+
void
Part_combine_music_iterator::do_process_and_next (Moment m)
{
Part_combine_music const * p = dynamic_cast<Part_combine_music const* > (music_l_);
- Moment now = next_moment ();
+ now_ = next_moment ();
- Array<Musical_pitch> first_pitches;
- Array<Duration> first_durations;
+ /*
+ Hmm, shouldn't we check per iterator if next_moment < m?
+ */
if (first_iter_p_->ok ())
- {
- Music_iterator* i = first_iter_p_->clone ();
- Moment until = i->next_moment ();
-
- /* Urg, silly first_b_ stuff */
- if (now && i->next ())
- until = i->next_moment ();
-
- /* How about a 'now_moment ()' for iterators? */
- for (; i->ok () && i->next_moment () == until; i->next ())
- {
- if (Music_sequence* m = dynamic_cast<Music_sequence *> (i->get_music ()))
- {
- for (SCM s = m->music_list (); gh_pair_p (s); s = gh_cdr (s))
- {
- Music *u = unsmob_music (gh_car (s));
- if (Melodic_req *r = dynamic_cast<Melodic_req *> (u))
- first_pitches.push (r->pitch_);
- if (Rhythmic_req *r = dynamic_cast<Rhythmic_req *> (u))
- first_durations.push (r->duration_);
- }
- }
- }
- }
-
- Array<Musical_pitch> second_pitches;
- Array<Duration> second_durations;
+ first_iter_p_->process_and_next (m);
+
if (second_iter_p_->ok ())
- {
- Music_iterator* i = second_iter_p_->clone ();
- Moment until = i->next_moment ();
-
- /* Urg, silly second_b_ stuff */
- if (now && i->next ())
- until = i->next_moment ();
-
- /* How about a 'now_moment ()' for iterators? */
- for (; i->ok () && i->next_moment () == until; i->next ())
- {
- if (Music_sequence* m = dynamic_cast<Music_sequence *> (i->get_music ()))
- {
- for (SCM s = m->music_list (); gh_pair_p (s); s = gh_cdr (s))
- {
- Music *u = unsmob_music (gh_car (s));
- if (Melodic_req *r = dynamic_cast<Melodic_req *> (u))
- second_pitches.push (r->pitch_);
- if (Rhythmic_req *r = dynamic_cast<Rhythmic_req *> (u))
- second_durations.push (r->duration_);
- }
- }
- }
- }
+ second_iter_p_->process_and_next (m);
+
+ Music_iterator::do_process_and_next (m);
+
+ /*
+ TODO:
+
+ * Maybe we need a Skip_engraver?
+
+ (check): can this all be handled now?
+
+ Maybe different modes exist?
+
+ * Wind instruments (Flute I/II)
+ * Hymnals:
+
+
+ Rules for Hymnals/SATB (John Henckel <henckel@iname.com>):
+
+ 1. if S and A differ by less than a third, the stems should be up/down.
+ 2. else if S and A have different values, the stems should be up/down.
+ 3. else if A sings "la" or higher, both S and A stems should be down.
+ 4. else both stems should be up
+
+ * This may get really tricky: combining voices/staffs: string instruments
+
+ */
+
+ if (!first_spanish_inquisition)
+ first_spanish_inquisition = new Pitch_interrogate_req;
+ first_iter_p_->try_music (first_spanish_inquisition);
+ if (!second_spanish_inquisition)
+ second_spanish_inquisition = new Pitch_interrogate_req;
+ second_iter_p_->try_music (second_spanish_inquisition);
+
+ Array<Musical_pitch>* first_pitches = &first_spanish_inquisition->pitch_arr_;
+ Array<Musical_pitch>* second_pitches = &second_spanish_inquisition->pitch_arr_;
+
+ if (!first_rhythmic_inquisition)
+ first_rhythmic_inquisition = new Rhythm_interrogate_req;
+ first_iter_p_->try_music (first_rhythmic_inquisition);
+
+ if (!second_rhythmic_inquisition)
+ second_rhythmic_inquisition = new Rhythm_interrogate_req;
+ second_iter_p_->try_music (second_rhythmic_inquisition);
+
+ Array<Duration>* first_durations = &first_rhythmic_inquisition->duration_arr_;
+ Array<Duration>* second_durations = &second_rhythmic_inquisition->duration_arr_;
+
SCM interval = SCM_BOOL_F;
- if (first_pitches.size () && second_pitches.size ())
+ if (first_pitches->size () && second_pitches->size ())
{
- first_pitches.sort (Musical_pitch::compare);
- second_pitches.sort (Musical_pitch::compare);
- interval = gh_int2scm (first_pitches.top ().steps ()
- - second_pitches[0].steps ());
+ first_pitches->sort (Musical_pitch::compare);
+ second_pitches->sort (Musical_pitch::compare);
+ interval = gh_int2scm (first_pitches->top ().steps ()
+ - (*second_pitches)[0].steps ());
}
- if (first_durations.size ())
+ if (first_durations->size ())
{
- first_durations.sort (Duration::compare);
- Moment new_until = now + first_durations.top ().length_mom ();
+ first_durations->sort (Duration::compare);
+ Moment new_until = now_ + first_durations->top ().length_mom ();
if (new_until > first_until_)
first_until_ = new_until;
}
- if (second_durations.size ())
+ if (second_durations->size ())
{
- second_durations.sort (Duration::compare);
- Moment new_until = now + second_durations.top ().length_mom ();
+ second_durations->sort (Duration::compare);
+ Moment new_until = now_ + second_durations->top ().length_mom ();
if (new_until > second_until_)
second_until_ = new_until;
}
-#if 0 /* DEBUG */
- printf ("now: %s\n", now.str ().ch_C ());
- printf ("first: ");
- for (int i = 0; i < first_pitches.size (); i++)
- {
- printf ("%s, ", first_pitches[i].str ().ch_C ());
- }
- printf ("\nsecond: ");
- for (int i = 0; i < second_pitches.size (); i++)
- {
- printf ("%s, ", second_pitches[i].str ().ch_C ());
- }
- printf ("\n");
-#endif
-
Translator_group * fir = first_iter_p_->report_to_l ();
Translator_group * sir = second_iter_p_->report_to_l ();
- bool solo_b = (first_pitches.empty () != second_pitches.empty ())
- && !(first_until_ > now && second_until_ > now);
+ bool solo_b = (first_pitches->empty () != second_pitches->empty ())
+ && !(first_until_ > now_ && second_until_ > now_);
- bool unirhythm_b = !solo_b && !compare (&first_durations, &second_durations);
- bool unison_b = unirhythm_b && !first_pitches.empty ()
- &&!compare (&first_pitches, &second_pitches);
- bool unisilence_b = unirhythm_b && first_pitches.empty ();
+ bool unirhythm_b = !solo_b && !compare (first_durations, second_durations);
+ bool unison_b = unirhythm_b && !first_pitches->empty ()
+ &&!compare (first_pitches, second_pitches);
+ bool unisilence_b = unirhythm_b && first_pitches->empty ();
Translator_group * fd = fir->find_create_translator_l (p->what_str_, "one");
Translator_group * sd = sir->find_create_translator_l (p->what_str_, "two");
split_interval_b = true;
}
- bool combined_b = first_iter_p_->report_to_l ()->daddy_trans_l_
- == second_iter_p_->report_to_l ()->daddy_trans_l_;
+ /*
+ Hmm, maybe we should set/check combined_b_ against
- String to_id = combined_b ? "one" : "two";
- if ((!unirhythm_b && combined_b)
- || (split_interval_b && combined_b)
- || (solo_b && combined_b)
- /*|| (unisilence_b && combined_b) */
+ first_iter_p_->report_to_l () == second_iter_p_->report_to_l ()
+
+ ?
+ */
+
+ String to_id = combined_b_ ? "one" : "two";
+ if ((!unirhythm_b && combined_b_)
+ || (split_interval_b && combined_b_)
+ || (solo_b && combined_b_)
+ /*|| (unisilence_b && combined_b_) */
|| ((unirhythm_b || unison_b || unisilence_b)
- && !combined_b && !split_interval_b && !solo_b))
+ && !combined_b_ && !split_interval_b && !solo_b))
{
- combined_b = !combined_b;
- to_id = combined_b ? "one" : "two";
+ combined_b_ = !combined_b_;
+ to_id = combined_b_ ? "one" : "two";
change_to (second_iter_p_, p->what_str_, to_id);
}
- if (!combined_b)
+ if (!combined_b_)
sir = second_iter_p_->report_to_l ();
SCM b = unirhythm_b ? SCM_BOOL_T : SCM_BOOL_F;
sd->set_property ("unison", b);
b = solo_b ? SCM_BOOL_T : SCM_BOOL_F;
- if (first_pitches.size ())
+ if (first_pitches->size ())
{
fd->set_property ("solo", b);
sd->set_property ("solo", SCM_BOOL_F);
}
- if (second_pitches.size ())
+ if (second_pitches->size ())
{
fd->set_property ("solo", SCM_BOOL_F);
sd->set_property ("solo", b);
}
- /*
- Hmm, shouldn't we check per iterator if next_moment < m?
- */
- if (first_iter_p_->ok ())
- first_iter_p_->process_and_next (m);
-
- if (second_iter_p_->ok ())
- second_iter_p_->process_and_next (m);
-
- Music_iterator::do_process_and_next (m);
+ first_pitches->clear ();
+ second_pitches->clear ();
+ first_durations->clear ();
+ second_durations->clear ();
}
Music_iterator*
void
Pitch_squash_engraver::acknowledge_element (Score_element_info i)
{
+ SCM newpos = get_property ("squashedPosition");
if (Note_head::has_interface (i.elem_l_))
{
- Staff_symbol_referencer::set_position (i.elem_l_,0);
+ i.elem_l_->set_elt_property ("staff-position", newpos);
}
}
#include "music-list.hh"
#include "request.hh"
-Request_chord_iterator::Request_chord_iterator ()
-{
- last_b_ = false;
-}
-Request_chord_iterator::Request_chord_iterator (Request_chord_iterator const &src)
- : Music_iterator (src)
-{
- last_b_ = src.last_b_;
- elt_length_mom_ = src.elt_length_mom_;
-}
void
Request_chord_iterator::construct_children()
return (Request_chord*) music_l_;
}
+Request_chord_iterator::Request_chord_iterator ()
+{
+ last_b_ = false;
+}
+
+
bool
Request_chord_iterator::ok() const
{
#endif
}
-bool
-Request_chord_iterator::next ()
-{
- if (first_b_)
- first_b_ = false;
- else
- last_b_ = true;
- return ok ();
-}
-
void
Request_chord_iterator::do_process_and_next (Moment mom)
{
-#if 0
- // URG
- //if (first_b_)
-#else
- if (ok ())
-#endif
+ if (first_b_)
{
- for (SCM s = dynamic_cast<Music_sequence *> (get_music ())->music_list (); gh_pair_p (s); s = gh_cdr (s))
+ for (SCM s = dynamic_cast<Music_sequence *> (music_l_)->music_list (); gh_pair_p (s); s = gh_cdr (s))
{
Music *mus = unsmob_music (gh_car (s));
if (Request * req_l = dynamic_cast<Request*> (mus))
mus->origin ()->warning (_f ("Huh? Not a Request: `%s'",
classname (mus)));
}
+ first_b_ = false;
}
- next ();
-#if 0
- // URG
if (mom >= elt_length_mom_)
last_b_ = true;
-#endif
}
+/*
+ request-iterator.cc -- implement Simple_music_iterator
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+#include "request-iterator.hh"
+#include "music.hh"
+#include "input.hh"
+
+void
+Simple_music_iterator::do_process_and_next (Moment m)
+{
+ if (first_b_)
+ {
+ bool g= try_music (music_l_);
+ if (!g)
+ music_l_->origin ()->warning (_f ("Junking music: `%s'", classname(music_l_)));
+
+ first_b_ = false;
+ }
+ Music_iterator::do_process_and_next (m);
+}
{
me->set_extent_callback (0, X_AXIS);
me->set_extent_callback (0, Y_AXIS);
- me->set_elt_property ("elements", SCM_EOL);
}
mutable_property_alist_ = SCM_EOL;
smobify_self ();
- set_elt_property ("dependencies", SCM_EOL);
-
- if (get_elt_property ("interfaces") == SCM_UNDEFINED)
- set_elt_property ("interfaces", SCM_EOL);
}
if (gh_procedure_p (proc))
mol = gh_apply (proc, gh_list (this->self_scm (), SCM_UNDEFINED));
-
+
SCM origin =get_elt_property ("origin");
if (!unsmob_input (origin))
origin =ly_symbol2scm ("no-origin");
mol = gh_cons (gh_list (origin, gh_car (mol), SCM_UNDEFINED), gh_cdr (mol));
}
-
- return create_molecule (mol);
+
+ Molecule m (create_molecule (mol));
+
+ /*
+ This is almost the same as setting molecule-callback to #f, but
+ this retains the dimensions of this element, which means that you
+ can erase elements individually. */
+ if (to_boolean (get_elt_property ("transparent")))
+ m = Molecule (m.extent_box (), SCM_EOL);
+
+ return m;
}
}
void
-Script_column_engraver::acknowledge_element( Score_element_info inf)
+Script_column_engraver::acknowledge_element(Score_element_info inf)
{
- if (Side_position::has_interface (inf.elem_l_)) // ugh FIXME
+ Item *thing = dynamic_cast<Item*> (inf.elem_l_);
+ if (thing && Side_position::has_interface (inf.elem_l_)) // ugh FIXME
{
- Item *thing = dynamic_cast<Item*> (inf.elem_l_);
- if (thing
- && !Item::breakable_b (thing)
+ if (!Item::breakable_b (thing)
&& Side_position::get_axis (inf.elem_l_) == Y_AXIS)
{
script_l_arr_.push (thing);
if (!scol_p_ && script_l_arr_.size () > 1)
{
scol_p_ = new Item (get_property ("basicScriptColumnProperties"));
- scol_p_->set_elt_property ("scripts", SCM_EOL);
+
announce_element (scol_p_, 0);
}
/*
- g-script-column.cc -- implement Script_column
+ script-column.cc -- implement Script_column
source file of the GNU LilyPond music typesetter
void
Separation_item::set_interface (Score_element*s)
{
- s->set_elt_property ("elements", SCM_EOL);
s->set_extent_callback (0, X_AXIS);
s->set_extent_callback (0, Y_AXIS);
}
#include "music-list.hh"
#include "request-chord-iterator.hh"
-Sequential_music_iterator::Sequential_music_iterator ()
-{
- cursor_ = 0;
- here_mom_ = 0;
- iter_p_ =0;
-}
-
-Sequential_music_iterator::Sequential_music_iterator (Sequential_music_iterator const &src)
- : Music_iterator (src)
-{
- cursor_ = src.cursor_;
- here_mom_ = src.here_mom_;
- iter_p_ = src.iter_p_->clone ();
-}
-
-Sequential_music_iterator::~Sequential_music_iterator()
-{
- if (iter_p_)
- {
- if (iter_p_->ok ())
- music_l_->origin ()->warning (_ ("Must stop before this music ends"));
- delete iter_p_;
- iter_p_ = 0;
- }
-}
void
Sequential_music_iterator::do_print() const
iter_p_->print();
}
+Sequential_music_iterator::Sequential_music_iterator ()
+{
+ cursor_ = 0;
+ here_mom_ = 0;
+ iter_p_ =0;
+}
+
void
Sequential_music_iterator::construct_children()
{
set_translator (child_report);
}
-Music*
-Sequential_music_iterator::get_music ()
-{
- if (ok ())
- return unsmob_music (gh_car (cursor_));
-
- return 0;
-}
-
-bool
-Sequential_music_iterator::next ()
+Sequential_music_iterator::~Sequential_music_iterator()
{
- if (ok ())
+ if (iter_p_)
{
- bool b = false;
if (iter_p_->ok ())
- b = iter_p_->next ();
- if (!b)
- {
- set_sequential_music_translator ();
- leave_element ();
- if (gh_pair_p (cursor_))
- start_next_element ();
- b = ok ();
- }
- return b;
+ music_l_->origin ()->warning (_ ("Must stop before this music ends"));
+ delete iter_p_;
+ iter_p_ = 0;
}
- return false;
}
-/*
- This should use get_music () and next ()
- */
void
Sequential_music_iterator::do_process_and_next (Moment until)
{
- if (ok ())
+ if (!iter_p_)
+ return;
+
+ while (1)
{
- while (1)
+ Moment local_until = until - here_mom_;
+ while (iter_p_->ok())
+ {
+ Moment here = iter_p_->next_moment();
+ if (here != local_until)
+ goto loopexit;
+
+ iter_p_->process_and_next (local_until);
+ }
+
+ if (!iter_p_->ok())
{
- Moment local_until = until - here_mom_;
- while (iter_p_->ok ())
- {
- Moment here = iter_p_->next_moment ();
- if (here != local_until)
- return Music_iterator::do_process_and_next (until);
-
- iter_p_->process_and_next (local_until);
- }
+ set_sequential_music_translator();
+ leave_element();
- if (!iter_p_->ok ())
- {
- set_sequential_music_translator ();
- leave_element ();
-
- if (gh_pair_p (cursor_))
- start_next_element ();
- else
- return Music_iterator::do_process_and_next (until);
- }
+ if (gh_pair_p (cursor_))
+ start_next_element();
+ else
+ goto loopexit;
}
}
+
+loopexit:
+
+ Music_iterator::do_process_and_next (until);
}
Moment
void
Side_position::set_axis (Score_element*me, Axis a)
{
- /*
- // prop transparent ?
- if (me->get_elt_property ("side-support-elements") == SCM_UNDEFINED)
- me->set_elt_property ("side-support-elements" ,SCM_EOL);
- */
if (!me->has_offset_callback_b (aligned_side, a))
me->add_offset_callback (aligned_side, a);
}
bool
Side_position::has_interface (Score_element*me)
{
- return me->get_elt_property ("side-support-elements") != SCM_EOL;
+ return me->has_interface (ly_symbol2scm ("side-position-interface"));
}
bool
Side_position::supported_b (Score_element*me)
{
SCM s = me->get_elt_property ("side-support-elements");
- return s != SCM_UNDEFINED && s != SCM_EOL;
+ return gh_pair_p(s);
}
+++ /dev/null
-/*
- simple-music-iterator.cc -- implement Simple_music_iterator
-
- source file of the GNU LilyPond music typesetter
-
- (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#include "simple-music-iterator.hh"
-#include "music.hh"
-#include "input.hh"
-
-Simple_music_iterator::Simple_music_iterator ()
- : Music_iterator ()
-{
-}
-
-Simple_music_iterator::Simple_music_iterator (Simple_music_iterator const &src)
- : Music_iterator (src)
-{
-}
-
-void
-Simple_music_iterator::do_process_and_next (Moment m)
-{
- if (ok ())
- {
- bool b = try_music (get_music ());
- if (!b)
- music_l_->origin ()->warning (_f ("Junking music: `%s'",
- classname (music_l_)));
-
- }
- Music_iterator::do_process_and_next (m);
-}
void
Spaceable_element::set_interface (Score_element*me)
{
- me->set_elt_property ("minimum-distances", SCM_EOL);
- me->set_elt_property ("ideal-distances", SCM_EOL);
- me->set_elt_property ("dir-list",SCM_EOL) ;
}
void
Stem_tremolo::set_interface (Score_element *me)
{
-me->set_elt_property ("stem", SCM_EOL);
}
#include "item.hh"
#include "musical-request.hh"
#include "stem.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
/**
typeset directions that are plain text.
void
Text_engraver::acknowledge_element (Score_element_info inf)
{
- if (Note_head::has_interface (inf.elem_l_))
+ if (Rhythmic_head::has_interface (inf.elem_l_))
{
for (int i=0; i < texts_.size (); i++)
{
Translator_def::set_acceptor (SCM name, bool add)
{
if (add)
- this->accepts_name_list_ = gh_append2 (this->accepts_name_list_, gh_cons (name, SCM_EOL));
+ this->accepts_name_list_ = gh_cons (name, this->accepts_name_list_);
else
this->accepts_name_list_ = scm_delete_x (name, this->accepts_name_list_);
}
Translator_def::add_push_property (SCM props, SCM syms, SCM vals)
{
this->property_ops_ = gh_cons (gh_list (push_sym, props, syms, vals, SCM_UNDEFINED),
- this->property_ops_);
+ this->property_ops_);
}
void
Translator_def::add_pop_property (SCM props, SCM syms)
{
this->property_ops_ = gh_cons (gh_list (push_sym, props, syms, SCM_UNDEFINED),
- this->property_ops_);
+ this->property_ops_);
}
/*
accepted_arr.push (t);
}
-
Link_array<Translator_def> best_result;
for (int i=0; i < accepted_arr.size (); i++)
if (scm_equal_p (accepted_arr[i]->type_name_, type_str) == SCM_BOOL_T)
tg->output_def_l_ = md;
tg->definition_ = self_scm ();
tg->type_str_ = ly_scm2string (type_name_);
+ SCM l1 = trans_list (consists_name_list_, tg);
+ SCM l2 =trans_list (end_consists_name_list_,tg);
+ l1 = scm_reverse_x (l1, l2);
+
+ tg->simple_trans_list_ = l1;
+
+ return tg;
+}
+
+
+void
+Translator_def::apply_property_operations (Translator_group*tg)
+{
SCM correct_order = scm_reverse (property_ops_); // pity of the mem.
for (SCM s = correct_order; gh_pair_p (s); s = gh_cdr (s))
{
tg->set_property (gh_car(entry), gh_cadr (entry));
}
}
-
- SCM l1 = trans_list (consists_name_list_, tg);
- SCM l2 =trans_list (end_consists_name_list_,tg);
- l1 = scm_reverse_x (l1, l2);
-
- tg->simple_trans_list_ = l1;
-
- return tg;
}
SCM
this->property_ops_);
}
+/*
+ Default child context as a SCM string, or something else if there is
+ none.
+*/
+SCM
+Translator_def::default_child_context_name ()
+{
+ SCM d = accepts_name_list_;
+ return gh_pair_p (d) ? gh_car (scm_last_pair (d)) : SCM_EOL;
+}
Translator_group::~Translator_group ()
{
-
- //assert (removable_b());
+ assert (removable_b());
}
bool
Translator_group::is_bottom_translator_b () const
{
- return unsmob_translator_def (definition_)->accepts_name_list_ == SCM_EOL;
+ return !gh_string_p (unsmob_translator_def (definition_)->default_child_context_name ());
+
}
Translator_group*
{
if (!is_bottom_translator_b ())
{
- SCM nm = unsmob_translator_def (definition_)->accepts_name_list_;
- SCM st = output_def_l ()->find_translator_l (gh_car (nm));
+ SCM nm = unsmob_translator_def (definition_)->default_child_context_name ();
+ SCM st = output_def_l ()->find_translator_l (nm);
Translator_def *t = unsmob_translator_def (st);
if (!t)
void
Translator_group::do_add_processing ()
{
+ unsmob_translator_def (definition_)->apply_property_operations (this);
for (SCM s = simple_trans_list_; gh_pair_p (s) ; s = gh_cdr (s))
{
Translator * t = unsmob_translator (gh_car (s));
void
Tuplet_spanner::set_interface (Score_element*me)
{
- me-> set_elt_property ("beams", SCM_EOL);
- me->set_elt_property ("columns", SCM_EOL);
}
/*
void
Volta_spanner::set_interface (Score_element*me)
{
- me->set_elt_property ("bars", SCM_EOL);
Side_position::set_axis (me, Y_AXIS);
Directional_element_interface::set (me, UP);
}
)
basicDynamicLineSpannerProperties = #`(
- (interfaces . (dynamic-interface axis-group-interface))
+ (interfaces . (dynamic-interface axis-group-interface side-position-interface))
(axes . ( 1))
(padding . 3)
(minimum-space . 6)
(name . "lyric syllable")
)
basicMarkProperties = #`(
- (interfaces . (mark-interface))
+ (interfaces . (mark-interface side-position-interface))
(molecule-callback . ,Text_item::brew_molecule)
(breakable . #t)
(visibility-lambda . ,end-of-line-invisible)
)
basicNoteHeadProperties = #`(
(interfaces . (note-head-interface rhythmic-head-interface))
+ (style . default)
(molecule-callback . ,Note_head::brew_molecule)
(name . "note head")
)
)
basicScriptProperties = #`(
(molecule-callback . ,Script::brew_molecule)
- (interfaces . (script-interface))
+ (interfaces . (script-interface side-position-interface))
(name . "script")
)
basicScriptColumnProperties = #`(
basicTextScriptProperties = #`(
(molecule-callback . ,Text_item::brew_molecule)
(no-spacing-rods . #t)
- (interfaces . (text-script-interface text-item-interface))
+ (interfaces . (text-script-interface text-item-interface side-position-interface))
(padding . 3.0)
(name . "text script")
)
(name . "separation spanner")
)
basicSustainPedalProperties = #`(
- (interfaces . (sustain-pedal-interface))
+ (interfaces . (sustain-pedal-interface side-position-interface))
(no-spacing-rods . #t)
(molecule-callback . ,Sustain_pedal::brew_molecule)
(self-alignment-X . 0)
(self-alignment-X . 0)
(name . "una chorda pedal")
)
-
+
basicVoltaSpannerProperties = #`(
(molecule-callback . ,Volta_spanner::brew_molecule)
(interfaces . (volta-spanner-interface side-position-interface))
--- /dev/null
+% legal.ly
+
+hsize = 8.5 \in;
+vsize = 14.0 \in;
sheet music using a high level description file as input. LilyPond is
part of the GNU Project.
-
%package documentation
Summary: Prebuilt website containing all LilyPond documentation.
Group: Applications/Publishing
%description documentation
-
The documentation of LilyPond, both in HTML and PostScript.
%prep
%doc mudela-mode.el
%ifnos cygwin
+%{_prefix}/bin/abc2ly
%{_prefix}/bin/etf2ly
%{_prefix}/bin/musedata2ly
%{_prefix}/bin/pmx2ly
Begin3
Title: LilyPond
-Version: 1.3.85
-Entered-date: 08SEP00
+Version: 1.3.86
+Entered-date: 13SEP00
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.85.tar.gz
+ 1000k lilypond-1.3.86.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 1000k lilypond-1.3.85.tar.gz
+ 1000k lilypond-1.3.86.tar.gz
Copying-policy: GPL
End
Name: lilypond
-Version: 1.3.85
+Version: 1.3.86
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.85.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.86.tar.gz
Summary: A program for printing sheet music.
URL: http://www.cs.uu.nl/~hanwen/lilypond
# Icon: lilypond-icon.gif
sheet music using a high level description file as input. LilyPond is
part of the GNU Project.
-
%package documentation
Summary: Prebuilt website containing all LilyPond documentation.
Group: Applications/Publishing
%description documentation
-
The documentation of LilyPond, both in HTML and PostScript.
%prep
%doc mudela-mode.el
%ifnos cygwin
+%{_prefix}/bin/abc2ly
%{_prefix}/bin/etf2ly
%{_prefix}/bin/musedata2ly
%{_prefix}/bin/pmx2ly
#!@PYTHON@
-# TODO: Rewrite this. The control structure is too hairy.
-#
-
# TODO:
-# Should use files in /tmp/ only. This potentially messes with
+#
+# * Rewrite this. The control structure is too hairy.
+# * (c) on page 1
+# * more helpful info on lily crashes
+# * Should use files in /tmp/ only. This potentially messes with
# usergenerated files in the CWD