TOPLEVEL_MAJOR_VERSION = 0
TOPLEVEL_MINOR_VERSION = 0
-TOPLEVEL_PATCH_LEVEL = 63
+TOPLEVEL_PATCH_LEVEL = 64
# use to send patches, always empty for released version:
# include separator: ".postfix", "-pl" makes rpm barf
make all
everything will be compiled, but nothing will be installed. The
-resulting binaries can be found in the subdirectory
-F<bin/>.
+resulting binaries can be found in the subdirectories F<out/> (which
+contain all files generated during compilation).
+
=head1 INSTALLING
should do the trick.
-[todo]
+[todo. Obsolete; fonts are in distribution now.]
Install the musixtex fonts in a directory which TeX and MF knows (if
you are root, look for a directory which contains the directories with
=item *
-Make a which system which fully tweakable. It should be possible to
-typeset a book on how not to typeset music.
+Make a system which is fully tweakable. It should be possible to
+typeset a book on how not to typeset music.
=back
A: See lilyponddefs.tex, it has some comments.
+Q: How do I learn the C++ code?
+
+A: The entry point is in main(). Good luck. :-)
+
+Seriously, read, reread and reread lilygut and CodingStyle, and
+just start anywhere.
Q: Why GPL?
typesetting existing music. This would couple the ASCII language, the
printing engine and the typesetting engine
+LilyPond is currently representing this section.
+
=item *
A GUI for composing. This would combine the display engine, the
</a
>
+=item *
+<a href=gnu-music.html
+>
+The GNU Music project
+</a
+>
+
=item *
<a href=docxx/index.html
>
Get it at ftp://pcnov095.win.tue.nl/pub/lilypond !
-=head1 AUTHOR
-
-Han-Wen Nienhuys <hanwen@stack.nl>, for this page
-
+=item *
<a href=sconstat/stats.html
>
Stats on this page.
</a
>
+
+
+=back
+
+
-2/May/97 LilyPond 0.0.62 1
+16/May/97 LilyPond 0.0.64 1
-2/May/97 LilyPond 0.0.62 2
+16/May/97 LilyPond 0.0.64 2
everything will be compiled, but nothing will be
installed. The resulting binaries can be found in the
- subdirectory _\bb_\bi_\bn_\b/.
+ subdirectories _\bo_\bu_\bt_\b/ (which contain all files generated
+ during compilation).
I\bI\bI\bIN\bN\bN\bNS\bS\bS\bST\bT\bT\bTA\bA\bA\bAL\bL\bL\bLL\bL\bL\bLI\bI\bI\bIN\bN\bN\bNG\bG\bG\bG
If you have done a successful make, then a simple
should do the trick.
- [todo]
+ [todo. Obsolete; fonts are in distribution now.]
Install the musixtex fonts in a directory which TeX and MF
knows (if you are root, look for a directory which
R\bR\bR\bRU\bU\bU\bUN\bN\bN\bNN\bN\bN\bNI\bI\bI\bIN\bN\bN\bNG\bG\bG\bG
GNU LilyPond does use a lot of resources. For operation
- you need the following:
-2/May/97 LilyPond 0.0.62 3
+16/May/97 LilyPond 0.0.64 3
INSTALL(1) LilyPond documentation INSTALL(1)
+ you need the following:
+
+\bo A fast computer (a full page of music typically takes
1 minute on my 486/66, using the -\b-\b-\b--\b-\b-\b-e\be\be\ben\bn\bn\bna\ba\ba\bab\bb\bb\bbl\bl\bl\ble\be\be\be-\b-\b-\b-c\bc\bc\bch\bh\bh\bhe\be\be\bec\bc\bc\bck\bk\bk\bki\bi\bi\bin\bn\bn\bng\bg\bg\bg
compile. It's lot slower than most MusiXTeX
-
-
-2/May/97 LilyPond 0.0.62 4
+16/May/97 LilyPond 0.0.64 4
+pl 64
+ - exe's now built in out/
+ - toplevel Makefile dep from make/Toplevel.make.in
+ - make_website: add version fokoter
+ - make_website: bf dist *.txt
+ - bf: fix loose bars : \meter 4/4; c1.
+ - Staff_elem -> Score_elem
+ - bf <cis cis>
+ - vbrace lookup
+ - stop if barchecks failed
+ - resync barcheck
+
+*******
pl 63
- bf: segfault during MIDI output with mi2mu output.
- kludge: parse error beyond eof
* staccato dot positions.
- * \meter 4/4; c1. doesn't gen bar.
-
* stacked scripts.
- * redo timing stuff <-> pulk to allow \meter 2/4; e2. to work
- out correctly
-
* key transposition.
* help-lines for rests
SMALLISH PROJECTS
+ * Help_line, Help_line_reg
+
* --fast/--draft: leave out constraints
* write Dynamic_line (to group dynamics horizontally)
* cleanup lily-proto.hh and proto.hh
* half-sharps, half-flats
-
- * resync barcheck.
+ * adaptive accidental spacing.
+
+ * score_elem invible_b_ flag
+
* key undo
* unix style paths for LILYINCLUDE env
#
+EXECUTABLES=convert-mudela
localinstall: all
$(INSTALL) -d $(bindir)
$(INSTALL) -m 755 convert-mudela $(bindir)
#!/usr/bin/perl -w
-
+# stupid script to generate WWW site.
use FileHandle;
+my $lily_version;
+my $footstr;
+my $mw_id = "<!make_website!>";
+sub get_version
+{
+ my ($vstr)=("");
+ open V, "$depth/.version";
+ while (<V>) {
+ s/#.*$//g;
+ next if (/^ *$/);
+ s/^/\$/;
+ s/= *(.*)$/=\"$1\";/;
+ $vstr .= $_;
+ }
+ eval ($vstr);
+
+ $lily_version= "$TOPLEVEL_MAJOR_VERSION.$TOPLEVEL_MINOR_VERSION.$TOPLEVEL_PATCH_LEVEL$TOPLEVEL_MY_PATCH_LEVEL";
+
+ # stupid checks.
+ $lily_version= "$TOPLEVEL_MAJOR_VERSION.$TOPLEVEL_MINOR_VERSION.$TOPLEVEL_PATCH_LEVEL$TOPLEVEL_MY_PATCH_LEVEL";
+
+
+ close V;
+}
+
+sub set_html_footer
+{
+ my $MAILADRESS=$ENV{MAILADRESS};
+ my @pw=(getpwuid($<));
+ my $username=$pw[6];
+
+ $footstr =
+ "\n<hr>
+<font size=-2>
+This page was generated by <code>make_website</code> from lilypond-$lily_version by
+<p>
+<address><br>$username <a href=mailto:$MAILADRESS><<!bla>$MAILADRESS</a>></address>
+<p>" . `date` . "
+<p></font>\n";
+}
+
# do something, check return status
sub my_system
{
my (@cmds) = @_;
foreach $cmd (@cmds) {
- my $ret = ( system ($cmd))/256;
+ my $ret = ( system ($cmd));
if ($ret) {
print STDERR "\nmake_website: failed on command \`$cmd\' (status $ret)\n";
exit 2;
{
print "generating HTML list\n";
open HTMLLIST, ">example_output.html";
- print HTMLLIST "<title>LilyPond examples</title>\n";
+ print HTMLLIST "<html><body><title>LilyPond examples</title>\n";
foreach $a (@examples) {
$name=$a;
print HTMLLIST "<h1>example file: $name</h1>\n<XMP>\n";
if ( -f $midif );
print HTMLLIST "</ul>";
}
+ print HTMLLIST "</BODY></HTML>";
close HTMLLIST;
}
+
+sub edit_html
+{
+ print STDERR "adding footer\n";
+
+ OUTER:
+ foreach $a (<*.html>) {
+ open H, "$a";
+ my $sep="</BODY>";
+ input_record_separator H $sep;
+ my $file="";
+
+ while (<H>) {
+ if (/$mw_id/) {
+ close H;
+ next OUTER;
+ }
+ $file .= $_;
+
+ }
+ close H;
+
+
+ $file =~ s/$sep/$footstr$sep/g ;
+
+ open H, ">$a";
+ print H $mw_id;
+ print H $file;
+ close H;
+ }
+}
sub copy_files
{
print "copying files\n";
my_system "make -C $depth doc++";
}
-sub
- do_tar
+sub do_tar
{
print "tarring.\n";
my_system
- " tar vhcf website.tar *.html *.gif *.ps.gz *.ly.txt *.midi docxx/*;",
+ " tar vhcf website.tar *.html *.gif *.ps.gz *.txt *.midi docxx/*;",
"gzip -f9 website.tar;";
}
-$depth = "../../";
-$ENV{"TEXINPUTS"} .= ":$depth/input/:";
-$ENV{"LILYINCLUDE"} = "$depth/input/";
-my $cwd;
-chomp($cwd = `pwd`);
+sub main
+{
+ $depth = "../";
+ my $cwd;
+ chomp($cwd = `pwd`);
+ die "need to be in directory Documentation\n" if ( ! ($cwd =~ /Documentation$/));
+ get_version;
+ set_html_footer;
+
-die "need to be in directory Documentation\n" if ( ! ($cwd =~ /Documentation$/));
-chdir ("out");
+ $depth = "../../";
+ chdir ("out");
+ $ENV{"TEXINPUTS"} .= ":$depth/input/:";
+ $ENV{"LILYINCLUDE"} = "$depth/input/";
-gen_html;
-gen_examples;
-gen_list;
-copy_files;
-docxx_update;
-do_tar;
+
+ gen_html;
+ gen_examples;
+ gen_list;
+ copy_files;
+ edit_html;
+ docxx_update;
+ do_tar;
+}
+main;
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "make/out/Configure_variables.make:make/Configure_variables.make.in
- Makefile:make/Toplevel.make.in
- " | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "make/out/Configure_variables.make:make/Configure_variables.make.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"make/out/Configure_variables.make:make/Configure_variables.make.in
- Makefile:make/Toplevel.make.in
- "}
+CONFIG_FILES=\${CONFIG_FILES-"make/out/Configure_variables.make:make/Configure_variables.make.in"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
eval "DIR_DATADIR=$datadir"
DIR_DATADIR="$DIR_DATADIR/lilypond"
echo $ac_n "checking ""... $ac_c" 1>&6
-echo "configure:1634: checking " >&5
+echo "configure:1630: checking " >&5
cat << EOF > lib/out/config.hh
AC_CHECK_HEADER(FlexLexer.h, true,
AC_MSG_WARN(can't find flex header. Please install Flex headers correctly))
AC_CONFIG_SUBDIRS(flower)
-AC_OUTPUT(make/out/Configure_variables.make:make/Configure_variables.make.in
- Makefile:make/Toplevel.make.in
- )
+AC_OUTPUT(make/out/Configure_variables.make:make/Configure_variables.make.in)
MAJOR_VERSION = 1
MINOR_VERSION = 1
-PATCH_LEVEL = 16
+PATCH_LEVEL = 17
# use to send patches, always empty for released version:
MY_PATCH_LEVEL = # include separator: "-1" or ".a"
#
version 1.1:
+pl 17
+ - naming: Pointer->Link, IPointer->Pointer
pl 16
- Array::get()
- P< > doco.
# main target of this module:
#
-MAINTARGET = $(lily_bindir)/$(EXECUTABLE)# huh?
BUILDSTRINGTEST=$(MAINTARGET)
EXECSTRINGTEST=$(EXECUTABLE)
copyright:public domain
Tested Features: multiple meters, beaming
+ unsynced bars
EndMudelaHeader
%}
\version "0.0.57";
another = \staff {
melodicregs
\melodic{ \meter 4/4;
- c1 c1 c1 c4 c4 c4 c4 \meter 4/4; c1 c1 c1
+ c1. c1. c4 c4 c4 c4 \meter 4/4; c1 c1 c1
}
}
another
yanother
+ \midi { }
\paper{
\unitspace 2\cm
\geometric 1.3
#include "rational.hh"
class String;
typedef Rational Moment;
+void print(Moment);
#endif //
struct Subtle_req;
struct Staff;
struct Staff_column;
-struct Staff_elem;
-struct Staff_elem_info;
struct Staff_symbol;
struct Staff_walker;
struct Stem;
--- /dev/null
+#include <iostream.h>
+#include "string.hh"
+#include "moment.hh"
+
+void
+print(Moment m)
+{
+ cout << String(m) << flush;
+}
+
+
MAJOR_VERSION = 0
MINOR_VERSION = 0
-PATCH_LEVEL = 63
+PATCH_LEVEL = 64
# use to send patches, always empty for released version:
# include separator: ".postfix", "-pl" makes rpm barf
# main target of this module:
#
-MAINTARGET = $(lily_bindir)/$(EXECUTABLE)# huh?
-
-default: $(MAINTARGET)
+default: $(EXECUTABLE)
#
# generic targets and rules:
localclean:
rm -f $(outdir)/parser.* $(outdir)/lexer.cc
+
+#should merge with mi2mu rule
+localinstall: installexe
+
+localuninstall: uninstallexe
}
if (bar_p_){
- announce_element(Staff_elem_info(bar_p_, bar_req_l_) );
+ announce_element(Score_elem_info(bar_p_, bar_req_l_) );
}
}
c_l->error("unknown clef type ");
}
void
-Clef_register::acknowledge_element(Staff_elem_info info)
+Clef_register::acknowledge_element(Score_elem_info info)
{
if (info.elem_l_->name() == Bar::static_name()) {
if (!clef_p_){
{
clef_p_ = new Clef_item;
clef_p_->read(*this);
- announce_element(Staff_elem_info(clef_p_,
+ announce_element(Score_elem_info(clef_p_,
clef_req_l_));
}
#include "collision.hh"
void
-Collision_register::acknowledge_element(Staff_elem_info i)
+Collision_register::acknowledge_element(Score_elem_info i)
{
if (!(i.elem_l_->name() == Note_column::static_name()))
return;
if (!col_p_)
col_p_ = new Collision;
- col_p_->add((Note_column*)i.elem_l_);
+ col_p_->add((Note_column*)i.elem_l_->item());
}
void
}
void
-Complex_walker::typeset_element(Staff_elem *elem_p)
+Complex_walker::typeset_element(Score_elem *elem_p)
{
if (!elem_p)
return;
assert (!dynamic_p_) ; // TODO
dynamic_p_ = new Text_item(td_p);
- announce_element(Staff_elem_info(dynamic_p_, dreq_l));
+ announce_element(Score_elem_info(dynamic_p_, dreq_l));
} else if (dreq_l->span_dynamic()) {
Span_dynamic_req* span_l = dreq_l->span_dynamic();
assert(!new_cresc_p);
new_cresc_p = new Crescendo;
new_cresc_p->grow_dir_i_ = span_l->dynamic_dir_i_;
- announce_element(Staff_elem_info(new_cresc_p, span_l));
+ announce_element(Score_elem_info(new_cresc_p, span_l));
}
}
}
delete cresc_p_;
}
void
-Dynamic_register::acknowledge_element(Staff_elem_info i)
+Dynamic_register::acknowledge_element(Score_elem_info i)
{
if (i.elem_l_->name() == Note_column::static_name()) {
if (dynamic_p_) dynamic_p_->add_support(i.elem_l_);
6 * paper()->internote()));
}
- Staff_elem_info itinf(note_p_,note_req_l_);
+ Score_elem_info itinf(note_p_,note_req_l_);
announce_element(itinf);
}
virtual void pre_move_processing();
virtual void post_move_processing();
virtual bool try_request(Request*);
- virtual void acknowledge_element(Staff_elem_info);
+ virtual void acknowledge_element(Score_elem_info);
public:
int c0_position_i_;
String clef_type_str_;
Collision* col_p_;
protected:
- virtual void acknowledge_element(Staff_elem_info);
+ virtual void acknowledge_element(Score_elem_info);
virtual void pre_move_processing();
public:
Collision_register();
/* *************** */
void regs_process_requests();
- void typeset_element(Staff_elem *elem_p);
- void announce_element(Staff_elem_info);
+ void typeset_element(Score_elem *elem_p);
+ void announce_element(Score_elem_info);
virtual void process_requests();
virtual void do_post_move();
virtual void do_pre_move();
~Dynamic_register();
NAME_MEMBERS(Dynamic_register);
protected:
- virtual void acknowledge_element(Staff_elem_info);
+ virtual void acknowledge_element(Score_elem_info);
virtual bool try_request(Request *req_l);
virtual void process_requests();
virtual void pre_move_processing();
spacing calculation.
*/
-class Item : public Staff_elem {
+class Item : public virtual Score_elem {
public:
/// indirection to the column it is in
PCol * pcol_l_;
virtual void process_requests();
virtual void pre_move_processing();
virtual void post_move_processing();
- virtual void acknowledge_element(Staff_elem_info);
+ virtual void acknowledge_element(Score_elem_info);
Key_register();
NAME_MEMBERS(Key_register);
private:
struct Rest_req;
struct Rhythmic_grouping_req;
struct Rhythmic_req;
+struct Score_elem;
+struct Score_elem_info;
struct Script_req;
struct Skip_req;
struct Slur_req;
struct Rest_column;
struct Rest_collision_register;
struct Rest_collision;
+struct Vertical_spanner;
+struct Vertical_brace;
#endif // LILY_PROTO_HH
#include "varray.hh"
struct Local_acc {
- int name , acc, octave;
+ int name_i_;
+ int accidental_i_;
+ int octave_i_;
static int compare(Local_acc&, Local_acc&);
};
Link_array<Item *> tied_l_arr_;
/* *************** */
virtual void process_requests();
- virtual void acknowledge_element(Staff_elem_info);
+ virtual void acknowledge_element(Score_elem_info);
virtual void pre_move_processing();
Local_key_register();
NAME_MEMBERS(Local_key_register);
*/
Symbol streepjes(int pos)const;
+ Symbol vbrace(Real &dy) const;
Symbol meter(Array<Scalar>)const;
Symbol stem(Real y1_pos, Real y2_pos)const;
Symbol rule_symbol(Real height, Real width)const;
int dir_i_;
/* *************** */
- bool acceptable_elem_b(Staff_elem const*)const;
+ bool acceptable_elem_b(Score_elem const*)const;
protected:
virtual void set_feature(Feature);
- virtual void acknowledge_element(Staff_elem_info);
+ virtual void acknowledge_element(Score_elem_info);
virtual void pre_move_processing();
virtual void post_move_processing();
public:
#include "colhpos.hh"
#include "varray.hh"
+#include "lily-proto.hh"
#include "p-col.hh"
#include "p-staff.hh"
/// broken spanners
Pointer_list<Spanner*> broken_spans;
+ Pointer_list<Vertical_spanner*> vspan_p_list_;
/* *************** */
/* CONSTRUCTION */
/**
Align requests with starting time.
- */
+
+ To our foreign readers "pulk"ing is what you do with the stuff in
+ your nose to get it out. (and I don't mean blowing) */
class Pulk_voice
{
PCursor<Voice_element*> cur_;
bool ok()const { return cur_.ok() ; }
Pulk_voice(Voice*, int staff_idx);
+
+ /**
+ Get the requests at when(), and advance.
+ */
Array<Request*> get_req_l_arr();
};
#ifndef PULK_VOICES_HH
#define PULK_VOICES_HH
+
#include "pqueue.hh"
#include "plist.hh"
#include "moment.hh"
#include "proto.hh"
#include "lily-proto.hh"
#include "voice.hh"
-
+#include "time-description.hh"
struct Voice_l {
PQueue< Voice_l > voice_pq_;
Pointer_list< Pulk_voice * > pulk_p_list_;
Link_list<Staff *> staff_l_list_;
+ Array < Time_description > time_arr_;
Moment next_mom_;
public:
Moment last_;
+ bool time_checks_failed_b() const;
bool ok() const;
- Moment next_mom() { return next_mom_; }
+ Moment next_mom() const;
Pulk_voices(Link_list<Staff*> const&);
void get_aligned_request(Request_column *col_l );
};
virtual void sync_features() ;
virtual void pre_move_processing();
virtual void post_move_processing();
- virtual void acknowledge_element(Staff_elem_info info);
+ virtual void acknowledge_element(Score_elem_info info);
virtual bool try_request(Request*);
virtual void process_requests();
virtual ~Register_group_register();
#include "staff-info.hh"
/**
- a struct which processes requests, and creates the #Staff_elem#s.
+ a struct which processes requests, and creates the #Score_elem#s.
It may use derived classes. Hungarian postfix: register
*/
class Request_register {
/**
Invoke walker method to typeset element. Default: pass on to daddy.
*/
- virtual void typeset_element(Staff_elem*elem_p);
+ virtual void typeset_element(Score_elem*elem_p);
/**
take note of item/spanner
Default: ignore the info
*/
- virtual void acknowledge_element(Staff_elem_info) {}
+ virtual void acknowledge_element(Score_elem_info) {}
/**
Announce element. Default: pass on to daddy. Utility
*/
- virtual void announce_element(Staff_elem_info);
+ virtual void announce_element(Score_elem_info);
/**
Set Feature of the register(s). Default: ignore Feature.
*/
bool used_b()const;
Moment when();
void add_reqs(int staff_idx, Array<Request*> const&);
+ void update_time(int staff_idx, Time_description &);
void set_score_cols(Score_column*, Score_column*);
};
Rest_collision* rest_collision_p_;
Array< Collision *> collision_l_arr_;
protected:
- virtual void acknowledge_element(Staff_elem_info);
+ virtual void acknowledge_element(Score_elem_info);
virtual void pre_move_processing();
public:
Rest_collision_register();
Array<Script_req *> script_req_l_arr_;
/* *************** */
- bool acceptable_elem_b(Staff_elem*);
+ bool acceptable_elem_b(Score_elem*);
public:
NAME_MEMBERS(Script_register);
Script_register();
protected:
virtual bool try_request(Request*);
virtual void process_requests();
- virtual void acknowledge_element(Staff_elem_info);
+ virtual void acknowledge_element(Score_elem_info);
virtual void pre_move_processing();
virtual void post_move_processing();
virtual void set_feature(Feature);
virtual bool acceptable_request_b(Request*);
virtual void process_requests();
- virtual void acknowledge_element(Staff_elem_info);
+ virtual void acknowledge_element(Score_elem_info);
virtual void pre_move_processing();
virtual void post_move_processing();
public:
length of stems of notes they encompass.
*/
-class Spanner:public Staff_elem {
+class Spanner:public virtual Score_elem {
public:
PCol *left_col_l_, *right_col_l_;
void add_reqs (Array<Request*> req_l_arr);
void OK() const;
~Staff_column();
+ void update_time(Time_description&, Rhythmic_grouping*);
void typeset_breakable_items(Array<Item *> &pre_p_arr,
Array<Item *> &nobreak_p_arr,
Array<Item *> &post_p_arr);
/*
- staff-elem-info.hh -- declare Staff_elem_info
+ staff-elem-info.hh -- declare Score_elem_info
source file of the LilyPond music typesetter
#define STAFFELEMINFO_HH
#include "scalar.hh"
-#include "proto.hh"
+#include "lily-proto.hh"
#include "varray.hh"
/// data container.
-struct Staff_elem_info {
- Staff_elem * elem_l_;
+struct Score_elem_info {
+ Score_elem * elem_l_;
Request*req_l_;
Voice const * voice_l_;
Array<Request_register*> origin_reg_l_arr_;
/* *** */
- Staff_elem_info(Staff_elem*, Request*);
- Staff_elem_info();
+ Score_elem_info(Score_elem*, Request*);
+ Score_elem_info();
};
#include "class-name.hh"
-/** Both Spanner and Item are Staff_elem's. Most Staff_elem's depend
- on other Staff_elem's, eg, Beam needs to know and set direction of
+/** Both Spanner and Item are Score_elem's. Most Score_elem's depend
+ on other Score_elem's, eg, Beam needs to know and set direction of
Stem. So the Beam has to be calculated *before* Stem. This is
- accomplished with the dependencies field of struct Staff_elem.
+ accomplished with the dependencies field of struct Score_elem.
(elem)
*/
-class Staff_elem {
+class Score_elem {
/// member: the symbols
Molecule *output; // should scrap, and use temp var?
NULL.
*/
Offset offset_;
- Array<Staff_elem*> dependancy_l_arr_;
+ Array<Score_elem*> dependancy_l_arr_;
public:
enum Status {
ORPHAN, // not yet added to pstaff
PRECALCED, // calcs before spacing done
POSTCALCING, // busy calculating. This is used to trap cyclic deps.
POSTCALCED, // after spacing calcs done
+ VERTICALCING, // height determined
+ VERTICALCED,
OUTPUT, // molecule has been output
DELETED, // to catch malloc mistakes.
} status;
PStaff *pstaff_l_;
/* *************** */
- Staff_elem(Staff_elem const&);
+ Score_elem(Score_elem const&);
String TeXstring () const ;
virtual void print() const;
virtual Interval width() const;
virtual Interval height() const;
Paper_def *paper() const;
- virtual ~Staff_elem();
- Staff_elem();
- NAME_MEMBERS(Staff_elem);
+ virtual ~Score_elem();
+ Score_elem();
+ NAME_MEMBERS(Score_elem);
/**
translate the symbol. The symbol does not have to be created yet.
/**
add a dependency. It may be the 0 pointer, in which case, it is ignored.
*/
- void add_dependency(Staff_elem* );
- void substitute_dependency(Staff_elem* old, Staff_elem * newdep);
+ void add_dependency(Score_elem* );
+ void substitute_dependency(Score_elem* old, Score_elem * newdep);
protected:
virtual Interval do_height()const;
/// do calculations after determining horizontal spacing
virtual void do_post_processing();
- Array<Staff_elem*> dependant_l_arr_;
+ /// do calculations after height of spanners/items is determined.
+ virtual void do_verticalcing();
+ Array<Score_elem*> dependant_l_arr_;
};
virtual bool try_request(Request * r);
virtual Staff_info get_staff_info();
virtual bool acceptable_request_b(Request*) const ;
- virtual void acknowledge_element(Staff_elem_info);
+ virtual void acknowledge_element(Score_elem_info);
public:
/* *************** */
/// A symbol which sits along the staff
class Staff_side {
- Array<Staff_elem*> support_l_arr_;
+ Array<Score_elem*> support_l_arr_;
int staff_size_i_;
- Staff_elem * elem_l_;
+ Score_elem * elem_l_;
Interval support_height()const;
Staff_symbol* staff_sym_l_;
void read_staff_sym();
void set_staffsym(Staff_symbol*);
- Staff_side(Staff_elem*);
- void add_support(Staff_elem*);
+ Staff_side(Score_elem*);
+ void add_support(Score_elem*);
protected:
int get_position_i()const;
/*
- staffeleminfo.hh -- declare Staff_elem_info
+ staffeleminfo.hh -- declare Score_elem_info
source file of the LilyPond music typesetter
#include "proto.hh"
/// data container.
-struct Staff_elem_info {
- Staff_elem * elem_p_;
+struct Score_elem_info {
+ Score_elem * elem_p_;
Request*req_l_;
Voice const * voice_l_;
Voice_group_registers * group_regs_l_;
Request_register * origin_reg_l_;
/* *** */
- Staff_elem_info(Staff_elem*, Request*, Request_register*);
- Staff_elem_info();
+ Score_elem_info(Score_elem*, Request*, Request_register*);
+ Score_elem_info();
};
#endif // STAFFELEMINFO_HH
virtual void set_feature(Feature dir_i_);
virtual bool try_request(Request*);
virtual void process_requests();
- virtual void acknowledge_element(Staff_elem_info);
+ virtual void acknowledge_element(Score_elem_info);
virtual void pre_move_processing();
virtual void post_move_processing();
};
virtual void process_requests();
virtual void pre_move_processing();
virtual void post_move_processing();
- virtual void acknowledge_element(Staff_elem_info);
+ virtual void acknowledge_element(Score_elem_info);
public:
Text_register();
NAME_MEMBERS(Text_register);
protected:
virtual ~Tie_register();
- virtual void acknowledge_element(Staff_elem_info);
+ virtual void acknowledge_element(Score_elem_info);
virtual bool try_request(Request*);
virtual bool acceptable_request_b(Request*);
virtual void sync_features();
#define tdes_HH
#include "moment.hh"
+#include "lily-proto.hh"
+#include "varray.hh"
/// full info on where we are
struct Time_description {
Moment when_;
+ /// found an error so far?
+ bool error_b_ ;
+
/// if true, no bars needed, no reduction of whole_in_measure
bool cadenza_b_;
void print() const;
void setpartial(Moment p);
String try_set_partial_str(Moment)const;
- Moment barleft();
+ Moment barleft()const;
+ Moment next_bar_moment()const;
void set_meter(int,int);
static int compare (const Time_description&, const Time_description&);
};
instantiate_compare(Time_description&,Time_description::compare);
+
+void
+process_timing_reqs(Time_description &time_,
+ Rhythmic_grouping *default_grouping,
+ Array<Timing_req*> const& timing_req_l_arr);
#endif // Time_description_HH
--- /dev/null
+/*
+ vertical-brace.hh -- declare
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef VERTICAL_BRACE_HH
+#define VERTICAL_BRACE_HH
+
+#include "vertical-spanner.hh"
+
+class Vertical_brace : public Vertical_spanner {
+public:
+
+};
+
+#endif // VERTICAL_BRACE_HH
--- /dev/null
+/*
+ vertical-spanner.hh -- declare Vertical_spanner
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef VERTICAL_SPANNER_HH
+#define VERTICAL_SPANNER_HH
+
+#include "staff-elem.hh"
+
+class Vertical_spanner: virtual public Score_elem {
+public:
+ PStaff *lower_pstaff_l_;
+ PStaff *upper_pstaff_l_;
+ NAME_MEMBERS(Vertical_spanner);
+
+ Vertical_spanner();
+
+};
+#endif // VERTICAL_SPANNER_HH
protected:
virtual void pre_move_processing();
virtual bool acceptable_request_b(Request*);
- virtual void acknowledge_element(Staff_elem_info info);
+ virtual void acknowledge_element(Score_elem_info info);
virtual bool try_request(Request*);
virtual void do_print() const;
};
Array<Item*> prebreak_item_p_arr_;
Array<Item*> nobreak_item_p_arr_;
Array<Item*> postbreak_item_p_arr_;
- Array<Staff_elem_info> announce_info_arr_;
+ Array<Score_elem_info> announce_info_arr_;
Complex_walker * walk_l_;
/* *************** */
- void typeset_musical_item(Staff_elem * elem_p);
+ void typeset_musical_item(Score_elem * elem_p);
Walker_registers(Complex_walker*);
void do_announces();
virtual Staff_info get_staff_info();
- virtual void announce_element(Staff_elem_info);
- virtual void acknowledge_element(Staff_elem_info);
+ virtual void announce_element(Score_elem_info);
+ virtual void acknowledge_element(Score_elem_info);
virtual void typeset_breakable_item(Item * pre_p , Item * nobreak_p, Item * post_p);
- virtual void typeset_element(Staff_elem*elem_p);
+ virtual void typeset_element(Score_elem*elem_p);
virtual void pre_move_processing();
virtual void post_move_processing();
virtual Paper_def * paper() const;
}
void
-Key_register::acknowledge_element(Staff_elem_info info)
+Key_register::acknowledge_element(Score_elem_info info)
{
Command_req * r_l = info.req_l_->command() ;
if (r_l && r_l->clefchange()) {
else
kit_p_ = new Key_item(c0_i);
kit_p_->read(*this);
- announce_element(Staff_elem_info(kit_p_, keyreq_l_));
+ announce_element(Score_elem_info(kit_p_, keyreq_l_));
}
void
+/*
+ local-key-item.cc -- implement Local_key_item, Local_acc
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
#include "local-key-item.hh"
#include "molecule.hh"
#include "scalar.hh"
{
add(m_l->octave_i_, m_l->notename_i_, m_l->accidental_i_);
}
+
void
Local_key_item::add (int o, int p , int a)
{
Local_acc l;
- l.octave = o;
- l.name = p;
- l.acc = a;
+ l.octave_i_ = o;
+ l.name_i_ = p;
+ l.accidental_i_ = a;
+ for (int i=0; i< accs.size(); i++)
+ if (!Local_acc::compare(l, accs[i]))
+ return;
+
accs.push(l);
}
int lastoct = -100;
for (int i = 0; i < accs.size(); i++) {
// do one octave
- if (accs[i].octave != lastoct) {
+ if (accs[i].octave_i_ != lastoct) {
if (octmol){
Real dy =lastoct*7*paper()->internote();
octmol->translate(Offset(0, dy));
}
octmol= new Molecule;
}
- lastoct = accs[i].octave;
- Symbol s =paper()->lookup_l()->accidental(accs[i].acc);
+ lastoct = accs[i].octave_i_;
+ Symbol s =paper()->lookup_l()->accidental(accs[i].accidental_i_);
Atom a(s);
- Real dy = (accs[i].name + c0_position) * paper()->internote();
+ Real dy = (accs[i].name_i_ + c0_position) * paper()->internote();
a.translate(Offset(0,dy));
octmol->add_right(a);
int
Local_acc::compare(Local_acc&a, Local_acc&b)
{
- if (a.octave - b.octave)
- return a.octave - b.octave;
- if (a.name - b.name)
- return a.name - b.name;
+ if (a.octave_i_ - b.octave_i_)
+ return a.octave_i_ - b.octave_i_;
+ if (a.name_i_ - b.name_i_)
+ return a.name_i_ - b.name_i_;
- assert(false);
+ return a.accidental_i_ - b.accidental_i_;
};
IMPLEMENT_STATIC_NAME(Local_key_item);
Item * support_l = support_l_arr_[i];
Note_req * note_l = mel_l_arr_[i];
- if (tied_l_arr_.find_l(support_l) && !forced_l_arr_.find_l(support_l))
+ if (tied_l_arr_.find_l(support_l) &&
+ !forced_l_arr_.find_l(support_l))
continue;
if (!key_item_p)
}
void
-Local_key_register::acknowledge_element(Staff_elem_info info)
+Local_key_register::acknowledge_element(Score_elem_info info)
{
- Staff_elem * elem_l = info.elem_l_;
+ Score_elem * elem_l = info.elem_l_;
if (info.req_l_->note()) {
Note_req * note_l = info.req_l_->note();
Item * item_l = info.elem_l_->item();
(Key_register*)info.origin_reg_l_arr_[0];
key_C_ = &key_reg_l->key_;
} else if (elem_l->name() == Tie::static_name()) {
- Tie * tie_l = (Tie*)elem_l;
+ Tie * tie_l = (Tie*)elem_l->spanner();
if (tie_l->same_pitch_b_)
tied_l_arr_.push(tie_l-> right_head_l_ );
}
s.tex = substitute_args(src,a);
return s;
}
+
+Symbol
+Lookup::vbrace(Real &y) const
+{
+ if (y < 2* 20 PT) {
+ warning ( "piano brace too small (" + print_dimen(y)+ ")");
+ y = 2*20 PT;
+ }
+ if (y > 67 * 2 PT) {
+ warning ( "piano brace too big (" + print_dimen(y)+ ")");
+ y = 67 *2 PT;
+ }
+
+ int idx = (y/2.0 - 20 ) + 148;
+
+ Symbol s = (*symtables_)("param")->lookup("brace");
+
+ Array<String> a;
+ a.push(idx);
+ s.tex = substitute_args(s.tex,a);
+ s.dim.y = Interval(0,y);
+ return s;
+}
}
if (meter_p_)
- announce_element(Staff_elem_info(meter_p_, meter_req_l_) );
+ announce_element(Score_elem_info(meter_p_, meter_req_l_) );
}
void
#include "rest-column.hh"
bool
-Note_column_register::acceptable_elem_b(Staff_elem const*elem_C)const
+Note_column_register::acceptable_elem_b(Score_elem const*elem_C)const
{
char const*nC = elem_C->name();
return (nC == Script::static_name() || nC == Notehead::static_name()
{
if (!ncol_p_){
ncol_p_ = new Note_column;
- announce_element(Staff_elem_info(ncol_p_, 0));
+ announce_element(Score_elem_info(ncol_p_, 0));
}
return ncol_p_;
}
{
if (!restcol_p_) {
restcol_p_ = new Rest_column;
- announce_element(Staff_elem_info(restcol_p_,0));
+ announce_element(Score_elem_info(restcol_p_,0));
}
return restcol_p_;
}
void
-Note_column_register::acknowledge_element(Staff_elem_info i)
+Note_column_register::acknowledge_element(Score_elem_info i)
{
if (!acceptable_elem_b(i.elem_l_))
return;
char const*nC = i.elem_l_->name();
if (nC == Script::static_name()) {
- script_l_arr_.push((Script*)i.elem_l_);
+ script_l_arr_.push((Script*)i.elem_l_->item());
} else if (nC == Notehead::static_name()) {
- Notehead * h_l = (Notehead*)i.elem_l_;
+ Notehead * h_l = (Notehead*)i.elem_l_->item();
if (h_l->rest_b_)
rest_col_l()->add(h_l);
else
note_col_l()->add(h_l);
}
else if (nC == Stem::static_name()){
- stem_l_ = (Stem*)i.elem_l_;
+ stem_l_ = (Stem*)i.elem_l_->item();
}
}
last_ = last_ >? staff_last;
}
next_mom_ = voice_pq_.front().l_->start_;
-
+ time_arr_.set_size(staff_i);
if (last_ != min_staff_last_mom)
warning("Not all staffs end simultaneously");
+
}
void
}
/* hairy. #i# is a cursor which points to Pulk_voice (which a
- cursor, essentially) */
+ cursor, essentially)
+
+
+ At the same time bookkeeping of measures is done.
+ */
Moment new_next_mom = last_;
iter(pulk_p_list_.top() , i);
assert (i->when() >= next_mom_);
if (i->when() == next_mom_) {
col_l->add_reqs(i->staff_idx_, i->get_req_l_arr() );
+ Time_description &t_r = time_arr_[i->staff_idx_];
+ col_l->update_time(i->staff_idx_, t_r);
+
+ if (! t_r.cadenza_b_ && t_r.next_bar_moment() > next_mom_) {
+ mtor << "next bar at: " << t_r.next_bar_moment();
+ new_next_mom = new_next_mom <? t_r.next_bar_moment();
+ }
if (!i->ok()) {
i.del();
continue;
}
}
+ assert( i->when() > next_mom_);
+ /* no need to call i->next(), since this is done automatically */
new_next_mom = new_next_mom <? i->when();
- i++;
+
+ i++;
+
}
if (voice_pq_.size() )
new_next_mom = new_next_mom <? voice_pq_.front().l_->start_;
+
+ for (int j=0; j < time_arr_.size(); j++)
+ time_arr_[j].add( new_next_mom - next_mom_ );
+
+ if (pulk_p_list_.size())
+ assert( new_next_mom > next_mom_);
next_mom_ = new_next_mom;
}
return pulk_p_list_.size() || voice_pq_.size();
}
-int compare(Voice_l const& v1, Voice_l const& v2)
+int
+compare(Voice_l const& v1, Voice_l const& v2)
{
return sign(v1.l_->start_ - v2.l_->start_);
}
+Moment
+Pulk_voices::next_mom()const
+{
+ return next_mom_;
+}
+
+bool
+Pulk_voices::time_checks_failed_b()const
+{
+ bool b = false;
+ for (int i=0; !b && i < time_arr_.size(); i++)
+ b|=time_arr_[i].error_b_;
+ return b;
+}
}
void
-Register_group_register::acknowledge_element(Staff_elem_info info)
+Register_group_register::acknowledge_element(Score_elem_info info)
{
Request_register* origin = info.origin_reg_l_arr_[0];
if (!contains_b(origin) && !origin->contains_b(this)) // am i sure?
}
void
-Request_register::announce_element(Staff_elem_info i)
+Request_register::announce_element(Score_elem_info i)
{
i.origin_reg_l_arr_.push(this);
daddy_reg_l_->announce_element(i);
}
void
-Request_register::typeset_element(Staff_elem*p)
+Request_register::typeset_element(Score_elem*p)
{
daddy_reg_l_->typeset_element(p);
}
b |= command_column_l_->used_b();
return b;
}
+void
+Request_column::update_time(int idx, Time_description&t)
+{
+ staff_col_l_arr_[idx]->update_time(t, 0);
+}
#include "note-column.hh"
void
-Rest_collision_register::acknowledge_element(Staff_elem_info i)
+Rest_collision_register::acknowledge_element(Score_elem_info i)
{
char const * nC = i.elem_l_->name();
if (nC == Collision::static_name()) {
- collision_l_arr_.push((Collision*)i.elem_l_);
+ collision_l_arr_.push((Collision*)i.elem_l_->item());
}
else if (nC == Rest_column ::static_name()) {
if (!rest_collision_p_)
rest_collision_p_ = new Rest_collision;
- rest_collision_p_->add((Rest_column*)i.elem_l_);
+ rest_collision_p_->add((Rest_column*)i.elem_l_->item());
}
}
input_.error("Need to have music in a score.");
}
+ Moment previous_mom = -1;
while (pulk.ok()) {
+
Moment w= pulk.next_mom();
+ assert(w > previous_mom);
Request_column* rcol_p = new Request_column( staffs_ );
Score_column* c1 = new Score_column(w);
rcol_p->set_score_cols(c1, c2);
rcols_.bottom().add(rcol_p);
pulk.get_aligned_request( rcol_p );
+ previous_mom =w;
}
+
+ errorlevel_i_ |= pulk.time_checks_failed_b();
}
void
{
if (!paper_p_)
return;
-
+ if( errorlevel_i_){
+ // should we? hampers debugging.
+ warning("Errors found, /*not processing score*/");
+// return;
+ }
pscore_p_ = new PScore(paper_p_);
do_cols();
Script_req* l=script_req_l_arr_[i];
Script *p =new Script( l);
script_p_arr_.push(p);
- announce_element(Staff_elem_info(p, l));
+ announce_element(Score_elem_info(p, l));
}
}
bool
-Script_register::acceptable_elem_b(Staff_elem*s_l)
+Script_register::acceptable_elem_b(Score_elem*s_l)
{
char const *nC = s_l->name();
return (nC == Stem::static_name());
}
void
-Script_register::acknowledge_element(Staff_elem_info info)
+Script_register::acknowledge_element(Score_elem_info info)
{
- Staff_elem *elem_l = info.elem_l_;
+ Score_elem *elem_l = info.elem_l_;
if (!acceptable_elem_b(elem_l))
return;
for (int i=0; i < script_p_arr_.size(); i++) {
Script*script_l = script_p_arr_[i];
if (elem_l->name() == Stem::static_name())
- script_l->set_stem((Stem*)elem_l);
+ script_l->set_stem((Stem*)elem_l->item());
}
}
}
void
-Slur_register::acknowledge_element(Staff_elem_info info)
+Slur_register::acknowledge_element(Score_elem_info info)
{
if (info.elem_l_->name() == Note_column::static_name()) {
- Note_column *col_l =(Note_column*) info.elem_l_ ;// ugh
+ Note_column *col_l =(Note_column*) info.elem_l_->item() ;// ugh
for (int i = 0; i < slur_l_stack_.size(); i++)
slur_l_stack_[i]->add(col_l );
for (int i = 0; i < end_slur_l_arr_.size(); i++)
Slur * s_p =new Slur;
requests_arr_.push(slur_req_l);
start_slur_l_arr_.push(s_p);
- announce_element(Staff_elem_info(s_p, slur_req_l));
+ announce_element(Score_elem_info(s_p, slur_req_l));
}
}
for (int i=0; i < start_slur_l_arr_.size(); i++)
set_default_dir();
Real inter_f = paper()->internote();
if (encompass_arr_[0]->stem_l_)
- left_pos_i_ = encompass_arr_[0]->stem_l_->height()[dir_i_]/inter_f;
+ left_pos_i_ = rint(encompass_arr_[0]->stem_l_->height()[dir_i_]/inter_f);
else
left_pos_i_ = 0;
if (encompass_arr_.top()->stem_l_)
- right_pos_i_ = encompass_arr_.top()->stem_l_->height()[dir_i_]/inter_f;
+ right_pos_i_ = rint(encompass_arr_.top()->stem_l_->height()[dir_i_]/inter_f);
else
right_pos_i_ = 0;
for (int i=0; i < dependant_l_arr_.size(); i++) {
dependant_l_arr_[i]->
- substitute_dependency((Staff_elem*)this, span_p);
+ substitute_dependency((Score_elem*)this, span_p);
}
span_p->left_col_l_ = c1;
#include "item.hh"
#include "p-col.hh"
#include "request-column.hh"
+#include "grouping.hh"
void
Staff_column::OK() const
{
return req_col_l_->musical_column_l_;
}
+
+void
+Staff_column::update_time(Time_description &time_,
+ Rhythmic_grouping *default_grouping)
+{
+ // first all meter changes
+ for (int i=0; i < timing_req_l_arr_.size(); i++) {
+ Timing_req * tr_l = timing_req_l_arr_[i];
+ if (tr_l->meterchange()) {
+ int b_i=tr_l->meterchange()->beats_i_;
+ int o_i = tr_l->meterchange()->one_beat_i_;
+ if (! time_.allow_meter_change_b() )
+ tr_l->warning("Meter change not allowed here");
+ else{
+ time_.set_meter(b_i, o_i);
+ if (default_grouping)
+ *default_grouping =
+ Rhythmic_grouping(MInterval(0,Moment(b_i, o_i)), b_i);
+ }
+ }
+ }
+
+ // then do the rest
+ for (int i=0; i < timing_req_l_arr_.size(); i++) {
+ Timing_req * tr_l = timing_req_l_arr_[i];
+ if (tr_l->partial()) {
+ Moment m = tr_l->partial()->duration_;
+ String error = time_.try_set_partial_str(m);
+ if (error != "") {
+ tr_l->warning(error);
+ } else
+ time_.setpartial(m);
+ } else if (tr_l->barcheck() && time_.whole_in_measure_) {
+ tr_l ->warning( "Barcheck failed");
+
+ time_.whole_in_measure_ = 0; // resync
+ time_.error_b_ = true;
+ } else if (tr_l->cadenza()) {
+ time_.set_cadenza(tr_l->cadenza()->on_b_);
+ } else if (tr_l->measuregrouping()) {
+ if (default_grouping)
+ *default_grouping = parse_grouping(
+ tr_l->measuregrouping()->beat_i_arr_,
+ tr_l->measuregrouping()->elt_length_arr_);
+ }
+ }
+ time_.OK();
+}
+
/*
- staff-elem-info.cc -- implement Staff_elem_info
+ staff-elem-info.cc -- implement Score_elem_info
source file of the LilyPond music typesetter
#include "staff-elem-info.hh"
#include "request.hh"
-Staff_elem_info::Staff_elem_info(Staff_elem*s_l, Request*r_l)
+Score_elem_info::Score_elem_info(Score_elem*s_l, Request*r_l)
{
elem_l_ = s_l;
voice_l_ = (r_l)?r_l->voice_l():0;
req_l_ = r_l;
}
-Staff_elem_info::Staff_elem_info()
+Score_elem_info::Score_elem_info()
{
elem_l_ = 0;
voice_l_ = 0;
/*
- staff-elem.cc -- implement Staff_elem
+ staff-elem.cc -- implement Score_elem
source file of the LilyPond music typesetter
#include "debug.hh"
String
-Staff_elem::TeXstring() const
+Score_elem::TeXstring() const
{
Molecule m(*output);
m.translate(offset_); // ugh?
return m.TeXstring();
}
-Staff_elem::Staff_elem(Staff_elem const&s)
+Score_elem::Score_elem(Score_elem const&s)
:dependancy_l_arr_(s.dependancy_l_arr_),
dependant_l_arr_(s.dependant_l_arr_)
{
TODO:
If deleted, then remove dependant_l_arr_ depency!
*/
-Staff_elem::~Staff_elem()
+Score_elem::~Score_elem()
{
assert(status < DELETED);
delete output;
}
void
-Staff_elem::translate(Offset O)
+Score_elem::translate(Offset O)
{
offset_ += O;
}
Interval
-Staff_elem::do_width() const
+Score_elem::do_width() const
{
Interval r;
}
Interval
-Staff_elem::width() const
+Score_elem::width() const
{
Interval r=do_width();
return r;
}
Interval
-Staff_elem::do_height() const
+Score_elem::do_height() const
{
Interval r;
if (!output){
}
Interval
-Staff_elem::height() const
+Score_elem::height() const
{
Interval r=do_height();
}
void
-Staff_elem::print()const
+Score_elem::print()const
{
#ifndef NPRINT
mtor << name() << "{\n";
-Staff_elem::Staff_elem()
+Score_elem::Score_elem()
{
pstaff_l_=0;
offset_ = Offset(0,0);
Paper_def*
-Staff_elem::paper() const
+Score_elem::paper() const
{
assert(pstaff_l_);
return pstaff_l_->pscore_l_->paper_l_;
}
void
-Staff_elem::add_processing()
+Score_elem::add_processing()
{
if (status >= VIRGIN)
return;
}
void
-Staff_elem::pre_processing()
+Score_elem::pre_processing()
{
if (status >= PRECALCED )
return;
status = PRECALCED;
}
void
-Staff_elem::post_processing()
+Score_elem::post_processing()
{
if (status >= POSTCALCED)
return;
}
void
-Staff_elem::molecule_processing()
+Score_elem::molecule_processing()
{
if (status >= OUTPUT)
return;
}
void
-Staff_elem::do_post_processing()
+Score_elem::do_post_processing()
{
}
void
-Staff_elem::do_pre_processing()
+Score_elem::do_pre_processing()
+{
+}
+void
+Score_elem::do_verticalcing()
{
}
void
-Staff_elem::do_add_processing()
+Score_elem::do_add_processing()
{
}
void
-Staff_elem::substitute_dependency(Staff_elem * old, Staff_elem * newdep)
+Score_elem::substitute_dependency(Score_elem * old, Score_elem * newdep)
{
bool hebbes_b=false;
for (int i=0; i < dependancy_l_arr_.size(); i++) {
}
void
-Staff_elem::add_dependency(Staff_elem * p)
+Score_elem::add_dependency(Score_elem * p)
{
for (int i=0; i < dependancy_l_arr_.size(); i ++)
if (dependancy_l_arr_[i] == p)
dependancy_l_arr_.push(p);
p->dependant_l_arr_.push(p);
}
-IMPLEMENT_STATIC_NAME(Staff_elem);
+IMPLEMENT_STATIC_NAME(Score_elem);
Molecule*
-Staff_elem::brew_molecule_p()const
+Score_elem::brew_molecule_p()const
{
Atom a(paper()->lookup_l()->fill(Box(Interval(0,0), Interval(0,0))));
return new Molecule (a);
}
Offset
-Staff_elem::offset() const
+Score_elem::offset() const
{
return offset_;
}
}
void
-Staff_registers::acknowledge_element(Staff_elem_info i)
+Staff_registers::acknowledge_element(Score_elem_info i)
{
Register_group_register::acknowledge_element(i);
if ( i.elem_l_->name() == Staff_symbol::static_name())
- staff_sym_l_ = (Staff_symbol*)i.elem_l_;
+ staff_sym_l_ = (Staff_symbol*)i.elem_l_->item();
}
staff_sym_l_ = s_l;
}
-Staff_side::Staff_side(Staff_elem * elem_l)
+Staff_side::Staff_side(Score_elem * elem_l)
{
inter_f_ = 2 PT;
staff_size_i_ = 0;
}
void
-Staff_side::add_support(Staff_elem*i)
+Staff_side::add_support(Score_elem*i)
{
support_l_arr_.push(i);
elem_l_->add_dependency(i);
void
Staff_sym_register::process_requests()
{
- announce_element(Staff_elem_info(span_p_, 0));
+ announce_element(Score_elem_info(span_p_, 0));
}
void
return ptr()->when();
}
-
void
Staff_walker::process_timing_reqs()
{
- // first all meter changes
- for (int i=0; i < ptr()->timing_req_l_arr_.size(); i++) {
- Timing_req * tr_l = ptr()->timing_req_l_arr_[i];
- if (tr_l->meterchange()) {
- int b_i=tr_l->meterchange()->beats_i_;
- int o_i = tr_l->meterchange()->one_beat_i_;
- if (! time_.allow_meter_change_b() )
-
- tr_l->warning("Meterchange should be at start of measure");
- else
- time_.set_meter(b_i, o_i);
-
- *default_grouping = Rhythmic_grouping(
- MInterval(0,Moment(b_i, o_i)), b_i);
- }
- }
-
- // then do the rest
- for (int i=0; i < ptr()->timing_req_l_arr_.size(); i++) {
- Timing_req * tr_l = ptr()->timing_req_l_arr_[i];
- if (tr_l->partial()) {
- Moment m = tr_l->partial()->duration_;
- String error = time_.try_set_partial_str(m);
- if (error != "") {
- tr_l->warning(error);
- } else
- time_.setpartial(m);
- } else if (tr_l->barcheck() && time_.whole_in_measure_) {
- tr_l ->warning( "Barcheck failed");
- } else if (tr_l->cadenza()) {
- time_.set_cadenza(tr_l->cadenza()->on_b_);
- } else if (tr_l->measuregrouping()) {
- *default_grouping = parse_grouping(
- tr_l->measuregrouping()->beat_i_arr_,
- tr_l->measuregrouping()->elt_length_arr_);
- }
- }
- time_.OK();
+ ptr()->update_time(time_, default_grouping);
}
void
stem_p_->print_flag_b_ = true;
}
- announce_element(Staff_elem_info(stem_p_, stem_req_l_));
+ announce_element(Score_elem_info(stem_p_, stem_req_l_));
}
}
void
-Stem_beam_register::acknowledge_element(Staff_elem_info info)
+Stem_beam_register::acknowledge_element(Score_elem_info info)
{
if (!stem_p_)
return;
if (info.elem_l_->name() == Notehead::static_name() &&
stem_req_l_->duration() == info.req_l_->rhythmic()->duration()){
- Notehead * n_l= (Notehead*)info.elem_l_;
+ Notehead * n_l= (Notehead*)info.elem_l_->item();
stem_p_->add(n_l);
}
}
{
Molecule *out =0;
if ( invisible_b() )
- return Staff_elem::brew_molecule_p();
+ return Score_elem::brew_molecule_p();
Real bot = stem_bottom_f_;
Real top = stem_top_f_;
#include "spanner.hh"
#include "scoreline.hh"
#include "staffline.hh"
+#include "vertical-spanner.hh"
#include "pcursor.tcc"
#include "plist.tcc"
IPLC_instantiate(Line_of_staff);
IPLC_instantiate(Item);
IPLC_instantiate(Spanner);
+IPLC_instantiate(Vertical_spanner);
IPLC_instantiate(PStaff);
IPLC_instantiate(Idealspacing);
IPLC_instantiate(PCol);
return true;
}
void
-Text_register::acknowledge_element(Staff_elem_info i)
+Text_register::acknowledge_element(Score_elem_info i)
{
if (text_p_ && i.elem_l_->name() == Note_column::static_name()) {
text_p_->add_support(i.elem_l_);
{
if (text_req_l_) {
text_p_ = new Text_item(text_req_l_->tdef_p_, text_req_l_->dir_i_); // ugh
- announce_element(Staff_elem_info(text_p_, text_req_l_));
+ announce_element(Score_elem_info(text_p_, text_req_l_));
}
}
void
}
void
-Tie_register::acknowledge_element(Staff_elem_info i)
+Tie_register::acknowledge_element(Score_elem_info i)
{
if (i.elem_l_->name() == Notehead::static_name()) {
if (tie_p_) {
- tie_p_->set_head(-1, (Notehead*)i.elem_l_);
+ tie_p_->set_head(-1, (Notehead*)i.elem_l_->item());
melodic_req_l_ = i.req_l_->musical()->melodic();
}
if (end_tie_p_) {
- end_tie_p_->set_head(1, (Notehead*)i.elem_l_);
+ end_tie_p_->set_head(1, (Notehead*)i.elem_l_->item());
if (!Melodic_req::compare ( *end_melodic_req_l_, *melodic_req_l_))
end_tie_p_->same_pitch_b_ = true;
- announce_element(Staff_elem_info(end_tie_p_,end_req_l_));
+ announce_element(Score_elem_info(end_tie_p_,end_req_l_));
}
}
}
Time_description::Time_description()
{
+ error_b_ = false;
whole_per_measure_ = 1;
whole_in_measure_ =0;
one_beat_ = Moment(1,4);
}
Moment
-Time_description::barleft()
+Time_description::barleft()const
{
assert(!cadenza_b_);
return whole_per_measure_-whole_in_measure_;
return i;
}
+
+Moment
+Time_description::next_bar_moment() const
+{
+ return when_ + barleft();
+}
+
--- /dev/null
+/*
+ vertical-brace.cc -- implement
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "vertical-brace.hh"
--- /dev/null
+/*
+ vertical-spanner.cc -- implement Vertical_spanner
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "vertical-spanner.hh"
+
+Vertical_spanner::Vertical_spanner()
+{
+ upper_pstaff_l_ = lower_pstaff_l_ = 0;
+}
+
+IMPLEMENT_STATIC_NAME(Vertical_spanner);
+
}
void
-Voice_registers::acknowledge_element(Staff_elem_info i)
+Voice_registers::acknowledge_element(Score_elem_info i)
{
if (i.voice_l_ != voice_l_)
return;
}
void
-Walker_registers::announce_element(Staff_elem_info info)
+Walker_registers::announce_element(Score_elem_info info)
{
if (info.elem_l_->name() == Bar::static_name()) {
walk_l_->allow_break();
}
void
-Walker_registers::acknowledge_element(Staff_elem_info )
+Walker_registers::acknowledge_element(Score_elem_info )
{
assert(false);
}
{
Request dummy_req;
for (int i = 0; i < announce_info_arr_.size(); i++){
- Staff_elem_info info = announce_info_arr_[i];
+ Score_elem_info info = announce_info_arr_[i];
mtor << "Announcing " << info.elem_l_->name()<<"\n";
if (!info.req_l_)
}
void
-Walker_registers::typeset_element(Staff_elem *elem_p)
+Walker_registers::typeset_element(Score_elem *elem_p)
{
typeset_musical_item(elem_p);
}
void
-Walker_registers::typeset_musical_item(Staff_elem * elem_p)
+Walker_registers::typeset_musical_item(Score_elem * elem_p)
{
walk_l_->typeset_element(elem_p);
}
# dependency list of executable:
#
-EXECUTABLE = $(lily_bindir)/$(NAME)
+
$(EXECUTABLE): $(build) $(OFILES)
$(MAKE) $(MODULE_LIBDEPS)
$(INCREASE_BUILD)
lib: $(LIBRARY)
#
TOCLEAN= $(allobs) $(alldeps)
+
+# be careful about deletion.
clean: localclean
+ rm -f core
+ifdef EXECUTABLE
+ rm -f $(EXECUTABLE)
+endif
ifdef allobs
rm -f $(allobs)
endif
ifdef alldeps
rm -f $(alldeps)
endif
- rm -f core
ifdef SUBDIRS
set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done
endif
rpm -ba $(makeout)/lilypond.spec
#
+installexe:
+ $(INSTALL) -d $(bindir)
+ $(INSTALL) -m 755 $(EXECUTABLES) $(bindir)
+
+uninstallexe:
+ for a in $(EXECUTABLES); do rm -f $(bindir)/`basename $a`; done
# -*-Makefile-*-
########################################################
-#
-# WARNING!WARNING!WARNING!WARNING!WARNING!WARNING!
-#
-# DO NOT EDIT!
-#
-#
-# @configure_input@
-########################################################
# project LilyPond -- the musical typesetter
# title top level makefile for LilyPond
# file Makefile
localclean:
- rm -f $(allexe) core config.cache config.log config.status
+ rm -f core config.cache config.log config.status
rm -f $(outdir)/*.{class,html,gif}
-localinstall: all
- $(INSTALL) -d $(bindir)
- $(INSTALL) -m 755 $(allexe) $(bindir)
+Makefile: make/Toplevel.make.in
+ echo '# WARNING WARNING WARNING WARNING' > $@
+ echo '# do not edit! this is generated from make/Toplevel.make.in' >> $@
+ cat $< >> $@
-localuninstall:
- for i in $(allexe); do rm -f $(bindir)/`basename $$i`; done
#
ERROR_LOG = 2> /dev/null
SILENT_LOG = 2>&1 > /dev/null
-allexe = $(lily_bindir)/lilypond $(lily_bindir)/mi2mu
date = $(shell date +%x)
allhh := $(shell $(FIND) ./ -name "*.hh" $(ERROR_LOG))
allcc := $(shell $(FIND) ./ -name "*.cc" $(ERROR_LOG))
# generic target names:
#
-EXECUTABLE = $(NAME)$(EXE)
+EXECUTABLE = $(outdir)/$(NAME)$(EXE)
+EXECUTABLES = $(EXECUTABLE)
LIB_PREFIX = lib
ifndef LIB_SUFFIX
Begin3
Title: LilyPond
-Version: 0.0.63
-Entered-date: 05/15/97
+Version: 0.0.64
+Entered-date: 05/16/97
Description: LilyPond is a program which converts a music-script (mudela) into
TeX output, or MIDI to produce multi-staff scores. Features include multiple
meters, clefs, keys, lyrics, versatile input-language, cadenzas
jan@digicash.com (Jan Nieuwenhuizen)
Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
Primary-site: pcnov095.win.tue.nl /pub/lilypond/
- 300k lilypond-0.0.63.tar.gz
+ 300k lilypond-0.0.64.tar.gz
Alternate-site:
Original-site:
Platform: unix/win32, GNU C++
Name: lilypond
-Version: 0.0.63
+Version: 0.0.64
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.63.tar.gz
+Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.64.tar.gz
Summary: A preprocessor to make TeX typeset music.
URL: http://www.stack.nl/~hanwen/lilypond
Packager: Han-Wen Nienhuys <hanwen@stack.nl>
MODULE_LIBES=-llily -lflower
#
-# main target of this module:
-#
-# MAINTARGET = $(EXECUTABLE)
-# MAINTARGET = $(LIBRARY)
-MAINTARGET = $(lily_bindir)/$(EXECUTABLE)# huh?
-# MAINTARGET = $(libdir)/$(LIBRARY)# huh?
-default: $(MAINTARGET)
+default: $(EXECUTABLE)
+
#
# generic targets and rules:
localclean:
rm -f $(outdir)/{midi-parser,midi-lexer}.*
+localinstall: installexe
+
+localuninstall: uninstallexe
main( int argc_i, char* argv_sz_a[] )
{
Long_option_init long_option_init_a[] = {
- 0, "be-blonde", 'b',
- 0, "debug", 'd',
- 0, "help", 'h',
- 0, "no-silly", 'n',
- 1, "output", 'o',
- 0, "no-plets", 'p',
- 0, "quiet", 'q',
- 1, "smallest", 's',
- 0, "verbose", 'v',
- 0, "warranty", 'w',
- 0, "no-double-dots", 'x',
- 0,0,0
+ {0, "be-blonde", 'b'},
+ {0, "debug", 'd'},
+ {0, "help", 'h'},
+ {0, "no-silly", 'n'},
+ {1, "output", 'o'},
+ {0, "no-plets", 'p'},
+ {0, "quiet", 'q'},
+ {1, "smallest", 's'},
+ {0, "verbose", 'v'},
+ {0, "warranty", 'w'},
+ {0, "no-double-dots", 'x'},
+ {0,0,0}
};
Getopt_long getopt_long( argc_i, argv_sz_a, long_option_init_a );
-\font\musicfont=musix16
+\font\musicfont=musixsps
\font\slurfont=xslu16
\def\thefont{\musicfont}