TOPLEVEL_MAJOR_VERSION = 0
TOPLEVEL_MINOR_VERSION = 0
-TOPLEVEL_PATCH_LEVEL = 56
+TOPLEVEL_PATCH_LEVEL = 57
# use to send patches, always empty for released version:
# include separator: ".postfix", "-pl" makes rpm barf
(setq font-lock-maximum-decoration t)
(setq c++-font-lock-keywords-3
- (cons
- '("\\b\\([a-zA-Z_]+_\\)\\b" 1 font-lock-variable-name-face)
- c++-font-lock-keywords-3))
+ (append
+ c++-font-lock-keywords-3
+ '(("\\b\\([a-zA-Z_]+_\\)\\b" 1 font-lock-variable-name-face)
+ ("\\b\\([A-Z]+[a-z_]+\\)\\b" 1 font-lock-type-face))
+ ))
=head2 CLASSES and TYPES:
the C<type> is a Hungarian notation postfix for C<Type>. See below
+=head2 BROKEN CODE
+
+Broken code (hardwired dependencies, hardwired constants, slow
+algorithms and obvious limitations) should be marked as such:
+either with a verbose TODO, or with a short "ugh" comment.
+
=head2 COMMENTS
The source is commented in the DOC++ style. Check out doc++ at
short description.
Long class documentation.
(Hungarian postfix)
+
+ TODO Fix boring_member()
*/
class Class {
/**
Rettype member(Argtype);
/// memo only
- boring_member();
+ boring_member() {
+ data_member_ = 121; // ugh
+ }
};
+
+
Unfortunately most of the code isn't really documented that good.
=item *
-usefullness in I<very large>
-(but how many classes is very large?)
+usefullness in I<very large> (but how many classes is very large?)
remains an issue.
=back
other options include:
- --enable-shared
- --enable-printing
- --enable-optimise
- --enable-profiling
- --enable-tex-prefix
- --enable-tex-dir
+=over 4
+
+=item --enable-shared
+
+Make a shared library (linux, solaris (?) only )
+
+=item --enable-printing
+
+Enable debugging print routines (B<-d> option)
+
+=item --enable-optimise
+
+Set maximum optimisation
+
+=item --enable-profiling
+
+Compile with support for profiling
+
+=item --enable-tex-prefix
+
+Set the directory where texmf lives
+
+
+=item --enable-tex-dir
+
+Set then directory tex input is in
+
+=item --enable-mf-dir
+
+Set then directory tex input is in
+
+=back
All options are documented in the F<configure> help
The option B<--enable-optimise> is recommended for Real Life usage.
rm -f out/*
rm -f $(TEXTFILES) $(HTMLFILES) $(GROFFFILES)
-MAN1FILES = lilypond convert-mudela
+MAN1FILES = lilypond convert-mudela mi2mu
MAN1GROFF = $(addprefix $(outdir)/, $(addsuffix .1,$(MAN1FILES)))
bla:
Most music distributed with GNU LilyPond was composed a long time ago, and
do not have copyrights. Any exceptions are mentioned here.
-=head2 F<cadenza.ly>
-
-A cadenza to Mozart Horn concerto no. 3.
-
-Features: cadenza mode.
-
-Copyright: public domain
-
=head2 F<collisions.ly>
Random counterpoint to demonstrate features.
Copyright: public domain
-=head2 F<maartje.ly>
-
-Features: partial measure.
-
-=head2 F<martien.ly>, F<ml*.ly>
-
-Martien Lohman, Viola Quartet.
-
-Features: n-plets, multi-staff scores.
-
-Copyright: copyright Martien Lohman 1997.
-
=head2 F<midi.ly>
Features: midi output.
-=head2 F<plet.ly>
-
-Features: plets.
-
=head2 F<rhythm.ly>
Features: auto beams, multiple parralel meters.
JS Bach, Das Wohltemperirtes Clavier I, Fuga II (c-minor), BWV ?
-Features: stem direction, multivoice.
+Features:
Copyright: public domain
--- /dev/null
+=head1 NAME
+
+mi2mu - convert MIDI to mudela(5)
+
+=head1 SYNOPSIS
+
+ mi2mu [options] midi-file
+
+=head1 DESCRIPTION
+
+Mi2mu translates a MIDI input file to Mudela (GNU LilyPond source
+format).
+Mi2mu is part of the GNU LilyPond music typesetting package.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-b, --no-quantify>,
+
+Write exact durations, e.g.: `a4*385/384'.
+
+=item B<-d, --debug>,
+
+Print lots of debugging stuff.
+
+=item B<-h, --help>,
+
+Show a summary of usage.
+
+=item B<-I, --include>=F<DIR>,
+
+Add DIR to search path.
+
+=item B<-n, --no-silly>,
+
+Assume no plets or double dots, assume smallest (reciprocal) duration 16.
+
+=item B<-o, --output>=F<FILE>,
+
+Set FILE as default output.
+
+=item B<-p, --no-plets>,
+
+Assume no plets.
+
+=item B<-q, --quiet>,
+
+Be quiet.
+
+=item B<-s, --smallest=N>,
+
+Assume no shorter (reciprocal) durations than N.
+
+=item B<-v, --verbose>,
+
+Be verbose.
+
+=item B<-w, --warranty>,
+
+Show the warranty with which mi2mu comes. (It comes with B<NO WARRANTY>!)
+
+=item B<-x, --no-double-dots>,
+
+Assume no double dotted notes.
+
+=back
+
+=head1 FEATURES
+
+This is an overview of the features that Mi2mu supports.
+
+=over 4
+
+=item *
+
+[todo]
+
+=back
+
+=head1
+DISCLAIMER & COPYING POLICY
+
+Mi2mu is copyright 1996,97 by its authors. Mi2mu is distributed
+as part of GNU LilyPond, under the terms of the GNU General Public
+License. Mi2mu is provided without any warranty what so ever.
+Mi2mu may be freely distributed. For further information consult
+the GNU General Public License, which is in the file F<COPYING>.
+
+=head1 AUTHORS
+
+Please consult the documentation file AUTHORS for more detailed
+information, and small contributions.
+
+=over 4
+
+=item *
+
+Jan Nieuwenhuizen <jan@digicash.com>, http://www.digicash.com/~jan.
+
+=back
+
+=head1 SEE ALSO
+
+=over 4
+
+=item lilypond(1)
+
+The GNU LilyPond music typesetter.
+
+=item mudela(5)
+
+On the LilyPond input format.
+
+=item The GNU LilyPond FAQ list.
+
+=back
+
A' % 220
Cisis
-The rest is named
+Rests are named r or s
- r
+ r % print a rest
+ s % a "space" rest, nothing is printed.
These notenames along with duration are enough material to construct
simple melodies:
\melodic {
- c4 ++ \transpose {
+ \meter 2/4;
+ ++
+ \transpose {
d % from c to the d that's one octave down
{ e4 f4 } % the horizontal music
} ++ g4
}
-The result is, as you can see, simple horizontal music again
+The result is, as you can see, again simple horizontal music.
=head2 Rhythms
Make the piece start with a partial measure [transl?] lasting 1 3/4
quaver.
+These commands are also "voice elements", and constitute simple mudela
+(consisting of stuff with duration 0).
+
=head1 STRUCTURE
In concrete, a piece of Mudela has the following structure:
+pl 57
+ - lots of TODO doco
+ - text alignment bugfix
+ - bugfix Voice_group_regs::get_register_p() now is actually called too
+ - bugfix init of Text_item::pos_i_
+
+pl 55.jcn1
+ - mi2mu man page
+ - make doc fixlet
+ - \[lr]heel \[lr]toe scripts (happy pedal studies, pa)
+ - lyric with width
+ - removal of some example files
+
+pl 56.mb:
+ - last duration fix
+ - makefile fixes
+ - space rest
+ - swedish note name update
+
+******
pl 56
- Massive Rest/Stem/Collision/Note_column rewrite: resolve
notehead/rest ambiguities and bugs. eg, [c8 r8 c8]
+
IMPORTANT
- * mi2mu man page
* update 20 pt table
* check return status in make_website
- * plet.ly
-
* a Hands on tutorial [HKN]
This is an assorted collection of stuff that will be done, might be
done, or is an idea that I want to think about
+Most of the items are marked in the code as well, with full explanation.
+grep for TODO and ugh/ugr
+
PARSER
* Duration-> Musical_duration, typedef Rational Duration?
* lilypond - -> crash
+ * chlapik balk ruimte
+
+ * standchen triool beam up/down
+
SEVERELY LACKING:
* use Real for y positions.
+ * shared lib on Solaris too.
+
* bugreport to doc++ devel: struct not in class hier; public
virtual baseclasses
* unix style paths for LILYINCLUDE EN
- * rpm package buildroot
-
* indentable stream as baseclass for TeX stream, lily stream, Dstream.
* caching Item/spanner dimensions.
* midi esp.: use I32 iso int where 32 bits are needed (or assumed...)
- * fix Staff_elem::width() derivs to use offset_
-
* parshape
* read from mmap directly: bugreport to flex developers->
* Decent TeX titledefs (\tempo, \metron, etc. )
- * command priority into enum
-
* C meter iso 4/4
* textspanner: center position
* use (char *) iso. String for communication between lexer and
parser.
- * configure idealspacing: arithmetic
-
- * add (good guess of) width to lyric items
+ * configure idealspacing: arithmetic spacing
* midi output: eat-up dynamic, key/meter/tempo changes, and
write them neatly
IDEAS
- * scoping in Lexer?
+ * scoping in Lexer: do general id- assignments in mudela.
+
+ ID '=' EXPR;
* integrate Register/Midi stuff
* y -dims in internote?
- * hack up mf sources for decent spacing info (and then maybe
- read TFM directly)
+ * hack up mf sources for decent spacing info (and then
+ read TFM directly, for text too)
* merge Atom and Symbol?
* SHIT: meters/bars should be aligned, which is difficult if
we get different keychanges in different staffs.
- * Integrating (objectiveC) MusicKit with LilyPond
+ * Integrating (objectiveC) MusicKit with LilyPond?
* MusixTeX output possible?
}
local $base="lilypond/";
-local @examples=("wohltemperirt" ,"standchen", "scsii-menuetto", "rhythm", "martien", "collisions");
+local @examples=("wohltemperirt" ,"standchen", "scsii-menuetto", "rhythm", "collisions");
sub gen_html
foreach $a (@examples) {
$texfile="test";
$tex = "tex $texfile";
- if ($a eq "standchen" || $a eq "scsii-menuetto" || $a eq "martien") {
+ if ($a eq "standchen" || $a eq "scsii-menuetto" ) {
$tex = "latex $a";
$texfile = "$a";
}
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
- enable-printing set debug printing"
+ enable-printing turn on debug printing"
ac_help="$ac_help
- disable-checking set runtime checks"
+ disable-checking set runtime checks (assert calls)"
ac_help="$ac_help
- disable-debugging set debug info"
+ disable-debugging set debug info "
ac_help="$ac_help
enable-optimise use maximal speed optimisations"
ac_help="$ac_help
enable-profiling compile with gprof support"
ac_help="$ac_help
- tex-prefix=DIR set the tex-directory to find TeX subdirectories."
+ tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)"
ac_help="$ac_help
- tex-dir=DIR set the directory to put LilyPond TeX files in."
+ tex-dir=DIR set the directory to put LilyPond TeX files in. "
ac_help="$ac_help
mf-dir=DIR set the directory to put LilyPond MetaFont files in."
ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
-printing_b=no
-checking_b=yes
-debug_b=yes
-optimise_b=no
-profile_b=no
-#shared_b=no
# Check whether --enable-printing or --disable-printing was given.
if test "${enable_printing+set}" = set; then
# 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:644: checking for $ac_word" >&5
+echo "configure:638: 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:675: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:669: 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 685 "configure"
+#line 679 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:683: \"$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:709: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:703: 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:714: checking whether we are using GNU C++" >&5
+echo "configure:708: 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:723: \"$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:717: \"$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:738: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:732: 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:768: checking for $ac_word" >&5
+echo "configure:762: 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:824: checking for a BSD compatible install" >&5
+echo "configure:818: 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:878: checking for $ac_word" >&5
+echo "configure:872: 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:928: checking for $ac_word" >&5
+echo "configure:922: 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:962: checking for $ac_word" >&5
+echo "configure:956: 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:996: checking for $ac_word" >&5
+echo "configure:990: 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:1030: checking for $ac_word" >&5
+echo "configure:1024: 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:1066: checking TeX/MF root dir directory" >&5
+echo "configure:1060: checking TeX/MF root dir directory" >&5
find_root_prefix="$prefix"
echo "$ac_t""$find_texprefix" 1>&6
+else
+ find_texprefix=$TEXPREFIX
fi
if test "x$TEXDIR" = xauto ; then
echo $ac_n "checking TeX input directory""... $ac_c" 1>&6
-echo "configure:1102: checking TeX input directory" >&5
+echo "configure:1098: 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:1124: checking MF input directory" >&5
+echo "configure:1120: 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:1175: checking how to run the C++ preprocessor" >&5
+echo "configure:1171: 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 1188 "configure"
+#line 1184 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1189: \"$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:1213: checking for FlexLexer.h" >&5
+echo "configure:1209: 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 1218 "configure"
+#line 1214 "configure"
#include "confdefs.h"
#include <FlexLexer.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1219: \"$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:1627: checking " >&5
+echo "configure:1623: 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_LANG_CPLUSPLUS
-printing_b=no
-checking_b=yes
-debug_b=yes
-optimise_b=no
-profile_b=no
-#shared_b=no
AC_ARG_ENABLE(printing,
- [ enable-printing set debug printing],
+ [ enable-printing turn on debug printing],
[printing_b=$enableval])
AC_ARG_ENABLE(checking,
- [ disable-checking set runtime checks],
+ [ disable-checking set runtime checks (assert calls)],
[checking_b=$enableval] )
AC_ARG_ENABLE(debugging,
- [ disable-debugging set debug info],
+ [ disable-debugging set debug info ],
[debug_b=$enableval])
AC_ARG_ENABLE(optimise,
[profile_b=$enableval])
AC_ARG_ENABLE(tex-prefix,
- [ tex-prefix=DIR set the tex-directory to find TeX subdirectories.],
+ [ tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)],
[TEXPREFIX=$enableval],
[TEXPREFIX=auto] )
AC_ARG_ENABLE(tex-dir,
- [ tex-dir=DIR set the directory to put LilyPond TeX files in.],
+ [ tex-dir=DIR set the directory to put LilyPond TeX files in. ],
[TEXDIR=$enableval],
[TEXDIR=auto] )
AC_ARG_ENABLE(mf-dir,
if test "x$TEXPREFIX" = xauto ; then
AC_TEX_PREFIX(TEXPREFIX)
+else
+ find_texprefix=$TEXPREFIX
fi
if test "x$TEXDIR" = xauto ; then
MAJOR_VERSION = 1
MINOR_VERSION = 1
-PATCH_LEVEL = 13
+PATCH_LEVEL = 14
# use to send patches, always empty for released version:
MY_PATCH_LEVEL = # include separator: "-1" or ".a"
#
+pl 1.1.14
+ - interval methods
pl 1.1.13
- better test-bed
- Heap PQueue implementation
/** mindblowingly stupid Associative array implementation.
Hungarian: map
+
+ TODO: a decent hash for strings.
*/
template<class K, class V>
struct Assoc {
Init for the class names which should be silent can be given in a rc file.
+ TODO:
+ make a baseclass for indentable streams.
*/
class Dstream
{
right +=r;
return *this;
}
+ Interval_t<T> &operator *=(T r) {
+ left *= r;
+ right *= r;
+ if (r <0) {
+ T t = left;
+ left = right;
+ right = t;
+ }
+ return *this;
+ }
String str() const;
bool elt_b(T r);
};
}
-
template<class T>
inline
Interval_t<T> operator +(T a,Interval_t<T> i )
return a+i;
}
+template<class T>
+inline
+Interval_t<T> operator *(T a,Interval_t<T> i )
+{
+ i *= a;
+ return i;
+}
+
+template<class T>
+inline
+Interval_t<T> operator *(Interval_t<T> i,T a ){
+ return a*i;
+}
+
typedef Interval_t<Real> Interval;
/** C++ for version of long_getopt. For processing GNU style command
line arguments. No pointer (return values, arguments) contents are
- copied. */
+ copied.
+
+ TODO: handle
+ command - , and command --
+
+ argument reordering
+ */
class Getopt_long {
public:
/** errorcodes: no error, argument expected, no argument expected,
+/*
+ path.hh -- declare File_path
+
+ source file of the Flower Library
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
#ifndef PATH_HH
#define PATH_HH
#include "string.hh"
#include "varray.hh"
-/** searching directory for file.
+/**
+ search in directories for a file.
Abstraction of PATH variable. An interface for searching input files.
Search a number of dirs for a file.
+ TODO: add a unix style PATH interface
Should use kpathsea?
*/
Array<String>::push;
void add(String str) { push(str); }
};
-/** split a path into its components.
+
+/** split a path into its components.
@params path
@return
- String & drive, String &dirs, String &filebase, String &extension
+ String &drive, String &dirs, String &filebase, String &extension
*/
void split_path(String path, String &drive, String &dirs, String &filebase, String &extension);
Hungarian postfix pq
+ TODO: add increase/decrease operations,
+ add max() operation
*/
template<class T>
class PQueue {
% name = \script {
-% indexstring same_dir_as_stem above_below_staff symbol_can_beinverted }
+% indexstring follow_into_staff same_dir_as_stem above_below_staff symbol_can_beinverted }
%
accent = \script { "sforzato" 0 -1 0 0 }
tenuto = \script {"tenuto" 0 -1 0 0 }
upbow = \script { "upbow" 0 0 1 0 }
downbow = \script { "downbow" 0 0 1 0 }
+% toe = \script { "toe" 0 -1 0 0 }
+% heel = \script { "heel" 0 -1 0 0 }
+lheel = \script { "heel" 0 0 -1 0 }
+rheel = \script { "heel" 0 0 1 0 }
+ltoe = \script { "toe" 0 0 -1 0 }
+rtoe = \script { "toe" 0 0 1 0 }
-%%
-% Please note that, while these names are used to enter *notes*, they
-% actually are *melodic*s, i.e. they represent a pitch solely. Notes
-% have a rhythmic part too. This is the reason that we don't write 'note
-% common Swedish names for notes. "-ess" means flat, "-iss" means sharp
+%
+% common Swedish names for notes. "ess" means flat, "iss" means sharp
%
% by Mats Bengtsson.
+
+%
+% Please note that, while these names are used to enter *notes*, they
+% actually are *melodic*s, i.e. they represent a pitch solely. Notes
+% have a rhythmic part too. This is the reason that we don't write 'note { .. }'
+%
\notenames {
-cessess = \melodic_request { 0 0 -2 }
-cess = \melodic_request { 0 0 -1 }
-c = \melodic_request { 0 0 0 }
-ciss = \melodic_request { 0 0 1 }
-cississ = \melodic_request { 0 0 2 }
-dessess = \melodic_request { 0 1 -2 }
-dess = \melodic_request { 0 1 -1 }
-d = \melodic_request { 0 1 0 }
-diss = \melodic_request { 0 1 1 }
-dississ = \melodic_request { 0 1 2 }
-essess = \melodic_request { 0 2 -2 }
-ess = \melodic_request { 0 2 -1 }
-e = \melodic_request { 0 2 0 }
-eiss = \melodic_request { 0 2 1 }
-eississ = \melodic_request { 0 2 2 }
-fessess = \melodic_request { 0 3 -2 }
-fess = \melodic_request { 0 3 -1 }
-f = \melodic_request { 0 3 0 }
-fiss = \melodic_request { 0 3 1 }
-fississ = \melodic_request { 0 3 2 }
-gessess = \melodic_request { 0 4 -2 }
-gess = \melodic_request { 0 4 -1 }
-g = \melodic_request { 0 4 0 }
-giss = \melodic_request { 0 4 1 }
-gississ = \melodic_request { 0 4 2 }
-assess = \melodic_request { 0 5 -2 }
-ass = \melodic_request { 0 5 -1 }
-a = \melodic_request { 0 5 0 }
-aiss = \melodic_request { 0 5 1 }
-aississ = \melodic_request { 0 5 2 }
-hessess = \melodic_request { 0 6 -2 }
-b = \melodic_request { 0 6 -1 }
-h = \melodic_request { 0 6 0 }
-hiss = \melodic_request { 0 6 1 }
-hississ = \melodic_request { 0 6 2 }
+ cessess = \melodic_request { -1 0 -2 }
+ cess = \melodic_request { -1 0 -1 }
+ c = \melodic_request { -1 0 0 }
+ ciss = \melodic_request { -1 0 1 }
+ cississ = \melodic_request { -1 0 2 }
+ dessess = \melodic_request { -1 1 -2 }
+ dess = \melodic_request { -1 1 -1 }
+ d = \melodic_request { -1 1 0 }
+ diss = \melodic_request { -1 1 1 }
+ dississ = \melodic_request { -1 1 2 }
+ essess = \melodic_request { -1 2 -2 }
+ ess = \melodic_request { -1 2 -1 }
+ e = \melodic_request { -1 2 0 }
+ eiss = \melodic_request { -1 2 1 }
+ eississ = \melodic_request { -1 2 2 }
+ fessess = \melodic_request { -1 3 -2 }
+ fess = \melodic_request { -1 3 -1 }
+ "f" = \melodic_request { -1 3 0 }
+ fiss = \melodic_request { -1 3 1 }
+ fississ = \melodic_request { -1 3 2 }
+ gessess = \melodic_request { -1 4 -2 }
+ gess = \melodic_request { -1 4 -1 }
+ g = \melodic_request { -1 4 0 }
+ giss = \melodic_request { -1 4 1 }
+ gississ = \melodic_request { -1 4 2 }
+ assess = \melodic_request { -1 5 -2 }
+ ass = \melodic_request { -1 5 -1 }
+ a = \melodic_request { -1 5 0 }
+ aiss = \melodic_request { -1 5 1 }
+ aississ = \melodic_request { -1 5 2 }
+ hessess = \melodic_request { -1 6 -2 }
+ b = \melodic_request { -1 6 -1 }
+ h = \melodic_request { -1 6 0 }
+ hiss = \melodic_request { -1 6 1 }
+ hississ = \melodic_request { -1 6 2 }
+
+
+ %
+ % upper case: 1 octave lower.
+ %
+
+
+ Cessess = \melodic_request { -2 0 -2 }
+ Cess = \melodic_request { -2 0 -1 }
+ C = \melodic_request { -2 0 0 }
+ Ciss = \melodic_request { -2 0 1 }
+ Cississ = \melodic_request { -2 0 2 }
+ Dessess = \melodic_request { -2 1 -2 }
+ Dess = \melodic_request { -2 1 -1 }
+ D = \melodic_request { -2 1 0 }
+ Diss = \melodic_request { -2 1 1 }
+ Dississ = \melodic_request { -2 1 2 }
+ Essess = \melodic_request { -2 2 -2 }
+ Ess = \melodic_request { -2 2 -1 }
+ E = \melodic_request { -2 2 0 }
+ Eiss = \melodic_request { -2 2 1 }
+ Eississ = \melodic_request { -2 2 2 }
+ Fessess = \melodic_request { -2 3 -2 }
+ Fess = \melodic_request { -2 3 -1 }
+ F = \melodic_request { -2 3 0 }
+ Fiss = \melodic_request { -2 3 1 }
+ Fississ = \melodic_request { -2 3 2 }
+ Gessess = \melodic_request { -2 4 -2 }
+ Gess = \melodic_request { -2 4 -1 }
+ G = \melodic_request { -2 4 0 }
+ Giss = \melodic_request { -2 4 1 }
+ Gississ = \melodic_request { -2 4 2 }
+ Assess = \melodic_request { -2 5 -2 }
+ Ass = \melodic_request { -2 5 -1 }
+ A = \melodic_request { -2 5 0 }
+ Aiss = \melodic_request { -2 5 1 }
+ Aississ = \melodic_request { -2 5 2 }
+ Hessess = \melodic_request { -2 6 -2 }
+ B = \melodic_request { -2 6 -1 }
+ H = \melodic_request { -2 6 0 }
+ Hiss = \melodic_request { -2 6 1 }
+ Hississ = \melodic_request { -2 6 2 }
+
+
}
"-staccatissimo" "\istaccatissimo" 0\pt 0\pt -7.5\pt 0\pt
"upbow" "\upbow" -1\pt 6\pt 0\pt 5\pt
"downbow" "\downbow" 0\pt 5\pt 0\pt 7.5\pt
+ "heel" "\heel" -1\pt 6\pt -5\pt 17.5\pt
+ "toe" "\toe" 0\pt 5\pt -5\pt 17.5\pt
}
"style" = \table {
- "roman" "\settext{%}" 0\pt 0\pt 0\pt 8\pt
+ "roman" "\settext{%}" 0\pt 5\pt 0\pt 8\pt
"italic" "\setitalic{%}" 0\pt 0\pt 0\pt 8\pt
"dynamic" "\setdynamic{%}" 0\pt 0\pt 0\pt 8\pt
}
+% title:
+% description:Cadenza to Mozart Horn concerto 3
+% composer(s):unknown
+% entered-by:HWN
+% copyright: public domain
%
-% Cadenza to Mozart Horn/3
-%
-% author: unknown. Copyright: none
-%
+% Tested Features: cadenza mode
+
+
\version "0.0.54";
+
cad = \melodic {
\cadenza 1;
\grouping 1*4;\duration 8;\octave c';
--- /dev/null
+%%MudelaHeader
+% title:
+% description:
+% composer(s):
+% entered-by:
+% copyright:
+%
+% Tested Features:
+%%End
+
+\version "0.0.54";
%
% copyright: None
%
-% declare melody (which will be in *one* staff ) for the lead voice
\version "0.0.54";
+% declare melody (which will be in *one* staff ) for the lead voice
melodie = \melodic {
% switch Lilypond in note-mode
\clef\violin;
-% JS Bach, Das Wohltemperirtes Clavier I, Fuga II (c-minor)
%
-% Public Domain -- typed by by HWN
+% title: Das Wohltemperirte Clavier I, Fuga II (c-minor)
+% description:
+% composer(s): JS Bach
+% entered-by: HWN
+% copyright:Public Domain
%
+% Tested Features:stem direction, multivoice.
+%
+
\version "0.0.54";
global = \melodic{
\meter 4/4 ;
- \grouping 2*2;
\key bes es as;
}
[G F16 Es] [F8 D] [As G] r A |
[B c] [F16 Es D C] [C8 c16 B] [c8 G]|
[As c16 B] [c8 d] [G8 c16 B] [c8 d] |
- [F16 G] As4 [G16 F] E2. |
+ [F16 G] As4 [G16 F] E2 |
}
MAJOR_VERSION = 0
MINOR_VERSION = 0
-PATCH_LEVEL = 55
+PATCH_LEVEL = 57
# use to send patches, always empty for released version:
# include separator: ".postfix", "-pl" makes rpm barf
-MY_PATCH_LEVEL =
+MY_PATCH_LEVEL =
+/*
+ beam.cc -- implement Beam
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+
+ TODO
+
+ Less hairy code. Better slope calculations.
+ knee ([\stem 1; c8 \stem -1; c8]
+
+*/
+
#include "varray.hh"
#include "proto.hh"
left_pos *= dir_i_;
slope *= dir_i_;
- // URG
+ // ugh
Real sl = slope*paper()->internote();
paper()->lookup_l()->beam(sl, 20 PT);
slope = sl /paper()->internote();
/**
- this needs A LOT of rethinking.
-
generate springs between columns.
+ TODO: This needs A LOT of rethinking. Spacing should take optical
+ effects into account, should be local (measure wide), should check
+ smallest divisions.
+
+
*/
void
Score::calc_idealspacing()
for (int i=0; i < clash_l_arr_.size(); i++) {
Note_column* c_l = clash_l_arr_[i];
+ if (! c_l->dir_i_) {
+ warning ("No stem direction set. Ignoring column in clash. ");
+ continue;
+ }
int d = (c_l->dir_i_);
clash_group_arr_a[idx(d, c_l->h_shift_b_)].push(c_l);
}
+
for (int j=0; j < 4; j++) {
if (clash_group_arr_a[j].size() > 1) {
warning("Too many clashing notecolumns. Ignoring them.");
Crescendo::brew_molecule_p() const return m_p ;
{
Real x_off_dim=0.0;
- Real absdyn_dim = 10 PT; // UGR
+ Real absdyn_dim = 10 PT; // ugh
m_p = new Molecule;
Real w_dim = width().length();
#ifndef BAR_HH
#define BAR_HH
#include "item.hh"
-
-struct Bar: Item {
+/**
+ TODO: connections with pre and postbreak
+ */
+class Bar:public Item {
+public:
String type;
+ NAME_MEMBERS(Bar);
Bar(String type);
-NAME_MEMBERS(Bar);
+private:
void do_print() const;
Molecule*brew_molecule_p()const;
};
/*
- break.hh -- part of LilyPond
+ break.hh -- declare Break_algorithm
- (c) 1996,97 Han-Wen Nienhuys
+ source file of the LilyPond music typesetter
+
+ (c) 1996, 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
+
#ifndef BREAK_HH
#define BREAK_HH
#include "varray.hh"
#include "colhpos.hh"
/** Class representation of an algorithm which decides where to put
- the column, and where to break lines. */
+ the column, and where to break lines.
+
+ TODO: a decent algorithm, based on dynamic programming or something
+ a like. A "parindent", caching of breakpoints
+
+ */
struct Break_algorithm {
PScore &pscore_;
Real linelength;
#include "lily-proto.hh"
#include "item.hh"
+/** TODO
+
+ multistaff support (see Chlapik: equal noteheads should be on the
+ same hpos.)
+*/
class Collision : public Item {
protected:
virtual void do_pre_processing();
typedef Interval_t<Moment> MInterval;
/** data structure which represents rhythmic units this is a tree. It groupes notes according to rules
+
+ TODO Documentation. Unhairing
*/
struct Rhythmic_grouping {
Array<Rhythmic_grouping*> children;
The quality is given by the total potential energy in the
springs. The lower the energy, the better the configuration.
+
+ TODO: make item widths work per pstaff.
+
*/
class Spacing_problem {
Array<Idealspacing const *> ideals;
#include "varray.hh"
#include "scalar.hh"
-struct Meter: Item {
+/**
+ TODO:
+
+ C style meters, 2+3+2/8 meters, alla breve.
+
+ */
+class Meter: public Item {
Array<Scalar> args;
/* *************** */
-NAME_MEMBERS(Meter);
-
- Meter(Array<Scalar> args) ;
+protected:
Molecule*brew_molecule_p() const;
+public:
+ Meter(Array<Scalar> args) ;
+ NAME_MEMBERS(Meter);
};
#endif // METER_HH
#define MIDIOUTPUT_HH
#include "lily-proto.hh"
+
struct Midi_output {
Midi_output(Score* score_l, Midi_def* );
Voice_element* get_rest_element(String,Duration *);
Voice_element* get_word_element(Text_def*, Duration*);
void set_last_duration(Duration const *);
+ void set_default_duration(Duration const *);
void set_duration_mode(String s);
friend int yyparse( void*);
public:
/** a struct for treating a group of noteheads (noteheads, stem
(chord) and scripts ) as a single entity. */
class Note_column : public Script_column {
+ /// link to the stem. For setting default direction
+ Stem * stem_l_;
+ void do_pre_processing();
public:
bool h_shift_b_;
/*
- paper-def.hh -- declare Paper_def
+paper-def.hh -- declare Paper_def
source file of the LilyPond music typesetter
- (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+ (c) 1996,1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
#include "moment.hh"
-/** symbols, dimensions and constants
+/**
+
+ symbols, dimensions and constants
This struct takes care of all kinds of symbols, dimensions and
constants. Most of them are related to the point-size of the fonts,
so therefore, the lookup table for symbols is also in here.
+ TODO:
+
+ add support for multiple fontsizes
+ split into "Input_paper_def" and Paper_def
+ add support for other len->wid conversions.
*/
class Paper_def {
Lookup *lookup_p_;
source file of the LilyPond music typesetter
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+
+ TODO
+ integrate Meter handling, to guarantee proper creation of staff_columns.
*/
/**
Remove #reg_l# from the list, and return it.
*/
- Request_register * get_register_p(Request_register*reg_l);
+ virtual Request_register * get_register_p(Request_register*reg_l);
virtual void set_feature(Feature i);
virtual bool acceptable_request_b(Request*)const;
virtual void pre_move_processing();
/*
- register.hh -- part of LilyPond
+ register.hh -- declare Request_register
- (c) 1996,1997 Han-Wen Nienhuys <hanwen@stack.nl>
+ source file of the LilyPond music typesetter
+
+ (c) 1996, 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
+
#ifndef REGISTER_HH
#define REGISTER_HH
source file of the LilyPond music typesetter
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+
+
*/
/**
walk through the score_columns, and while doing so, walk all staffs in a score.
+
+ TODO
+ support for vertical spanners.
*/
class Score_walker : public PCursor<Score_column *>
{
#define STEMBEAMREG_HH
#include "register.hh"
-struct Stem_beam_register : Request_register {
+/**
+ TODO:
+ override default_grouping if setting a n-plet
+
+ */
+class Stem_beam_register : public Request_register {
Stem * stem_p_;
Beam * beam_p_;
Beam_req * beam_req_l_;
bool end_beam_b_;
Rhythmic_grouping *current_grouping;
int default_dir_i_;
-
+public:
/* *************** */
+ NAME_MEMBERS(Stem_beam_register);
Stem_beam_register();
+
+protected:
~Stem_beam_register();
virtual void set_feature(Feature dir_i_);
virtual bool try_request(Request*);
virtual void acknowledge_element(Staff_elem_info);
virtual void pre_move_processing();
virtual void post_move_processing();
- NAME_MEMBERS(Stem_beam_register);
};
#endif // STEMBEAMREG_HH
(c) 1996,97 Han-Wen Nienhuys
*/
-#ifndef TEXTDEF_HH
-#define TEXTDEF_HH
+#ifndef TEXT_DEF_HH
+#define TEXT_DEF_HH
#include "string.hh"
#include "proto.hh"
#include "input.hh"
-struct Text_def : Input {
+class Text_def : public Input {
+public:
+ /**
+ centered , or aligned?
+
+ -1 = raggedright, 0 = center, 1 = raggedleft
+ */
int align_i_;
+ Paper_def* pdef_l_;
String text_str_;
String style_str_;
bool compare(const Text_def&);
Text_def();
virtual void print() const;
- virtual Atom create_atom(Paper_def*) const;
+ Atom create_atom() const;
+ Interval width() const;
};
-#endif // TEXTDEF_HH
+#endif // TEXT_DEF_HH
/*
- text.hh -- part of LilyPond
+ text-item.hh -- part of LilyPond
(c) 1996,97 Han-Wen Nienhuys
*/
*/
class Text_item : public Item ,public Staff_side{
void init(Text_def* tdef_l);
- Text_def* tdef_p_;
-
+
public:
Text_def * tdef_l();
+ Text_def const* tdef_c_l();
int pos_i_;
-
+
+ /// do I have width?
+ bool fat_b_;
+
/* ***************/
- Text_item(Text_def*);
- Text_item(Text_req*);
- ~Text_item();
+ Text_item(Text_def*,int dir=0);
+ virtual ~Text_item();
NAME_MEMBERS(Text_item);
+
protected:
+ Text_def* tdef_p_;
+
virtual void set_default_index();
- Molecule* brew_molecule_p() const;
+ virtual Molecule* brew_molecule_p() const;
virtual void do_post_processing();
virtual void do_pre_processing();
};
virtual void post_move_processing();
virtual bool try_request(Request*);
public:
-
+ void OK() const;
virtual Request_register * get_register_p(Request_register * reg_l);
/// each group in a staff has an unique ID.
String group_id_str_;
/// The pointers are in the base class. This is just administration
- Array<Voice_registers*> voice_regs_l_;
+ Array<Voice_registers*> voice_reg_l_arr_;
/* *************** */
NAME_MEMBERS(Voice_group_registers);
class Voice_registers : public Register_group_register {
Input_register const *ireg_C_;
+ bool terminate_b_;
public:
Voice *voice_l_;
/* *************** */
+ Voice_registers(Voice*, Input_register const*);
NAME_MEMBERS(Voice_registers);
+protected:
+ virtual void pre_move_processing();
virtual bool acceptable_request_b(Request*);
virtual void acknowledge_element(Staff_elem_info info);
virtual bool try_request(Request*);
- Voice_registers(Voice*, Input_register const*);
virtual void do_print() const;
};
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
- todo: key undo
+
+ Todo: key undo, special keys.
*/
#include "key-reg.hh"
+/*
+ key.cc -- implement Key, Octave_key
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+
+ TODO
+ transposition.
+*/
+
#include "key.hh"
const int OCTAVES=14; // ugh..
KEYWORD \\{WORD}
WHITE [ \n\t\f]
BLACK [^ \n\t\f]
-RESTNAME r
+RESTNAME [rs]
NOTECOMMAND \\{WORD}
DOTS \.+
LYRICS {AA}[^0-9 \t\n\f]*
source file of the LilyPond music typesetter
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+
+ TODO
+ This doth suck. We should have PS output, and read spacing info from TFMs
+
+ Glissando, bracket
+
*/
#include "lookup.hh"
Symbol s = (*symtables_)("align")->lookup(dir);
s.tex = substitute_args(s.tex,a);
- s.dim.y = tsym.dim.y;
+ s.dim = tsym.dim;
return s;
}
#include "lyric-register.hh"
#include "musical-request.hh"
#include "text-item.hh"
+#include "paper-def.hh"
+#include "lookup.hh"
Lyric_register::Lyric_register()
{
-
}
bool
{
Text_item * last_item_l =0;
for (int i=0; i < lreq_arr_.size(); i++) {
- Text_item *lp = new Text_item(lreq_arr_[i]);
+ Text_item *lp = new Text_item(lreq_arr_[i]->tdef_p_ );
lp->dir_i_ = -1;
+ lp->fat_b_ = true;
if (last_item_l)
lp->add_support(last_item_l);
last_item_l = lp;
source file of the LilyPond music typesetter
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>, Jan Nieuwenhuizen <jan@digicash.com>
+
+ TODO
+
+ Ideally this should also use a register system, to process slurs,
+ dynamics, etc.
+
*/
#include "command-request.hh"
last_duration_mode = (s== "LAST");
}
+void
+My_lily_parser::set_default_duration(Duration const *d)
+{
+ last_duration_mode = false;
+ default_duration_ = *d;
+}
+
+
void
My_lily_parser::set_last_duration(Duration const *d)
{
}
Voice_element *
-My_lily_parser::get_rest_element(String, Duration * duration_p )
+My_lily_parser::get_rest_element(String s, Duration * duration_p )
{
Voice_element* velt_p = new Voice_element;
velt_p->set_spot( here_input());
- Rest_req * rest_req_p = new Rest_req;
- rest_req_p->duration_ = *duration_p;
- rest_req_p->set_spot( here_input());
-
- velt_p->add(rest_req_p);
-
+ if (s=="s") { /* Space */
+ Skip_req * skip_p = new Skip_req;
+ skip_p->duration_ = duration_p->length();
+ skip_p->set_spot( here_input());
+ velt_p->add(skip_p);
+ }
+ else {
+ Rest_req * rest_req_p = new Rest_req;
+ rest_req_p->duration_ = *duration_p;
+ rest_req_p->set_spot( here_input());
+
+ velt_p->add(rest_req_p);
+ }
Stem_req * stem_p = new Stem_req;
stem_p->duration_ = *duration_p;
stem_p->set_spot ( here_input ());
velt_p->add(stem_p);
+
delete duration_p;
return velt_p;
}
IMPLEMENT_STATIC_NAME(Note_column);
-
void
Note_column::add(Stem*stem_l)
{
+ stem_l_ = stem_l;
add_support(stem_l);
}
Note_column::Note_column()
{
+ stem_l_ = 0;
h_shift_b_ =false;
dir_i_ =0;
}
head_l_arr_.top()->position_i_);
}
+
+
+void
+Note_column::do_pre_processing()
+{
+ if (!dir_i_)
+ dir_i_ = stem_l_->dir_i_;
+}
+/*
+ paper-def.cc -- implement Paper_def
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
#include <math.h>
#include "misc.hh"
#include "paper-def.hh"
delete $2;
}
| DURATIONCOMMAND notemode_duration {
- THIS->default_duration_ = *$2;
+ THIS->set_default_duration($2);
delete $2;
}
| OCTAVECOMMAND {
{
int staff_i = 0;
last_= 0;
- Moment min_staff_last_mom=1e8; // UGH
+ Moment min_staff_last_mom=1e8; // ugh
for (iter_top(l, i); i.ok(); i++, staff_i++) {
Moment staff_last=0;
for (iter_top(i->voice_list_,j); j.ok(); j++) {
+/*
+ qlpsolve.cc -- implement Active_constraints, Inactive_iter
+
+ source file of the LilyPond music typesetter
+
+ (c) 1996, 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+
+ TODO:
+ try fixed point arithmetic, to speed up lily.
+ */
+
#include "qlpsolve.hh"
#include "const.hh"
#include "debug.hh"
void
Register_group_register::set_feature(Feature d)
{
- for (iter_top(reg_list_, i); i.ok(); i++) {
- i->set_feature(d);
+ iter_top(reg_list_, i);
+ while (i.ok()) {
+ // this construction to ensure clean deletion
+ Request_register *reg_l = i++;
+ reg_l->set_feature(d);
}
}
void
Register_group_register::pre_move_processing()
{
- for (iter_top(reg_list_, i); i.ok(); i++)
- i->pre_move_processing();
+ iter_top(reg_list_, i);
+ while (i.ok()) {
+ // this construction to ensure clean deletion
+ Request_register *reg_l = i++;
+ reg_l->pre_move_processing();
+ }
}
void
Register_group_register::process_requests()
{
- for (iter_top(reg_list_, i); i.ok(); i++)
- i->process_requests();
+ iter_top(reg_list_, i);
+ while (i.ok()) {
+ // this construction to ensure clean deletion
+ Request_register *reg_l = i++;
+ reg_l->process_requests();
+ }
}
void
if (ok() && ptr()->when() == last)
PCursor<Score_column *>::operator++(0);
reinit();
- bool last_b = (!ok()); // urgh
+ bool last_b = (!ok()); // ughh
for (int i=0; i< walker_p_arr_.size(); i++) {
if (walker_p_arr_[i]->ok() &&
(last_b || walker_p_arr_[i]->when() < when())) {
void
Script::set_default_index()
{
- pos_i_ = get_position_i();
+ pos_i_ = get_position_i(symbol().dim.y);
}
Interval
/*
TODO:
+
think about crossing stems.
+ Begin and end should be treated as a Script.
+
*/
#include "slur.hh"
#include "scalar.hh"
Staff_side::get_position_i(Interval sym_dim) const
{
int i= get_position_i();
- return i+ int(rint(- sym_dim[dir_i_] / inter_f_));
+ return i+ int(rint(- sym_dim[-dir_i_] / inter_f_));
}
if (!span_p_ && !last_mom_) {
span_p_= new Staff_symbol(NO_LINES);
span_p_->left_col_l_ =
- get_staff_info().command_pcol_l()->postbreak_p_; // GUH
+ get_staff_info().command_pcol_l()->postbreak_p_; // ugh
}
if (!last_mom_) {
last_mom_ = get_staff_info().score_l()->last();
iter_top(cols_, i);
iter_top(cols_, j);
i++;
- for (; i.ok(); j++,i++) {
- assert(j->when () < i->when() );
- }
assert(score_l_);
#endif
}
set_default_dir();
- // uhh... how about non 5-line staffs?
+ // ugh... how about non 5-line staffs?
if ((max_head_i() < -2 && dir_i_ == 1 )
||(min_head_i() > staff_size_i_ + 2 && dir_i_ == -1) ){
set_stemend( staff_size_i_ /2 );
Stem::brew_molecule_p()const
{
Molecule *out =0;
+ if (invisible_b() && ! rest_l_arr_.size())
+ warning("Empty stem. Ugh!");
+
if ( invisible_b() )
return Staff_elem::brew_molecule_p();
Real bot = stem_bottom_f_;
Real top = stem_top_f_;
- if (min_head_i() > max_head_i()) {
- warning("Empty stem. Ugh!");
- bot = -10;
- top = 20;
- }
-
+
assert(bot!=top);
Paper_def *p =paper();
#include "paper-def.hh"
#include "molecule.hh"
#include "text-def.hh"
+#include "dimen.hh"
+
+Interval
+Text_def::width() const
+{
+ Atom a = create_atom();
+
+ Real guess_width_f = text_str_.length_i() * a.sym.dim.x.length(); // ugh
+ Interval i(0, guess_width_f);
+ i += - (align_i_ + 1)* i.center();
+ return i;
+}
+
Text_def::Text_def()
{
- align_i_ = 1; // right
+ align_i_ = -1; // right
+ pdef_l_ = 0;
style_str_ = "roman";
}
bool
}
Atom
-Text_def::create_atom(Paper_def*p) const
+Text_def::create_atom() const
{
- return p->lookup_l()->text(style_str_, text_str_, -align_i_);
+ return pdef_l_->lookup_l()->text(style_str_, text_str_, -align_i_);
}
void
/*
- textitem.cc -- implement Text_item
+ text-item.cc -- implement Text_item
source file of the LilyPond music typesetter
#include "molecule.hh"
#include "lookup.hh"
-Text_item::Text_item(Text_def *tdef_l)
+Text_item::Text_item(Text_def *tdef_l, int d)
: Staff_side(this)
{
- dir_i_ =-1;
- init(tdef_l);
+ dir_i_ = d;
+ fat_b_ = false;
+ tdef_p_ = new Text_def(*tdef_l);
+ pos_i_ =0;
}
Text_def*
delete tdef_p_;
}
-void
-Text_item::init(Text_def *tdef_l)
-{
- tdef_p_ = new Text_def (*tdef_l);
-}
-
-Text_item::Text_item(Text_req* treq_l)
- : Staff_side(this)
-{
- init(treq_l->tdef_p_);
- dir_i_ = treq_l->dir_i_;
- if (!dir_i_)
- dir_i_ = -1;
-}
-
void
Text_item::set_default_index()
{
- pos_i_ = get_position_i(tdef_p_->create_atom(paper()).extent().y );
+ pos_i_ = get_position_i(tdef_p_->create_atom().extent().y );
}
void
{
if (!dir_i_)
dir_i_ = -1;
+ tdef_p_->pdef_l_ = paper();
}
void
Molecule*
Text_item::brew_molecule_p() const
{
- Molecule* mol_p = new Molecule(tdef_p_->create_atom(paper()));
+ Atom a(tdef_p_->create_atom());
+
+ if ( fat_b_)
+ a.sym.dim.x = tdef_p_->width();
+
+ Molecule* mol_p = new Molecule(a);
if(dir_i_<0 ) // should do something better anyway.
mol_p->translate(Offset(0, -mol_p->extent().y.left ));
Text_register::process_requests()
{
if (text_req_l_) {
- text_p_ = new Text_item(text_req_l_); // UGH
+ text_p_ = new Text_item(text_req_l_->tdef_p_, 0); // ugh
announce_element(Staff_elem_info(text_p_, text_req_l_));
}
}
Molecule*
Text_spanner::brew_molecule_p() const
{
- Atom tsym (spec.create_atom(paper()));
+ Atom tsym (spec.create_atom());
tsym.translate(text_off_);
Molecule*output = new Molecule;
right_col_l_ = support->right_col_l_;
left_col_l_ = support->left_col_l_;
assert(left_col_l_ && right_col_l_);
+ spec.pdef_l_ = paper();
}
Interval
Voice_element::Voice_element(Voice_element const&src)
: Input(src)
{
+ principal_req_l_ = 0;
voice_C_=0;
for (iter_top(src.req_p_list_, i); i.ok(); i++)
add(i->clone());
{
ireg_C_ =ireg_C;
Register_group_register::add(ireg_C->get_nongroup_p_arr());
- if (id=="") // UGH
+ if (id=="") // ugh
id = __FUNCTION__ + String(temp_id_count++);
group_id_str_ = id;
termination_mom_ = 0;
bool
Voice_group_registers::try_request(Request*r_l)
{
- for (int i=0; i < voice_regs_l_.size(); i++) {
- if (voice_regs_l_[i]->voice_l_ == r_l->voice_l())
+ for (int i=0; i < voice_reg_l_arr_.size(); i++) {
+ if (voice_reg_l_arr_[i]->voice_l_ == r_l->voice_l())
goto gotcha; // yeah, yeah, I know
}
return false;
Register_group_register::add(r_l);
if (r_l->name() == Voice_registers::static_name()) {
Voice_registers * vregs_l = (Voice_registers*)r_l;
- voice_regs_l_.push( vregs_l );
+ voice_reg_l_arr_.push( vregs_l );
Voice *v_l = vregs_l->voice_l_;
termination_mom_ = termination_mom_ >? v_l -> last();
mtor << "adding Voice_registers, now terminating at " <<
termination_mom_<< "\n";
}
+ OK();
}
void
if ( get_staff_info().time_C_ ->when_ > termination_mom_ ){
mtor << "Terminating voice_group\n";
daddy_reg_l_->terminate_register(this);
+ return ;
}
Register_group_register::post_move_processing();
}
Voice_group_registers::get_register_p(Request_register *reg_l)
{
if (reg_l->name() == Voice_registers::static_name()) {
- for (int i=0; i <voice_regs_l_.size(); i++) {
- if (reg_l == voice_regs_l_[i])
- voice_regs_l_.del(i);
+ for (int i=0; i <voice_reg_l_arr_.size(); i++) {
+ if (reg_l == voice_reg_l_arr_[i])
+ voice_reg_l_arr_.del(i);
}
}
- return Register_group_register::get_register_p(reg_l);
+ Request_register*reg_p =Register_group_register::get_register_p(reg_l);
+ OK();
+
+ return reg_p;
+}
+
+void
+Voice_group_registers::OK() const
+{
+ for (int i=0; i < voice_reg_l_arr_.size(); i++) {
+ iter(reg_list_.find(voice_reg_l_arr_[i]), j);
+ assert(j.ok());
+ }
}
+
+
Voice_registers::Voice_registers(Voice *v_p, Input_register const*ireg_C)
{
+ terminate_b_ = false;
ireg_C_ = ireg_C;
voice_l_ = v_p;
add(ireg_C->get_nongroup_p_arr());
Command_req *c=r_l->command();
if (c&&c->terminate()) {
- daddy_reg_l_->terminate_register(this);
+ terminate_b_ = true;
return true; // scary. We're deleted now..
} else if (c&&c->groupchange()) {
/* this is scary as well. The groupchange has to be handled by
assert(daddy_reg_l_->name() == Voice_group_registers::static_name());
((Staff_registers*)daddy_reg_l_->daddy_reg_l_)-> // scary.
change_group(c->groupchange(), this,
- (Voice_group_registers*)daddy_reg_l_); // UGR!
+ (Voice_group_registers*)daddy_reg_l_); // ugh!
return true;
}
Register_group_register::do_print();
#endif
}
+
+void
+Voice_registers::pre_move_processing()
+{
+ if (terminate_b_)
+ daddy_reg_l_->terminate_register(this);
+ else
+ Register_group_register::pre_move_processing();
+}
# so why does make still consider xx.y : RCS/xx.y,v ?
# there is no suffix ,v anymore!
-.SUFFIXES: .cc .o .hh .y .l .pod .txt .1 .dep .html
+.SUFFIXES: .cc .o .hh .y .l .pod .text .1 .dep .html
# compile rules:
INSTALL.text: check-doc-deps
rm -f INSTALL.text
- ln `find -name INSTALL.text|head -1` .
+ ln `$(FIND) ./ -name INSTALL.text|head -1` .
localdistclean:
rm -rf Makefile $(lily-version) $(flower-version) $(mi2mu-version) .b $(build) *~ $(allout) $(allgen) config.cache config.status
Begin3
Title: LilyPond
-Version: 0.0.56
-Entered-date: 04/23/97
+Version: 0.0.57
+Entered-date: 04/28/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.56.tar.gz
+ 300k lilypond-0.0.57.tar.gz
Alternate-site:
Original-site:
Platform: unix/win32, GNU C++
Name: lilypond
-Version: 0.0.56
+Version: 0.0.57
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.56.tar.gz
+Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.57.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/mudela.text input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/error.ly input/fugue1.midi.ly input/kortjakje.ly input/maartje.ly input/martien.ly input/martien.tex input/mlalt.ly input/mlcello.ly input/mlvio1.ly input/mlvio2.ly input/plet.ly input/pre1.midi.ly input/rhythm.ly input/scales.ly input/scsii-menuetto.ly input/scsii-menuetto.tex input/standchen.ly input/standchen.tex 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/rhythm.ly input/scales.ly input/scsii-menuetto.ly input/scsii-menuetto.tex input/standchen.ly input/standchen.tex input/twinkle.ly input/wohltemperirt.ly Documentation/lelie_logo.gif
/usr/bin/convert-mudela
/usr/bin/lilypond
/usr/lib/libflower.so
-\font\musicfont=musix20
+\font\musicfont=cmsy10
\font\slurfont=xslu16
\def\thefont{\musicfont}
%%
%% include file for LilyPond
+%%
+%% this file defines various macros to accomodate lilypond output
\def\mdef#1#2{\def#1{\mchar{#2}}}
\def\mchar#1{\musicfnt\char#1}
\def\maccentdef#1#2#3{\def#1{\maccentraise{\mchar{#2}}{#3}}}
\def\vcenter#1{\vbox to 0pt{\vss #1\vss}}
+\def\mathdef#1#2{\def#1{\mathchar{#2}}}
+% \def\mathchar#1{\mathfnt\char#1}
+\def\mathchar#1{$#1$}
+\def\mathaccentraise#1#2{\dimen0=\noteheight
+ \rationalmultiply\dimen0*#2%
+ \raise\dimen0\hbox{#1}}
+\def\mathaccentdef#1#2#3{\def#1{\mathaccentraise{\mathchar{#2}}{#3}}}
+
\def\topalign#1{\vbox to 0pt{#1\vss}}
\def\botalign#1{\vbox to 0pt{\vss #1}}
\font\hslurdfont=xslhd16
\font\hslurhfont=xslhz20
\font\musicfnt=musix16
- \font\dynfont=cmbxti10
+ \font\dynfont=cmbxti12
\font\musicdraw=musixsps
\balkhoog=16pt
\staffrulethickness=0.4pt
}
% \def\dyn{\italicfont}
\def\dyn{\dynfont}
-\def\dynf{f\kern-.1ex}
-\def\dynm{f\kern-.15ex}
-\def\dynp{p\kern-.15ex}
+\def\kdynf{\dynfont f\kern-.1ex}
+\def\kdynm{\dynfont f\kern-.15ex}
+\def\kdynp{\dynfont p\kern-.15ex}
-\def\dynppp{\dynfont\dynp\dynp p}
-\def\dynpp{\dynfont\dynp p}
+\def\dynppp{\dynfont\dynp\kdynp p}
+
+\def\dynpp{\dynfont p\kdynp}
\def\dynp{\dynfont p}
-\def\dynmp{\dynfont\dynm p}
-\def\dynmf{\dynfont\dynm f}
+\def\dynmp{\dynfont m\kdynp}
+\def\dynmf{\dynfont m\kdynf}
\def\dynf{\dynfont f}
-\def\dynff{\dynfont\dynf f}
-\def\dynfff{\dynfont\dynf\dynf f}
+\def\dynff{\dynfont f\kdynf}
+\def\dynfff{\dynfont f\kdynf \kdynf}
\def\slurcharh#1{{\slurhfont\char#1}}
\def\slurcharu#1{{\slurufont\char#1}}
\maccentdef\fermata{80}{-1/1}
\maccentdef\ifermata{81}{1/1}
-
-
\mdef\spicato{28}
\mdef\ispicato{29}
\mdef\upbow{23}
\mdef\downbow{22}
\mdef\portato{26}
+% \mathdef\heel\cup % "225B
+% \mathdef\toe\wedge % "225E
+\mathaccentdef\heel\cup{-1/1}
+\mathaccentdef\toe\wedge{-1/1}
+
\def\stem#1#2{\vrule height#2 depth-#1}
\def\placebox#1#2#3{%