TOPLEVEL_MAJOR_VERSION = 0
TOPLEVEL_MINOR_VERSION = 0
-TOPLEVEL_PATCH_LEVEL = 60
+TOPLEVEL_PATCH_LEVEL = 61
# use to send patches, always empty for released version:
# include separator: ".postfix", "-pl" makes rpm barf
Some questions that have been answered before.
+=head2 Installing
+
+Q: I get all kinds of errors while compiling parser.cc
+
+A: LilyPond uses features of bison version 1.25. Please confirm that
+you are using a version 1.25 or better. If the problem persists, then
+please mail me.
+
+
=head2 Language: mudela
Q: Why can't you type C<#c> in stead of C<cis> ?
the MIDI, GIF and PS files for some standard music files. It also has
the complete LilyPond documentation
+A mailing list for GNU LilyPond has been setup, it's at
+lilypond@gnu.ai.mit.edu. To subscribe, send mail to
+lilypond-request@gnu.ai.mit.edu.
+
+For discussions concerning the GNU Music project,
+gnu-music-discuss@vanderbilt. .edu
+
=head1 REMARKS
GNU LilyPond has no connection with the music package Rosegarden, other
+pl 61
+ - scales.ly bugfix: dimensions default to ((0,0),(0,0))
+ - naming: PointerList->Pointer_list
+ - tied notes don't get accidental
+ - bf: crescendo size
+ - fixes: make_patch,
+ - bf: _"text" direction
+ - mailing list into lilypond.pod
+
+pl 60.mb
+ - set_flower_debug: Warning if -d is used when NPRINT is defined.
+ - Fixed several TeX details. vcenter renamed since it interfered
+ with LaTeX. Position of accents changed.
+ - New example; scriptS.ly
+ - table_sixteen: added scriptdefinition (Lilypond breaks if a
+ script is defined without dimensions).
+ - bf: ifndef typos in p-score.cc, choleski.cc
+ - bf: Slur::do_post_processing(), whole notes caused SIGSEGV.
+
+
+*******
pl 60
- Request_register::get_feature(), tie direction, Slur direction
- lilypond output is now directly texable.
******
may 2
+pl 58.jnc1
+ - bf: toccata-fuga-E.ly
+
+pl 57.jcn4
+ - mi2mu handles rests (quantified only)
+ - fixed configure buglet
+ - "!date" Fri May 2 02:18:12 MET DST 1997
+
pl 58
- lexer cleanup
- national chars in lyrics
* a Hands on tutorial [HKN]
-
-PROJECT:
+PROJECTS
* Output class, handles
- help text /(c) notice?
- quiet/ignore-version options
- logfile output
-
* elaborate Staff_side baseclass:
- - scripts
- - text
- - slur start/end
+ - scripts
+ - text
+ - slur start/end
* Output an output format independent (ofi) typeset file; and
make ofi2 TeX, MusixTex, PostScript, Ascii... interpreters.
- poor man's ascii output possible?
- - MusixTeX output possible?
+ - MusixTeX output possible? (would have to be done before break calc.)
+ - NIFF ?
- PostScript output (esp. Beams, Slurs, etc)
+ * TeX spanners , use texbeam.cc as an example
+ - Glissando
+ - trill
+ - bracket
+
+ * Rewrite Beam and Rhythmic_grouping
+ - [c8. c32 c32]
+ - interbeam height
+ - general shaving
+ - use plet grouping
+ - abbreviations [c2 c2]1/2
+ - separate visual from rhythmic info
+
PARSER
- * Duration-> Musical_duration, typedef Rational Duration?
+ * Duration -> Musical_duration, typedef Rational Duration?
+**********************
HKN buglist:
\bar || ook dunne streepjes? Sluit de balk niet af! (soms met de
barcheck failed in lyric mode -> assert (zie barcheck.ly) (0.0.57)
------------------------/
-optie om te stoppen na eerste barcheck fail? (en wellicht in eerder
-stadium van preprocessing)
-
noten staan vaak te dicht aan de rechterkant van de maatstreep.
optie om nummers/markers boven maatstrepen te zetten
tekst staat erg ver van notenbalken af
-barcheck her-synchroniseren? (evt met optie)
-
-script ^"3" onder ondanks boven?
-
-symbolen voor triller? (dus "tr---")
-
waarom geen ; achter dingen in \paper? (\textwidth 180\mm)
(sowieso: wanneer wel en geen ; ?)
midi: tempo halverwege het stuk wijzigen?
midi: gebonden noten niet herhalen?
---------/\
-De beam van de triool klopt niet.
- <[d8. b8.> \duration 32; <e'32*2/3 cis'32*2/3> <d'32*2/3 b32*2/3>
- <cis'32*2/3 a32*2/3> \duration 16; <b gis> <d' fis> <cis' e>
-<b d]> |
-(zie ook ergens in lacidarem-pianoI.ly)
---------/
-scales.ly compileert niet meer (vanwege transpose?)
-
-Lengte van de stokken klopt vaak niet, zie bijv. de eerste maat van
-langestok.ly.
-
Triolen enzo: het zou handig zijn als je het cijfer "3" ook _tussen_
twee noten kon plaatsen. Dat is bijvoorbeeld nodig in
c4*2/3 c8*2/3
---------------\
\bar "||" \meter 6/8; op het eind van de regel staat door elkaar
gedrukt.
-
+****************
BUGS
* detect -pipe
+ * staccato dot positions.
+
+ * stacked scripts.
+
* redo timing stuff <-> pulk to allow \meter 2/4; e2. to work
out correctly
* key transposition.
- * hairpin width
-
* help-lines for rests
- * [c8. c32 c32]
-
- * \duration 8; e*2/3
-
- * cis ( | ) cis
-
* lilypond - -> crash
* chlapik balk ruimte
* relative mode for pitch entering
+ * \duration 8; e*2/3
+
+
* configure pitch_byte
* special key.
SMALLISH PROJECTS
+ * write Dynamic_line (to group dynamics horizontally)
+
* write Rest_collision
* use Real for y positions.
* stafftypes: voice names/ instrument names.
- * Lookup::tex_glissando, Lookup::tex_bracket, (use texbeam.cc as an
- example.)
-
* Decent TeX titledefs (\tempo, \metron, etc. )
* C meter iso 4/4
* put scripts on bars
- * glissando
-
* guitar chord
* Junk Staff_column, and find the requests while walking the Voices.?
* move MIDI stuff (including Quantization) to a ANSI C libmidi library.
- * use an embedded language: scheme, lisp, S-lang, Perl, GUILE, ?
+ * use an embedded language: Python, Scheme?
for :
- Items/Spanners
- Registers
+ - Complex mudela
* y -dims in internote?
% --|--- --|---
(where "to" is a tiny bow)
+ * move towards incremental algorithms.
tar zfx $oldarc
fi
-#(cd $nm$old; touch depend; make clean)
-#(cd $nm$new; touch depend; make clean)
+# not interested in auto generated files.
+for a in lilypond.lsm INSTALL.text AUTHORS.text lilypond.spec configure; do
+ rm `find $nm$old $nm$new -name $a`
+done
echo 'use cd source-dir; patch -E -p0 < this_patch'> patch-$new
"dvips -o $a.ps $texfile;";
}
+
+ my_system "mv lelie.midi $a.midi; " if ( -f "lelie.midi" );
+
# generate the pixmap at twice the size, then rescale (for antialiasing)
if ( ! -f "$a.gif" ) {
- my_system "mv lelie.midi $a.midi; ",
- "gs -q -sDEVICE=ppmraw -sOutputFile=- -r200 -dNOPAUSE $a.ps -c quit |pnmscale 0.5| ppmtogif > $a.gif",
+ my_system "gs -q -sDEVICE=ppmraw -sOutputFile=- -r200 -dNOPAUSE $a.ps -c quit |pnmscale 0.5| ppmtogif > $a.gif",
"gzip $a.ps";
}
}
-
+# if given here, these vars are initted at the checking point.
+printing_b=no
+checking_b=yes
+debug_b=yes
+optimise_b=no
+profile_b=no
+
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:638: checking for $ac_word" >&5
+echo "configure:644: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:669: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:675: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
-#line 679 "configure"
+#line 685 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:703: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:709: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:708: checking whether we are using GNU C++" >&5
+echo "configure:714: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:732: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:738: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:762: checking for $ac_word" >&5
+echo "configure:768: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:818: checking for a BSD compatible install" >&5
+echo "configure:824: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:872: checking for $ac_word" >&5
+echo "configure:878: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_FIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:922: checking for $ac_word" >&5
+echo "configure:928: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:956: checking for $ac_word" >&5
+echo "configure:962: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:990: checking for $ac_word" >&5
+echo "configure:996: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1024: checking for $ac_word" >&5
+echo "configure:1030: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_PODMAN'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking TeX/MF root dir directory""... $ac_c" 1>&6
-echo "configure:1060: checking TeX/MF root dir directory" >&5
+echo "configure:1066: checking TeX/MF root dir directory" >&5
find_root_prefix="$prefix"
echo $ac_n "checking TeX input directory""... $ac_c" 1>&6
-echo "configure:1098: checking TeX input directory" >&5
+echo "configure:1104: checking TeX input directory" >&5
find_dirdir=`(cd $find_texprefix;
$FIND ./ -type d -a -name tex -print |sort|head -1|sed 's#^\./##')`
echo $ac_n "checking MF input directory""... $ac_c" 1>&6
-echo "configure:1120: checking MF input directory" >&5
+echo "configure:1126: checking MF input directory" >&5
find_dirdir=`(cd $find_texprefix;
$FIND ./ -type d -a -name source -print |sort|head -1|sed 's#^\./##')`
fi
echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
-echo "configure:1171: checking how to run the C++ preprocessor" >&5
+echo "configure:1177: checking how to run the C++ preprocessor" >&5
if test -z "$CXXCPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
CXXCPP="${CXX-g++} -E"
cat > conftest.$ac_ext <<EOF
-#line 1184 "configure"
+#line 1190 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
ac_safe=`echo "FlexLexer.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for FlexLexer.h""... $ac_c" 1>&6
-echo "configure:1209: checking for FlexLexer.h" >&5
+echo "configure:1215: checking for FlexLexer.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1214 "configure"
+#line 1220 "configure"
#include "confdefs.h"
#include <FlexLexer.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
eval "DIR_DATADIR=$datadir"
DIR_DATADIR="$DIR_DATADIR/lilypond"
echo $ac_n "checking ""... $ac_c" 1>&6
-echo "configure:1623: checking " >&5
+echo "configure:1629: checking " >&5
cat << EOF > lib/out/config.hh
dnl should cache result.
dnl should look in $prefix first.
-printing_b=no
-checking_b=yes
-debug_b=yes
-optimise_b=no
-profile_b=no
-#shared_b=no
+
AC_DEFUN(AC_TEX_PREFIX, [
AC_INIT(flower/choleski.cc)
-
+# if given here, these vars are initted at the checking point.
+printing_b=no
+checking_b=yes
+debug_b=yes
+optimise_b=no
+profile_b=no
+
AC_LANG_CPLUSPLUS
AC_ARG_ENABLE(printing,
MAJOR_VERSION = 1
MINOR_VERSION = 1
-PATCH_LEVEL = 14
+PATCH_LEVEL = 15
# use to send patches, always empty for released version:
MY_PATCH_LEVEL = # include separator: "-1" or ".a"
#
+pl 1.1.15
+ - #ifndef fixes (MB)
+ - Dstream::clear ()
+
pl 1.1.14
- interval methods
pl 1.1.13
D(k) = d;
}
-#ifdef NDEBUG
+#ifndef NDEBUG
assert((original()-P).norm() / P.norm() < EPS);
#endif
}
invm(i,j) = inv(j);
}
-#ifdef NDEBUG
+#ifndef NDEBUG
Matrix I1(n), I2(original());
I1.unit();
- assert((I1-original()*invm).norm()/original.norm() < EPS);
+ assert((I1-I2*invm).norm()/I2.norm() < EPS);
#endif
return invm;
+/*
+ dstream.cc -- implement Dstream
+
+ source file of the Flower Library
+ (c) 1996,1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
#include <fstream.h>
#include "assoc.hh"
#include "scalar.hh"
#include "text-db.hh"
#include "string-convert.hh"
-
+#include "assoc-iter.hh"
/// indent of each level
const INDTAB = 2;
Dstream&
Dstream::identify_as(String name)
{
- if (!os)
+ if (!os_l_)
return *this;
String mem(strip_pretty(name));
String cl(strip_member(mem));
String idx = cl;
- if (silent->elt_b(mem))
+ if (silent_assoc_p_->elt_b(mem))
idx = mem;
- else if (silent->elt_b(cl))
+ else if (silent_assoc_p_->elt_b(cl))
idx = cl;
else {
- (*silent)[idx] = false;
+ (*silent_assoc_p_)[idx] = false;
}
- local_silence = (*silent)[idx];
- if (classname != idx && !local_silence) {
- classname=idx;
- if (!(*silent)["Dstream"])
- *os << "[" << classname << ":]"; // messy.
+ local_silence_b_ = (*silent_assoc_p_)[idx];
+ if (current_classname_str_ != idx && !local_silence_b_) {
+ current_classname_str_=idx;
+ if (!(*silent_assoc_p_)["Dstream"])
+ *os_l_ << "[" << current_classname_str_ << ":]"; // messy.
}
return *this;
}
bool
Dstream::silence(String s)
{
- if (!silent->elt_b(s))
+ if (!silent_assoc_p_->elt_b(s))
return false;
- return (*silent)[s];
+ return (*silent_assoc_p_)[s];
}
/** Output a string via the Dstream. This is the only output
void
Dstream::output(String s)
{
- if (local_silence|| !os)
+ if (local_silence_b_|| !os_l_)
return ;
for (char const *cp = s ; *cp; cp++)
switch(*cp) {
case '{':
case '[':
- case '(': indentlvl += INDTAB;
- *os << *cp;
+ case '(': indent_level_i_ += INDTAB;
+ *os_l_ << *cp;
break;
case ')':
case ']':
case '}':
- indentlvl -= INDTAB;
- *os << *cp ;
+ indent_level_i_ -= INDTAB;
+ *os_l_ << *cp ;
- assert (indentlvl>=0) ;
+ assert (indent_level_i_>=0) ;
break;
case '\n':
- *os << '\n' << String (' ', indentlvl) << flush;
+ *os_l_ << '\n' << String (' ', indent_level_i_) << flush;
break;
default:
- *os << *cp;
+ *os_l_ << *cp;
break;
}
return ;
Dstream::Dstream(ostream *r, char const * cfg_nm )
{
- os = r;
- silent = new Assoc<String,bool>;
- indentlvl = 0;
- if (!os)
+ os_l_ = r;
+ silent_assoc_p_ = new Assoc<String,bool>;
+ indent_level_i_ = 0;
+ if (!os_l_)
return;
char const * fn =cfg_nm ? cfg_nm : ".dstreamrc";
r.message("not enough fields in Dstream init.");
continue;
}
- (*silent)[r[0]] = (bool)(int)(Scalar(r[1]));
+ (*silent_assoc_p_)[r[0]] = (bool)(int)(Scalar(r[1]));
}
}
Dstream::~Dstream()
{
- delete silent;
- assert(!indentlvl) ;
+ delete silent_assoc_p_;
+ assert(!indent_level_i_) ;
+}
+
+void
+Dstream::clear_silence()
+{
+ for (Assoc_iter<String, bool> i(*silent_assoc_p_); i.ok(); i++) {
+ i.val() = 0;
+ }
+
}
*/
void set_flower_debug(Dstream&ds, bool b)
{
+#ifdef NPRINT
+ cout << "Debug printout disabled, see the installation guide." << endl;
+#endif
flower_check_debug = b;
flower_dstream = &ds;
}
+/*
+ dstream.hh -- declare Dstream
+
+ source file of the Flower Library
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
#ifndef DSTREAM_HH
#define DSTREAM_HH
*/
class Dstream
{
- ostream *os;
- int indentlvl;
- bool local_silence;
- String classname;
+ ostream *os_l_;
+ int indent_level_i_;
+ bool local_silence_b_;
+ String current_classname_str_;
void output(String s);
- Assoc<String, bool> *silent;
+ Assoc<String, bool> *silent_assoc_p_;
public:
-
+ void clear_silence();
bool silence(String);
/**
template<class T> struct sstack;
template<class T,class K> struct Assoc;
template<class T> struct List;
-template<class T> struct PointerList;
-template<class T> struct IPointerList;
+template<class T> struct Pointer_list;
+template<class T> struct IPointer_list;
template<class T> struct Cursor;
template<class T> struct PCursor;
template<class T> struct Link;
items are always stored as copies in List, but:
#List<String># : copies of #String# stored
#List<String*># : copies of #String*# stored!
- (do not use, use \Ref{PointerList} #<String*># instead.)
+ (do not use, use \Ref{Pointer_list} #<String*># instead.)
{\bf note:}
retrieving "invalid" cursors, i.e.
--- /dev/null
+/*
+ parray.hh -- declare Pointer_array
+
+ source file of the Flower Library
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef PARRAY_HH
+#define PARRAY_HH
+
+#include "varray.hh"
+
+template<class T>
+class Pointer_array : public Array<T>
+{
+public:
+ int find_i (T t) const{
+ for (int i=0; i < size(); i++)
+ if (elem(i) == t)
+ return i;
+ return -1;
+ }
+ T find_l(T t)const
+ {
+ int i = find_i(t);
+ if (i >= 0)
+ return elem(i);
+ else
+ return 0;
+ }
+};
+#endif // PARRAY_HH
#include "plist.hh"
#include "cursor.hh"
-/** cursor to go with PointerList.
- don't create PointerList<void*>'s.
+/** cursor to go with Pointer_list.
+ don't create Pointer_list<void*>'s.
This cursor is just an interface class for Cursor. It takes care of the
appropriate type casts
*/
template<class T>
class PCursor : private Cursor<void *> {
- friend class IPointerList<T>;
+ friend class IPointer_list<T>;
/// delete contents
void junk();
return remove_p();
}
- PointerList<T> &list() { return (PointerList<T>&)Cursor<void*>::list(); }
+ Pointer_list<T> &list() { return (Pointer_list<T>&)Cursor<void*>::list(); }
PCursor<T> operator++(int) { return Cursor<void*>::operator++(0);}
PCursor<T> operator--(int) { return Cursor<void*>::operator--(0); }
PCursor<T> operator+=(int i) { return Cursor<void*>::operator+=(i);}
PCursor<T> operator-=(int i) { return Cursor<void*>::operator-=(i); }
PCursor<T> operator -(int no) const { return Cursor<void*>::operator-(no);}
int operator -(PCursor<T> op) const { return Cursor<void*>::operator-(op);}
- PCursor<T> operator +( int no) const {return Cursor<void*>::operator+(no);} PCursor(const PointerList<T> & l) : Cursor<void*> (l) {}
+ PCursor<T> operator +( int no) const {return Cursor<void*>::operator+(no);} PCursor(const Pointer_list<T> & l) : Cursor<void*> (l) {}
PCursor() : Cursor<void*> () {}
PCursor( const Cursor<void*>& cursor ) : Cursor<void*>(cursor) { }
void* vptr() const { return *((Cursor<void*> &) *this); }
/**
A list of pointers.
- Use for list of pointers, e.g. PointerList<AbstractType*>.
+ Use for list of pointers, e.g. Pointer_list<AbstractType*>.
This class does no deletion of the pointers, but it knows how to
copy itself (shallow copy). We could have derived it from List<T>,
- but this design saves a lot of code dup; for all PointerLists in the
+ but this design saves a lot of code dup; for all Pointer_lists in the
program only one parent List<void*> is instantiated.
*/
template<class T>
-class PointerList : public List<void *>
+class Pointer_list : public List<void *>
{
public:
PCursor<T> top() const{
return PCursor<T> (List<void*>::bottom());
}
PCursor<T> find(T) const;
- void concatenate(PointerList<T> const &s) { List<void*>::concatenate(s); }
- PointerList() {}
+ void concatenate(Pointer_list<T> const &s) { List<void*>::concatenate(s); }
+ Pointer_list() {}
};
-/** PointerList which deletes pointers given to it.
+/** Pointer_list which deletes pointers given to it.
NOTE:
The copy constructor doesn't do what you'd want:
new T(*cursor)
- You have to copy this yourself, or use the macro PointerList__copy
+ You have to copy this yourself, or use the macro Pointer_list__copy
*/
template<class T>
-class IPointerList : public PointerList<T> {
+class IPointer_list : public Pointer_list<T> {
public:
- IPointerList(IPointerList const &) { set_empty(); }
- IPointerList() { }
- ~IPointerList();
+ IPointer_list(IPointer_list const &) { set_empty(); }
+ IPointer_list() { }
+ ~IPointer_list();
};
-#define IPointerList__copy(T, to, from, op) \
+#define IPointer_list__copy(T, to, from, op) \
for (PCursor<T> _pc_(from); _pc_.ok(); _pc_++)\
to.bottom().add(_pc_->op)\
\
template<class T>
-void PL_copy(IPointerList<T*> &dst,IPointerList<T*> const&src);
+void PL_copy(IPointer_list<T*> &dst,IPointer_list<T*> const&src);
template<class T>
void
-PL_copy(IPointerList<T*> &to, IPointerList<T*> const&src)
+PL_copy(IPointer_list<T*> &to, IPointer_list<T*> const&src)
{
for (PCursor<T*> pc(src); pc.ok(); pc++) {
T *q = pc;
#include "plist.hh"
-#define PL_instantiate(a) template class PointerList<a*>; \
+#define PL_instantiate(a) template class Pointer_list<a*>; \
template class PCursor<a*>;
#define IPL_instantiate(a) PL_instantiate(a); \
- template class IPointerList<a*>
+ template class IPointer_list<a*>
template<class T>
-IPointerList<T>::~IPointerList()
+IPointer_list<T>::~IPointer_list()
{
PCursor<T> c( *this );
while (c.ok()) {
template<class T>
PCursor<T>
-PointerList<T>::find(T what ) const
+Pointer_list<T>::find(T what ) const
{
PCursor<T> i(*this);
for (; i.ok(); i++)
"scripts" = \table {
"fermata" "\fermata" 0\pt 0\pt 0\pt 6\pt
"-fermata" "\ifermata" 0\pt 0\pt -6\pt 0\pt
- "portato" "\portato"
- "-portato" "\iportato"
- "tenuto" "\tenuto"
- "-tenuto" "\itenuto"
+ "portato" "\portato" 0\pt 4.8\pt 0\pt 2\pt
+ "-portato" "\iportato" 0\pt 4.8\pt -2\pt 0\pt
+ "tenuto" "\tenuto" 0\pt 4.8\pt 0\pt 1\pt
+ "-tenuto" "\itenuto" 0\pt 4.8\pt -1\pt 0\pt
"sforzato" "\sforzato" -0.8\pt 4.8\pt -1.92\pt 1.92\pt
"marcato" "\marcato" 0\pt 4.8\pt 0\pt 4\pt
"-marcato" "\imarcato" 0\pt 4.8\pt -4\pt 0\pt
"staccato" "\staccato" 0\pt 0\pt 0\pt 5\pt
- "staccatissimo" "\staccatissimo" 0\pt 0\pt 0\pt 7.5\pt
- "-staccatissimo" "\istaccatissimo" 0\pt 0\pt -7.5\pt 0\pt
+ "staccatissimo" "\staccatissimo" 0\pt 0\pt 0\pt 1\pt
+ "-staccatissimo" "\istaccatissimo" 0\pt 0\pt 0\pt 1\pt
"upbow" "\upbow" -1\pt 6\pt 0\pt 5\pt
"downbow" "\downbow" 0\pt 5\pt 0\pt 7.5\pt
"back" "\backorfront" 0\pt 6\pt 0\pt 3\pt
--- /dev/null
+%{MudelaHeader
+
+ filename: keys.ly
+ title:
+ description:
+ composers:
+ entered-by:
+ copyright:
+
+ Tested Features: local key, key
+EndMudelaHeader
+%}
+\version "0.0.57";
+
+
+blah = \melodic{
+ \duration 4;
+ \meter 4/4;
+ \octave c';
+ cis c cis cis |
+ <cis dis eis fes ges> cis dis2 ~ |
+ \meter 2/4 ;
+ dis dis ~ | c cis~ | c
+}
+
+\score{
+ \staff {
+ melodicregs
+ blah
+ }
+}
--- /dev/null
+%{MudelaHeader
+
+ filename: scripts.ly
+ title:
+ description:
+ composers:
+ entered-by:HWN, MB
+ copyright:
+
+ Tested Features: scripts, text.
+EndMudelaHeader
+%}
+\version "0.0.57";
+
+
+blah = \staff{ melodicregs
+
+ \melodic {
+ \octave c';
+ 'c ->-.-\fermata-"text"
+ c ->-.-\fermata-"text"
+ c' ->-.-\fermata-"text"
+ c'' ->-.-\fermata-"text"
+
+ 'd ->-.-\fermata-"text"
+ d ->-.-\fermata-"text"
+ d' ->-.-\fermata-"text"
+ d'' ->-.-\fermata-"text"
+
+ 'c ^>^.^\fermata^"text"
+ c ^>^.^\fermata^"text"
+ c' ^>^.^\fermata^"text"
+ c'' ^>^.^\fermata^"text"
+
+ 'd ^>^.^\fermata^"text"
+ d ^>^.^\fermata^"text"
+ d' ^>^.^\fermata^"text"
+ d'' ^>^.^\fermata ^"text"
+
+ 'c _>_._\fermata _"text"
+ c _>_._\fermata _"text"
+ c' _>_._\fermata _"text"
+ c'' _>_._\fermata _"text"
+
+ 'd _>_._\fermata _"text"
+ d _>_._\fermata _"text"
+ d' _>_._\fermata _"text"
+ d'' _>_._\fermata _"text"
+
+ \meter 4/4;
+ \duration 8;
+ \octave c';
+ [c \< d e \! f][d' \> e' f' \! g']
+ [c-> \< d-> e-> \! f->][d'-> \> e'-> f'-> \! g'->]
+ [c-^ \< d-^ e-^ \! f-^][d'-^ \> e'-^ f'-^ \! g'-^]
+ [c-. \< d-. e-. \! f-.][d'-. \> e'-. f'-. \! g'-.]
+ [c-- \< d-- e-- \! f--][d'-- \> e'-- f'-- \! g'--]
+ [c-\portato \< d-\portato e-\portato \! f-\portato]
+ [d'-\portato \> e'-\portato f'-\portato \! g'-\portato]
+ [c-\upbow \< d-\upbow e-\upbow \! f-\upbow]
+ [d'-\upbow \> e'-\upbow f'-\upbow \! g'-\upbow]
+ [c-| \< d-| e-| \! f-|][d'-| \> e'-| f'-| \! g'-|]
+ [c-\fermata \< d-\fermata e-\fermata \! f-\fermata]
+ [d'-\fermata \> e'-\fermata f'-\fermata \! g'-\fermata]
+ [c-\lheel \< d-\lheel e-\lheel \! f-\lheel]
+ [d'-\lheel \> e'-\lheel f'-\lheel \! g'-\lheel]
+}
+}
+
+\score{
+ blah
+ \paper{
+ \symboltables {table_sixteen}
+ }
+}
-% toccata-fuga-E.ly
-%
-% toccata and fuga in E-major
-% Johann Sebastian Bach (1685-1750)
-% bwv 566
-%
-% toccata: 3 bar excerpt
-% 2nd fuga: transposed subject --- 4 bar except
-%
-% purpose of this file is testing:
-% * real-life collisions
-% * multi-voice input --- splitting?
-% * organ staff...
-%
+%{MudelaHeader
+
+ filename: toccata-fuga-E.ly
+ title: toccata and fuga in E-major bwv 566
+ description:
+ toccata: 3 bar excerpt
+ 2nd fuga: transposed subject --- 4 bar excerpt
+
+ composers: Johann Sebastian Bach (1685-1750)
+ entered-by: JCN
+ copyright:
+
+ Tested Features:
+ purpose of this file is testing:
+ * real-life collisions
+ * multi-voice input --- splitting?
+ * organ staff...
+
+EndMudelaHeader
+%}
+
\version "0.0.57";
% 13
r4 'fis4-\ltoe 'e4.-\lheel e8-\rheel |
% 14
- fis4.-\rtoe fis8-.-\rtoe fis4-\rtoe [e8-\ltoe ais8-\rtoe] |
+ fis4.-\rtoe fis8-.-\rtoe fis4-\rtoe [e8-\ltoe a8-\rtoe] |
% 15
- dis4-\ltoe gis4-\rtoe [cis8-\ltoe 'b8-\lheel 'ais8-\rtoe 'gis8-\ltoe] |
+ dis4-\ltoe gis4-\rtoe [cis8-\ltoe 'b8-\lheel 'a8-\rtoe 'gis8-\ltoe] |
% 16
}
private:
const File_path * path_C_;
void add( Source_file* sourcefile_p );
- IPointerList<Source_file*> sourcefile_p_iplist_;
+ IPointer_list<Source_file*> sourcefile_p_iplist_;
bool binary_b_ ;
};
MAJOR_VERSION = 0
MINOR_VERSION = 0
-PATCH_LEVEL = 60
+PATCH_LEVEL = 61
# use to send patches, always empty for released version:
# include separator: ".postfix", "-pl" makes rpm barf
Molecule*
-Crescendo::brew_molecule_p() const return m_p ;
+Crescendo::brew_molecule_p() const
{
+ Molecule* m_p =0;
Real x_off_dim=0.0;
Real absdyn_dim = 10 PT; // ugh
error("Crescendo too small");
w_dim = 0;
}
- Symbol s( paper()->lookup_l()->hairpin(w_dim, grow_dir_i_ < 0) );
+ Real lookup_wid = w_dim * 0.9; // make it slightly smaller.
+
+ Symbol s( paper()->lookup_l()->hairpin( lookup_wid, grow_dir_i_ < 0) );
m_p->add(Atom(s));
int pos = get_position_i(s.dim.y);
- m_p->translate(Offset(x_off_dim,pos * paper()->internote()));
+ m_p->translate(Offset(x_off_dim + 0.05 * w_dim,
+ pos * paper()->internote()));
+ return m_p;
}
IMPLEMENT_STATIC_NAME(Crescendo);
make sure that they reach the beam and that point in the correct
direction */
struct Beam: public Directional_spanner {
- PointerList<Stem*> stems;
+ Pointer_list<Stem*> stems;
/// the slope of the beam in posns / point (dimension)
Real slope;
#include "voice.hh"
#include "moment.hh"
-struct Voice_list : public PointerList<Voice*> {
+struct Voice_list : public Pointer_list<Voice*> {
void translate_time(Moment dt);
};
/// Complex_music consists of multiple voices
struct Complex_music : Input_music {
- IPointerList<Input_music*> elts;
+ IPointer_list<Input_music*> elts;
/* *************** */
virtual void transpose(Melodic_req const&) const ;
virtual void set_default_group(String g);
#include "input.hh"
struct Input_register : Input {
- IPointerList<Input_register*> ireg_list_;
+ IPointer_list<Input_register*> ireg_list_;
String name_str_;
void add(Input_register*);
/// paper_, staffs_ and commands_ form the problem definition.
Paper_def *paper_p_;
Midi_def* midi_p_;
- IPointerList<Input_staff*> staffs_;
+ IPointer_list<Input_staff*> staffs_;
/* *************************************************************** */
class Input_staff:public Input {
public:
- IPointerList<Input_music*> music_;
+ IPointer_list<Input_music*> music_;
Input_register * ireg_p_;
/* *************** */
#define LOCALKEYREG_HH
#include "register.hh"
#include "key.hh"
+#include "parray.hh"
struct Local_key_register : Request_register {
Key local_key_;
- Local_key_item* key_item_p_;
Key const *key_C_;
+ Array<Note_req* > mel_l_arr_;
+ Array<Item* > support_l_arr_;
+ Pointer_array<Item * > forced_l_arr_;
+ Pointer_array<Item *> tied_l_arr_;
/* *************** */
virtual void process_requests();
virtual void acknowledge_element(Staff_elem_info);
/** a group of individually translated symbols. You can add molecules
to the top, to the right, etc. */
struct Molecule {
- IPointerList<Atom*> ats; // change to List<Atom>?
+ IPointer_list<Atom*> ats; // change to List<Atom>?
/* *************** */
/// return pitch from central c (in halfnotes)
int pitch()const;
Melodic_req();
+ static int compare(Melodic_req const&, Melodic_req const&);
REQUESTMETHODS(Melodic_req,melodic);
};
class PCol {
public:
- PointerList<Item const *> its;
- PointerList<Spanner const *> stoppers, starters;
+ Pointer_list<Item const *> its;
+ Pointer_list<Spanner const *> stoppers, starters;
/** prebreak is put before end of line.
if broken here, then (*this) column is discarded, and prebreak
Paper_def *paper_l_;
/// the columns, ordered left to right
- IPointerList<PCol *> cols;
+ IPointer_list<PCol *> cols;
/// the idealspacings, no particular order
- IPointerList<Idealspacing*> suz;
+ IPointer_list<Idealspacing*> suz;
/// the staffs ordered top to bottom
- IPointerList<PStaff*> staffs;
+ IPointer_list<PStaff*> staffs;
/// all symbols in score. No particular order.
- IPointerList<Item*> its;
+ IPointer_list<Item*> its;
/// if broken, the different lines
- IPointerList<Line_of_score*> lines;
+ IPointer_list<Line_of_score*> lines;
/// crescs etc; no particular order
- IPointerList<Spanner *> spanners;
+ IPointer_list<Spanner *> spanners;
/// broken spanners
- IPointerList<Spanner*> broken_spans;
+ IPointer_list<Spanner*> broken_spans;
/* *************** */
/* CONSTRUCTION */
PScore * pscore_l_;
- PointerList<Spanner const *> spans;
- PointerList<Item*> its;
+ Pointer_list<Spanner const *> spans;
+ Pointer_list<Item*> its;
/* *************** */
void add(Item*i);
class Pulk_voices
{
PQueue< Voice_l > voice_pq_;
- IPointerList< Pulk_voice * > pulk_p_list_;
- PointerList<Staff *> staff_l_list_;
+ IPointer_list< Pulk_voice * > pulk_p_list_;
+ Pointer_list<Staff *> staff_l_list_;
Moment next_mom_;
public:
Moment last_;
bool ok() const;
Moment next_mom() { return next_mom_; }
- Pulk_voices(PointerList<Staff*> const&);
+ Pulk_voices(Pointer_list<Staff*> const&);
void get_aligned_request(Request_column *col_l );
};
*/
class Register_group_register : public Request_register {
protected:
- IPointerList<Request_register*> reg_list_;
+ IPointer_list<Request_register*> reg_list_;
virtual void do_print()const;
public:
*/
class Request_column
{
- IPointerList<Staff_column*> staff_cols_;
+ IPointer_list<Staff_column*> staff_cols_;
Array<Staff_column*> staff_col_l_arr_;
public:
Score_column *musical_column_l_, *command_column_l_;
- Request_column(PointerList<Staff*> const& );
+ Request_column(Pointer_list<Staff*> const& );
bool used_b()const;
Moment when();
void add_reqs(int staff_idx, Array<Request*> const&);
void add(Notehead *);
NAME_MEMBERS(Rest_column);
void translate_y(Real dy);
+ Rest_column();
};
#endif // REST_COLUMN_HH
/// paper_, staffs_ and commands_ form the problem definition.
Paper_def *paper_p_;
Midi_def *midi_p_;
- IPointerList<Staff*> staffs_;
+ IPointer_list<Staff*> staffs_;
/// "runtime" fields for setting up spacing
- IPointerList<Request_column*> rcols_;
+ IPointer_list<Request_column*> rcols_;
- IPointerList<Score_column*> cols_;
+ IPointer_list<Score_column*> cols_;
PScore *pscore_p_;
Input input_;
/// the columns of a score that form one line.
struct
Line_of_score {
- PointerList<PCol *> cols;
+ Pointer_list<PCol *> cols;
// need to store height of each staff.
- IPointerList<Line_of_staff*> staffs;
+ IPointer_list<Line_of_staff*> staffs;
PScore * pscore_l_; // needed to generate staffs
/* *************** */
public:
Input_register * ireg_p_;
- PointerList<Voice*> voice_list_;
+ Pointer_list<Voice*> voice_list_;
/// runtime field
- PointerList<Staff_column*> cols_;
+ Pointer_list<Staff_column*> cols_;
Score *score_l_;
PScore *pscore_l_;
/* *************************************************************** */
- void add(const PointerList<Voice*> &s);
+ void add(const Pointer_list<Voice*> &s);
void add_voice(Voice *v_p);
Paper_def*paper()const;
Tie_req * req_l_;
int dir_i_;
Tie_req *end_req_l_;
+ Melodic_req * end_melodic_req_l_;
+ Melodic_req * melodic_req_l_;
protected:
virtual ~Tie_register();
virtual void do_post_processing();
virtual void set_default_dir();
public:
+ bool same_pitch_b_;
Notehead * left_head_l_;
Notehead * right_head_l_;
-
void set_head(int, Notehead*head_l);
Tie();
Voice_element */
Moment duration_;
Voice const *voice_C_;
- IPointerList<Request*> req_p_list_;
+ IPointer_list<Request*> req_p_list_;
Request * principal_req_l_;
/* *************** */
/** the elements, earliest first.
Please use the member #add()# to add a new element
*/
- IPointerList<Voice_element *> elts_;
+ IPointer_list<Voice_element *> elts_;
Moment start_;
/* *************** */
WHITE [ \n\t\f]
BLACK [^ \n\t\f]
RESTNAME [rs]
-NOTECOMMAND \\{WORD}
+NOTECOMMAND \\{A}+
DOTS \.+
LYRICS ({AA}|{NATIONAL})[^0-9 \t\n\f]*
#include "key-reg.hh"
#include "debug.hh"
#include "key-item.hh"
+#include "tie.hh"
+#include "notehead.hh"
Local_key_register::Local_key_register()
{
- key_item_p_ = 0;
key_C_ = 0;
}
void
Local_key_register::pre_move_processing()
{
- if (key_item_p_) {
- typeset_element(key_item_p_);
- key_item_p_ = 0;
+ if (mel_l_arr_.size()) {
+ Local_key_item *key_item_p = 0;
+ for (int i=0; i < mel_l_arr_.size(); i++) {
+ 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))
+ continue;
+
+ if (!key_item_p)
+ key_item_p = new Local_key_item(*get_staff_info().c0_position_i_l_);
+ key_item_p->add(note_l);
+ key_item_p->add(support_l);
+ local_key_.oct(note_l->octave_i_)
+ .set(note_l->notename_i_, note_l->accidental_i_);
+ }
+ if (key_item_p)
+ typeset_element(key_item_p);
}
+ mel_l_arr_.set_size(0);
+ tied_l_arr_.set_size(0);
+ support_l_arr_.set_size(0);
+ forced_l_arr_.set_size(0);
}
void
Local_key_register::acknowledge_element(Staff_elem_info info)
{
+ Staff_elem * elem_l = info.elem_l_;
if (info.req_l_->note()) {
- Note_req * note_l_ = info.req_l_->note();
+ Note_req * note_l = info.req_l_->note();
+ Item * item_l = info.elem_l_->item();
- if( note_l_->forceacc_b_ ||
- local_key_.oct(note_l_->octave_i_).acc(note_l_->notename_i_)
- != note_l_->accidental_i_) {
- Item * support_l_ = info.elem_l_->item();
-
-
- if (!key_item_p_) {
- key_item_p_ = new Local_key_item(*get_staff_info().c0_position_i_l_);
- }
-
- key_item_p_->add(note_l_);
- key_item_p_->add(support_l_);
- local_key_.oct(note_l_->octave_i_)
- .set(note_l_->notename_i_, note_l_->accidental_i_);
+ if( note_l->forceacc_b_ ||
+ local_key_.oct(note_l->octave_i_).acc(note_l->notename_i_)
+ != note_l->accidental_i_) {
+ mel_l_arr_.push(note_l );
+ support_l_arr_.push(item_l);
+ if (note_l->forceacc_b_)
+ forced_l_arr_.push(item_l);
}
- } else if (info.req_l_->command() && info.req_l_->command()->keychange()) {
+ } else if (info.req_l_->command()
+ && info.req_l_->command()->keychange()) {
Key_register * key_reg_l =
(Key_register*)info.origin_reg_l_arr_[0];
key_C_ = &key_reg_l->key_;
local_key_ = *key_C_;
- } else if (info.elem_l_->name() == Key_item::static_name()) {
+ } else if (elem_l->name() == Key_item::static_name()) {
Key_register * key_reg_l =
(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;
+ if (tie_l->same_pitch_b_)
+ tied_l_arr_.push(tie_l-> right_head_l_ );
}
}
if (key_C_)
local_key_= *key_C_;
else if( time_C_->when_ >Moment(0))
- warning ("Help me! can't figure current key");
+ warning ("Help me! can't figure out current key");
}
}
IMPLEMENT_STATIC_NAME(Melodic_req);
+int
+Melodic_req::compare(Melodic_req const&m1, Melodic_req const&m2)
+{
+ if (m1.octave_i_ != m2.octave_i_)
+ return m1.octave_i_ -m2.octave_i_;
+ else if (m1.notename_i_ != m2.notename_i_)
+ return m1.notename_i_ - m2.notename_i_;
+ else if (m1.accidental_i_ != m2.accidental_i_)
+ return m1.accidental_i_ - m2.accidental_i_;
+ return 0;
+}
+
void
Melodic_req::do_print() const
{
#ifndef NPRINT
- mtor << "notename: " << notename_i_ << " acc: " <<accidental_i_<<" oct: "<< octave_i_;
+ mtor << "notename: " << notename_i_ << " acc: " <<accidental_i_<<" oct: "<< octave_i_;
#endif
}
break;
case '.' : s = "staccato";
break;
+ default:
+ assert(false);
}
return new String(s);
}
void
PScore::OK()const
{
-#ifdef NDEBUG
+#ifndef NDEBUG
for (iter_top(cols,cc); cc.ok(); cc++)
cc->OK();
for (iter_top(suz,i); i.ok(); i++)
delete $2;
}
| STRING {
- Box b;
+ Box b(Interval(0,0), Interval(0,0));
$$ = new Symbol(*$1, b);
delete $1;
}
#include "request-column.hh"
#include "debug.hh"
-Pulk_voices::Pulk_voices(PointerList<Staff*> const& l)
+Pulk_voices::Pulk_voices(Pointer_list<Staff*> const& l)
: staff_l_list_(l)
{
int staff_i = 0;
staff_col_l_arr_[idx]->add_reqs(req_l_arr);
}
-Request_column::Request_column(PointerList<Staff*> const& list )
+Request_column::Request_column(Pointer_list<Staff*> const& list )
{
musical_column_l_ = command_column_l_ =0;
iter(list.top(), j);
void
Rest_collision::do_post_processing()
{
- #if 0
+#if 0
bool rest_b_a[4];
rest_b_a[j] = (col_l_a[j]) ? col_l_a[j]->rest_b_ : false;
do {
}
IMPLEMENT_STATIC_NAME(Rest_column);
+
+Rest_column::Rest_column()
+{
+ dir_i_ = 0;
+}
+
if (!dir_i_)
set_default_dir();
Real inter_f = paper()->internote();
- left_pos_i_ = encompass_arr_[0]->stem_l_->height()[dir_i_]/inter_f;
- right_pos_i_ = encompass_arr_.top()->stem_l_->height()[dir_i_]/inter_f;
+ if (encompass_arr_[0]->stem_l_)
+ left_pos_i_ = 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;
+ else
+ right_pos_i_ = 0;
left_pos_i_ += dir_i_;
right_pos_i_ += dir_i_;
void
-Staff::add(PointerList<Voice*> const &l)
+Staff::add(Pointer_list<Voice*> const &l)
{
for (iter_top(l,i); i.ok(); i++)
voice_list_.bottom().add(i);
/*
- template4.cc -- instantiate PointerList baseclass.
+ template4.cc -- instantiate Pointer_list baseclass.
source file of the LilyPond music typesetter
Text_def::Text_def()
{
- align_i_ = -1; // right
+ align_i_ = 1; // right
pdef_l_ = 0;
style_str_ = "roman";
}
void
Text_item::do_post_processing()
{
- set_default_index();
+ set_default_index();
}
Text_register::process_requests()
{
if (text_req_l_) {
- text_p_ = new Text_item(text_req_l_->tdef_p_, 0); // ugh
+ 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_));
}
}
Text_register::pre_move_processing()
{
if (text_p_) {
- text_p_->dir_i_ = dir_i_;
+ if (dir_i_ && !text_p_->dir_i_)
+ text_p_->dir_i_ = dir_i_;
Staff_symbol* s_l = get_staff_info().staff_sym_l_;
text_p_->set_staffsym(s_l);
typeset_element(text_p_);
req_l_ =0;
end_req_l_ =0;
end_mom_ = -1;
+ melodic_req_l_ = 0;
+ end_melodic_req_l_ =0;
}
void
if (tie_p_ && get_staff_info().when() == end_mom_) {
end_tie_p_ = tie_p_;
end_req_l_ = req_l_;
+ end_melodic_req_l_ = melodic_req_l_;
tie_p_ =0;
req_l_ =0;
end_mom_ = -1;
Tie_register::acknowledge_element(Staff_elem_info i)
{
if (i.elem_l_->name() == Notehead::static_name()) {
- if (tie_p_)
+ if (tie_p_) {
tie_p_->set_head(-1, (Notehead*)i.elem_l_);
-
+ melodic_req_l_ = i.req_l_->musical()->melodic();
+ }
+
if (end_tie_p_) {
end_tie_p_->set_head(1, (Notehead*)i.elem_l_);
+ 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_));
}
}
{
right_head_l_ =0;
left_head_l_ =0;
+ same_pitch_b_ =false;
}
void
# main target of this module:
#
-MAINTARGET = $(EXECUTABLE)
+# MAINTARGET = $(EXECUTABLE)
# MAINTARGET = $(LIBRARY)
+MAINTARGET =
default: $(MAINTARGET)
#
Begin3
Title: LilyPond
-Version: 0.0.60
-Entered-date: 05/05/97
+Version: 0.0.61
+Entered-date: 05/12/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.60.tar.gz
+ 300k lilypond-0.0.61.tar.gz
Alternate-site:
Original-site:
Platform: unix/win32, GNU C++
Name: lilypond
-Version: 0.0.60
+Version: 0.0.61
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.60.tar.gz
+Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.61.tar.gz
Summary: A preprocessor to make TeX typeset music.
URL: http://www.stack.nl/~hanwen/lilypond
Packager: Han-Wen Nienhuys <hanwen@stack.nl>
strip bin/lilypond bin/mi2mu
make prefix="$RPM_BUILD_ROOT/usr" install
%files
-%doc Documentation/out/AUTHORS.text Documentation/out/CodingStyle.text Documentation/out/INSTALL.text Documentation/out/MANIFESTO.text Documentation/out/convert-mudela.text Documentation/out/error.text Documentation/out/examples.text Documentation/out/faq.text Documentation/out/index.text Documentation/out/language.text Documentation/out/lilygut.text Documentation/out/lilypond.text Documentation/out/mi2mu.text Documentation/out/mudela.text input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/error.ly input/header.ly input/kortjakje.ly input/pedal.ly input/rhythm.ly input/scales.ly input/scsii-menuetto.ly input/scsii-menuetto.tex input/slurs.ly input/standchen.ly input/standchen.tex input/toccata-fuga-E.ly input/twinkle.ly input/wohltemperirt.ly Documentation/lelie_logo.gif
+%doc Documentation/out/AUTHORS.text Documentation/out/CodingStyle.text Documentation/out/INSTALL.text Documentation/out/MANIFESTO.text Documentation/out/convert-mudela.text Documentation/out/error.text Documentation/out/examples.text Documentation/out/faq.text Documentation/out/index.text Documentation/out/language.text Documentation/out/lilygut.text Documentation/out/lilypond.text Documentation/out/mi2mu.text Documentation/out/mudela.text input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/error.ly input/header.ly input/kortjakje.ly input/pedal.ly input/rhythm.ly input/scales.ly input/scripts.ly input/scsii-menuetto.ly input/scsii-menuetto.tex input/slurs.ly input/standchen.ly input/standchen.tex input/toccata-fuga-E.ly input/twinkle.ly input/wohltemperirt.ly Documentation/lelie_logo.gif
/usr/bin/convert-mudela
/usr/bin/lilypond
/usr/lib/libflower.so
# main target of this module:
#
-MAINTARGET = $(EXECUTABLE)
+MAINTARGET =
default: $(MAINTARGET)
#
\rationalmultiply\dimen0*#2%
\raise\dimen0\hbox{#1}}
\def\maccentdef#1#2#3{\def#1{\maccentraise{\mchar{#2}}{#3}}}
-\def\vcenter#1{\vbox to 0pt{\vss #1\vss}}
+\def\vertcenter#1{\vbox to 0pt{\vss #1\vss}}
\def\mathdef#1#2{\def#1{\mathchar{#2}}}
\def\mathchar#1{\mathfont\char#1}
\def\kdynm{\dynfont m\kern-.15ex}
\def\kdynp{\dynfont p\kern-.15ex}
-\def\dynppp{\dynfont\dynp\kdynp p}
-\def\dynpp{\dynfont p\kdynp}
\def\dynp{\dynfont p}
+\def\dynpp{\dynp\kdynp}
+\def\dynppp{\dynpp\kdynp}
\def\dynmp{\dynfont m\kdynp}
\def\dynmf{\dynfont m\kdynf}
\def\dynf{\dynfont f}
-\def\dynff{\dynfont f\kdynf}
-\def\dynfff{\dynfont f\kdynf \kdynf}
+\def\dynff{\dynf\kdynf}
+\def\dynfff{\dynff\kdynf}
\def\slurcharh#1{{\slurhfont\char#1}}
\def\slurcharu#1{{\slurufont\char#1}}
\def\sixteenthflag{\topalign{\usixteenthflag}}
\def\thirtysecondflag{\topalign{\uthirtysecondflag}}
-\def\cquartrest{\vcenter\quartrest}
-\def\ceighthrest{\vcenter\eighthrest}
-\def\csixteenthrest{\vcenter\sixteenthrest}
-\def\cthirtysecondrest{\vcenter\thirtysecondrest}
+\def\cquartrest{\vertcenter\quartrest}
+\def\ceighthrest{\vertcenter\eighthrest}
+\def\csixteenthrest{\vertcenter\sixteenthrest}
+\def\cthirtysecondrest{\vertcenter\thirtysecondrest}
\def\lsingledot{\kern-\notewidth\singledot}
\def\ldoubledot{\kern-\notewidth\doubledot}
\maccentdef\sforzato{30}{-3/2}
\maccentdef\marcato{20}{-1/1}
\maccentdef\imarcato{21}{1/1}
-\maccentdef\staccato{24}{-1/1}
-\maccentdef\istaccato{25}{1/1}
-\maccentdef\staccatissimo{28}{-1/1}
-\maccentdef\istaccatissimo{29}{1/1}
-\maccentdef\portato{18}{-9/10}
-\maccentdef\iportato{19}{9/10}
-\maccentdef\tenuto{26}{0/1}
-\maccentdef\itenuto{27}{0/1}
+\maccentdef\staccato{24}{-1/3}
+\maccentdef\istaccato{25}{1/3}
+\maccentdef\staccatissimo{28}{-5/5}
+\maccentdef\istaccatissimo{29}{2/5}
+\maccentdef\portato{18}{-6/5}
+\maccentdef\iportato{19}{3/5}
+\maccentdef\tenuto{26}{-1/1}
+\maccentdef\itenuto{27}{1/1}
\maccentdef\fermata{80}{-1/1}
\maccentdef\ifermata{81}{1/1}
\mdef\ispicato{29}
\mdef\upbow{23}
\mdef\downbow{22}
-\mdef\portato{26}
\mathdef\cup{91} % \cup
\mathdef\wedge{94} % \wedge