TOPLEVEL_MAJOR_VERSION = 0
TOPLEVEL_MINOR_VERSION = 0
-TOPLEVEL_PATCH_LEVEL = 68
+TOPLEVEL_PATCH_LEVEL = 70
# use to send patches, always empty for released version:
# include separator: ".postfix", "-pl" makes rpm barf
-TOPLEVEL_MY_PATCH_LEVEL =pre.jcn1
+TOPLEVEL_MY_PATCH_LEVEL = pre
-[DRAFT]
- Born .. 1997,
+ We are proud to announce the birth of "GNU LilyPond 0.1", a.k.a.
Lily
- GNU LilyPond 0.1, daughter to
+ born .. 1997
- Jan 'Janneke' Nieuwenhuizen and Han-Wen 'Wendy' Nienhuys
+ daughter to Jan 'Janneke' Nieuwenhuizen and Han-Wen 'Wendy'
+ Nienhuys
-Lily is a health baby weighing 330 kilobyte
+Lily is a healthy, bouncing baby weighing 340 kilobytes
-Visiting hours: 24hrs a day at ftp://, pictures & droppings at http://
+Visiting hours: 24hrs a day at
-Congratulations to janneke & wendy, hanwen@stack.nl, jan@digicash.com
+ ftp://pcnov095.win.tue.nl,
-**************************
+you can see some diapers and pictures at
- I would like to dedicate this program to all friends that
-music got me. Those deserving special mention (In no particular order)
+ http://www.stack.nl/~hanwen/lilypond/index.html
+
+You can send your congratulations to Janneke (jan@digicash.com) and
+Wendy (hanwen@stack.nl)
+
+ --- * ---
+
+ We would like to dedicate this program to all the friends that we
+ met through music.
+
+
+ Those deserving special mention (in no particular order):
Esther, Marijke, Heike, Inge, Judith, Hannah, Auke, Ilse, Evelyn,
-Maartje, Suzanne, Ilse (gee, again?), and last (but certainly not
-least) Janneke!
+Maartje, Suzanne, Ilse (gee, again?), most members of the Eindhovens
+Jongeren Ensemble and last (but certainly not least) Janneke!
HW
Eva, Roos, Judith, and, of course, Wendy!
JCN
+
+ --- * ---
-**************************
+[ And now the serious part ]
Announcing
changes, cadenza-mode, key changes, repeat bars
[Kudos to the FSF, all linux hackers, and --of course-- especially
-GrandMaster Linus T, for the OS and The Announce :-]
+GrandMaster Linus T, for the OS-kernel and The Announce :-]
Han-Wen Nienhuys <hanwen@stack.nl>
Jan Nieuwenhuizen <jan@digicash.com>
--- /dev/null
+This file documents bugs which were "re-introduced" in various pl's
+
+
+pl69
+ * scales.ly
+
+ * slurs.ly
+
+pl68:
+
+ * lyrics broken,
+
+ * midi broken
=item *
<a href=lilyliterature.html
>
-resources on music typesetting
+Papers, books and online-resources on music typesetting
</a
>
[What I do know, I've commented inside brackets. They are just
my personal comments, not to be taken too seriously]
-More on GNU Music: http://dept-info.labri.u-bordeaux.fr/~strandh/Gsharp
-
-Tablature: http://wabakimi.carleton.ca/~phacket2/guitar/tabfaq.html
-
=head2 References
Wanske, Helene. ``Musiknotation --- Von der Syntax des Notenstichs
[This is about I<engraving> i.e. professional music typesetting, and
includes some good spacing tables]
-
+
Read, Gardner. ``Modern Rhythmic Notation.'' Indiana University Press, 1978.
Read, Gardner. ``Music Notation'' (2nd edition). Taplinger Publishing,
Extensibility, Abstraction, and Notation Contexts for the Lime Music
Editor, Computer Music Journal, Vol. 17, No. 3, 1993, pp. 43-58
-[A description of Lime internals (which resemble LilyPond pre 0.0.68
-data structures somewhat)]
+[A description of Lime internals (which resemble older (before
+0.0.68pre) LilyPond data structures somewhat)]
L. Haken and D. Blostein, A New Algorithm for Horizontal Spacing of
Printed Music, International Computer Music Conference, Banff,
[This paper provides a shallow overview of the algorithm used in LIME
for spacing individual lines.]
+Gary M. Rader, ``Creating Printed Music Automatically''. Computer Vol
+29(6), June 1996, pp 61--69.
+
+[Describes a system called MusicEase, and explains that it uses
+"constraints" (which go unexplained) to automatically position various
+elements.]
+
=head2 Further reading
Chlapik, Herbert. ``Die Praxis des Notengraphikers''. Doblinger, 1987.
The University of Colorado Music Engraving page.
http://obenamots.cc.colorado.edu/cgi-bin/Musicpress/engraving.html
+More on GNU Music: http://dept-info.labri.u-bordeaux.fr/~strandh/Gsharp
+
+Tablature: http://wabakimi.carleton.ca/~phacket2/guitar/tabfaq.html
+
+
(of varying usefulness):
Donato, Anthony. Preparing Music Manuscript. Englewood Cliffs:
Prentice-Hall, 1963.
Donemus. "Uitgeven van muziek". Donemus Amsterdam, 1900
-
+
Heussenstamm, George. The Norton Manual of Music Notation. New York:
Norton, 1987.
-
+
Karkoshka, Erdhard. Notation in New Music. Trans. Ruth Koenig. New York:
Praeger Publishers, 1972. Out of print.
(CA), 1973.
Rosecrans, Glen. Music Notation Primer. New York: Passantino, 1979.
-
+
Stone, Kurt. Music Notation in the Twentieth Century. New York: Norton, 1980.
=head2 other stuff
write parts and scores of music. Department of Physics, Eindhoven
University of Technology, 1995.
+MusicEase, ftp://ftp.secret.com/ad-ftp
+
+Described in Computer vol 29(6)
+
+
MusE
+june 30
+pl 70pre
+ - bf: text Script
+ - bf: Script::dir_i_ checks.
+ - bf: script stacking
+ - bf: Text_spanner::do_subst.
+ - bf: Text_spanner::Text_spanner(Text_spanner&)
+ - bf: script priority read from script.ini
+ - bf: Script_def::do_equal_b
+ - bf: script dims.
+ - mudela: ; obligatory for \paper {}.
+ - some cosmetic changes involving RTTI macros
+
+*******
+june 29
+pl 69pre
+ - bf: whole rest position, whole/half rest dots.
+ - bf: scripts
+ - reg termination
+ - centered bars
+ - bf: init of Tie::dir_i_
+ - bf: Staff_side depends on staff_sym_
+ - bf: Script::do_substitute_dependency() now implemented
+ - more print info (also in output)
+ - bf: Vertical_align_element
+ - stemless beams now allowed (with warning)
+ - bf: Rest_column::stem_l_ init
+ - merge rests.ly with collisions.ly
+
pl 67.jcn3
- rests under beam [c8 r c]
- bf: mingw configure
- re: conflily
-pl 68
+******
+june 26
+pl 68pre
- doco: other-packages.pod, lots of lilyliterature.pod
- last duration mode now is default.
- some OpusTeX stuff.
* separation of Y and X-elt-groups
* Registers: info up: broadcasts, info down: get_xxx_info()
* Registers: try_request works from bottom to top of tree.
- * Score_elem invisible_b_ flag
+ * Score_elem empty_b_ and transparent_b_ flag
* Junk Staff_column, and find the requests while walking the
Voices.
* Score_register
- bf: make_patch explanation
- bf: make install TeX stuff
- - new Beam/Stem code (WL)
- mudela: . mandatory for REALs
-******
-june 3
-pl 67.wl1
+pl 67
- damped beamslope after wanske
+******
+june 3
pl 67
- sketch of Music classes
- General_script_def as baseclass for Text_def and Script_def
- mi2mu IP*list to Array (implications?!) conversion
- mi2mu parsing speedup: backup rules for midi-lexer.l
- bf: zero denominator
+
**********
may 14
pl 62
-Features you cannot find in the doco as working, should be mentioned her.
+Features you cannot find in the doco as working, should be mentioned here.
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
-bugs introduced in pl68:
-
- * lyrics broken,
-
- * midi broken
-
- * scripts broken
-
-IMPORTANT
+ *
* piano staff
* decent TeX page layout
- * script priority
+ * enter script priority
* a Hands on tutorial [HKN]
- PostScript output (esp. Beams, Slurs, etc)
- Move PScore, Items, Spanners etc. into libmutype.a
-
* separate Score_elem settings in user-settable (properties
.. ) and non-user-settable part. Maybe use something like X-resources:
"Staff=oboe*dir: 0", "Staff=*.Voice_group=solo*dir: 1"
- hack up mf sources for decent spacing info (and then
read AFM/TFM directly, for text too)
-
* lines:
- Ledger lines, should be separate item: Ledger_lines, Ledger_lines_reg
- set different line sizes / thicknesses
* Collisions
- bring Collision::do_pre_processing to haircutter
- left/right note balls should be handled by Collision:
- < \multivoice { \stem 1; <b c> } { <f as b> } >
+ < \multi 2; { \stem 1; <b c> } { <f as b> } >
* Keys:
- merge key{item} & localkey{item}?
tekst staat erg ver van notenbalken af
-waarom geen ; achter dingen in \paper? (\textwidth 180\mm)
-(sowieso: wanneer wel en geen ; ?)
-
Onduidelijk wanneer wel en geen \ voor een woord. Maak liever
verplichte regels
-
BUGS
- * spurious Weird stem size warnings
- * staccato dot positions.
+ * spurious Weird stem size warnings
- * stacked scripts.
+ * fix mysterious Flex malloc bug
* should adjust stemlength for flag number.
* A range for context errors (eg. mark both { and }. )
- * text in staff (sharpsharp in staff, text below)
+ * lyric in staff (sharpsharp in staff, text below)
* fix Egler definitions ( see tex/eglerdefs.tex )
* script-spacing
* Brackets
-
* use (char *) iso. String for communication between lexer and
parser.
* Spacing_request for manually adjusting spacing
-
* caching breakpoints
* #c <-> cis
export LILYINCLUDE=$root/lelie/init
fi
-configure --prefix=$HOME --enable-debugging --enable-printing --enable-checking
+configure --prefix=$root --enable-debugging --enable-printing --enable-checking
detect \lyrics and \melodic, and do substitution accordingly.
count <> and {} ?
+
+Ugh . Perl sux. Anybody for Python?
=cut
use Getopt::Long;
+sub version_compare
+{
+ local ($a,$b)=@_;
+ return &cmpver;
+}
+
sub cmpver
{
-
my(@a)= split /\./,$a;
my(@b)= split /\./,$b;
-
+
for $i (0,1,2) {
return $a[$i] <=> $b[$i] if ($a[$i] != $b[$i]);
}
{
die "Not smart enough to convert 0.0.58 to 0.0.59\n";
}
+
+sub convert_0_0_59_to_0_0_60
+{
+ s/(\\unitspace [0-9.mcptin\\ ]+|\\geometric [0-9.]+|\\width [0-9.mcp\\tin]+)/$1;/g;
+ s/(\\output \"[^\"]+\")/$1;/;
+ s/(\\tempo [0-9: ]+)/$1;/;
+}
+
###############################################################
sub last_conversion
"0.0.56" => \&convert_0_0_55_to_0_0_56,
"0.0.57" => \&convert_0_0_56_to_0_0_57,
"0.0.58" => \&convert_0_0_57_to_0_0_58,
- "0.0.59" => \&convert_0_0_58_to_0_0_59
+ "0.0.59" => \&convert_0_0_58_to_0_0_59,
+ "0.0.60" => \&convert_0_0_59_to_0_0_60
);
my @applicable_conversion;
my @mudela_levels;
- die "This is too old to convert " if $from < 50;
+# die "This is too old to convert " if $from < 50;
my @v = versions;
- foreach $a (@v) {
- if ($a > $from && $a <= $to ){
- push @applicable_conversion, $minor_conversions{$a};
- push @mudela_levels, $a;
+ foreach $ver (@v) {
+ if (version_compare($ver, $from) > 0 && version_compare($ver,$to) <= 0 ){
+ push @applicable_conversion, $minor_conversions{$ver};
+ push @mudela_levels, $ver;
}
}
($to_version = last_conversion) unless (defined($opt_to));
-
die "can't open \`$infile\'" unless open INLY,$infile ;
die "can't open \`$outfile\'" unless open OUTLY, ">$outfile";
identify;
+
GetOptions ("help", "output=s", "from=i", "to=i", "minor=i", "edit", "show-rules");
if ($opt_help) {
local $base="lilypond/";
-local @examples=("wohltemperirt" ,"standchen", "toccata-fuga-E", "scsii-menuetto", "rhythm", "collisions");
+local @examples=("multi", "wohltemperirt" ,"standchen", "toccata-fuga-E", "scsii-menuetto", "collisions");
+
+# rhythm, scales,
sub gen_html
sub do_tar
{
print "tarring.\n";
+ $files = join (' ', < *.html *.$image *.ps.gz *.txt *.midi docxx/*>);
my_system
- " tar vhcf website.tar *.html *.$image *.ps.gz *.txt *.midi docxx/*;",
+ "-tar vhcf website.tar $files;",
"gzip -f9 website.tar;";
}
sub identify
sub main
{
identify;
- GetOptions("jpeg", "gif", "png");
+ GetOptions("jpeg", "gif", "png", "noexamples");
local $image="gif" ;
$image = "png" if ($opt_png);
gen_html;
- gen_examples;
copy_files;
+ if (! $opt_noexamples) {
+ gen_examples;
+ gen_list;
+ }
set_images;
- gen_list;
- edit_html;
+ edit_html;
docxx_update;
do_tar;
}
if [ -z $MP -o x$MP = xpre ]
then
LASTVER=$MJ.$MI.`expr $PA - 1`
+
+ if [ -f $releasedir//lilypond-$LASTVER""pre.tar.gz ] ; then
+ LASTVER="$LASTVER""pre"
+ fi
else
- LASTVER=$MJ.$MI.$PA
+ LASTVER=$MJ.$MI.$PA
fi
echo
}
heredir=`pwd`
+releasedir=`pwd`/../releases
+patchdir=`pwd`/../patches
make dist;
setversion
LILYVER=$NEWVER
tarball=lilypond-$LILYVER.tar.gz
patch=patch-$LILYVER.gz
-
-mv $tarball ../releases
+
+mv $tarball $releasedir/
cd ../test
$heredir/bin/make_patch $LASTVER $NEWVER lilypond
gzip -f9 patch-$NEWVER
-mv $patch ../patches/
+mv $patch $patchdir//
RPMS=`find ~/rpms/ -name lilypond-$NEWVER'*'rpm`
rm *.rpm {lilypond,patch}-*.gz
ln $RPMS .
fi
-ln ../releases/$tarball .
-ln ../patches/$patch .
+ln $releasedir//$tarball .
+ln $patchdir//$patch .
if [ ! -z "$RPMS" ]; then
enableval="$enable_mingw32"
MINGWPREFIX=$enableval
else
- MINGWPREFIX=$enableval
+ MINGWPREFIX=no
fi
MAJOR_VERSION = 1
MINOR_VERSION = 1
-PATCH_LEVEL = 19
+PATCH_LEVEL = 20
# use to send patches, always empty for released version:
MY_PATCH_LEVEL = # include separator: "-1" or ".a"
#
version 1.1:
+pl 20
+ - List::junk_links()
pl 19
- Array::reverse()
Cursor<T> top() const;
void OK() const; // check list
+ void junk_links();
protected:
friend class Cursor<T>;
assert(!lp);
}
-
template<class T>
-List<T>::~List()
+void
+List<T>::junk_links()
{
Cursor<T> c(*this);
while (c.ok())
c.del();
}
+template<class T>
+List<T>::~List()
+{
+ junk_links();
+}
+
/**
add after after_me.
}
PCursor<T> find(T) const;
void concatenate(Link_list<T> const &s) { List<void*>::concatenate(s); }
+
Link_list() {}
};
/*
- class-name.hh -- declare
+ virtual-methods.hh -- declare
- source file of the LilyPond music typesetter
+ source file of the Flower Library
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
-#ifndef CLASS_NAME_HH
-#define CLASS_NAME_HH
+#ifndef VIRTUAL_METHODS_HH
+#define VIRTUAL_METHODS_HH
/** a macro to declare the classes name as a static and virtual function.
The static_name() can *not* be inlined (this might have the effect that
#define VIRTUAL_COPY_CONS(T, R)\
virtual R *clone() const { return new T(*this); } \
+ int yet_another_stupid_function_to_allow_semicolon()
#define IMPLEMENT_IS_TYPE_B(D) \
bool D::is_type_b(const char *s) const \
return s == static_name() || BA::is_type_b(s) || BB::is_type_b(s); \
}
-#endif // CLASS-NAME_HH
+#endif
\alias "Voice_group";
\consists "Dynamic_register";
\consists "Stem_beam_register";
- \consists "Text_register";
\consists "Script_register";
\consists "Note_column_register";
\consists "Slur_register";
% name = \script {
-% indexstring follow_into_staff same_dir_as_stem above_below_staff symbol_can_beinverted }
+% indexstring follow_into_staff same_dir_as_stem above_below_staff symbol_can_beinverted priority }
%
-accent = \script { "sforzato" 0 -1 0 0 }
-marcato = \script { "marcato" 0 -1 0 1 }
-staccatissimo = \script { "staccatissimo" 0 -1 0 1 }
-portato= \script { "portato" 0 -1 0 1 }
-fermata = \script { "fermata" 0 1 0 1 }
-stopped = \script { "stopped" 0 0 1 0 }
-staccato = \script { "staccato" 1 -1 0 0 }
-tenuto = \script {"tenuto" 0 -1 0 0 }
-upbow = \script { "upbow" 0 0 1 0 }
-downbow = \script { "downbow" 0 0 1 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 }
-lbheel = \script { "bheel" 0 0 -1 0 }
-rbheel = \script { "bheel" 0 0 1 0 }
-lbtoe = \script { "btoe" 0 0 -1 0 }
-rbtoe = \script { "btoe" 0 0 1 0 }
-lfheel = \script { "fheel" 0 0 -1 0 }
-rfheel = \script { "fheel" 0 0 1 0 }
-lftoe = \script { "ftoe" 0 0 -1 0 }
-rftoe = \script { "ftoe" 0 0 1 0 }
+accent = \script { "sforzato" 0 -1 0 0 0 }
+marcato = \script { "marcato" 0 -1 0 1 0 }
+staccatissimo = \script { "staccatissimo" 0 -1 0 1 0 }
+portato= \script { "portato" 0 -1 0 1 0 }
+fermata = \script { "fermata" 0 1 0 1 0 }
+stopped = \script { "stopped" 0 0 1 0 0 }
+staccato = \script { "staccato" 1 -1 0 0 0 }
+tenuto = \script {"tenuto" 0 -1 0 0 0 }
+upbow = \script { "upbow" 0 0 1 0 0 }
+downbow = \script { "downbow" 0 0 1 0 0 }
+lheel = \script { "heel" 0 0 -1 0 0 }
+rheel = \script { "heel" 0 0 1 0 0 }
+ltoe = \script { "toe" 0 0 -1 0 0 }
+rtoe = \script { "toe" 0 0 1 0 0 }
+lbheel = \script { "bheel" 0 0 -1 0 0 }
+rbheel = \script { "bheel" 0 0 1 0 0 }
+lbtoe = \script { "btoe" 0 0 -1 0 0 }
+rbtoe = \script { "btoe" 0 0 1 0 0 }
+lfheel = \script { "fheel" 0 0 -1 0 0 }
+rfheel = \script { "fheel" 0 0 1 0 0 }
+lftoe = \script { "ftoe" 0 0 -1 0 0 }
+rftoe = \script { "ftoe" 0 0 1 0 0 }
%
% left toe: right heel:
%
%
% heu, me thought for a moment that order in table_xxx.ini was
% being translated into priority...
-back = \script { "back" 0 -1 -1 0 }
-front = \script { "front" 0 -1 1 0 }
+back = \script { "back" 0 -1 -1 0 0 }
+front = \script { "front" 0 -1 1 0 0 }
-\version "0.0.59";
+\version "0.0.60";
\include "register.ini"
\include "dynamic.ini"
"scripts" = \table {
"fermata" "\fermata" 0.0\pt 0.0\pt 0.0\pt 6.0\pt
"-fermata" "\ifermata" 0.0\pt 0.0\pt -6.0\pt 0.0\pt
- "portato" "\portato" 0.0\pt 4.8\pt 0.0\pt 2.0\pt
- "-portato" "\iportato" 0.0\pt 4.8\pt -2.0\pt 0.0\pt
- "tenuto" "\tenuto" 0.0\pt 4.8\pt 0.0\pt 1.0\pt
- "-tenuto" "\itenuto" 0.0\pt 4.8\pt -1.0\pt 0.0\pt
- "sforzato" "\sforzato" -0.8\pt 4.8\pt -1.92\pt 1.92\pt
- "marcato" "\marcato" 0.0\pt 4.8\pt 0.0\pt 4.0\pt
- "-marcato" "\imarcato" 0.0\pt 4.8\pt -4.0\pt 0.0\pt
- "staccato" "\staccato" 0.0\pt 0.0\pt 0.0\pt 5.0\pt
+ "portato" "\portato" 0.0\pt 4.0\pt 0.0\pt 2.0\pt
+ "-portato" "\iportato" 0.0\pt 4.0\pt -2.0\pt 0.0\pt
+ "tenuto" "\tenuto" 0.0\pt 4.0\pt -1.0\pt 1.0\pt
+ "-tenuto" "\itenuto" 0.0\pt 4.0\pt -1.0\pt 1.0\pt
+ "sforzato" "\sforzato" -0.8\pt 4.0\pt -1.92\pt 1.92\pt
+ "marcato" "\marcato" 0.0\pt 4.0\pt 0.0\pt 4.0\pt
+ "-marcato" "\imarcato" 0.0\pt 4.0\pt -4.0\pt 0.0\pt
+ "staccato" "\staccato" 0.0\pt 0.0\pt -1.1\pt 1.1\pt
"staccatissimo" "\staccatissimo" 0.0\pt 0.0\pt 0.0\pt 1.0\pt
"-staccatissimo" "\istaccatissimo" 0.0\pt 0.0\pt 0.0\pt 1.0\pt
"upbow" "\upbow" -1.0\pt 6.0\pt 0.0\pt 5.0\pt
}
"rests" = \table {
+ "1o" "\outsidewholerest" 0.0\pt 6.0\pt 0.0\pt 2.0\pt
"1" "\wholerest" 0.0\pt 6.0\pt 0.0\pt 2.0\pt
"2" "\halfrest" 0.0\pt 6.0\pt -2.0\pt 0.0\pt
+ "2o" "\outsidehalfrest" 0.0\pt 6.0\pt -2.0\pt 0.0\pt
"4" "\quartrest" -5.0\pt 2.0\pt -5.0\pt 5.0\pt
"8" "\eighthrest" 0.0\pt 5.0\pt 0.0\pt 8.0\pt
"16" "\sixteenthrest" 0.0\pt 6.0\pt 0.0\pt 12.0\pt
EndMudelaHeader
%}
-\version "0.0.59";
+\version "0.0.60";
cad = \melodic {
\melodic{ \cad }
\paper {
- \unitspace 14.0\mm
- \geometric 1.4}
- \midi { \tempo 4:90 }
+ \unitspace 14.0\mm;
+ \geometric 1.4;}
+% \midi { \tempo 4:90 }
}
filename: collisions.ly
title:
description: random counterpoint to test collisions
- composer(s): HWN
- entered-by: HWN
+ composer(s): HWN,JCN
+ entered-by: HWN,JCN
copyright: public domain
Tested Features:test the Collision resolution
EndMudelaHeader
%}
-\version "0.0.59";
+\version "0.0.60";
}
>
-\score{
+restsII = \melodic {
+ \octave c';
+ < \multi2;
+ { \stem 1; g' f' e' d' c' b a g f e d c }
+ { \stem -1; r r r r r r r r r r r r }
+ >
+ < \multi2;
+ { \stem 1; r r r r r r r r r r r r }
+ { \stem -1; c d e f g a b c' d' e' f' g' }
+ >
+ r8
+ < \multi2; r8 r8 >
+ < \multi2; r8 r8 r8 >
+ < \multi2; r8 r8 r8 r8 >
+ < \multi2; r r >
+ < \multi2; r r r >
+ \stem 1;
+ [c''8 r8 c''8 c''8]
+ [c8 r8 c8 c8]
+ \stem -1;
+ [c8 r8 c8 c8]
+ [c''8 r8 c''8 c''8]
+}
- \melodic { \$two_voice \$two_voice_steminvert
- \$three_voice \rests
- }
+\score{
+ \melodic { \$two_voice \$two_voice_steminvert
+ \$three_voice \rests \restsII }
+
- \paper {}
+
% \midi { \tempo 4:80 }
}
Tested Features:
EndMudelaHeader
%}
-\version "0.0.58";
+\version "0.0.60";
+%{MudelaHeader
-% stupid testfile for pl68 features.
+ filename:multi.ly
+ title:
+ description: stupid testfile for pl68 features.
+ composers:
+ entered-by:HWN
+ copyright: public domain
+
+ Tested Features: \multi
+EndMudelaHeader
+%}
+
+
+\version "0.0.60";
\score{
\melodic
< \multi 1; { c2 c2 } { c'2 c'2 } >
< \multi 2; { \stem -1; c2 c2 } { \stem 1; c'2 c'2 } >
< \multi 3; { \clef "bass"; c2 c2 } { \bar "||"; \key cis ; c'2 c'2 } >
- % c1 c1 % bug
+ c2 c1
}
}
+++ /dev/null
-%{MudelaHeader
-
- filename: rests.ly
- title:
- description:
- composer(s): heu
- entered-by: jcn
- copyright: GPL
-
- Tested Features: rest collisions
-EndMudelaHeader
-%}
-
-\score{
- \staff{ \inputregister{melodicregs}
- \melodic{
- \meter 4/4;
- \octave c';
- < \multivoice
- { \stem 1; g' f' e' d' c' b a g f e d c }
- { \stem -1; r r r r r r r r r r r r }
- >
- < \multivoice
- { \stem 1; r r r r r r r r r r r r }
- { \stem -1; c d e f g a b c' d' e' f' g' }
- >
- r8
- < \multivoice r8 r8 >
- < \multivoice r8 r8 r8 >
- < \multivoice r8 r8 r8 r8 >
- < \multivoice r r >
- < \multivoice r r r >
- \stem 1;
- [c''8 r8 c''8 c''8]
- [c8 r8 c8 c8]
- \stem -1;
- [c8 r8 c8 c8]
- [c''8 r8 c''8 c''8]
- }
- }
- \paper{}
-}
% scales with accents.
%
-\version "0.0.59";
+\version "0.0.60";
blah = \melodic {
\meter 6/8;
\octave 'c ;
|[c' b a g][f e d c]
}
-}
+
\score{
\melodic {\blah}
\paper{
- \symboltables {table_sixteen}
- \unitspace 1.5 \cm
- \geometric 1.4
+ \unitspace 1.5 \cm;
+ \geometric 1.4;
}
}
EndMudelaHeader
%}
-\version "0.0.59";
+
+\version "0.0.60";
%% Stuff from MPP version
% \lefttitle{Menuetto}
% \key\F % \key is F ( f-major )
%
% \slope{30} % Fool MusiXTeX into 30 / 10 steeper beam
-% \stemlength3 % shorter \stemlength
% % because piece is set very tightly
IImenuetto = \melodic{
\duration 8;
< a2 f2 d2 \f > bes4-. |
%%2
- < [ bes^"1" e c_"2"_"4" >
+ < [ bes8^"1" e c_"2"_"4" >
a bes-. g-. ] a4-.^"4" |
%%3
- < d4 'bes4-. > g4-. [ f-. e-. ] |
+ < d4 'bes4-. > g4-. [ f8-. e-. ] |
%%4
< [ f 'a > e d cis-. 'b-. 'a-. ]
%%5
< a2 f2 d2 > bes!4-. |
%%6
- < [ bes e > a bes-. g-. ]
+ < [ bes8 e > a bes-. g-. ]
c'!4-. |
%%7
< a4-. f4>
%%9
\clef "violin";
< e'2 a2 \f >
- [ d'( e'16 )f'16 ] |
+ [ d'8( e'16 )f'16 ] |
%%10
- < [ e' g > d' cis'_"2" e' a~ g ] |
+ < [ e'8 g > d' cis'_"2" e' a~ g ] |
%%11
< \multi 2;
{\stem 1; a4~ d'4 cis'4-. }
{ \stem -1; f2 e4 } > |
%%12
- < [ g'^"4" d > f' e' f' d'^"3"~ c' ] |
+ < [ g'8^"4" d > f' e' f' d'^"3"~ c' ] |
%%13
\clef "alto";
< \multi 2;
{ \stem -1; g4~ f4 e4 }% ugh
> |
%%14
- < [ a f > g a f ] < d'4-\upbow e4 'bes4 > |
+ < [ a8 f > g a f ] < d'4-\upbow e4 'bes4 > |
%%15
- < c'4-\downbow f4 'a4 > [ bes~ a g a ] |
+ < c'4-\downbow f4 'a4 > [ bes8~ a g a ] |
%%16
[ f( e )f a-. g-. bes-. ] |
%%17
< a2^"0" fis2_"3" > bes4 |
%%18
- < { [ c'~ bes c' a ] } { [ es ] } > fis4 |
+ < { [ c'8~ bes c' a ] } { [ es ] } > fis4 |
%%19
- < d'4-\downbow g4 'bes4 > < c'4-\upbow g4 c4 > < [ bes d > a ] |
+ < d'4-\downbow g4 'bes4 > < c'4-\upbow g4 c4 > < [ bes8 d > a ] |
%%20
- < { [ c'( bes a )bes g~ bes ] } { [ d ] } { [ g ] } > |
+ < { [ c'8 ( bes a )bes g~ bes ] } { [ d ] } { [ g ] } > |
%%21
< \multi 2;
{\stem 1; d'4 (\stem 1; ) cis'4 d'4 }
{ \stem -1; g2 f4 }
> |
%%22
- < { [ g~ f g e ] } { [ cis ] } > < f4 d4 > |
+ < { [ g8 ~ f g e ] } { [ cis ] } > < f4 d4 > |
%%23
- [ 'g g ] < e4. 'a4. > d-\upbow |
+ [ 'g8 g ] < e4. 'a4. > d-\upbow |
%%24
< d2.^"fine" 'a2. 'd2._"3 mins.">
\bar ":|";
\score{
\melodic { \IImenuetto }
\paper{
- \width 195.0\mm
- \unitspace 9.0\mm % to get lily to use only three lines
- \geometric 1.40
- \output "scsii-menuetto.out"
+ \width 195.0\mm;
+ \unitspace 9.0\mm ;% to get lily to use only three lines
+ \geometric 1.40;
+ \output "scsii-menuetto.out";
}
\midi{
- \tempo 4:120
- \output "scsii-menuetto.midi"
+ \tempo 4:120;
+ \output "scsii-menuetto.midi";
}
}
EndMudelaHeader
%}
-\version "0.0.58";
+\version "0.0.60";
-\score{\staff{
- melodicregs
+\score{
\melodic{\octave c';
\duration "last";
'c4 ~ 'c c'' ~ c'' ~ g ~ c ~
< { c ~ d }
{ e ~ f }
>
- < \multivoice
+ < \multi 2;
{ \stem 1; c'8 ~g ~e( ~c~ [c'~ g' e' )c'] c'' ~ c'' c~c }
- { \stem -1; c (e g )c'~( [b a g )d] r2 } >
-
- }
+ { \stem -1; c (e g )c'~( [b a g )d] r2 }
+ >
}
}
EndMudelaHeader
%}
-\version "0.0.58";
+\version "0.0.60";
commands = \melodic{
\skip 2.*4;
''a r4 |
%%5
\duration 8;
- < \multivoice { \stem 1;
+ < \multi 2; { \stem 1;
[ 'f 'a d 'a d 'a ]
[ 'd 'e 'g 'e 'g 'e ]
[ 'cis 'e 'g 'e 'g e ]
%%10
[ 'd 'a d 'a d 'a ] |
%%11
- < \multivoice
+ < \multi 2;
{ \stem 1;
[ 'f 'a d 'a d 'a ]
[ 'd 'e 'g 'e 'g 'e ]
[ 'c 'g 'bes 'g 'bes 'g ] |
%%16
[ ''f 'c 'f 'c 'f 'c ] |
- < \multivoice
+ < \multi 2;
{ \stem 1;
[ ''a 'e 'g 'e 'g 'e ][ 'd 'a d 'a d 'a ]
[ ''bes 'f 'bes 'f 'bes 'f ][ ''f 'c 'f 'c 'f 'c ] }
< [ 'e 'c > 'g c 'g c 'g ] |
%%22
[ 'f 'a c 'a 'f 'c ] |
- < \multivoice {
+ < \multi 2; {
\stem 1;
[ ''a 'e 'g 'e 'g 'e ]
[ 'd 'fis 'a 'fis 'a 'fis ]
%%44
< [ 'd ''b > 'fis 'b 'fis 'b 'fis ] |
%%45
- < \multivoice { \stem 1;
+ < \multi 2; { \stem 1;
[ ''g 'd 'b 'd 'b 'd ]
[ 'd 'a d 'a d 'a ]
} {
}
\score{
- \staff{ lyricregs tekstI }
- \staff{ lyricregs tekstII }
+% \staff{ lyricregs tekstI }
+% \staff{ lyricregs tekstII }
- \staff{ melodicregs melodie commands}
- \staff{ melodicregs begeleiding commands }
+ \melodic < \multi 3; < \melodie \commands >
+ <\begeleiding \commands >
+ >
\paper{
- \width 195\mm
+ \width 195.\mm;
% on two pages...
- \unitspace 9\mm
- \geometric 1.2
- \output "standchen.out"
+ \unitspace 9.\mm;
+ \geometric 1.2;
+ \output "standchen.out";
}
\midi{
- \tempo 4:54
+ \tempo 4:54;
}
}
%}
-\version "0.0.59";
+\version "0.0.60";
toccata_commands = \melodic{
\meter 4/4;
% these should be two separate scores...
\score{
\melodic < \multi 3;
- { \$toccata_right \break \$fuga2_right }
- { \$toccata_left \break \$fuga2_left }
+
+ {\$toccata_right \break \$fuga2_right }
+ {\$toccata_left \break \$fuga2_left }
- { \$toccata_pedal \break \$fuga2_pedal }
+ {\$toccata_pedal \break \$fuga2_pedal }
>
\paper{}
\midi{
- \tempo 4:96
+ \tempo 4:96;
}
}
Tested Features: stem direction, multivoice, forced accidentals.
Remarks: the stem direction algorithm is severely broken (look at the
- bass dux) with pl64.
+bass dux) with pl64. [this is supposedly fixed in pl68, can anybody
+knowledgeable remove this comment if it's not appropriate anymore?]
+
%}
-\version "0.0.59";
+\version "0.0.60";
% should add \need{dutch.ini} for
% correct parsing of note names
>
\paper{}
\midi {
- \tempo 4:84
+ \tempo 4:84;
}
}
MAJOR_VERSION = 0
MINOR_VERSION = 0
-PATCH_LEVEL = 68
+PATCH_LEVEL = 70
# use to send patches, always empty for released version:
# include separator: ".postfix", "-pl" makes rpm barf
-MY_PATCH_LEVEL =pre.jcn1
+MY_PATCH_LEVEL =
paper-def.cc parser.cc lexer.cc qlp.cc qlpsolve.cc\
template1.cc template2.cc template3.cc template4.cc\
template5.cc template6.cc version.cc tex-stream.cc tex.cc\
- identifier.cc note.cc\
+ identifier.cc note.cc voice-regs.cc\
/*
should use minimum energy formulation (cf linespacing)
- */
+
+ [todo]
+ the y of the (start) of the beam should be quantisized,
+ so that no stafflines appear just in between two beam-flags
+
+*/
void
Beam::solve_slope()
{
void
Beam::do_post_processing()
{
+ if ( stems.size() < 2) {
+ warning("Beam with less than 2 stems");
+ transparent_b_ = true;
+ return ;
+ }
solve_slope();
set_stemlens();
}
void
Beam::do_pre_processing()
{
- assert(stems.size()>1);
if (!dir_i_)
set_default_dir();
Molecule*
Beam::brew_molecule_p() const
{
- /*
- [todo]
- the y of the (start) of the beam should be quantisized,
- so that no stafflines appear just in between two beam-flags
- */
+
Molecule *mol_p = new Molecule;
// huh? inter-what
// Real inter_f = paper()->interbeam_f();
Spanner::print();
#endif
}
-
+/*
+ duh. The stem is not a dependency but a dependent
+ */
void
Beam::do_substitute_dependency(Score_elem*o,Score_elem*n)
{
- int i;
- while ((i=stems.find_i((Stem*)o->item())) >=0)
- if (n) stems[i] = (Stem*) n->item();
- else stems.del(i);
+ if (o->is_type_b( Stem::static_name() )) {
+ stems.substitute( (Stem*)o->item(), n?(Stem*) n->item():0);
+ }
}
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
+
#include "break-align-item.hh"
void
Collision::Collision()
{
+ empty_b_ = transparent_b_ =true;
}
void
left_dyn_b_ = right_dyn_b_ =false;
}
-
-
Molecule*
Crescendo::brew_molecule_p() const
{
*get_staff_info().c0_position_i_l_;
} else if (note_req_l_->rest()) {
n_p->rest_b_ = true;
- if (note_req_l_->rhythmic()->duration_.type_i_ <= 2)
- note_p_->translate(
- Offset(0,
- 6 * paper()->internote_f()));
}
Score_elem_info itinf(note_p_,note_req_l_);
announce_element(itinf);
}
-
+
void
Note_head_register::do_pre_move_processing()
{
*/
#include "horizontal-align-item.hh"
+
IMPLEMENT_STATIC_NAME(Horizontal_align_item);
IMPLEMENT_IS_TYPE_B1(Horizontal_align_item,Item);
+
bool
Horizontal_align_item::contains_b(Item *i)const
{
}
Real where_f= total * (align_i_-1.0)/2.0;
+ Real center_dx_f = 0;
for ( int i=0 ; i < item_l_arr_.size(); i++) {
- item_l_arr_[i]->translate_x(where_f -dims[i][-1] );
+ Real dx = where_f -dims[i][-1];
+ item_l_arr_[i]->translate_x( dx );
+ if (item_l_arr_[i] == center_l_)
+ center_dx_f = where_f;
where_f += dims[i].length();
}
+ if (center_dx_f && !align_i_ )
+ for ( int i=0 ; i < item_l_arr_.size(); i++)
+ item_l_arr_[i]->translate_x( - center_dx_f );
+
}
Interval
Horizontal_align_item::Horizontal_align_item()
{
+ center_l_ = 0;
align_i_ = 0;
empty_b_ = true;
transparent_b_ = true;
default_accessor(Real_id, Real, real);
-default_accessor(Script_id, General_script_def, script);
+virtual_accessor(Script_id, General_script_def, script);
default_accessor(Lookup_id, Lookup, lookup);
default_accessor(Symtables_id, Symtables, symtables);
virtual_accessor(Music_id, Music, music);
String type_str_;
NAME_MEMBERS();
- SCORE_ELEM_CLONE(Bar)
+ SCORE_ELEM_CLONE(Bar);
Bar();
private:
void do_print() const;
void set_grouping(Rhythmic_grouping def, Rhythmic_grouping current);
void set_stemlens();
- SCORE_ELEM_CLONE(Beam)
+ SCORE_ELEM_CLONE(Beam);
protected:
virtual Interval do_width()const;
virtual Offset center() const;
virtual void do_pre_processing();
public:
NAME_MEMBERS();
- SCORE_ELEM_CLONE(Break_align_item)
+ SCORE_ELEM_CLONE(Break_align_item);
};
#endif // BREAK_ALIGN_ITEM_HH
/* *************** */
NAME_MEMBERS();
- SCORE_ELEM_CLONE(Clef_item)
+ SCORE_ELEM_CLONE(Clef_item);
Clef_item();
void read(Clef_register const&);
void read(String);
bool left_dyn_b_;
Crescendo();
protected:
- SCORE_ELEM_CLONE(Crescendo)
+ SCORE_ELEM_CLONE(Crescendo);
virtual Molecule*brew_molecule_p()const;
NAME_MEMBERS();
class Horizontal_vertical_group_item : public Item, public Horizontal_vertical_group {
public:
NAME_MEMBERS();
- SCORE_ELEM_CLONE(Horizontal_vertical_group_item)
+ SCORE_ELEM_CLONE(Horizontal_vertical_group_item);
protected:
virtual void do_print() const;
};
class Horizontal_group_item : public Item, public Horizontal_group {
NAME_MEMBERS();
- SCORE_ELEM_CLONE(Horizontal_group_item)
+ SCORE_ELEM_CLONE(Horizontal_group_item);
protected:
virtual void do_print() const { Elbement_group::do_print(); }
};
*/
class General_script_def : public Input {
public:
- VIRTUAL_COPY_CONS(General_script_def,General_script_def)
+ VIRTUAL_COPY_CONS(General_script_def,General_script_def);
NAME_MEMBERS();
virtual int staff_dir_i()const;
void print() const;
/**
Order elems left to right.
+
+
TODO: insert(order, elem)
*/
class Horizontal_align_item : public Item {
protected:
Link_array<Item> item_l_arr_;
Array<int> priority_i_arr_;
- int align_i_;
public:
+ Item * center_l_;
+ /**
+ Which side to align?
+ -1: left side, 0: centered (around center_l_ if not nil), 1: right side
+ */
+ int align_i_;
+
NAME_MEMBERS();
- SCORE_ELEM_CLONE(Horizontal_align_item)
+ SCORE_ELEM_CLONE(Horizontal_align_item);
void add(Item*, int p);
Horizontal_align_item();
protected:
+
virtual void do_substitute_dependency(Score_elem * , Score_elem *);
/// do calculations before determining horizontal spacing
virtual void do_pre_processing();
*/
-#ifndef Interpreter_HH
-#define Interpreter_HH
+#ifndef INTERPRETER_HH
+#define INTERPRETER_HH
+
+#include "lily-proto.hh"
class Interpreter {
public:
+ int music_list_i_;
+ Interpreter();
+ virtual ~Interpreter();
virtual bool interpret_request_b(Request*) { return false;}
};
-#endif // Interpreter_HH
+#endif // INTERPRETER_HH
/* *************** */
NAME_MEMBERS();
- SCORE_ELEM_CLONE(Key_item)
+ SCORE_ELEM_CLONE(Key_item);
Key_item(int cposition);
void add(int pitch, int acc);
Symbol accidental(int)const;
Symbol ball(int)const;
Symbol flag(int)const;
- Symbol rest(int)const;
+ Symbol rest(int, bool outside)const;
Symbol clef(String)const;
Symbol bar(String)const;
Symbol dots(int)const;
public:
Meter(Array<Scalar> args) ;
NAME_MEMBERS();
- SCORE_ELEM_CLONE(Meter)
+ SCORE_ELEM_CLONE(Meter);
};
#endif // METER_HH
class Music_iterator {
protected:
bool first_b_;
+ virtual void do_print()const;
public:
Music_iterator *daddy_iter_l_;
static Music_iterator* static_get_iterator_p(Music*,Register_group_register*);
Music_iterator* get_iterator_p(Music*)const;
+ void set_reg(Register_group_register*);
Music_iterator();
virtual void next(Moment until);
virtual Moment next_moment()const;
virtual bool ok()const;
virtual ~Music_iterator();
virtual void construct_children();
+ void print()const;
virtual Register_group_register * get_req_acceptor_l();
};
// duh.
class Request_iterator : public Music_iterator {
Request *req_l_;
+ bool last_b_;
public:
Request_iterator(Request const *);
NAME_MEMBERS();
protected:
+ virtual bool ok() const;
+ virtual Moment next_moment() const;
+
+ virtual void do_print()const;
virtual void next(Moment);
};
Chord_iterator(Chord const*);
NAME_MEMBERS();
protected:
+ virtual void do_print()const;
virtual void construct_children();
virtual void next(Moment);
virtual Moment next_moment()const;
Voice_iterator(Voice const*);
NAME_MEMBERS();
protected:
+ virtual void do_print()const;
virtual void construct_children();
~Voice_iterator();
virtual void next(Moment);
Music_list(Music_list const&);
Music_list();
NAME_MEMBERS();
- VIRTUAL_COPY_CONS(Music_list,Music)
+ VIRTUAL_COPY_CONS(Music_list,Music);
virtual void add(Music*);
virtual void transpose(Melodic_req const *);
public:
Chord();
NAME_MEMBERS();
- VIRTUAL_COPY_CONS(Chord,Music)
+ VIRTUAL_COPY_CONS(Chord,Music);
virtual void translate(Moment dt);
virtual MInterval time_int()const;
};
class Voice_element : public Chord {
public:
NAME_MEMBERS();
- VIRTUAL_COPY_CONS(Voice_element,Music)
+ VIRTUAL_COPY_CONS(Voice_element,Music);
};
/**
Voice();
NAME_MEMBERS();
- VIRTUAL_COPY_CONS(Voice, Music)
+ VIRTUAL_COPY_CONS(Voice, Music);
virtual void translate(Moment dt);
virtual MInterval time_int()const;
};
String id_str_;
NAME_MEMBERS();
- VIRTUAL_COPY_CONS(Change_reg, Music)
+ VIRTUAL_COPY_CONS(Change_reg, Music);
};
#endif // MUSIC_LIST_HH
void print() const;
virtual void transpose(Melodic_req const *);
virtual void translate(Moment dt);
- VIRTUAL_COPY_CONS(Music,Music)
+ VIRTUAL_COPY_CONS(Music,Music);
NAME_MEMBERS();
Music();
protected:
int staff_size_i_;
int dots_i_;
int balltype_i_;
+ int dot_delta_y_i_;
int x_dir_i_;
/* *************** */
position of top line (5 linestaff: 8)
*/
Note_head(int staff_size);
+ void set_dots();
static int compare(Note_head * const &a, Note_head *const &b) ;
protected:
virtual void do_print()const;
Array<Score_elem_info> announce_info_arr_;
virtual void do_print()const;
-
+
+ virtual bool removable_b()const;
+
public:
+ int iterator_count_;
+ void check_removal();
+ Register_group_register();
+ ~Register_group_register();
+
/// Score_register = 0, Staff_registers = 1, etc)
virtual int depth_i()const;
/**
virtual void do_removal_processing();
virtual bool do_try_request(Request*);
virtual void do_process_requests();
+
virtual Staff_info get_staff_info()const;
virtual Register_group_register * find_register_l(String name,String id);
virtual ~Request(){}
NAME_MEMBERS();
- VIRTUAL_COPY_CONS(Request,Music)
+ VIRTUAL_COPY_CONS(Request,Music);
void print()const ;
virtual MInterval time_int() const;
#define REQUESTMETHODS(T,accessor) \
virtual T * accessor() { return this;}\
NAME_MEMBERS();\
-VIRTUAL_COPY_CONS(T, Request)\
+VIRTUAL_COPY_CONS(T, Request);\
virtual void do_print() const
void add(Rest_column*);
void add(Collision*);
NAME_MEMBERS();
+ Rest_collision();
protected:
virtual void do_post_processing();
virtual void do_pre_processing();
class Score_align_register: public Request_register
{
-
- const char* type_ch_C_;
Horizontal_group_item * align_p_;
public:
+
+ const char* type_ch_C_;
int priority_i_;
- Score_align_register(char const*);
+ Score_align_register();
NAME_MEMBERS();
protected:
virtual void acknowledge_element(Score_elem_info);
*/
Offset offset_;
+ /**
+ for administration of what was done already
+ */
enum Status {
ORPHAN, // not yet added to pstaff
VIRGIN, // added to pstaff
OUTPUT, // molecule has been output
DELMARKED, // mark for 'unclean' deletion
DELETED, // to catch malloc mistakes.
- } status;
+ };
+
+ Status status;
public:
PScore *pscore_l_;
Interval height() const;
virtual void translate_x(Real);
virtual void translate_y(Real);
+
/**
translate the symbol. The symbol does not have to be created yet.
- Overridable, since this score-elem might act as a pseudo-list.
- */
+ */
void translate(Offset);
Offset offset()const;
virtual Horizontal_vertical_group* elem_group() { return 0; }
virtual Item * item() { return 0; }
virtual Line_of_score * line_l() const;
- SCORE_ELEM_CLONE(Score_elem)
+ SCORE_ELEM_CLONE(Score_elem);
protected:
virtual Interval do_height()const;
virtual void do_substitute_dependency(Score_elem*,Score_elem*);
virtual Interval do_width()const;
virtual void do_print() const;
- SCORE_ELEM_CLONE(Line_of_score)
+ SCORE_ELEM_CLONE(Line_of_score);
};
#endif
class Script_def : public General_script_def {
/// invert if below staff?
bool invertsym_b_;
- String symidx;
+ String symidx_str_;
/// on the other side of the stem?
NAME_MEMBERS();
virtual bool do_equal_b(General_script_def const &)const;
- void print() const;
+ virtual void do_print() const;
Script_def();
- void set_from_input(String, bool, int, int ,bool);
+ void set_from_input(String, bool, int, int ,bool,int );
protected:
- VIRTUAL_COPY_CONS(Script_def,General_script_def)
+ VIRTUAL_COPY_CONS(Script_def,General_script_def);
};
#define SCRIPT_HH
#include "staff-side.hh"
-#include "script-def.hh"
#include "item.hh"
/**
int pos_i_;
- General_script_def *specs_l_;
Stem *stem_l_;
/* *************** */
protected:
Molecule *brew_molecule_p()const;
+ virtual void do_substitute_dependency(Score_elem*,Score_elem*);
+ virtual void do_print() const;
virtual void do_post_processing();
virtual void do_pre_processing();
virtual Interval do_width() const;
void set_default_index();
Symbol symbol()const;
public:
+ General_script_def *specs_l_;
+
static int compare(Script *const&, Script *const&) ;
- Script(Script_req*);
+ Script();
void set_stem(Stem*);
NAME_MEMBERS();
virtual void do_post_processing();
virtual void do_substitute_dependency(Score_elem*, Score_elem*);
virtual void do_pre_processing();
- SCORE_ELEM_CLONE(Slur)
+ SCORE_ELEM_CLONE(Slur);
NAME_MEMBERS();
};
protected:
virtual Interval do_width()const;
virtual void do_print() const;
- SCORE_ELEM_CLONE(Spanner_elem_group)
+ SCORE_ELEM_CLONE(Spanner_elem_group);
public:
NAME_MEMBERS();
};
bool broken_b() const;
Spanner* find_broken_piece(Line_of_score*)const;
protected:
- SCORE_ELEM_CLONE(Spanner)
+ SCORE_ELEM_CLONE(Spanner);
virtual void break_into_pieces();
Link_array<Spanner> broken_into_l_arr_;
Real inter_note_f()const;
int steps_i()const;
protected:
- SCORE_ELEM_CLONE(Staff_symbol)
+ SCORE_ELEM_CLONE(Staff_symbol);
virtual Molecule* brew_molecule_p() const;
virtual void do_print()const;
};
/// one broken line of staff.
struct Line_of_staff : public Spanner_elem_group{
- SCORE_ELEM_CLONE(Line_of_staff)
+ SCORE_ELEM_CLONE(Line_of_staff);
public:
NAME_MEMBERS();
protected:
virtual Atom get_atom(Paper_def* p, int dir_i_)const;
NAME_MEMBERS();
- VIRTUAL_COPY_CONS(Text_def,General_script_def)
+ VIRTUAL_COPY_CONS(Text_def,General_script_def);
public:
/**
centered , or aligned?
String style_str_;
/* *************** */
+ virtual void do_print() const;
virtual ~Text_def() {};
bool do_equal_b(const Text_def&)const;
Text_def();
triplets, eentweetjes, ottava, etc. */
class Text_spanner : public Spanner {
public:
- Directional_spanner * support;
+ Directional_spanner * support_span_l_;
General_script_def * spec_p_;
Offset text_off_;
NAME_MEMBERS();
void set_support(Directional_spanner*);
Text_spanner();
+ Text_spanner(Text_spanner const&);
protected:
- SCORE_ELEM_CLONE(Text_spanner)
+ SCORE_ELEM_CLONE(Text_spanner);
~Text_spanner();
virtual void do_substitute_dependency(Score_elem*,Score_elem*);
virtual void do_pre_processing();
Tie();
NAME_MEMBERS();
- SCORE_ELEM_CLONE(Tie)
+ SCORE_ELEM_CLONE(Tie);
};
#endif // TIE_HH
protected:
virtual void do_print() const;
virtual Scalar get_feature(String);
- virtual void do_post_move_processing();
virtual bool do_try_request(Request*);
public:
class Voice_registers : public Interpreter, public Register_group_register {
public:
- Voice_registers();
NAME_MEMBERS();
protected:
virtual bool interpret_request_b(Request*);
virtual Interpreter* interpreter_l() { return this; }
- virtual void do_print() const;
};
--- /dev/null
+/*
+ interpreter.cc -- implement Interpreter
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include <assert.h>
+#include "interpreter.hh"
+
+Interpreter::Interpreter()
+{
+ music_list_i_ =0;
+}
+
+Interpreter::~Interpreter()
+{
+// assert(!music_list_i_ );
+}
}
Symbol
-Lookup::rest(int j) const
+Lookup::rest(int j, bool o) const
{
- return (*symtables_)("rests")->lookup(String(j));
+ return (*symtables_)("rests")->lookup(String(j) + (o ? "o" : "") );
}
Symbol
#include "register.hh"
#include "register-group.hh"
#include "interpreter.hh"
+#include "debug.hh"
IMPLEMENT_STATIC_NAME(Music_iterator);
IMPLEMENT_IS_TYPE_B(Music_iterator);
+void
+Music_iterator::do_print()const
+{
+
+}
+
+void
+Music_iterator::print() const
+{
+#ifndef NPRINT
+ mtor << name() << "{";
+ mtor << "report to " << report_to_reg_l_ << " (" << report_to_reg_l_->name() << ")\n";
+ mtor << "next at " << next_moment() << " ";
+ do_print();
+ mtor << "}\n";
+#endif
+}
+
Register_group_register *
Music_iterator::get_req_acceptor_l()
{
if (report_to_reg_l_->interpreter_l() )
return report_to_reg_l_;
- report_to_reg_l_ = report_to_reg_l_->get_default_interpreter();
+ set_reg( report_to_reg_l_->get_default_interpreter() );
return report_to_reg_l_;
}
+void
+Music_iterator::set_reg(Register_group_register*reg)
+{
+ if (report_to_reg_l_==reg)
+ return;
+
+ if (report_to_reg_l_)
+ report_to_reg_l_->iterator_count_ --;
+
+ report_to_reg_l_ = reg;
+
+ if (report_to_reg_l_)
+ report_to_reg_l_->iterator_count_ ++;
+}
+
void
Music_iterator::construct_children()
{
}
-Music_iterator::~Music_iterator(){
+Music_iterator::~Music_iterator()
+{
+ set_reg(0);
}
Moment
if ( m->is_type_b( Music_list::static_name())) {
Music_list* ml = (Music_list*) m;
if (ml -> type_str_ != "") {
- p->report_to_reg_l_ =
- report_l->find_get_reg_l(ml-> type_str_, ml->id_str_);
+ p->set_reg(report_l->find_get_reg_l(ml-> type_str_, ml->id_str_));
}
- }
+ }
if (! p->report_to_reg_l_ )
- p ->report_to_reg_l_ = report_l;
+ p ->set_reg(report_l);
return p;
}
for(iter(chord_C_->music_p_list_.top(), i); i.ok(); j++, i++) {
Music_iterator * mi = get_iterator_p( i.ptr());
- report_to_reg_l_ = mi->report_to_reg_l_->ancestor_l( chord_C_->multi_level_i_ );
+ set_reg(mi->report_to_reg_l_->ancestor_l( chord_C_->multi_level_i_ ));
children_p_list_.bottom().add( mi );
}
}
+void
+Chord_iterator::do_print() const
+{
+#ifndef NPRINT
+ for (iter(children_p_list_.top(), i); i.ok(); i++ ) {
+ i->print();
+ }
+#endif
+}
void
Chord_iterator::next(Moment until)
i->next(until);
}
if (!i->ok())
- i.del();
+ delete i.remove_p();
else
i++;
}
Music_iterator::next(until);
- assert(!ok() || next_moment() > until);
+// assert(!ok() || next_moment() > until);
}
IMPLEMENT_STATIC_NAME(Chord_iterator);
/* ************** */
+void
+Voice_iterator::do_print()const
+{
+ if (iter_p_)
+ iter_p_->print();
+}
+
Voice_iterator::Voice_iterator(Voice const*v)
: PCursor<Music*> ( v->music_p_list_)
{
Voice_iterator::construct_children()
{
if (ok()) {
-
iter_p_ = Music_iterator::get_iterator_p( ptr() );
- report_to_reg_l_ =
- iter_p_->report_to_reg_l_->ancestor_l( voice_C_ ->multi_level_i_ );
+ if (iter_p_->report_to_reg_l_->depth_i() > report_to_reg_l_->depth_i())
+ set_reg(iter_p_->report_to_reg_l_);
}
}
}
/* ***************** */
-
+void
+Request_iterator::do_print()const
+{
+ mtor << req_l_->name() ;
+}
Request_iterator::Request_iterator(Request const*c)
{
req_l_ = (Request*)c;
+ last_b_ = false;
}
void
Request_iterator::next(Moment m)
{
- if ( !daddy_iter_l_->report_to_reg_l_->
- interpreter_l()->interpret_request_b(req_l_) )
- req_l_->warning("Junking request: " + String(req_l_->name()));
+ if ( first_b_) {
+ bool gotcha = daddy_iter_l_->report_to_reg_l_->
+ interpreter_l()->interpret_request_b(req_l_);
+ if (!gotcha)
+ req_l_->warning("Junking request: " + String(req_l_->name()));
+ first_b_ = false;
+ }
-
- Music_iterator::next(m);
+ if ( m >= req_l_->duration() )
+ last_b_ = true;
}
+Moment
+Request_iterator::next_moment()const
+{
+
+ Moment m(0);
+ if (!first_b_)
+ m = req_l_->duration();
+ return m;
+}
+
+bool
+Request_iterator::ok()const
+{
+ return (req_l_->duration() && !last_b_) || first_b_; // ugh
+}
IMPLEMENT_STATIC_NAME(Request_iterator);
IMPLEMENT_IS_TYPE_B1(Request_iterator, Music_iterator);
void
Voice_element_iterator::construct_children()
{
+ get_req_acceptor_l();
+/*
if ( daddy_iter_l_
&& daddy_iter_l_->is_type_b(Voice_iterator::static_name() )) {
- report_to_reg_l_ = daddy_iter_l_-> get_req_acceptor_l();
+ set_reg(daddy_iter_l_-> get_req_acceptor_l());
} else if (daddy_iter_l_
&& daddy_iter_l_-> is_type_b( Chord_iterator::static_name() )) {
get_req_acceptor_l();
}
+ */
Chord_iterator::construct_children();
}
IMPLEMENT_STATIC_NAME(Stem_req);
IMPLEMENT_IS_TYPE_B1(Stem_req,Rhythmic_req);
+
void
Stem_req::do_print() const
{
int
Script_req::compare(Script_req const &d1, Script_req const &d2)
{
- return d1.dir_i_ == d2.dir_i_ &&
- d1.scriptdef_p_->equal_b(*d2.scriptdef_p_);
+ return !(d1.dir_i_ == d2.dir_i_ &&
+ d1.scriptdef_p_->equal_b(*d2.scriptdef_p_));
}
Script_req::Script_req()
void
Script_req::do_print() const
{
+#ifndef NPRINT
mtor << " dir " << dir_i_ ;
scriptdef_p_->print();
+#endif
}
void
Musical_script_req::do_print() const
-{}
+{
+ Script_req::do_print();
+}
IMPLEMENT_STATIC_NAME(Musical_script_req);
IMPLEMENT_IS_TYPE_B2(Musical_script_req,Musical_req, Script_req);
else
dir_i_ = (head_positions_interval().center() >= 5) ? -1 : 1;
}
+ Script_column::do_pre_processing();
}
#include "molecule.hh"
#include "musical-request.hh"
+/*
+ TODO
+
+ Separate notehead into
+
+
+ Rhythmic_head
+ Note_head
+ Rest
+
+ and Stem takes Rhythmic_heads
+ */
Note_head::Note_head(int ss)
position_i_ = 0;
balltype_i_ = 0;
dots_i_ = 0;
+ dot_delta_y_i_ = 0;
extremal_i_ = 0;
rest_b_ = false;
}
void
Note_head::do_pre_processing()
{
- // 8 ball looks the same as 4 ball:
+ // 8 ball looks the same as 4 ball:
if (balltype_i_ > 4 && !rest_b_)
balltype_i_ = 4;
+
+ if (rest_b_) {
+ if (balltype_i_ == 1)
+ position_i_ = 6;
+ else if (balltype_i_ == 2)
+ position_i_ = 4;
+ }
}
void
return a->position_i_ - b->position_i_;
}
+void
+Note_head::set_dots()
+{
+ if (!(position_i_ %2) && rest_b_ && balltype_i_ == 1)
+ dot_delta_y_i_ = -1;
+ else if (!(position_i_ %2))
+ dot_delta_y_i_ = 1;
+}
+
+/*
+ Ugh, hairy.
+ */
Molecule*
Note_head::brew_molecule_p() const
{
+ ((Note_head*)this)->set_dots(); // UGH GUH
Molecule*out = 0;
Paper_def *p = paper();
-
- Real dy = p->internote_f();
+ Real inter_f = p->internote_f();
Symbol s;
+
+ // ugh
+ bool streepjes_b = (position_i_<-1) || (position_i_ > staff_size_i_+1);
+
if (!rest_b_)
s = p->lookup_l()->ball(balltype_i_);
- else
- s = p->lookup_l()->rest(balltype_i_);
-
+ else {
+ s = p->lookup_l()->rest(balltype_i_, streepjes_b);
+ }
out = new Molecule(Atom(s));
if (dots_i_) {
- Symbol d = p->lookup_l()->dots(dots_i_);
+ Symbol d = p->lookup_l()->dots(dots_i_ );
Molecule dm;
dm.add(Atom(d));
- if (!(position_i_ %2))
- dm.translate_y(dy);
+ dm.translate_y( inter_f * dot_delta_y_i_ );
out->add_right(dm);
}
- out->translate_x(x_dir_i_ * p->note_width());
- bool streepjes = (position_i_<-1)||(position_i_ > staff_size_i_+1);
+
- if (rest_b_ && balltype_i_ > 2)
- streepjes = false;
+ if (rest_b_) {
+ streepjes_b = false;
+ }
- if (streepjes) {
+ if (streepjes_b) {
int dir = sign(position_i_);
int s =(position_i_<-1) ? -((-position_i_)/2): (position_i_-staff_size_i_)/2;
+
Symbol str = p->lookup_l()->streepjes(s);
Molecule sm;
sm.add(Atom(str));
if (position_i_ % 2)
- sm.translate_y(-dy* dir);
+ sm.translate_y(-inter_f* dir);
out->add(sm);
}
- out->translate_y(dy*position_i_);
+ out->translate_y(inter_f*position_i_);
return out;
}
PCol::clean_breakable_items()
{
if (!line_l_) {
- for(iter(its.top(), j); j.ok(); ) {
- j->unlink();
- j.del();
- }
+ its.junk_links();
}
if (prebreak_p_) prebreak_p_->clean_breakable_items();
if (postbreak_p_) postbreak_p_->clean_breakable_items();
typeset_broken_spanner(span_p);
}
}
+ for (iter(elem_p_list_.top(),i ); i.ok() ;) {
+ Item *i_l =i->item();
+ if ( i_l && !i_l->pcol_l_->line_l_) {
+ i_l->unlink();
+ delete i.remove_p();
+ } else
+ i++;
+ }
for (iter_top(cols, i); i.ok(); i++)
i->clean_breakable_items();
%{ // -*-Fundamental-*-
#include <iostream.h>
-#define MUDELA_VERSION "0.0.59"
+#define MUDELA_VERSION "0.0.60"
#include "script-def.hh"
#include "symtable.hh"
$$ = THIS->default_paper();
}
- | paper_body WIDTH dim { $$->linewidth = $3;}
- | paper_body OUTPUT STRING { $$->outfile = *$3;
+ | paper_body WIDTH dim ';' { $$->linewidth = $3;}
+ | paper_body OUTPUT STRING ';' { $$->outfile = *$3;
delete $3;
}
| paper_body symtables { $$->set($2); }
- | paper_body UNITSPACE dim { $$->whole_width = $3; }
- | paper_body GEOMETRIC REAL { $$->geometric_ = $3; }
+ | paper_body UNITSPACE dim ';' { $$->whole_width = $3; }
+ | paper_body GEOMETRIC REAL ';' { $$->geometric_ = $3; }
| paper_body error {
}
midi_body: {
$$ = new Midi_def;
}
- | midi_body OUTPUT STRING {
+ | midi_body OUTPUT STRING ';' {
$$->outfile_str_ = *$3;
delete $3;
}
- | midi_body TEMPO notemode_duration ':' int {
+ | midi_body TEMPO notemode_duration ':' int ';' {
$$->set_tempo( $3->length(), $5 );
}
| midi_body error {
;
script_body:
- STRING int int int int {
+ STRING int int int int int {
Script_def *s = new Script_def;
- s->set_from_input(*$1,$2, $3,$4,$5);
+ s->set_from_input(*$1,$2, $3,$4,$5, $6);
$$ = s;
delete $1;
}
gen_script_def:
text_def { $$ = $1; }
- | mudela_script
+ | mudela_script { $$ = $1;
+ $$-> set_spot( THIS->here_input() );
+ }
;
text_def:
#include "score-elem.hh"
#include "input-register.hh"
+Register_group_register::~Register_group_register()
+{
+ assert(removable_b());
+}
+
+void
+Register_group_register::check_removal()
+{
+ for (int i =0; i < group_l_arr_.size(); ) {
+ group_l_arr_[i]->check_removal();
+ if (group_l_arr_[i]->removable_b())
+ terminate_register(group_l_arr_[i]);
+ else
+ i++;
+ }
+
+}
+
+bool
+Register_group_register::removable_b()const
+{
+ return !iterator_count_&& !group_l_arr_.size() ;
+}
Register_group_register::Register_group_register()
{
ireg_l_ =0;
+ iterator_count_ =0;
}
void
void
Register_group_register::terminate_register(Request_register*r_l)
{
+ mtor << "Removing " << r_l->name() << " at " << get_staff_info().when() << "\n";
+ r_l->do_removal_processing();
Request_register * reg_p =remove_register_p(r_l);
- reg_p->do_removal_processing();
+
delete reg_p;
}
for (int j =0; j < announce_info_arr_.size(); j++){
Score_elem_info info = announce_info_arr_[j];
- mtor << "Announcing " << info.elem_l_->name()<<"\n";
if (!info.req_l_)
info.req_l_ = &dummy_req;
rest_l_arr_.substitute((Rest_column*)o_l,(Rest_column*)n_l);
ncol_l_arr_.substitute((Note_column*)o_l,(Note_column*)n_l);
}
+
+Rest_collision::Rest_collision()
+{
+ transparent_b_ = true;
+ empty_b_ = true;
+}
Rest_column::Rest_column()
{
dir_i_ = 0;
+ stem_l_ = 0;
}
void
Rest_column::add(Stem*stem_l)
{
stem_l_ = stem_l;
+ add_dependency(stem_l);
// add_support(stem_l);
}
Rest_column::do_substitute_dependency(Score_elem*o,Score_elem*n)
{
Script_column::do_substitute_dependency(o,n);
- if (o->name() == Note_head::static_name()) {
+ if (o == stem_l_)
+ stem_l_ = n? (Stem*)n->item() :0;
+
+ if (o->is_type_b( Note_head::static_name()) )
head_l_arr_.substitute( (Note_head*)o->item(),
(n)? (Note_head*)n->item() : 0);
- }
}
+/*
+ Are you sure. Horizontal_vertical_group_item::translate_y could handle this
+ */
void
Rest_column::translate_y(Real dy_f)
{
#include "score-align-reg.hh"
#include "item.hh"
-Score_align_register::Score_align_register(const char *nm)
+Score_align_register::Score_align_register()
{
- type_ch_C_ = nm;
+ type_ch_C_ = 0;
priority_i_ =0;
align_p_=0;
}
Score_align_register::acknowledge_element(Score_elem_info inf)
{
if (inf.elem_l_->name() == type_ch_C_ ) {
+
if (! align_p_ ) {
align_p_ = new Horizontal_group_item;
announce_element(Score_elem_info(align_p_,0));
{ \
public: \
NAME_MEMBERS(); \
- C ## _align_register() : Score_align_register(T::static_name()) {\
+ C ## _align_register() : Score_align_register() \
+ { type_ch_C_ = T::static_name();\
priority_i_ = p;} \
}; \
IMPLEMENT_STATIC_NAME(C ## _align_register) ; \
assert( status > POSTCALCED);
if (transparent_b_ )
return "";
- String s("\\placebox{%}{%}{%}");
+ String s( "\\placebox{%}{%}{%}");
Array<String> a;
a.push(print_dimen(offset_.y));
a.push(print_dimen(offset_.x));
- a.push( output->TeX_string());
- return substitute_args(s, a);
+ String t = output->TeX_string();
+ if (t == "")
+ return t;
+
+ a.push( t);
+ String r;
+ if (check_debug)
+ r = String("\n%start: ") + name() + "\n";
+ r += substitute_args(s, a);;
+ return r;
+
}
#ifndef NPRINT
mtor << name() << "{\n";
mtor << "dets: " << dependent_size() << "dependencies: " <<
- dependency_size() << "\n";
+ dependency_size();
+ if (offset_.x || offset_.y)
+ mtor << "offset (" << offset_.x << ", " << offset_.y <<")";
+ mtor << "\n";
+
do_print();
if (output)
output->print();
return 0;
}
-/********************
+/*
DEPENDENCIES
*/
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
-
+#include "bar.hh"
#include "break-align-item.hh"
#include "score-halign-reg.hh"
#include "score-align-reg.hh"
if (reg->is_type_b(
Score_align_register::static_name()) )
{
+ Score_align_register * align_reg_l = (Score_align_register*) reg;
if (!halign_p_) {
halign_p_ = new Break_align_item;
announce_element(Score_elem_info(halign_p_,0));
}
- halign_p_->add(i.elem_l_->item(),
- ((Score_align_register*)reg)->priority_i_ );
+ Item * it = i.elem_l_->item();
+ if (align_reg_l->type_ch_C_ == Bar::static_name())
+ halign_p_->center_l_ = it;
+
+ halign_p_->add(it, align_reg_l->priority_i_);
}
}
IMPLEMENT_STATIC_NAME(Score_horizontal_align_register);
score_l_ = s;
scoreline_l_ = s->pscore_p_->super_elem_l_->line_of_score_l_;
last_mom_ = score_l_->music_p_->time_int().max();
- extra_mom_pq_.insert(last_mom_);
}
Score_register::Score_register()
while ( iter->ok() || score_reg->extra_mom_pq_.size() ) {
Moment w = INFTY;
- if (iter->ok() )
+ if (iter->ok() ) {
w = iter->next_moment();
-
+ iter->print();
+ }
if (score_reg->extra_mom_pq_.size() &&
score_reg->extra_mom_pq_.front() <= w)
score_reg->process_requests();
score_reg->do_announces();
score_reg->pre_move_processing();
+ score_reg->check_removal();
}
delete iter;
+ score_reg->check_removal();
score_reg->do_removal_processing();
delete score_reg;
}
{
mtor << "scripts: " << script_l_arr_.size() << '\n';
}
+static int
+idx(bool inside, int dir)
+{
+ int j = (dir+1);
+ if ( !inside )
+ j ++;
+ return j;
+}
void
Script_column::do_pre_processing()
if (!script_l_arr_.size())
return;
- /* up+outside, up+inside, down+outside, down+inside */
+ /* up+inside, up+outside, down+inside, down+outside */
Array<Script*> placed_l_arr_a[4];
for (int i=0; i < script_l_arr_.size(); i++) {
Script*s_l = script_l_arr_[i];
- int j = (s_l->dir_i_ >0) ? 0 : 2;
- if (!s_l->inside_staff_b_)
- j ++;
-
- placed_l_arr_a[j].push(s_l);
+ placed_l_arr_a[idx( s_l->inside_staff_b_ , s_l->dir_i_) ].push(s_l);
}
for (int j =0; j <4; j++) {
for (int i=0; i < support_l_arr_.size(); i++)
placed_l_arr_a[j][0]->add_support( support_l_arr_[i]);
}
+
Item * support_l=0;
int j = 0;
for (; j < 2; j++ ) {
- for (int i=1; i < placed_l_arr_a[j].size(); i++) {
+ for (int i=0; i < placed_l_arr_a[j].size(); i++) {
if (support_l)
placed_l_arr_a[j][i]->add_support(support_l);
support_l = placed_l_arr_a[j][i];
}
support_l = 0;
for (; j < 4; j++ ) {
- for (int i=1; i < placed_l_arr_a[j].size(); i++) {
+ for (int i=0; i < placed_l_arr_a[j].size(); i++) {
if (support_l)
placed_l_arr_a[j][i]->add_support(support_l);
support_l = placed_l_arr_a[j][i];
Script_def::Script_def()
{
inside_staff_b_ = false;
- symidx = "unknown" ;
+ symidx_str_ = "unknown" ;
rel_stem_dir_i_ =0;
staff_dir_i_ = -1;
invertsym_b_ = 0;
}
void
-Script_def::set_from_input(String idx, bool follow, int stem, int staff ,bool invert)
+Script_def::set_from_input(String idx, bool follow, int stem, int staff ,bool invert, int priority_i)
{
inside_staff_b_ = follow;
- symidx = idx ;
+ symidx_str_ = idx ;
rel_stem_dir_i_ =stem;
staff_dir_i_ = staff;
invertsym_b_ = invert;
- priority_i_ =0;
+ priority_i_ =priority_i;
}
void
-Script_def::print() const
+Script_def::do_print() const
{
- mtor << "Script_def{ idx: " << symidx
+#ifndef NPRINT
+ mtor << "Script_def{ idx: " << symidx_str_
<< " direction, stem: " << rel_stem_dir_i_ << " staff : " << staff_dir_i_ << "}\n";
+#endif
}
bool
Script_def::do_equal_b(General_script_def const &g)const
{
Script_def const & c = (Script_def const&) g;
- return !(symidx == c.symidx &&
+ return (symidx_str_ == c.symidx_str_ &&
rel_stem_dir_i_ == c.rel_stem_dir_i_&&
staff_dir_i_ == c.staff_dir_i_&&
invertsym_b_ == c.invertsym_b_);
if (invertsym_b_&& d < 0)
preidx_str = "-";
- return p->lookup_l()->script(preidx_str + symidx);
+ return p->lookup_l()->script(preidx_str + symidx_str_);
}
IMPLEMENT_STATIC_NAME(Script_def);
{
for (int i=0; i < script_req_l_arr_.size(); i++){
Script_req* l=script_req_l_arr_[i];
- Script *p =new Script( l);
+ Script *p =new Script;
+ p->dir_i_ = l->dir_i_;
+ p->specs_l_ = l->scriptdef_p_;
script_p_arr_.push(p);
announce_element(Score_elem_info(p, l));
}
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
-
+#include "script-def.hh"
#include "musical-request.hh"
#include "paper-def.hh"
#include "script.hh"
#include "molecule.hh"
#include "lookup.hh"
+void
+Script::do_print() const
+{
+#ifndef NPRINT
+ specs_l_->print();
+#endif
+}
+void
+Script::do_substitute_dependency(Score_elem*o,Score_elem*n)
+{
+ Staff_side::do_substitute_dependency(o,n);
+ if (o == stem_l_) {
+ stem_l_ = n ? (Stem*)n->item() : 0;
+ }
+}
void
Script::set_stem(Stem*st_l)
}
-Script::Script(Script_req* rq)
+Script::Script()
{
- specs_l_ = rq->scriptdef_p_;
- inside_staff_b_ = specs_l_->inside_b();
+ specs_l_ = 0;
+ inside_staff_b_ = false;
stem_l_ = 0;
pos_i_ = 0;
- dir_i_ =rq->dir_i_;
+ dir_i_ = 0;
}
+
void
Script::set_default_dir()
{
int s_i=specs_l_->rel_stem_dir_i();
- if (s_i && stem_l_)
- dir_i_ = stem_l_->dir_i_ * s_i;
- else {
+ if (s_i) {
+ if(stem_l_)
+ dir_i_ = stem_l_->dir_i_ * s_i;
+ else{
+ specs_l_->warning("Script needs stem direction");
+ dir_i_ = -1;
+ }
+ } else {
dir_i_ =specs_l_->staff_dir_i();
}
+ assert(dir_i_);
}
void
{
if (!dir_i_)
set_default_dir();
-
+ inside_staff_b_ = specs_l_->inside_b();
}
void
Staff_side::set_staffsym(Staff_symbol* s_l)
{
staff_sym_l_ = s_l;
+ add_dependency( s_l );
}
Staff_side::Staff_side()
Staff_side::get_position_i(Interval sym_dim) const
{
int i= get_position_i();
- return i+ int(rint(- sym_dim[-dir_i_] / paper()->internote_f()));
+ if (dir_i_)
+ return i+ int(rint(- sym_dim[-dir_i_] / paper()->internote_f()));
+ else
+ return i;
}
void
-Staff_side::do_substitute_dependency(Score_elem*o, Score_elem*n )
+Staff_side::do_substitute_dependency(Score_elem*o, Score_elem*n)
{
int i;
while ((i=support_l_arr_.find_i(o) ) >=0)
return (*this)[s];
else {
warning( "Symtable `" + id_str+ "\': unknown symbol `" +s+"'\n");
- Symbol sy; // unreachable
- sy.tex = "";
+ Symbol sy;
return sy;
}
}
return i;
}
+void
+Text_def::do_print() const
+{
+#ifndef NPRINT
+ mtor << "align " <<align_i_ << " `" << text_str_ << "'";
+#endif
+}
Text_def::Text_def()
{
align_i_ = 1; // right
style_str_ = "roman";
}
+
bool
Text_def::do_equal_b(Text_def const &def)const
{
mtor << "Text `" << text_str_ << "\', style " <<
style_str_ << "align " << align_i_ << '\n';
}
+
IMPLEMENT_STATIC_NAME(Text_def);
IMPLEMENT_IS_TYPE_B1(Text_def,General_script_def);
text-reg.cc -- implement Text_register
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+
+ Obsolete.
*/
#include "note-column.hh"
#include "musical-request.hh"
void
Text_spanner::set_support(Directional_spanner*d)
{
- if (support)
- remove_dependency(support);
+ if (support_span_l_)
+ remove_dependency(support_span_l_);
- support =d;
+ support_span_l_ =d;
add_dependency(d);
}
Text_spanner::Text_spanner()
{
spec_p_ = 0;
- support = 0;
+ support_span_l_ = 0;
}
IMPLEMENT_STATIC_NAME(Text_spanner);
void
Text_spanner::do_post_processing()
{
- text_off_ = support->center() +
- Offset(0,support->dir_i_ * paper()->internote_f() * 4); // todo
+ text_off_ = support_span_l_->center() +
+ Offset(0,support_span_l_->dir_i_ * paper()->internote_f() * 4); // todo
}
Molecule*
void
Text_spanner::do_pre_processing()
{
- right_col_l_ = support->right_col_l_;
- left_col_l_ = support->left_col_l_;
+ right_col_l_ = support_span_l_->right_col_l_;
+ left_col_l_ = support_span_l_->left_col_l_;
assert(left_col_l_ && right_col_l_);
}
void
Text_spanner::do_substitute_dependency(Score_elem* o, Score_elem*n)
{
- Directional_spanner * old = (Directional_spanner*)o->spanner();
- if (support == old)
- support = (Directional_spanner*) n->spanner();
+ if (support_span_l_ == o)
+ support_span_l_ = (Directional_spanner*) (n?n->spanner():0);
}
{
delete spec_p_;
}
+
+Text_spanner::Text_spanner(Text_spanner const&s)
+ : Spanner( s)
+{
+ support_span_l_ = s.support_span_l_;
+ spec_p_ = s.spec_p_? s.spec_p_->clone() : 0;
+ text_off_ = s.text_off_;
+}
end_mom_ = -1;
melodic_req_l_ = 0;
end_melodic_req_l_ =0;
+ dir_i_ = 0;
}
void
Vertical_align_elem::do_post_processing()
{
Array<Interval> dims;
- for (int i=elem_l_arr_.size(); i--; ) {
+ for (int i=0; i < elem_l_arr_.size(); i++ ) {
Interval y = elem_l_arr_[i]->height() ;
if (y.empty_b())
y = Interval(0,0);
Voice_group_registers::Voice_group_registers()
{
dir_i_ =0;
- termination_mom_ = INFTY;
}
bool
#endif
}
-void
-Voice_group_registers::do_post_move_processing()
-{
- if ( get_staff_info().time_C_ ->when_ > termination_mom_ ){
- mtor << "Terminating voice_group\n";
- daddy_reg_l_->terminate_register(this);
- return ;
- }
- Register_group_register::do_post_move_processing();
-}
-
Scalar
#include "register.hh"
#include "debug.hh"
-Voice_registers::Voice_registers()
-{
-}
-
-void
-Voice_registers::do_print() const
-{
-#ifndef NPRINT
- Register_group_register::do_print();
-#endif
-}
ADD_THIS_REGISTER(Voice_registers);
IMPLEMENT_IS_TYPE_B1(Voice_registers, Register_group_register);
Begin3
Title: LilyPond
-Version: 0.0.68pre
-Entered-date: 06/26/97
+Version: 0.0.70pre
+Entered-date: 06/29/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.68pre.tar.gz
+ 300k lilypond-0.0.70pre.tar.gz
Alternate-site:
Original-site:
Platform: unix/win32, GNU C++
Name: lilypond
-Version: 0.0.68pre
+Version: 0.0.70pre
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.68pre.tar.gz
+Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.70pre.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 lily/out/lilypond mi2mu/out/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/faq.text Documentation/out/gnu-music.text Documentation/out/index.text Documentation/out/language.text Documentation/out/lilygut.text Documentation/out/lilyliterature.text Documentation/out/lilypond.text Documentation/out/mi2mu.text Documentation/out/mudela.text Documentation/out/other-packages.text input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/error.ly input/header.ly input/keys.ly input/kortjakje.ly input/multi.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
+%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/faq.text Documentation/out/gnu-music.text Documentation/out/index.text Documentation/out/language.text Documentation/out/lilygut.text Documentation/out/lilyliterature.text Documentation/out/lilypond.text Documentation/out/mi2mu.text Documentation/out/mudela.text Documentation/out/other-packages.text input/beams.ly input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/error.ly input/header.ly input/keys.ly input/kortjakje.ly input/multi.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
%
% A tex file to help determine dims.
%
-\font\musicfont=opus20
+
+\font\musicfont=musix16
\font\slurfont=xslu16
\def\thefont{\musicfont}
\def\mdef#1#2{\def#1{\mchar{#2}}}
\def\mchar#1{\musicfnt\char#1}
\def\rationalmultiply#1*#2/#3{\multiply #1 by #2 \divide #1 by #3}
+
+
\def\maccentraise#1#2{\dimen0=\noteheight
\rationalmultiply\dimen0*#2%
\raise\dimen0\hbox{#1}}
\mdef\wholeball{'011}
\mdef\halfrest{'074}
\mdef\wholerest{'075}
+%% hmm
+\mdef\outsidehalfrest{10}
+\mdef\outsidewholerest{11}
\mdef\quartrest{62}
\mdef\eighthrest{63}
\mdef\sixteenthrest{64}
\maccentdef\sforzato{30}{-3/2}
\maccentdef\marcato{20}{-1/1}
\maccentdef\imarcato{21}{1/1}
-\maccentdef\staccato{24}{-1/3}
-\maccentdef\istaccato{25}{1/3}
+\maccentdef\staccato{24}{-1/1}
+\maccentdef\istaccato{25}{1/1}
\maccentdef\staccatissimo{28}{-5/5}
\maccentdef\istaccatissimo{29}{2/5}
\maccentdef\portato{18}{-6/5}