strict rules, notably the avoiding of so-called wedges.
+\subsection{Thickness and spacing}
+
+The spacing of double and triple beams (sixteenth and thirtysecond beams)
+is the same, quadruple and quintuple (thirtyfourth and hundredtwentyeighth
+beams) is wider.
+All beams are equally thick. Using the layout of triple beams and the
+beam-thickness $bt$ we can calculate the inter-beam spacing $ib$.
+
+Three beams span two interlines, including stafflines:
+\begin{eqnarray*}
+ 2 ib + bt &=& 2 il\\
+ ib &=& (2 il - bt) / 2
+\end{eqnarray*}
+
+We choose
+\begin{eqnarray*}
+ bt &=& 0.48(il - st)
+\end{eqnarray*}
+
+\subsubsection{Quadruple beams}
+
+If we have more than three beams they must open-up
+in order to not collide with staff lines. The only valid
+position that remains is for the upper beam to hang.
+
+\begin{eqnarray*}
+ 3 ib_{4+} + bt &=& 3 il\\
+ ib_{4+} &=& (3 il - bt) / 3
+\end{eqnarray*}
+
\bibliographystyle{plain}
\bibliography{engraving}
For your convenience, a formatted copy of the INSTALL instructions are
in the toplevel directory, as INSTALL.text
+The process is fairly straightforward, but chances are that you have
+to specify directories for TeX to configure (--enable-tex-dir,
+--enable-mf-dir)
4. DOCUMENTATION
dnl should look in $prefix first.
dnl should probably assume TDS
+
+
AC_DEFUN(AC_TEX_PREFIX, [
AC_MSG_RESULT($1/$find_dirdir)
])
+# ugh. this is hopeless
+AC_DEFUN(AC_KPSE_TEX_DIR, [
+ kpse_paths=`(kpsepath -n latex tex; kpsepath -n tex tex) | sed 's/:/ /g' | tr ' ' '\012' |sort | uniq -d`
+ kpse_syspaths=`echo $kpse_paths | grep '!'| sed 's/!//g'`
+ echo $kpse_paths
+ if test -w "$kpse_syspaths";
+ then
+ dir=`echo $kpse_syspaths | head -1`
+ else
+ dir=`echo $kpse_paths | grep -v '!'| head -1`
+ fi
+ if test "$prefix" = "NONE"; then
+ local_prefix=$ac_default_prefix
+ local_prefix_quote='${prefix}'
+
+ else
+ local_prefix=$prefix
+ local_prefix_quote=$prefix
+ fi
+ echo $local_prefix_quote = $local_prefix
+ echo $dir
+ echo $dir | sed 's!'$local_prefix'!\$local_prefix_quote!g'
+])
+
AC_DEFUN(AC_TEX_SUBDIR, [
dnl AC_REQUIRE([AC_TEX_PREFIX])
AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, tex,TeX input)
#!/bin/sh
-# conflily
-# ugh: must be executed from lilypond-x.x.x (bin/conflily)
-
-# the lilypond root dir looks like this:
-# current -> ./lilypond-x.x.x symlink to current source
-# lilypond-x.x.x the lilypond source
-# patches gzipped patches
-# releases gzipped releases
-
-# the lily root dir
+# conflily --- configure LilyPond sourcetree
#
-lelie=$HOME/music/lily
+# You should set LILYPOND_SOURCEDIR to the latest uppacked source dir,
+# it will default to:
+#
+export LILYPOND_SOURCEDIR=$HOME/lelie/current
+#
+# and create links to here, if necessary
#
-
if [ ! -e $HOME/lelie ]; then
- ln -s $lelie $HOME/lelie
+ (cd ..; ln -s `pwd` $HOME/lelie)
fi
-
-rm $lelie/current 2>&1 > /dev/null
+#
+#
current=`basename \`pwd\``
-echo ln -s $lelie/$current $lelie/current
-ln -s $lelie/$current $lelie/current
-
+(cd ..; rm -f current 2>&1 > /dev/null)
+(cd ..; ln -s $current current)
+#
+# The LilyPond root dir looks like this:
+#
+# current -> ./lilypond-x.x.x symlink to current source
+# lilypond-x.x.x/ the unpacked LilyPond source
+# patches/ gzipped patches
+# releases/ tar gzipped releases
+# test/ latest output of 'release'
+#
+#
if [ "x$LILYINCLUDE" = "x" ]; then
- echo you should make add the following to your login script
- echo "export LILYINCLUDE=$lelie/current/init:$lelie/current/mutopia:$lelie/current/input:$lelie/current/mutopia/J.S.Bach:"
- echo "export PATH=$PATH:$lelie/current/bin"
- echo "export MFINPUTS=$MFINPUTS:$lelie/current/mf"
+ # we can try...
+ echo you should add the following to your login script
+ if [ "x$MAILADDRESS" = "x" ]; then
+ export MAILADDRESS=$USER@`hostname`
+ echo " export MAILADDRESS=\$USER@`hostname`"
+ fi
+ export LILYINCLUDE=$LILYPOND_SOURCEDIR/init:$LILYPOND_SOURCEDIR/mf/out
+ export PATH=$PATH$LILYPOND_SOURCEDIR/bin:
+ export MFINPUTS=$MFINPUTS:$LILYPOND_SOURCEDIR/mf
+ export TEXINPUTS=$TEXINPUTS:$LILYPOND_SOURCEDIR/mf/out
+ cat <<EOF
+ export LILYINCLUDE=\$LILYPOND_SOURCEDIR/init:\$LILYPOND_SOURCEDIR/mf/out
+ export PATH=\$PATH:$LILYPOND_SOURCEDIR/bin
+ export MFINPUTS=\$MFINPUTS:\$LILYPOND_SOURCEDIR/mf
+ export TEXINPUTS=\$TEXINPUTS:\$LILYPOND_SOURCEDIR/mf/out
+EOF
fi
-ln -sf $lelie/current/lily/out/lilypond bin/lilypond
-ln -sf $lelie/current/mi2mu/out/mi2mu bin/mi2mu
+ln -sf $LILYPOND_SOURCEDIR/lily/out/lilypond bin/out/lilypond
+ln -sf $LILPPOND_SOURCEDIR/out/mi2mu bin/out/mi2mu
configure --prefix=/usr --enable-debugging --enable-printing --enable-checking --disable-optimise
def help():
sys.stdout.write(
'Generate a patch to go to this version.\n'
- ' --from=FROM, -f FROM old is FROM\n'
- ' --to=TO, -t TO to version TO\n'
- ' --dir=DIR, -d TO directory\n'
+ ' -f, --from=FROM old is FROM\n'
+ ' -d, --dir=DIR diff to (or from) directory DIR\n'
+ ' -r, --release diff against latest release\n'
+ ' -t, --to=TO to version TO\n'
)
-
-
def untar(fn):
# os.system('pwd');
sys.stderr.write('untarring ' + fn + '\n')
os.system('pwd')
print ('diff -urN ../%s . >> %s' % (fromdir, patfile_nm))
os.system('diff -urN ../%s . >> %s' % (fromdir, patfile_nm))
- os.system('gzip -9f %s' % patfile_nm)
+ os.system('gzip --quiet -9f %s' % patfile_nm)
def main():
os.environ['GZIP'] = '-q'
sys.stderr.write('This is make-patch version %s\n' % mp_version)
(cl_options, files) = getopt.getopt(sys.argv[1:],
- 'd:hf:o:t:', ['output=', 'help', 'from=', 'to='])
+ 'd:hf:o:rt:', ['output=', 'help', 'from=', 'to='])
outfn = ''
srcdir = ''
elif o == '--dir' or o == '-d':
srcdir = a;
to_b=0
- elif o== '--help' or o == '-h':
+ elif o == '--help' or o == '-h':
help()
return 0;
elif o == '--output' or o == '-o':
outfn = os.path.join(os.getcwd(), a)
+ elif o == '--release' or o == '-r':
+# huh?
+# if options.from_version[3]:
+# options.from_version[3] = '';
+ options.from_version = (options.from_version[0],
+ options.from_version[1], options.from_version[2], '');
else:
raise getopt.error
+pl 42.jcn1
+ - String_convert::split_arr
+
pl 42
- interval.*: Slice (Interval of int)
trying to get rid of 2.8 ice:
static String rational_str (Rational);
static String pointer_str (void const *);
static String precision_str (double x, int n);
+ static Array<String> split_arr (String str, char c);
static String i64_str (I64, char const * fmt = 0);
};
#include "string.hh"
#include "string-convert.hh"
#include "rational.hh"
+#include "varray.hh"
/**
a safe length for stringconversion buffers
return (sign (x) > 0 ? str : "-" + str);
}
+Array<String>
+String_convert::split_arr (String str, char c)
+{
+ Array<String> a;
+ int i = str.index_i (c);
+ while (i >=0)
+ {
+ String s = str.left_str (i);
+ a.push (s);
+ str = str.cut (i + 1, INT_MAX);
+ i = str.index_i (c);
+ }
+ if (str.length_i ())
+ a.push (str);
+ return a;
+}
+
% Toplevel initialisation file.
-\version "0.1.9";
+\version "0.1.10";
\include "declarations.ly"
% zillie spellink?
center=0
+break = { \penalty = 10000; }
+nobreak = { \penalty = -10000; }
+
\include "property.ly"
% Toplevel initialisation file.
-\version "0.1.10";
+\version "0.1.13";
-\include "declarations.ly"
+\include "declarations.ly";
\maininput
-% paper20.ly
+% paper11.ly
-\include "table11.ly"
+\include "table11.ly";
paper_eleven = \paper {
+ staffheight = 11.0\pt;
linewidth = 15.0 \cm;
- indent = 8.0\mm;
- rulethickness = 0.25\pt;
- barsize = 11.0 \pt;
- interline = 2.75\pt;
- notewidth = 7.15\pt; % ugh see table20 for sizes
- wholewidth = 10.44\pt;
- unitspace = 22.\pt;
-% basicspace = 4.\pt;
-% geometric = 1.414;
- geometric = 0.;
- basicspace = 9.\pt;
- arithmetic_basicspace = 2.;
- arithmetic_multiplier = 7.\pt;
-
- %
- % three beams span two interlines, including stafflines:
- % 2 interbeam + beam_thickness = 2 interline - staffline_thickness
- % ( beam_thickness = 0.48 interline for now...)
- % interbeam = interline - (beam_thickness + staffline_thickness) / 2
- % interbeam = 3.6;
- % ugh: interline *in fact* is rule_thickness + "interline"?
- interbeam = 3.0\pt;
+ % ugh see table11 for sizes
+ quartwidth = 3.63\pt;
+ wholewidth = 5.45\pt;
- gourlay_energybound = 100000.;
- gourlay_maxmeasures = 12.;
+ basicspace = 3.\pt;
+ arithmetic_basicspace = 2.;
+ arithmetic_multiplier = 4.8\pt;
- castingalgorithm = \Gourlay;
\symboltables { \table_eleven }
-\include "engraver.ly"
+ \include "params.ly";
}
-% paper20.ly
+% paper13.ly
-\include "table13.ly"
+\include "table13.ly";
paper_thirteen = \paper {
+ staffheight = 13.0\pt;
linewidth = 15.0 \cm;
- indent = 8.0\mm;
- rulethickness = 0.25\pt;
- barsize = 13.0 \pt;
- interline = 3.25\pt;
- notewidth = 7.15\pt; % ugh see table20 for sizes
- wholewidth = 10.44\pt;
- unitspace = 22.\pt;
-% basicspace = 4.\pt;
-% geometric = 1.414;
- geometric = 0.;
- basicspace = 9.\pt;
- arithmetic_basicspace = 2.;
- arithmetic_multiplier = 7.\pt;
-
- %
- % three beams span two interlines, including stafflines:
- % 2 interbeam + beam_thickness = 2 interline - staffline_thickness
- % ( beam_thickness = 0.48 interline for now...)
- % interbeam = interline - (beam_thickness + staffline_thickness) / 2
- % interbeam = 3.6;
- % ugh: interline *in fact* is rule_thickness + "interline"?
- interbeam = 3.5\pt;
+ % ugh see table13 for sizes
+ quartwidth = 4.29\pt;
+ wholewidth = 6.44\pt;
- gourlay_energybound = 100000.;
- gourlay_maxmeasures = 12.;
+ basicspace = 3.\pt;
+ arithmetic_basicspace = 2.;
+ arithmetic_multiplier = 4.8\pt;
- castingalgorithm = \Gourlay;
\symboltables { \table_thirteen }
- \include "engraver.ly"
+ \include "params.ly";
}
% paper16.ly
-\include "table16.ly"
+\include "table16.ly";
%{
chosen to look good on A4 paper. This probably looks less good on US
paper sizes.
-
%}
+
paper_sixteen = \paper {
+ staffheight = 16.0\pt;
linewidth = 15.5 \cm;
- indent = 10.\mm;
- rulethickness = 0.4\pt;
- barsize = 16.0 \pt;
- interline = 4.\pt;
- notewidth = 5.93\pt; % ugh, see table16 for sizes
- wholewidth = 8.64\pt;
- unitspace = 22.\pt;
- %geometric = 1.414;
- basicspace = 4.\pt;
- geometric = 0.;
+ % ugh, see table16 for sizes
+ quartwidth = 5.28\pt;
+ wholewidth = 7.92\pt;
+
+ basicspace = 4.\pt;
arithmetic_basicspace = 2.;
arithmetic_multiplier = 4.8\pt;
- % three beams span two interlines, including stafflines:
- % 2ib + bt = 2 il - st
- % bt = 0.48(il - st) for now.
- % 2ib + 0.48il - 0.48 st = 2il - st
- % 2ib = 1.52il - 0.52 st
- % ib = 0.76il - 0.26st = 2.94 --jcn
- % now, it seams rather ib = 0.76il + 0.26st = 3.14
- % interbeam = 2.94\pt;
- % No -- hwn
- interbeam = 3.14\pt;
-
- gourlay_energybound = 100000.;
- %{
- The following bounds the number of measures
- on a line. Decreasing it greatly reduces computation time
- %}
- gourlay_maxmeasures = 10.;
- castingalgorithm = \Gourlay;
\symboltables { \table_sixteen }
- \include "engraver.ly"
+ \include "params.ly";
}
% paper20.ly
-\include "table20.ly"
+\include "table20.ly";
paper_twenty = \paper {
+ staffheight = 20.0\pt;
linewidth = 17.0 \cm;
- indent = 12.\mm;
- rulethickness = 0.4\pt;
- barsize = 20.0 \pt;
- interline = 5.\pt;
- notewidth = 7.15\pt; % ugh see table20 for sizes
- wholewidth = 10.44\pt;
- unitspace = 22.\pt;
-% basicspace = 4.\pt;
-% geometric = 1.414;
- geometric = 0.;
- basicspace = 8.\pt;
+ % ugh see table20 for sizes
+ quartwidth = 6.61\pt;
+ wholewidth = 9.90\pt;
+
+ basicspace = 8.\pt;
arithmetic_basicspace = 2.;
arithmetic_multiplier = 6.\pt;
- % three beams span two interlines, including stafflines:
- % 2ib + bt = 2 il - st
- % bt = 0.48(il - st) for now.
- % 2ib + 0.48il - 0.48 st = 2il - st
- % 2ib = 1.52il - 0.52 st
- % ib = 0.76il - 0.26st = 3.70
- % now, it seams rather ib = 0.76il + 0.26st = 3.90
- % interbeam = 3.70\pt;
- interbeam = 3.90\pt;
-
- gourlay_energybound = 100000.;
- gourlay_maxmeasures = 10.;
-
- castingalgorithm = \Gourlay;
\symboltables { \table_twenty }
-\include "engraver.ly"
+ \include "params.ly";
}
-% paper20.ly
+% paper26.ly
-\include "table26.ly"
+\include "table26.ly";
paper_twentysix = \paper {
- linewidth = 15.0 \cm;
- indent = 12.0\mm;
- rulethickness = 0.5\pt;
- barsize = 26.0 \pt;
- interline = 6.5\pt;
- notewidth = 7.15\pt; % ugh see table20 for sizes
- wholewidth = 10.44\pt;
- unitspace = 22.\pt;
-% basicspace = 4.\pt;
-% geometric = 1.414;
- geometric = 0.;
- basicspace = 9.\pt;
+ staffheight = 20.0\pt;
+ linewidth = 17.0 \cm;
- arithmetic_basicspace = 2.;
- arithmetic_multiplier = 7.\pt;
-
- % three beams span two interlines, including stafflines:
- % 2ib + bt = 2 il - st
- % bt = 0.48(il - st) for now.
- % 2ib + 0.48il - 0.48 st = 2il - st
- % 2ib = 1.52il - 0.52 st
- % ib = 0.76il - 0.26st = 4.81
- % interbeam = 4.81\pt;
- % now, it seams rather ib = 0.76il + 0.26st = 5.07
- interbeam = 5.07\pt;
+ % ugh see table26 for sizes
+ notewidth = 8.59\pt
+ wholewidth = 12.87\pt;
- gourlay_energybound = 100000.;
- gourlay_maxmeasures = 12.;
+ basicspace = 8.\pt;
+ arithmetic_basicspace = 2.;
+ arithmetic_multiplier = 6.\pt;
- castingalgorithm = \Gourlay;
- \symboltables { \table_twentysix }
-\include "engraver.ly"
+ \symboltables { \table_twenty }
+ \include "params.ly";
}
--- /dev/null
+% params.ly
+% generic paper parameters
+
+interline = staffheight / 4.0;
+internote = interline / 2.0;
+staffline = interline / 10.0;
+
+beam_thickness = 0.48 * (interline - staffline);
+interbeam = (2.0 * interline - beam_thickness) / 2.0;
+interbeam4 = (3.0 * interline - beam_thickness) / 3.0;
+
+% OSU: suggested gap = ss / 5;
+slur_x_gap = interline / 5.0;
+slur_x_minimum = 2.0 * interline;
+tie_x_minimum = slur_x_minimum;
+tie_x_gap = slur_x_gap;
+
+% ugh: rename to bow (in bezier.cc and fonts.doc too...)
+slur_thickness = 1.8 * staffline;
+slur_height_limit = staffheight;
+slur_ratio = 1.0 / 3.0;
+slur_clip_ratio = 1.2;
+slur_clip_height = 3.0 * staffheight;
+slur_clip_angle = 100.0;
+slur_rc_factor = 2.4;
+
+% ugh
+notewidth = (quartwidth + wholewidth) / 2.0;
+
+% ugh
+barsize = staffheight;
+rulethickness = staffline;
+
+% mmm
+indent = linewidth / 14.0;
+
+% uhm
+unitspace = 22.\pt;
+geometric = 0.;
+
+gourlay_energybound = 100000.;
+%{
+The following bounds the number of measures
+on a line. Decreasing it greatly reduces computation time
+%}
+gourlay_maxmeasures = 10.;
+castingalgorithm = \Gourlay;
+\include "engraver.ly";
+
pletvisibility 2 show number, and bracket-if-no-beam
pletvisibility 4 show number, and bracket
+slurdash 0 normal slurs
+slurdash 1 dotted slurs
+slurdash >1 dashed slurs
+
[Score?]
beamslopedamping 0 no damping \beamslopeproportional
beamslopedamping 1 damping1) \beamslopedamped
\property Score.beamquantisation = \traditional
}
+slurnormal = {
+ \property Voice.slurdash = 0
+}
+
+slurdotted = {
+ \property Voice.slurdash = 1
+}
+
< 'c-\ltoe-\lheel 'e > < c'-\rtoe-\rheel e' >
< 'c-\lheel-\ltoe 'e > < c'-\rheel-\rtoe e' > |
% 46
- \duration 16;
- [d-\lfheel e-\rbtoe fis-\ltoe e-\rbtoe]
+
+ [d16-\lfheel e-\rbtoe fis-\ltoe e-\rbtoe]
[d-\lfheel e-\rbtoe fis-\lheel e] [d e fis e] [d e fis e] |
- d4 r4 r4 [b-\rtoe a-\ltoe b-\rtoe fis-\ltoe] |
+ d4 r4 r4 [b16-\rtoe a-\ltoe b-\rtoe fis-\ltoe] |
}
\paper{}
}
\meter 4/4;
c1
- \duration 8;
+
r8-"text" r8^. r8_. r8 r8 r8 r8 r8
[c-> d-> e-> f->][g-> a-> b-> c'->] % 1
\octave c'; [c'-^ b-^ a-^ g-^][f-^ e-^ d-^ c-^]
\property Score.beamquantisation = 3 % TEST
\octave c';
[c8 c] [c c] [c c] [c c]
- [a'8 a'] [a' a'] [a' a'] [a' a']
+ [a' a'] [a' a'] [a' a'] [a' a']
+ [c16 c] [c c] [c c] [c c]
+ [a' a'] [a' a'] [a' a'] [a' a']
}
\paper{
castingalgorithm = \Wordwrap;
--- /dev/null
+\score{
+ \melodic{
+ c( d e )c |
+ \slurdotted;
+ c( d e )c |
+ \slurnormal;
+ c( d e )c |
+ \property Voice.slurdash = 3
+ c( d e )c |
+ \slurnormal;
+ c( d e )c |
+ }
+ \paper{
+ indent = 0.0\pt;
+ %for broken!
+ % linewidth= 30.\mm;
+ castingalgorithm = \Wordwrap;
+ }
+}
+
\score{
\melodic{\octave c';
- \duration "last";
'c4 ~ 'c c'' ~ c'' ~ g ~ c ~
d ~ e ~ f ~ g ~
else
s->beams_right_i_ = s->flag_i_;
+ abeam_p_->multiple_i_ = s->flag_i_;
if (s->type_i () != 1) // no abbrev gaps on half note
s->beam_gap_i_ = s->flag_i_ - ((s->type_i () >? 2) - 2);
}
}
-void
-Bar_engraver::acknowledge_element (Score_elem_info i)
-{
- if (!bar_p_ || !i.elem_l_->is_type_b (Multi_measure_rest::static_name ()))
- return;
-
-#if 0
- if (!bar_p_ || !i.req_l_ || !i.req_l_->musical ()
- || !i.req_l_->musical ()->multi_measure ())
- return;
-
- // would this be enough?
- //urg segfault
- bar_p_->unlink ();
- delete bar_p_;
- bar_p_ = 0;
-#endif
-}
void
Bar_engraver::do_creation_processing ()
if (!bar_p_)
{
- Disallow_break_req r;
- daddy_grav_l()->try_request (&r);
+ Break_req r;
+ r.penalty_i_ = Break_req::DISALLOW;
+ daddy_grav_l ()->try_request (&r);
}
}
/*
[TODO]
- * lowest beam of (UP) beam must never be lower than second staffline
* centre beam symbol
* less hairy code
* redo grouping
{
Molecule *mol_p = new Molecule;
- Real interline_f = paper ()->interline_f ();
- Real internote_f = interline_f / 2;
- Real staffline_f = paper ()->rule_thickness ();
- Real beam_f = 0.48 * (interline_f - staffline_f);
+ Real internote_f = paper ()->internote_f ();
Real x0 = stems_[0]->hpos_f ();
for (int j=0; j <stems_.size (); j++)
Real interline_f = paper ()->interline_f ();
Real internote_f = interline_f / 2;
Real staffline_f = paper ()->rule_thickness ();
- Real beam_f = 0.48 * (interline_f - staffline_f);
+ Real beam_f = paper ()->beam_thickness_f ();
Real dx_f = stems_.top ()->hpos_f () - stems_[0]->hpos_f ();
hang straddle sit inter hang
*/
- Real interbeam_f = paper ()->interbeam_f ();
Real interline_f = paper ()->interline_f ();
- Real internote_f = interline_f / 2;
+ Real internote_f = paper ()->internote_f ();
Real staffline_f = paper ()->rule_thickness ();
- Real beam_f = 0.48 * (interline_f - staffline_f);
- Real symbol_f = beam_f + interbeam_f * (multiple_i_ - 1);
+ Real beam_f = paper ()->beam_thickness_f ();
+
+ /*
+ [TODO]
+ it would be nice to have all allowed positions in a runtime matrix:
+ (multiplicity, minimum_beam_dy, maximum_beam_dy)
+ */
Real straddle = 0;
Real sit = beam_f / 2 - staffline_f / 2;
// dim(left_y_) = internote
Real dy_f = dir_ * left_y_ * internote_f;
+ Real beamdx_f = stems_.top ()->hpos_f () - stems_[0]->hpos_f ();
+ Real beamdy_f = beamdx_f * slope_f_ * internote_f;
+
Array<Real> allowed_position;
if (quantisation_ != TEST)
{
if (quantisation_ <= NORMAL)
{
- if ((multiple_i_ <= 2) || (abs (dy_f) >= staffline_f / 2))
+ if ((multiple_i_ <= 2) || (abs (beamdy_f) >= staffline_f / 2))
allowed_position.push (straddle);
- if ((multiple_i_ <= 1) || (abs (dy_f) >= staffline_f / 2))
+ if ((multiple_i_ <= 1) || (abs (beamdy_f) >= staffline_f / 2))
allowed_position.push (sit);
allowed_position.push (hang);
}
else
// TODO: check and fix TRADITIONAL
{
- if ((multiple_i_ <= 2) || (abs (dy_f) >= staffline_f / 2))
+ if ((multiple_i_ <= 2) || (abs (beamdy_f) >= staffline_f / 2))
allowed_position.push (straddle);
- if ((multiple_i_ <= 1) && (dy_f <= staffline_f / 2))
+ if ((multiple_i_ <= 1) && (beamdy_f <= staffline_f / 2))
allowed_position.push (sit);
- if (dy_f >= -staffline_f / 2)
+ if (beamdy_f >= -staffline_f / 2)
allowed_position.push (hang);
}
}
void
Beam::set_stemlens ()
{
- Real interbeam_f = paper ()->interbeam_f ();
- Real interline_f = paper ()->interline_f ();
- Real internote_f = interline_f / 2;
Real staffline_f = paper ()->rule_thickness ();
- Real beam_f = 0.48 * (interline_f - staffline_f);
-
- /*
- if we have more than three beams they must open-up
- in order to not collide with staff lines
- */
- if (multiple_i_ > 3)
- interbeam_f += 2.0 * staffline_f / 4;
Real x0 = stems_[0]->hpos_f ();
Real dy = 0;
}
} while (abs (dy) > epsilon);
- // ugh asymmetric symbol ?
- if (dir_ == UP)
- left_y_ -= dir_ * staffline_f / 4;
-
- if ((multiple_i_ >= 3) && (dir_ == UP))
- left_y_ -= dir_ * staffline_f / 4;
-
test_pos++;
test_pos %= 4;
}
assert (!prev || prev->hpos_f () < here->hpos_f ());
Real staffline_f = paper ()->rule_thickness ();
- Real interbeam_f = paper ()->interbeam_f ();
- Real internote_f =paper ()->internote_f ();
- Real interline_f = 2 * internote_f;
- Real beamheight_f = 0.48 * (interline_f - staffline_f);
+ Real interbeam_f = paper ()->interbeam_f (multiple_i_);
+ Real internote_f = paper ()->internote_f ();
+ Real beam_f = paper ()->beam_thickness_f ();
- if (multiple_i_ > 3)
- interbeam_f += 2.0 * staffline_f / 4;
Real dy = interbeam_f;
Real stemdx = staffline_f;
Real sl = slope_f_* internote_f;
Real w = (here->hpos_f () - prev->hpos_f ())/4 <? paper ()->note_width ();;
Atom a;
if (lhalfs) // generates warnings if not
- a = paper ()->lookup_l ()->beam (sl, w, beamheight_f);
+ a = paper ()->lookup_l ()->beam (sl, w, beam_f);
a.translate (Offset (-w, -w * sl));
for (int j = 0; j < lhalfs; j++)
{
int rwholebeams = here->beams_right_i_ <? next->beams_left_i_;
Real w = next->hpos_f () - here->hpos_f ();
- Atom a = paper ()->lookup_l ()->beam (sl, w + stemdx, beamheight_f);
+ Atom a = paper ()->lookup_l ()->beam (sl, w + stemdx, beam_f);
a.translate_axis( - stemdx/2, X_AXIS);
int j = 0;
Real gap_f = 0;
// TODO: notehead widths differ for different types
gap_f = paper ()->note_width () / 2;
w -= 2 * gap_f;
- a = paper ()->lookup_l ()->beam (sl, w + stemdx, beamheight_f);
+ a = paper ()->lookup_l ()->beam (sl, w + stemdx, beam_f);
}
for (; j < rwholebeams; j++)
w = w/4 <? paper ()->note_width ();
if (rhalfs)
- a = paper ()->lookup_l ()->beam (sl, w, beamheight_f);
+ a = paper ()->lookup_l ()->beam (sl, w, beam_f);
for (; j < rwholebeams + rhalfs; j++)
{
Real internote_f = STAFFHEIGHT / 8;
#endif
- //urg
- Real epsilon = internote_f / 2;
+ Real epsilon = internote_f / 4;
if (abs (dy2 - dy1) < epsilon)
return;
Real dy = check_fit_f ();
calc_return (0, 0);
- transform_controls_back ();
+ transform_back ();
return dy;
}
calc_controls ();
- transform_controls_back ();
+ transform_back ();
}
/*
Bezier_bow::calc_clipping ()
{
#ifndef STANDALONE
- Real staffsize_f = paper_l_->get_var ("barsize");
+ Real clip_height = paper_l_->get_var ("slur_clip_height");
+ Real clip_ratio = paper_l_->get_var ("slur_clip_ratio");
+ Real clip_angle = paper_l_->get_var ("slur_clip_angle");
#else
Real staffsize_f = STAFFHEIGHT;
+ Real clip_height = 3.0 * staffsize_f;
+ Real clip_ratio = 1.2;
+ Real clip_angle = 100;
#endif
Real b = control_[3].x () - control_[0].x ();
- Real clip_h = 1.2 * b <? 3.0 * staffsize_f;
+ Real clip_h = clip_ratio * b <? clip_height;
Real begin_h = control_[1].y () - control_[0].y ();
Real end_h = control_[2].y () - control_[3].y ();
Real begin_dy = 0 >? begin_h - clip_h;
Real end_dy = 0 >? end_h - clip_h;
Real pi = M_PI;
- Real begin_alpha = (control_[1] - control_[0]).arg () + alpha_;
- Real end_alpha = pi - (control_[2] - control_[3]).arg () - alpha_;
+ Real begin_alpha = (control_[1] - control_[0]).arg () + dir_ * alpha_;
+ Real end_alpha = pi - (control_[2] - control_[3]).arg () - dir_ * alpha_;
- Real max_alpha = (100.0 / 90) * pi/2;
+ Real max_alpha = clip_angle / 90 * pi / 2;
if ((begin_dy < 0) && (end_dy < 0)
&& (begin_alpha < max_alpha) && (end_alpha < max_alpha))
return false;
- encompass_.rotate (alpha_);
- origin_.y () *= dir_;
- encompass_.translate (origin_);
+ transform_back ();
bool again = true;
{
Real dy = (begin_dy + end_dy) / 4;
dy *= cos (alpha_);
- encompass_[0].y () += dy;
- encompass_[encompass_.size () - 1].y () += dy;
+ encompass_[0].y () += dir_ * dy;
+ encompass_[encompass_.size () - 1].y () += dir_ * dy;
}
else
{
if (end_alpha >= max_alpha)
end_dy = 0 >? c * end_alpha / max_alpha * end_h;
- encompass_[0].y () += begin_dy;
- encompass_[encompass_.size () - 1].y () += end_dy;
+ encompass_[0].y () += dir_ * begin_dy;
+ encompass_[encompass_.size () - 1].y () += dir_ * end_dy;
Offset delta = encompass_[encompass_.size () - 1] - encompass_[0];
alpha_ = delta.arg ();
}
- origin_ = encompass_[0];
- encompass_.translate (-origin_);
- origin_.y () *= dir_;
- encompass_.rotate (-alpha_);
+ transform ();
return again;
}
Bezier_bow::calc_return (Real begin_alpha, Real end_alpha)
{
#ifndef STANDALONE
- Real thick = 1.8 * paper_l_->rule_thickness ();
+ Real thick = paper_l_->get_var ("slur_thickness");
#else
Real thick = 1.8 * 0.4 PT;
#endif
// emperic computer science:
// * tangents somewhat steeper than minimal line
+#ifndef STANDALONE
+ Real internote = paper_l_->internote_f ();
+ Real rc_correct = paper_l_->get_var ("slur_rc_factor");
+#else
+ Real internote = STAFFHEIGHT / 8;
Real rc_correct = 2.4;
+#endif
begin_rc *= rc_correct;
end_rc *= rc_correct;
Real end_alpha = atan (-end_rc);
Real theta = (begin_alpha - end_alpha) / 2;
-#ifndef STANDALONE
- Real internote = paper_l_->internote_f ();
-#else
- Real internote = STAFFHEIGHT / 8;
-#endif
Real epsilon = internote / 5;
// if we have two disturbing points, have height line through those...
}
void
-Bezier_bow::transform_controls_back ()
+Bezier_bow::transform_back ()
{
- // silly name; let's transform encompass back too
- // to allow recalculation without re-set()ting encompass array
-
if (dir_ == DOWN)
{
control_.flipy ();
encompass_.rotate (alpha_);
encompass_.translate (origin_);
-
}
/*
{
Real pi = M_PI;
#ifndef STANDALONE
- Real staffsize_f = paper_l_->get_var ("barsize");
+ Real height_limit = paper_l_->get_var ("slur_height_limit");
+ Real ratio = paper_l_->get_var ("slur_ratio");
#else
Real staffsize_f = STAFFHEIGHT;
-#endif
-
Real height_limit = staffsize_f;
Real ratio = 1.0/3.0;
+#endif
Real alpha = height_limit * 2.0 / pi;
Real beta = pi * ratio / (2.0 * height_limit);
{
dy_f_drul_[LEFT] = dy_f_drul_[RIGHT] = 0.0;
dx_f_drul_[LEFT] = dx_f_drul_[RIGHT] = 0.0;
+ dash_i_ = 0;
}
Molecule*
Bow::brew_molecule_p () const
{
- Molecule* mol_p = new Molecule;
-
+ Real thick = paper ()->get_var ("slur_thickness");
Array<Offset> c = get_controls ();
- Atom a = paper ()->lookup_l ()->slur (c);
Real dy = c[3].y () - c[0].y ();
+ Atom a;
+
+ if (!dash_i_)
+ a = paper ()->lookup_l ()->slur (c);
+ else
+ a = paper ()->lookup_l ()->dashed_slur (c, thick, dash_i_);
+
if (check_debug && !monitor->silent_b ("Bow"))
{
static int i = 1;
}
a.translate (Offset (dx_f_drul_[LEFT], dy_f_drul_[LEFT]));
+ Molecule* mol_p = new Molecule;
mol_p->add (a);
return mol_p;
clef_req_l_ =0;
clef_type_str_ = 0;
c0_position_i_ =0;
+ octave_dir_ = CENTER;
}
/*
bool
Clef_engraver::set_type (String s)
{
+ if (s.right_str(2) == "_8") // Down one octave
+ {
+ octave_dir_ = DOWN;
+ s = s.left_str(s.length_i() - 2);
+ }
+ else if (s.right_str(2) == "^8") // Up one octave
+ {
+ octave_dir_ = UP;
+ s = s.left_str(s.length_i() - 2);
+ }
+ else
+ octave_dir_ = CENTER;
clef_type_str_ = s;
if (clef_type_str_ == "violin" || clef_type_str_ == "G" || clef_type_str_ == "G2")
c0_position_i_= -6;
default:
return false;
}
+ c0_position_i_ -= (int) octave_dir_ * 7;
return true;
}
#include "paper-def.hh"
#include "lookup.hh"
#include "clef-grav.hh"
-
+#include "text-item.hh"
void
Clef_item::do_pre_processing()
breakable_b_ =true;
default_b_ = false;
change_b_ = true;
+ octave_dir_ = CENTER;
read ("violin");
+ // Ugh: This should be const, I guess.
+ octave_marker_td_p_ = new Text_def();
+ octave_marker_td_p_->text_str_ = "8";
+ octave_marker_td_p_->style_str_ = "italic";
}
/*
Clef_item::read (Clef_engraver const &k)
{
read (k.clef_type_str_);
+ octave_dir_ = k.octave_dir_;
}
Molecule*
Atom s = paper()->lookup_l ()->clef (t);
Molecule*output = new Molecule (Atom (s));
output->translate_axis (paper()->internote_f () * y_position_i_, Y_AXIS);
+ if (octave_dir_)
+ output->add_at_edge (Y_AXIS,
+ octave_dir_,
+ Molecule(octave_marker_td_p_->get_atom(paper(),
+ CENTER)));
return output;
}
void
Command_req::do_print() const{}
-IMPLEMENT_IS_TYPE_B1(Disallow_break_req,Command_req);
-
-void
-Disallow_break_req::do_print() const
-{
-}
-/* *************** */
-
IMPLEMENT_IS_TYPE_B1(Barcheck_req,Timing_req);
void
multi_octave_b_= false;
}
-void
-Break_force_req::do_print () const
+IMPLEMENT_IS_TYPE_B1(Break_req, Command_req);
+
+Break_req::Break_req ()
{
+ penalty_i_ = 0;
}
-IMPLEMENT_IS_TYPE_B1(Break_force_req, Command_req);
+void
+Break_req::do_print () const
+{
+}
Key_change_req::Key_change_req (Key_change_req const&c)
: Command_req (c)
protected:
- virtual void acknowledge_element (Score_elem_info);
virtual void do_creation_processing ();
virtual void do_removal_processing ();
virtual bool do_try_request (Request *req_l);
Real check_fit_f ();
void set (Array<Offset> points, int dir);
void transform ();
- void transform_controls_back ();
+ void transform_back ();
Paper_def* paper_l_;
Curve encompass_;
DECLARE_MY_RUNTIME_TYPEINFO;
+ int dash_i_;
+
protected:
virtual Molecule* brew_molecule_p () const;
virtual Interval do_width () const;
virtual Meter_change_req * meterchange() { return 0; }
virtual Bar_req *bar() { return 0; }
virtual Cadenza_req *cadenza() { return 0; }
- virtual Disallow_break_req *disallowbreak() { return 0; }
virtual Timing_req*timing() { return 0; }
virtual Command_script_req*commandscript() { return 0;}
- virtual Break_force_req *forcebreak () { return 0; }
+ virtual Break_req *linebreak () { return 0; }
};
-class Break_force_req : public Command_req {
+class Break_req : public Command_req {
public:
- REQUESTMETHODS(Break_force_req, forcebreak);
+ enum { DISALLOW = -10000, FORCE = 10000 };
+ int penalty_i_;
+ Break_req ();
+ REQUESTMETHODS (Break_req, linebreak);
};
class Command_script_req : public Command_req, public Script_req {
REQUESTMETHODS(Command_script_req, commandscript);
};
-
-class Disallow_break_req : public Command_req {
-public:
- REQUESTMETHODS(Disallow_break_req, disallowbreak);
-};
-
-
/** Baseclass for meter/partial req. It has to be handled by
Staff_{walker,column} baseclass. */
class Timing_req : public Command_req {
struct Blank_req;
struct Bow;
struct Box;
-struct Break_align_item;
struct Bracket_req;
+struct Break_align_item;
+struct Break_req;
struct Cadenza_req;
struct Change_iterator;
struct Change_translator;
struct Dots;
struct Dot_column;
struct Directional_spanner;
-struct Disallow_break_req;
struct Durational_req;
struct Dynamic;
struct Dynamic_req;
struct Element_group;
struct Element_group_item;
-struct Break_force_req;
struct General_script_def;
struct Graphical_element;
struct Music_output;
Atom bar (String, Real height) const;
Atom dots () const;
+ Atom dashed_slur (Array<Offset> controls, Real thick, Real dash) const;
Atom slur (Array<Offset> controls) const;
Atom plet (Real dy, Real dx, Direction dir) const;
Atom text (String style, String text, int align = 1) const;
extern Sources* source_global_l;
extern bool no_paper_global_b;
extern bool no_timestamps_global_b;
+extern bool find_quarts_global_b;
extern int exit_status_i_;
extern bool experimental_features_global_b;
extern bool dependency_global_b;
--- /dev/null
+/*
+ mudela-version.hh -- declare Mudela_version
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1998 Jan Nieuwenhuizen <jan@digicash.com>
+
+*/
+
+#ifndef MUDELA_VERSION_HH
+#define MUDELA_VERSION_HH
+
+#include "string.hh"
+
+struct Mudela_version
+{
+ Mudela_version (int major, int minor, int patch);
+ Mudela_version (String str);
+
+ String str () const;
+ operator int () const;
+
+ int major_i_;
+ int minor_i_;
+ int patch_i_;
+};
+
+#endif // MUDELA_VERSION_HH
class Multi_measure_rest_req : public Rhythmic_req {
public:
REQUESTMETHODS(Multi_measure_rest_req, multi_measure);
+
};
/**
Chord * get_note_element (Note_req * ,Duration *);
Chord* get_rest_element (String,Duration *);
Chord* get_word_element (Text_def*, Duration*);
+ Melodic_req* get_melodic_req (Melodic_req* melodic, int quotes);
+ void set_nearest (Melodic_req* melodic);
+ String notename_str (Melodic_req* melodic);
void set_last_duration (Duration const *);
void set_default_duration (Duration const *);
void set_abbrev_beam (int type_i);
void set_duration_mode (String s);
+ void set_octave_mode (String s);
friend int yyparse (void*);
public:
int abbrev_beam_type_i_;
int default_octave_i_;
+ Melodic_req* last_melodic_;
Duration default_duration_;
Plet plet_;
Header *default_header_p_;
String textstyle_str_;
bool first_b_;
bool last_duration_mode_b_ ;
+ bool relative_octave_mode_b_;
Array<Request*> pre_reqs, post_reqs;
int fatal_error_i_;
Sources * source_l_;
void set (Lookup*);
Paper_def (Paper_def const&);
- /// The distance between beams
- Real interbeam_f () const;
- /**
- The distance between lines
- */
+ /// The distance between beams of multiplicity_i
+ Real interbeam_f (int multiplicity_i) const;
+
+ /// The thickness of a beam
+ Real beam_thickness_f () const;
+
+ /// The distance between lines
Real interline_f () const;
/// half the distance between lines
Real internote_f () const;
/// thickness of the standard line
Real rule_thickness () const;
+
+ /// thickness of the staff line
+ Real staffline_f () const;
+
Interval line_dimensions_int (int) const;
Real linewidth_f () const;
+
/// height of the staff
- Real standard_height () const;
+ Real staffheight_f () const;
/// width of a crotchet ball
Real note_width () const;
friend class Score_engraver;
bool musical_b_;
- bool forced_break_b_;
+ int break_penalty_i_;
Moment when_;
+
public:
- bool forced_break_b () { return forced_break_b_ ; }
+ int break_penalty_i () { return break_penalty_i_; }
DECLARE_MY_RUNTIME_TYPEINFO;
SCORE_ELEM_CLONE(Score_column);
/// length of notes/rests in this column
public Engraver_group_engraver, public Global_translator
{
Line_of_score * scoreline_l_;
- bool disallow_break_b_;
+ int break_penalty_i_;
int breaks_i_;
Link_array<Score_elem> elem_p_arr_;
/// full info on where we are
struct Time_description {
- Moment when_;
+ Moment when_;
- /// found an error so far?
- bool error_b_ ;
+ /// found an error so far?
+ bool error_b_ ;
- /// if true, no bars needed, no reduction of whole_in_measure
- bool cadenza_b_;
+ /// if true, no bars needed, no reduction of whole_in_measure
+ bool cadenza_b_;
- /// current measure info
- Moment whole_per_measure_;
-
- /// where am i
- Moment whole_in_measure_;
-
- /// how long is one beat?
- Moment one_beat_;
-
- /// idem
- int bars_i_;
-
- /* *************** */
- void set_cadenza (bool);
- void OK() const;
- Time_description();
- void add (Moment dt);
- bool allow_meter_change_b();
- String str() const;
- void print() const;
- void setpartial (Moment p);
- String try_set_partial_str (Moment) const;
- Moment barleft() const;
- Moment next_bar_moment() const;
- void set_meter (int,int);
- static int compare (const Time_description&, const Time_description&);
+ /// current measure info
+ Moment whole_per_measure_;
+
+ /// where am i
+ Moment whole_in_measure_;
+
+ /// how long is one beat?
+ Moment one_beat_;
+
+ /// idem
+ int bars_i_;
+
+ /* *************** */
+ void set_cadenza (bool);
+ Moment when_mom () const { return when_; }
+ void OK() const;
+ Time_description();
+ void add (Moment dt);
+ bool allow_meter_change_b();
+ String str() const;
+ void print() const;
+ void setpartial (Moment p);
+ String try_set_partial_str (Moment) const;
+ Moment barleft() const;
+ Moment next_bar_moment() const;
+ void set_meter (int,int);
+ static int compare (const Time_description&, const Time_description&);
};
#include "compare.hh"
void
process_timing_reqs (Time_description &time_,
- Rhythmic_grouping *default_grouping,
- Array<Timing_req*> const& timing_req_l_arr);
+ Rhythmic_grouping *default_grouping,
+ Array<Timing_req*> const& timing_req_l_arr);
#endif // Time_description_HH
class Timing_engraver : public Timing_translator, public Engraver
{
protected:
- virtual void acknowledge_element (Score_elem_info i);
virtual void fill_staff_info (Staff_info&);
virtual Engraver * engraver_l () { return Engraver::engraver_l (); }
public:
virtual void do_pre_move_processing();
virtual void do_post_move_processing();
- bool mmrest_b_;
};
#endif // TIMING_TRANSLATOR_HH
#include "debug.hh"
#include "parseconstruct.hh"
#include "main.hh"
+#include "musical-request.hh"
#include "identifier.hh"
void strip_trailing_white (String&);
void strip_leading_white (String&);
<notes,INITIAL,lyrics>\\include {
yy_push_state (incl);
}
-<incl>\"[^"]*\" { /* got the include file name */
+<incl>\"[^"]*\";? { /* got the include file name */
String s (YYText ()+1);
- s = s.left_str (s.length_i ()-1);
+ s = s.left_str (s.index_last_i ('"'));
DOUT << "#include `" << s << "\'\n";
new_input (s,source_global_l);
yy_pop_state ();
DOUT << "rest:"<< yylval.string;
return RESTNAME;
}
+<notes>R {
+ return MEASURES;
+}
<INITIAL,lyrics,notes>\\\${BLACK}*{WHITE} {
String s=YYText () + 2;
s=s.left_str (s.length_i () - 1);
if (mel_l) {
DOUT << "(notename)\n";
yylval.melreq = mel_l;
+ mel_l->set_spot (Input (source_file_l (), here_ch_C ()));
return NOTENAME_ID;
}
}
if (mel_l) {
DOUT << "(notename)\n";
yylval.melreq = mel_l;
+ mel_l->set_spot (Input (source_file_l (), here_ch_C ()));
return NOTENAME_ID;
}
}
return (*symtables_p_)("flags")->lookup (c + String (j));
}
+Atom
+Lookup::dashed_slur (Array<Offset> controls, Real thick, Real dash) const
+{
+ assert (controls.size () == 8);
+
+ String ps = "\\embeddedps{\n";
+
+ Real dx = controls[3].x () - controls[0].x ();
+ Real dy = controls[3].y () - controls[0].y ();
+
+ for (int i = 1; i < 4; i++)
+ ps += String_convert::double_str (controls[i].x ()) + " "
+ + String_convert::double_str (controls[i].y ()) + " ";
+
+ ps += String_convert::double_str (controls[0].x ()) + " "
+ + String_convert::double_str (controls[0].y ()) + " ";
+
+ ps += String_convert::double_str (thick) + " ";
+ Real on = dash > 1? thick * dash - thick : 0;
+ Real off = 2 * thick;
+ ps += "[" + String_convert::double_str (on) + " ";
+ ps += String_convert::double_str (off) + "] ";
+ ps += String_convert::int_str (0) + " ";
+ ps += " draw_dashed_slur}";
+
+ Atom s;
+ s.tex_ = ps;
+
+ s.dim_[X_AXIS] = Interval (0, dx);
+ s.dim_[Y_AXIS] = Interval (0 <? dy, 0 >? dy);
+ return s;
+}
+
Atom
Lookup::slur (Array<Offset> controls) const
{
{
String embed;
Atom ret;
- Real height = paper_l_->get_var ("barsize") / 6;
+ Real height = paper_l_->staffheight_f () / 6;
embed = "\\embeddedps{\n" ;
embed += String (width) + " "
+ String (height) + " "
Real interline_f = paper ()->interline_f ();
mol_p->translate_axis (interline_f, Y_AXIS);
- if (measures_i_)
+ if (measures_i_ > 1)
{
Text_def text;
text.text_str_ = measures_i_;
/* *************** */
+
+
IMPLEMENT_IS_TYPE_B1 (Multi_measure_rest_req, Rhythmic_req);
void
Rhythmic_req::do_print ();
}
+
/* *************** */
IMPLEMENT_IS_TYPE_B1 (Beam_req,Span_req);
static Keyword_ent the_key_tab[]={
{"accepts", ACCEPTS},
{"bar", BAR},
- {"break", BREAK},
{"cadenza", CADENZA},
{"clear", CLEAR},
{"clef", CLEF},
{"output", OUTPUT},
{"partial", PARTIAL},
{"paper", PAPER},
+ {"penalty", PENALTY},
{"property", PROPERTY},
{"pt", PT_T},
{"score", SCORE},
last_duration_mode_b_ = true;
fatal_error_i_ = 0;
default_header_p_ =0;
+
+ relative_octave_mode_b_ = false;
+
+ last_melodic_ = new Melodic_req;
+ last_melodic_->octave_i_ = 0; // -1; // huh?
+ last_melodic_->notename_i_ = 0;
+ last_melodic_->accidental_i_ = 0;
}
My_lily_parser::~My_lily_parser()
last_duration_mode_b_ = (s== "LAST");
}
+void
+My_lily_parser::set_octave_mode (String s)
+{
+ s = s.upper_str();
+ if (s == "RELATIVE")
+ {
+ relative_octave_mode_b_ = true;
+ // must reset these
+ last_melodic_ = new Melodic_req;
+ last_melodic_->octave_i_ = 0; // -1; // huh?
+ last_melodic_->notename_i_ = 0;
+ last_melodic_->accidental_i_ = 0;
+ }
+ else
+ relative_octave_mode_b_ = false;
+}
+
void
My_lily_parser::set_abbrev_beam (int type_i)
{
}
}
+String
+My_lily_parser::notename_str (Melodic_req* melodic)
+{
+ // ugh
+ String str ((char)('a' + ((melodic->notename_i_ + 2) % 7)));
+ int i = melodic->accidental_i_;
+ while (i-- > 0)
+ str += "is";
+ i++;
+ while (i++ < 0)
+ str += "es";
+ return str;
+}
+
+Melodic_req*
+My_lily_parser::get_melodic_req (Melodic_req* melodic, int quotes)
+{
+ if (relative_octave_mode_b_)
+ {
+ set_nearest (melodic);
+ int d = melodic->pitch () - last_melodic_->pitch ();
+ if (quotes && (sign (d) == sign (quotes)))
+ quotes -= sign (quotes);
+ melodic->octave_i_ += quotes;
+ }
+ else
+ {
+ Melodic_req nearest (*melodic);
+ set_nearest (&nearest);
+ melodic->octave_i_ += quotes;
+
+ if (find_quarts_global_b)
+ {
+ int e = melodic->pitch () - nearest.pitch ();
+ if (e)
+ {
+ int d = melodic->pitch () - last_melodic_->pitch ();
+ String str = _("Interval bigger than quart");
+ int n = 1 + (abs (d) - 1) / 12;
+ String quote_str ('\'', n);
+#if 0
+ str += d < 0 ? _(", prepend: ") : _(", append: ");
+ str += quote_str;
+#else
+ str += _(", relative: ");
+ String name_str = notename_str (melodic);
+ str += d < 0 ? quote_str + name_str : name_str + quote_str;
+#endif
+ melodic->warning (str);
+ }
+ }
+ }
+ delete last_melodic_;
+ last_melodic_ = melodic->clone ()->musical ()->melodic ();
+ return melodic;
+}
+
+void
+My_lily_parser::set_nearest (Melodic_req* melodic)
+{
+ melodic->octave_i_ = last_melodic_->octave_i_;
+ int d = melodic->pitch () - last_melodic_->pitch ();
+ if (abs (d) > 6)
+ melodic->octave_i_ -= sign (d);
+}
Chord*
My_lily_parser::get_word_element (Text_def* tdef_p, Duration * duration_p)
return velt_p;
}
+
Chord *
My_lily_parser::get_rest_element (String s, Duration * duration_p)
{
skip_p->set_spot (here_input());
velt_p->add (skip_p);
}
- else if ((duration_p->plet_.type_i_ == 1) && (duration_p->plet_.iso_i_ > 1))
- {
- Multi_measure_rest_req* m = new Multi_measure_rest_req;
- // these shouldn't be necessary anymore
-// plet_.iso_i_ = 1;
-// default_duration_.plet_.iso_i_ = 1;
- m->duration_ = *duration_p;
- m->set_spot (here_input());
- velt_p->add (m);
- }
else
{
Rest_req * rest_req_p = new Rest_req;
{
lexer_p_->add_notename (s, m_p);
}
+
#include "main.hh"
-Paper_def::Paper_def()
+Paper_def::Paper_def ()
{
lookup_p_ = 0;
real_vars_p_ = new Dictionary<Real>;
}
-Paper_def::~Paper_def()
+Paper_def::~Paper_def ()
{
delete real_vars_p_;
delete lookup_p_;
Paper_def::get_var (String s) const
{
if (! real_vars_p_->elt_b (s))
- error (_("unknown paper variable `") + s+"'");
+ error (_ ("unknown paper variable `") + s+"'");
return real_vars_p_->elem (s);
}
return shape_int_a_[n];
}
+Real
+Paper_def::beam_thickness_f () const
+{
+ return get_var ("beam_thickness");
+}
+
Real
Paper_def::linewidth_f () const
{
Real
Paper_def::duration_to_dist (Moment d,Real k) const
{
- if (get_var("geometric"))
- return geometric_spacing(d);
- return arithmetic_spacing(d,k);
+ if (get_var ("geometric"))
+ return geometric_spacing (d);
+ return arithmetic_spacing (d,k);
}
*/
Real
-Paper_def::arithmetic_constant(Moment d) const
+Paper_def::arithmetic_constant (Moment d) const
{
- return get_var("arithmetic_basicspace") - log_2(Moment(1,8) <? d);
+ return get_var ("arithmetic_basicspace") - log_2 (Moment (1,8) <? d);
}
Real
-Paper_def::arithmetic_spacing(Moment d ,Real k) const
+Paper_def::arithmetic_spacing (Moment d ,Real k) const
{
- return (log_2(d) + k)* get_var("arithmetic_multiplier");
+ return (log_2 (d) + k)* get_var ("arithmetic_multiplier");
}
Real
-Paper_def::geometric_spacing(Moment d) const
+Paper_def::geometric_spacing (Moment d) const
{
- Real dur_f = (d) ?pow (get_var ("geometric"), log_2(d)) : 0;
+ Real dur_f = (d) ?pow (get_var ("geometric"), log_2 (d)) : 0;
return get_var ("basicspace") + get_var ("unitspace") * dur_f;
}
}
Real
-Paper_def::interline_f() const
+Paper_def::interline_f () const
{
return get_var ("interline");
}
+Real
+Paper_def::rule_thickness () const
+{
+ return get_var ("rulethickness");
+}
Real
-Paper_def::rule_thickness() const
+Paper_def::staffline_f () const
{
return get_var ("rulethickness");
}
Real
-Paper_def::interbeam_f() const
+Paper_def::staffheight_f () const
+{
+ return get_var ("staffheight");
+}
+
+Real
+Paper_def::interbeam_f (int multiplicity_i) const
{
- return get_var ("interbeam");
+ if (multiplicity_i <= 3)
+ return get_var ("interbeam");
+ else
+ return get_var ("interbeam4");
}
+
Real
-Paper_def::internote_f() const
+Paper_def::internote_f () const
{
- return interline_f() / 2;
+ return get_var ("internote");
}
Real
-Paper_def::note_width() const
+Paper_def::note_width () const
{
return get_var ("notewidth");
}
void
-Paper_def::print() const
+Paper_def::print () const
{
#ifndef NPRINT
Music_output_def::print ();
DOUT << "Paper {";
- lookup_p_->print();
- for (Assoc_iter<String,Real> i (*real_vars_p_); i.ok(); i++)
+ lookup_p_->print ();
+ for (Assoc_iter<String,Real> i (*real_vars_p_); i.ok (); i++)
{
- DOUT << i.key() << "= " << i.val () << "\n";
+ DOUT << i.key () << "= " << i.val () << "\n";
}
DOUT << "}\n";
#endif
}
Lookup const *
-Paper_def::lookup_l()
+Paper_def::lookup_l ()
{
assert (lookup_p_);
return lookup_p_;
}
-IMPLEMENT_IS_TYPE_B1(Paper_def, Music_output_def);
+IMPLEMENT_IS_TYPE_B1 (Paper_def, Music_output_def);
String
Paper_def::TeX_output_settings_str () const
{
- String s("\n ");
- for (Assoc_iter<String,Real> i (*real_vars_p_); i.ok(); i++)
+ String s ("\n ");
+ for (Assoc_iter<String,Real> i (*real_vars_p_); i.ok (); i++)
s += String ("\\def\\mudelapaper") + i.key () + "{" + i.val () + "}\n";
- s += lookup_p_->texsetting + "%(Tex id)\n";
+ s += lookup_p_->texsetting + "% (Tex id)\n";
return s;
}
#include <iostream.h>
-// mmm
-#define MUDELA_VERSION "0.1.10"
-
#include "scalar.hh"
#include "translation-property.hh"
#include "script-def.hh"
#include "duration-convert.hh"
#include "change-translator.hh"
#include "file-results.hh"
+#include "mudela-version.hh"
+
+// mmm
+Mudela_version oldest_version ("0.1.8");
+Mudela_version version ("0.1.13");
+
// needed for bison.simple's malloc() and free()
#include <malloc.h>
4
};
+Paper_def* current_paper = 0;
+
#ifndef NDEBUG
#define YYDEBUG 1
#endif
%token BAR
%token BEAMPLET
%token MAEBTELP
-%token BREAK
+%token PENALTY
%token CADENZA
%token CLEAR
%token CLEF
%token TEMPO
%token TYPE
%token TEXID
+%token MEASURES
%token TEXTSTYLE
%token TITLE
%token PROPERTY
%type <header> mudela_header mudela_header_body
%type <box> box
%type <i> open_request_parens close_request_parens
-%type <c> open_abbrev_parens
+%type <i> open_abbrev_parens
%type <i> open_plet_parens close_plet_parens
+%type <i> post_quotes pre_quotes
%type <music> simple_element music_elt full_element lyrics_elt command_elt
%type <i> abbrev_type
%type <i> int unsigned
%type <musiclist> Voice Voice_body
%type <chord> Chord Chord_body
%type <paper> paper_block paper_body
-%type <real> dim real
+%type <real> dim real real_expression
+%type <real> real_add_expression real_mult_expression real_primary
%type <real> unit
%type <request> abbrev_command_req
%type <request> post_request structured_post_request
check_version:
VERSION STRING ';' {
- if (String (*$2) != MUDELA_VERSION) {
+ Mudela_version ver (*$2);
+ if (!((ver >= oldest_version) && (ver <= version))) {
if (THIS->ignore_version_b_) {
THIS->here_input ().error ("Incorrect mudela version");
} else {
$$ = new Lookup_id ($1, IDENTIFIER);
}
- | real {
+ | real {
$$ = new Real_id (new Real ($1), REAL_IDENTIFIER);
-
}
| int {
$$ = new Int_id (new int ($1), INT_IDENTIFIER);
}
;
-
-
translator_spec:
TRANSLATOR '{' translator_spec_body '}'
{ $$ = $3; }
'{' paper_body '}' { $$ = $3; }
;
+optional_semicolon:
+ /* empty */
+ | ';'
+ ;
+
paper_body:
/* empty */ {
$$ = THIS->default_paper ();
}
- | PAPER_IDENTIFIER {
+ | PAPER_IDENTIFIER optional_semicolon {
$$ = $1->paperdef ();
}
| paper_body OUTPUT STRING ';' {
delete $3;
}
| paper_body symtables { $$->set ($2); }
- | paper_body STRING '=' dim ';' {
- $$->set_var (*$2, $4);
- }
- | paper_body STRING '=' real ';' {
+ | paper_body STRING '=' real_expression ';' {
$$->set_var (*$2, $4);
+// ugh, huh?
+ current_paper = $$;
}
| paper_body STRING '=' translator_spec {
$$-> assign_translator (*$2, $4);
}
;
+real_primary:
+ real
+ | dim
+ | STRING {
+// ugh, huh?
+// $$ = THIS->default_paper ()->get_var (*$1);
+ $$ = current_paper->get_var (*$1);
+ }
+ | '(' real_expression ')' {
+ $$ = $2;
+ }
+ ;
+
+real_expression:
+ real_add_expression
+ ;
+
+real_add_expression:
+ real_mult_expression
+ | real_add_expression '+' real_mult_expression {
+ $$ = $1 + $3;
+ }
+ | real_add_expression '-' real_mult_expression {
+ $$ = $1 - $3;
+ }
+ ;
+
+real_mult_expression:
+ real_primary
+ | real_mult_expression '*' real_primary {
+ $$ = $1 * $3;
+ }
+ | real_mult_expression '/' real_primary {
+ $$ = $1 / $3;
+ }
+ ;
+
shape_array:
/* empty */ {
$$ = new Array<Interval>;
$$ = new Bar_req (*$2);
delete $2;
}
- | BREAK {
- Break_force_req * f = new Break_force_req;
- f-> set_spot (THIS->here_input ());
- $$ = f;
+ | PENALTY '=' int {
+ Break_req * b = new Break_req;
+ b->penalty_i_ = $3;
+ b-> set_spot (THIS->here_input ());
+ $$ = b;
}
| METER unsigned '/' unsigned {
Meter_change_req *m = new Meter_change_req;
}
;
+pre_quotes:
+ PRE_QUOTES {
+// int i = $1;
+ $$ = $1;
+ }
+ | pre_quotes PRE_QUOTES {
+// int i = $1 + $2;
+ $$ = $1 + $2;
+ }
+ ;
+post_quotes:
+ POST_QUOTES {
+// int i = $1;
+ $$ = $1;
+ }
+ | post_quotes POST_QUOTES {
+// int i = $1 + $2;
+ $$ = $1 + $2;
+ }
+ ;
/*
URG!!
+
+ Whitespace mustn't be stripped. So what?
+ Python is cool, and there even the amount *and* type of whitespace
+ is significant. So this is not uncool per se, maybe context-free
+ just sucks for humans.
+ jcn
*/
steno_melodic_req:
NOTENAME_ID {
- $$ = $1->clone ()->musical ()->melodic ();
- $$->octave_i_ += THIS->default_octave_i_;
+ Melodic_req* m = $1->clone ()->musical ()->melodic ();
+ $$ = THIS->get_melodic_req (m, 0 + THIS->default_octave_i_);
}
- | steno_melodic_req POST_QUOTES {
- $$-> octave_i_ += $2;
+ | NOTENAME_ID post_quotes {
+ Melodic_req* m = $1->clone ()->musical ()->melodic ();
+ $$ = THIS->get_melodic_req (m, $2 + THIS->default_octave_i_);
}
- | PRE_QUOTES steno_melodic_req {
- $$ = $2;
- $2-> octave_i_ -= $1;
+ | pre_quotes NOTENAME_ID {
+ Melodic_req* m = $2->clone ()->musical ()->melodic ();
+ $$ = THIS->get_melodic_req (m, -$1 + THIS->default_octave_i_);
}
;
steno_note_req:
steno_melodic_req {
$$ = new Note_req;
- * (Melodic_req *) $$ = *$1;
+ *(Melodic_req *) $$ = *$1;
delete $1;
}
| steno_note_req '!' {
| E_BIGGER {
$$ = '>';
}
- | close_plet_parens {
- }
+ | close_plet_parens
;
open_abbrev_parens:
| '[' {
$$='[';
}
- | open_abbrev_parens {
- }
- | open_plet_parens {
- }
+ | open_abbrev_parens
+ | open_plet_parens
;
THIS->default_octave_i_ = $3->octave_i_;
delete $3;
}
+ | OCTAVE STRING {
+ THIS->set_octave_mode (*$2);
+ delete $2;
+ }
| TEXTSTYLE STRING {
THIS->textstyle_str_ = *$2;
delete $2;
}
| RESTNAME notemode_duration {
$$ = THIS->get_rest_element (*$1, $2);
- delete $1;
+ delete $1; // delete notename
+ }
+ | MEASURES notemode_duration {
+ Multi_measure_rest_req* m = new Multi_measure_rest_req;
+ m->duration_ = *$2;
+ delete $2;
+
+ Chord*velt_p = new Request_chord;
+ velt_p->set_spot (THIS->here_input ());
+ velt_p->add (m);
+ $$ = velt_p;
+
}
;
#include "p-col.hh"
#include "debug.hh"
#include "single-malt-grouping-item.hh"
+#include "dimen.hh"
+
Rod::Rod (Single_malt_grouping_item *l, Single_malt_grouping_item *r)
{
if (li.empty_b () || ri.empty_b ())
distance_f_ = 0;
else
- distance_f_ = li[RIGHT] - ri[LEFT];
+ distance_f_ = li[RIGHT] - ri[LEFT] + 1.5 PT; // ugh
}
Rod::Rod ()
#include "debug.hh"
#include "p-col.hh"
#include "score-column.hh"
+#include "command-request.hh"
Score_column::Score_column (Moment w)
{
- forced_break_b_ = false;
+ break_penalty_i_ = 0;
when_ = w;
musical_b_ = false;
}
{
#ifndef NPRINT
DOUT << "mus "<< musical_b_ <<" at " << when_<< '\n';
- if (forced_break_b_)
+ if (break_penalty_i_ >= Break_req::FORCE)
DOUT << "Break forced";
DOUT << "durations: [";
Score_engraver::Score_engraver()
{
- disallow_break_b_ = false;
+ break_penalty_i_ = 0;
scoreline_l_ =0;
command_column_l_ =0;
musical_column_l_ =0;
Global_translator::prepare (w);
set_columns (new Score_column (w), new Score_column (w));
- disallow_break_b_ = false;
+ break_penalty_i_ = 0;
post_move_processing();
}
void
Score_engraver::do_pre_move_processing()
{
- if (!disallow_break_b_)
+ if (break_penalty_i_ > Break_req::DISALLOW)
{
get_staff_info().command_pcol_l ()-> breakable_b_ = true;
breaks_i_ ++;
{
bool gotcha = Engraver_group_engraver::do_try_request (r);
- if (!gotcha && r->command())
+ if (gotcha || !r->command ())
+ return gotcha;
+
+ Command_req * c = r->command ();
+ if (c->linebreak ())
{
- Command_req * c = r->command ();
- if (c->disallowbreak ())
- disallow_break_b_ = true;
- else if (c->forcebreak ())
+ Break_req* b = (Break_req*)c->linebreak ();
+ if (b->penalty_i_ <= Break_req::DISALLOW)
+ break_penalty_i_ = b->penalty_i_;
+ else if (b->penalty_i_ >= Break_req::FORCE)
{
- command_column_l_->forced_break_b_ = true;
+ command_column_l_->break_penalty_i_ = b->penalty_i_;
gotcha = true;
}
}
{
if (init_str.length_i () && path.find (init_str).empty_b ())
{
- error (_("Can not find `") + init_str +"\'");
+ warning (_("Can not find `") + init_str +"\'");
return ;
}
if (file_str.length_i () && path.find (file_str).empty_b ())
{
- error (_("Can not find `") + file_str + "'");
+ warning (_("Can not find `") + file_str + "'");
return ;
}
// push a new slur onto stack.
//(use temp. array to wait for all slur STOPs)
Slur * s_p =new Slur;
+ Scalar prop = get_property ("slurdash");
+ if (prop.isnum_b ())
+ s_p->dash_i_ = prop;
requests_arr_.push (slur_req_l);
start_slur_l_arr_.push (s_p);
announce_element (Score_elem_info (s_p, slur_req_l));
#include "boxes.hh"
#include "bezier.hh"
#include "encompass-info.hh"
-// #include "main.hh"
+#include "main.hh"
IMPLEMENT_IS_TYPE_B1(Slur,Bow);
if (!dir_)
set_default_dir ();
- Real interline = paper ()->interline_f ();
- Real internote = interline / 2;
- Real notewidth = paper ()->note_width ();
- Real const SLUR_MIN = 2.0 * interline;
+ Real interline_f = paper ()->interline_f ();
+ Real internote_f = interline_f / 2;
+ Real notewidth_f = paper ()->note_width ();
+ Real slur_min = paper ()->get_var ("slur_x_minimum");
/*
[OSU]: slur and tie placement
* y = length < 5ss : horizontal raakpunt + d * 0.25 ss
y = length >= 5ss : y next interline - d * 0.25 ss
--> height <= 5 length ?? we use <= 3 length, now...
-
- * suggested gap = ss / 5;
*/
- // jcn: 1/5 seems so small?
- Real gap_f = interline / 2; // 5;
+ Real gap_f = paper ()->get_var ("slur_x_gap");
+
Drul_array<Note_column*> extrema;
extrema[LEFT] = encompass_arr_[0];
extrema[RIGHT] = encompass_arr_.top ();
if (extrema[d] != spanned_drul_[d])
{
dx_f_drul_[d] = -d
- *(spanned_drul_[d]->width ().length () -0.5*notewidth);
- Direction u = d;
- flip(&u);
- if ((extrema[u] == spanned_drul_[u]) && extrema[u]->stem_l_)
- {
- dy_f_drul_[d] = extrema[u]->stem_l_->height ()[dir_];
- dy_f_drul_[u] = extrema[u]->stem_l_->height ()[dir_];
- }
+ *(spanned_drul_[d]->width ().length () -0.5 * notewidth_f);
// prebreak
if (d == RIGHT)
{
dx_f_drul_[LEFT] = spanned_drul_[LEFT]->width ().length ();
-// dx_f_drul_[LEFT] -= 2 * notewidth;
// urg
if (encompass_arr_.size () > 1)
- dx_f_drul_[RIGHT] += notewidth;
+ dx_f_drul_[RIGHT] += notewidth_f;
}
-
- // postbreak
- if (d == LEFT)
- dy_f_drul_[d] += 2.0 * dir_ * internote;
}
/*
normal slur
else if (extrema[d]->stem_l_ && !extrema[d]->stem_l_->transparent_b_)
{
dy_f_drul_[d] = (int)rint (extrema[d]->stem_l_->height ()[dir_]);
- dx_f_drul_[d] += 0.5 * notewidth - d * gap_f;
+ dx_f_drul_[d] += 0.5 * notewidth_f - d * gap_f;
if (dir_ == extrema[d]->stem_l_->dir_)
{
if (dir_ == d)
- dx_f_drul_[d] += 0.5 * (dir_ * d) * d * notewidth;
+ dx_f_drul_[d] += 0.5 * (dir_ * d) * d * notewidth_f;
else
- dx_f_drul_[d] += 0.25 * (dir_ * d) * d * notewidth;
+ dx_f_drul_[d] += 0.25 * (dir_ * d) * d * notewidth_f;
}
}
else
{
dy_f_drul_[d] = (int)rint (extrema[d]->head_positions_interval ()
- [dir_])* internote;
+ [dir_]) * internote_f;
}
- dy_f_drul_[d] += dir_ * interline;
+ dy_f_drul_[d] += dir_ * interline_f;
}
while (flip(&d) != LEFT);
*/
if (extrema[d] != spanned_drul_[d])
{
+ Direction u = d;
+ flip(&u);
+
+ // postbreak
+ if (d == LEFT)
+ dy_f_drul_[u] += dir_ * internote_f;
+
+ dy_f_drul_[d] = dy_f_drul_[(Direction)-d];
+
// pre and post
- if (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT] < SLUR_MIN)
+ if (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT] < slur_min)
{
- dx_f_drul_[d] -= d * SLUR_MIN
+ dx_f_drul_[d] -= d * slur_min
- (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]);
- dx_f_drul_[d] = dx_f_drul_[(Direction)-d] + d * SLUR_MIN;
+ dx_f_drul_[d] = dx_f_drul_[(Direction)-d] + d * slur_min;
}
- dy_f_drul_[d] = dy_f_drul_[(Direction)-d];
}
}
while (flip(&d) != LEFT);
Atom
Staff_bracket::get_bar_sym (Real dy) const
{
- return paper()->lookup_l ()->vbracket (dy);
+ Atom a = paper()->lookup_l ()->vbracket (dy);
+ a.translate_axis (- 1.5 * a.extent ().x ().length (), X_AXIS);
+ return a;
}
Interval
Stem::set_default_stemlen ()
{
Real len = STEMLEN;
- Real dy = paper ()->interbeam_f ();
+ Real dy = paper ()->interbeam_f (mult_i_);
if (!dir_)
set_default_dir ();
if (req_l_ && ! tie_p_)
{
tie_p_ = new Tie;
+ Scalar prop = get_property ("slurdash");
+ if (prop.isnum_b ())
+ tie_p_->dash_i_ = prop;
}
}
#include "note-head.hh"
#include "p-col.hh"
#include "debug.hh"
+#include "main.hh" // experimental features
IMPLEMENT_IS_TYPE_B1(Tie,Bow);
Real notewidth = paper ()->note_width ();
Real interline_f = paper ()->interline_f ();
- Real const TIE_MIN = 2.0 * interline_f;
+ Real tie_min = paper ()->get_var ("tie_x_minimum");
/*
[OSU]: slur and tie placement
* y = length < 5ss : horizontal raakpunt
y = length >= 5ss : y next interline - d * 0.25 ss
--> height <= 5 length ?? we use <= 3 length, now...
-
- * suggested gap = ss / 5;
*/
- // jcn: 1/5 seems so small?
- Real gap_f = interline_f / 2; // 5;
+
+ Real gap_f = paper ()->get_var ("slur_x_gap");
Direction d = LEFT;
do
// tie attached to outer notehead
if (!head_l_drul_[d])
{
- if (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT] < TIE_MIN)
+ if (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT] < tie_min)
{
- dx_f_drul_[d] -= d * TIE_MIN
+ dx_f_drul_[d] -= d * tie_min
- (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]);
- dx_f_drul_[d] = dx_f_drul_[(Direction)-d] + d * TIE_MIN;
+ dx_f_drul_[d] = dx_f_drul_[(Direction)-d] + d * tie_min;
}
dy_f_drul_[d] = dy_f_drul_[(Direction) -d];
#include "score-elem-info.hh"
#include "multi-measure-rest.hh"
-void
-Timing_engraver::acknowledge_element (Score_elem_info i)
-{
- if (!i.elem_l_->is_type_b (Multi_measure_rest::static_name ()))
- return;
- if (((Multi_measure_rest*)i.elem_l_->item ())->measures_i_)
- mmrest_b_ = true;
-}
void
Timing_engraver::fill_staff_info (Staff_info &inf)
Timing_translator::Timing_translator ()
{
default_grouping_ = Rhythmic_grouping (MInterval (0, 1), 4); // ugh
- mmrest_b_ = false;
}
bool
Global_translator *global_l =
daddy_trans_l_->ancestor_l (100)->global_l (); // ugh 100.
- if (!time_.cadenza_b_ && !mmrest_b_)
+
+ bool allbars = ! get_property ("SkipBars").to_bool ();
+ if (!time_.cadenza_b_ && allbars)
global_l->add_moment_to_process (time_.next_bar_moment ());
-// mmrest_b_ = false;
}
IMPLEMENT_IS_TYPE_B1(Timing_translator, Translator);
include $(depth)/make/Include.make
LYFILES = $(wildcard *.ly)
-TEXFILES = $(wildcard *.tex)
M4FILES = $(wildcard *.m4)
-DISTFILES = Makefile $(EXTRA_DISTFILES) $(LYFILES) $(TEXFILES) $(wildcard *.m4)
+DISTFILES = Makefile $(EXTRA_DISTFILES) $(LYFILES) $(wildcard *.m4)
#
OUTFILES = $(addprefix $(outdir)/,$(M4FILES:%.m4=%))
Packager: Han-Wen Nienhuys <hanwen@cs.uu.nl>
Icon: lelie_icon.gif
Buildroot: /tmp/lilypond-install
+Prereq: tetex
%description
-LilyPond is the GNU Project music typesetter. The program
-generates visual or auditive output from a music
-definition file: it can typeset formatted sheet music
-to a TeX file and play (mechanical) performances to a
+LilyPond is the GNU Project music typesetter. This program can print
+beautiful sheet music from a music
+definition file. It can also play a play (mechanical) performances to a
MIDI file. Features include multiple staffs, meters,
clefs, keys, lyrics, versatile input-language,
cadenzas, beams, slurs, triplets.
It includes a nice font of musical symbols.
+
%prep
%setup
%build
/usr/share/lilypond/
%post
-ln -s
+
+ln -s /usr/lib/texmf/texmf/tex/lilypond /usr/lib/texmf/texmf/tex/latex/lilypond # suck me plenty
texhash # takes some time...
rm `find /var/lib/texmf -name 'feta*pk' -or -name 'feta*tfm'`
-ln -s /usr/lib/texmf/texmf/tex/lilypond /usr/lib/texmf/texmf/tex/latex/lilypond # suck me plenty
-This is a font of music symbols. All MF sources are original. The
-symbols are modelled after various editions of music, notably
-
- - Baerenreiter
- - Hofmeister
- - Breitkopf
- - Durand & C'ie
-
-The best references on Music engraving are [Wanske] and [Ross], some
-of their insights have also been used. Although a matter of taste,
-I'd say that Baerenreiter has the finest typography of all.
-
-Traditional engraving uses a set of 9 standardised sizes for Staffs
-(running from 0 to 8).
-
-I tried measuring those (helped by a magnifying glass), and I get the
-staffsizes in the following table. One should note that these are
-estimates, so I think there could be a measuring error of ~ .5 pt.
-Moreover [Ross] states that not all engravers use exactly those sizes.
-
-Staffsize Numbers Name
-
-26.2pt No. 0
-22.6pt No. 1 Giant/English
-21.3pt No. 2 Giant/English
-19.9pt No. 3 Regular, Ordinary, Common
-19.1pt No. 4 Peter
-17.1pt No. 5 Large middle
-15.9pt No. 6 Small middle
-13.7pt No. 7 Cadenza
-11.1pt No. 8 Pearl
-
-
-This table is partially taken from [Ross]. Most music is set in No.3,
-but the papersizes usually are bigger than standard printer paper
-(such as A4). If you plot these, you'll notice that the sizes (With
-exception of 26) almost (but not quite) form a arithmetic progression.
-
-[Ross] states that the dies (the stamps to make the symbols) come in
-12 different sizes.
-
+This is a font of music symbols. All MF sources are original. Most
+of the doco is in comments in the MF code, and in
+Documentation/tex/fonts.doc
*os_p_ << filename_str_g;
*os_p_ << "\n\n";
// ugh
- *os_p_ << "\\version \"0.1.10\";\n";
+ *os_p_ << "\\version \"0.1.11\";\n";
}
void
; FIXME
; ( ?% . ". 124b" )
-: ( ?{ . ". 23" )
+; ( ?{ . ". 23" )
))
)
\include "global.ly"
\include "clarinetti.ly"
-
+\include "part-paper.ly"
\score{
-% \property Score.part = 1
\$clarinetti_staff
\paper{}
}
\include "global.ly"
\include "corni.ly"
-
+\include "part-paper.ly"
\score{
-% \property Score.part = 1
\$corni_staff
\paper{}
}
\include "global.ly"
\include "fagotti.ly"
-
+\include "part-paper.ly"
\score{
-% \property Score.part = 1
\$fagotti_staff
\paper{}
}
\include "global.ly"
\include "flauti.ly"
+\include "part-paper.ly"
\score{
-% \property Score.part = 1
\$flauti_staff
\paper{}
}
\include "global.ly"
\include "oboi.ly"
+\include "part-paper.ly"
\score{
-% \property Score.part = 1
- \$oboi_staff
+ \$oboi_staff
\paper{}
}
\include "global.ly"
\include "trombe.ly"
-
+\include "part-paper.ly"
\score{
-% \property Score.part = 1
- \$trombe_staff
+ \$trombe_staff
\paper{}
}
depth = ../..
#
+EXTRA_DISTFILES=preludes.tex
# descent order into subdirectories:
#
SUBDIRS =
copyright = "public domain";
}
-\include "paper20.ly"
-
one = \melodic{
\octave c'';
\textstyle "italic";
>
a4 = \paper{
- \paper_twenty
- linewidth= 195.\mm;
+ linewidth= 193.\mm;
}
\score{
copyright = "public domain";
}
-\include "paper20.ly"
-
one = \melodic{
\octave c'';
\textstyle "italic";
>
a4 = \paper{
- \paper_twenty
- linewidth= 195.\mm;
+ linewidth= 193.\mm;
}
\score{
copyright = "public domain";
}
-\include "paper20.ly"
-
define(comma, r16 [$1$4 $2 $3] [$2 $1 $2 $6$1] r $1$7 r $5$1 |)
define(s, `comma(translit($*,` ', `,'))')
define(t, r16 [$1$4 $2 $3] [$2 $1 $2 $6$1] r $1$7 r $5$1 |)
>
a4 = \paper{
- \paper_twenty
- linewidth= 195.\mm;
+ linewidth= 193.\mm;
}
\score{
copyright = "public domain";
}
-\include "paper20.ly"
-
one = \melodic{
\octave c'';
\textstyle "italic";
>
widea4 = \paper{
- \paper_twenty
- linewidth= 195.\mm;
+ linewidth= 193.\mm;
% arithmetic_basicspace = 2.;
% arithmetic_multiplier = 6.\pt;
arithmetic_basicspace = 3.;
copyright = "public domain";
}
-\include "paper20.ly"
-
one = \melodic{
\octave c';
\textstyle "italic";
% arithmetic_multiplier = 6.\pt;
arithmetic_basicspace = 2.;
arithmetic_multiplier = 8.\pt;
- linewidth= 195.\mm;
+ linewidth= 193.\mm;
}
\score{
copyright = "public domain";
}
-\include "paper20.ly"
-
one = \melodic{
\octave c';
\skip 4*4; |
>
a4 = \paper{
- \paper_twenty
- linewidth = 195.\mm;
+ linewidth = 193.\mm;
}
\score{
}
%{
- Tested Features:breaking algorithm, chords, multivoice, accents
+ Tested Features:breaking algorithm, chords, multivoice, accents,
+ dotted slurs
%}
\version "0.1.10";
% \slope{30} % Fool MusiXTeX into 30 / 10 steeper beam
% % because piece is set very tightly
+%{
+ This file has a long heritage.
+ It should probably be rewritten as two separate voices.
+%}
+
+
IImenuetto = \melodic{
-% \property Voice.beamslopedamping = \infinity
\clef"alto";
\property Staff.instrument = cello
\meter 3/4;
\key bes;
\octave c';
- \duration 8;
- < a2 f2 d2 \f > bes4-. |
-%%2
- \textstyle "finger"; % ugh.
-
- \multi 2 <
- { \stemup; [ bes8^"1"( )a8 bes8-. g8-. ] a4-.^"4" }
-
- { \stemdown; < e8_"2" c8_"4" > }
- > |
- \stemboth;
-%%3
-% \property Voice.beamslopedamping = \normal
- < d4 'bes4-. > g4-. [ f8-. e8-. ] |
-% \property Voice.beamslopedamping = \infinity
-%%4
- \multi 2 <
- { \stemup; [ f8( e8 )d8 cis8-. 'b8-. 'a8-. ] }
- { \stemdown; 'a }
- > |
- \stemboth;
-%%5
- < a2 f2 d2 > bes!4-. |
-%%6
- \multi 2 <
- { \stemup; [ bes8 a8 bes8-. g8-. ] }
- { \stemdown; e8 }
- >
- \stemboth;
- c'!4-. |
-%%7
- < a4-. f4>
- < d'4-.-\upbow f4 'bes4 >
- < e'4-.-\downbow g4 'g4 > |
-%%8
- < cis'2.-\upbow e2. 'a2. >
- \bar ":|:";
-%%9
+ <a2 f d \f> bes4-. |
+ <{\voiceone; [bes8^1 a bes-. g-.] a4-.^4 } {\voicetwo; <e8_2 c_4> }> |
+ \onevoice;
+ <d4 'bes-.> g-. [f8-. e-.] |
+ <{\voiceone; [f8( e )d cis-. 'b-. 'a-.] } {\voicetwo; 'a8 }> |
+ \onevoice;
+ <a2 f d> bes!4-. |
+ <{\voiceone; [bes8 a bes-. g-.] } {\voicetwo; e8 }>
+ \onevoice;
+ c'!4-. | <a-. f> <d'-.-\upbow f 'bes>
+ <e'-.-\downbow g 'g> | <cis'2.-\upbow e 'a> \bar ":|:";
\clef "violin";
- < e'2 a2 \f >
-% \property Voice.beamslopedamping = \normal
- [ d'8( e'16 )f'16 ] |
-% \property Voice.beamslopedamping = \infinity
-%%10
- \multi 2 <
- { \stemup; [ e'8( d' cis'_"2" )e' a( )g8 ] }
- { \stemdown; g8 }
- > |
- \stemboth;
-%%11
- \multi 2 <
- { \stemup; a4( )d'4 cis'4-. }
- { \stemdown; f2 e4 }
- > |
- \stemboth;
-%%12
- \multi 2 <
- { \stemup; [ g'8^"4"( f' e' )f' d'^"3"( ) c' ] }
- { \stemdown; d8 }
- > |
- \stemboth;
-%%13
+ <e'2 a\f>
+ [d'8( e'16 )f'] |
+ \slurdotted;
+ <{\voiceone; [e'8( d' cis'_2 )e' a( )g] } {\voicetwo; g8 }> |
+ \onevoice;
+ <{\voiceone; a4 ~ d' cis'-. } {\voicetwo; f2 e4 }> |
+ \onevoice;
+ <{\voiceone; [g'8^4( f' e' )f' d'^3( ) c'] } {\voicetwo; d8 }> |
+ \onevoice;
\clef "alto";
- \multi 2 <
-
- { \stemup; bes2 c'4 }
- { \stemdown; g4( )f4 e4 }% ugh
- > |
- \stemboth;
-%%14
- \multi 2 <
- { \stemup; [ a8 g8 a8 f8 ] }
- { \stemdown; f8 }
- >
- \stemboth;
- < d'4-\upbow e4 'bes4 > |
-%%15
- < c'4-\downbow f4 'a4 > [ bes8( )a8 g8 a8 ] |
-%%16
- [ f( e8 )f a8-. g8-. bes8-. ] |
-%%17
- < a2^"0"^\trill fis2_"3" > bes4 |
-%%18
- \multi 2 <
- { \stemup; [ c'8( )bes8 c' a8 ] }
- { \stemdown; es8 }
- >
- \stemboth;
+ <{\voiceone; bes2 c'4 } {\voicetwo; g4 ~ f e }> |
+ \onevoice;
+ <{\voiceone; [a8 g a f] } {\voicetwo; f8 }>
+ \onevoice;
+ <d'4-\upbow e 'bes> |
+ <c'-\downbow f 'a> [bes8 a g a] |
+ [f8( e )f a-. g-. bes-.] |
+ <a2^"0"^\trill fis_3> bes4 |
+ <{\voiceone; [c'8 bes c' a] } {\voicetwo; es8 }>
+ \onevoice;
fis4^\trill |
-%%19
- < d'4-\downbow g4 'bes4 > < c'4-\upbow g4 c4 > < [ bes8 d8 > a8 ] |
-%%20
- \multi 2 <
- { \stemup; [ c'8( bes8 a8 )bes g( )bes8 ] }
- { \stemdown; < d8 g8 > }
- > |
- \stemboth;
-%%21
- \multi 2 <
- { \stemup; d'4( )cis'4 d'4 }
- { \stemdown; g2 f4 }
- > |
- \stemboth;
-%%22
- \multi 2 <
- { \stemup; [ g8( )f8 g8 e8 ] f4 }
- { \stemdown; cis8 d4 }
- > |
- \stemboth;
-%%23
-% \property Voice.beamslopedamping = \normal
- [ 'g8 g8 ] < e4.^\trill 'a4. > d8-\upbow |
-% \property Voice.beamslopedamping = \infinity
-%%24
- \textstyle "roman"; % ugh
- < d2.^"fine" 'a2. 'd2._"3 mins.">
- \bar ":|";
+ <d'4-\downbow g 'bes> <c'-\upbow g c> <[bes8( d> )a] |
+ <{\voiceone; [c'8( bes a )bes g( )bes] } {\voicetwo; <d8 g> }> |
+ \onevoice;
+ <{\voiceone; d'4 ~ cis' d' } {\voicetwo; g2 f4 }> |
+ \onevoice;
+ <{\voiceone; [g8 f g e] f4 } {\voicetwo; cis8 d4 }> |
+ \onevoice;
+ ['g8 g] <'a4. { e^\trill ~ d8-\upbow }> |
+ \textstyle "italic"; % ugh
+ <d2._"fine" 'a 'd> \bar ":|";
}
\score{
\IImenuetto
}
\paper{
- linewidth= 150.0\mm;
- % how does this work?
- % why does space not have dim?
- arithmetic_basicspace = 3.2;
- % how can multiplier have dim?
- arithmetic_mulitplier = 9.\pt;
- %\output "scsii-menuetto.out";
+ linewidth= 185.0\mm;
}
\midi{
\tempo 4 = 120;
- %\output "scsii-menuetto.midi";
}
}
\score {
- \melodic {
+
\type Grand_staff <
\type Staff = treble <
\global
\bassdux
>
>
- }
\paper {
gourlay_maxmeasures = 5.;
\header{
filename = "los-toros-oboe.ly";
-title = "La Feria"
+title = "La Feria";
subtitle = "Los Toros";
opus = "";
composer = "Paul Lac\\^ome d'Estalenx (1838-1920)";
enteredby = "jcn";
copyright = "public domain";
+latexheaders= "headers";
}
+\include "paper16.ly"
+
%{
Silly latex file dropped; use ly2dvi
%}
-\include "paper20.ly"
-
hoboonestart = \melodic{
% ugh: can't copy: allegro/primo tempo
\octave c';
% d'4(\^"Un peu plus lent et \\'el\\'egant"<
\textstyle "italic";
d'4(\<
- [e'8 \!f'8] |
+ [e'8 \!fis'8] |
% [)b'-. a'-.] [g16( fis' e' )d'] |
\textstyle "bold";
[)b'-.^"Un peu plus lent et \\'el\\'egant" a'-.] [g16( fis' e' )d'] |
\textstyle "italic";
- [d'( c' b\< c'] [)\!f'8-. e'-.] |
+ [d'( c' b\< c'] [)\!fis'8-. e'-.] |
d4-> ~ [d16 e( fis g] |
- [a b\< d' fis] [)\!a'8-. g'-.] |
+ [a b\< d' fis'] [)\!a'8-. g'-.] |
[fis'16( e' a )c'] e'4 ~ |
[e'16 d'( e c'] [)b8-. a-.] |
g2 ~ |
fis'2-> ~ |
[fis'16 g'-.\< a'-. b'-.] [\!c''8-. c'-.] |
[es'8.->(-"espress.") d'16] d'4 ~ |
- [d'16 e'( fis a'] [)g'8 b-.] |
- [b8.->( )c'16] c4 ~ |
+ [d'16 e'( fis' a'] [)g'8 b-.] |
+ [b8.->( )c'16] c'4 ~ |
[c'16\< cis'( d' \!dis'] [)e'8-.-"dim." fis-.] |
[fis8.->( g16] )g4 ~ |
[fis'16-.\p fis'-. fis'-. fis'-.] [fis'8-. g'-.] |
% same measure
[fis'16-.\p fis'-. fis'-. fis'-.] [fis'8-. g'-.] |
- [fis'8-. g-. fis-. g-.] |
+ [fis'8-. g'-. fis'-. g'-.] |
[a'-. bes'-. a'-. bes'-. ] |
[a'-.\f bes'-. a'-. bes'-. ] |
[c''-.-"cresc." f'-. g'-. a'-.] |
% r2^"Un peu plus lent et \\'el\\'egant"
% r2^"\\fetanummer8"
r2*8
- r4 r8\p bes |
- g2->^"Un peu plus lent et \\'el\\'egant" ~ |
+% r4 r8\p bes |
+ r4^"Un peu plus lent et \\'el\\'egant"
+ r8\p bes |
+% g2->^"Un peu plus lent et \\'el\\'egant" ~ |
+ g2-> ~ |
\textstyle "italic";
g8 r r c' |
c'2-> ~ |
d'2-> ~ |
[d'16-"dim."( es' f' g'] [)as'8 as-.] |
[ces'8.->\p( )bes16-.] bes4 ~ |
- [bes16( c' d' f] [)es'8 g-.] |
+ [bes16( c'! d' f'] [)es'8 g-.] |
[g8.->( )as16] as4 ~ |
[as16( a bes b] [)c'8-. d-.] |
% a deux
[bes'8.-> g'16-.] [es'16-. bes-. g-. as-.] |
[bes-. c'-. d'-. es'-.] [f'-. g'-. as'-. bes'-.] |
d''8-. r c''4-> ~ |
- [c''16 f-. g'-. a-.] [bes'-. c'-. d'-. es'-.] |
+ [c''16 f'-. g'-. a'-.] [bes'-. c'-. d'-. es'-.] |
g'8-. r f'4-> ~ |
- [f'16 bes-. c'-. d-.] [es'-. f'-. g-. as-.] |
+ [f'16 bes-. c'-. d'-.] [es'-. f'-. g'-. as'-.] |
c''8 r bes'4 ~ |
[bes'8 as'-. g'8.-. e'16-.] |
- g'8-. r f4-> ~ |
+ g'8-. r f'4-> ~ |
[f'8 es'-. ces'8.-. as16-.] |
% `a deux
\textstyle "large";
[ces'8.->^"Plus vite" bes16-.(] [a bes es' d'] |
\textstyle "italic";
- [)c!8.-> bes16] [a( bes es' )d'] |
+ [)c'!8.-> bes16] [a( bes es' )d'] |
[c'->( bes es' )d'] [c'->( bes es' )d'] |
% same measure
[c'->( bes es' )d'] [c'->( bes es' )d'] |
- [c'( bes a bes] [c' d es' e] |
+ [c'( bes a bes] [c' d' es' e'] |
[g' )f' d'( es'] [f' g' as' a'] |
[c'' )bes' bes( c'] [d' es' f' g'] |
[as' g' f' g'] [as' bes' c'' d''] |
\textstyle "large";
- [)es''-.^"Tempo 1$^o$" g'-. g'-. g-.] [g'8-. g'-.] |
+ [)es''-.^"Tempo 1$^o$" g'-. g'-. g'-.] [g'8-. g'-.] |
\textstyle "italic";
bes'4.-> g'8-. |
gis'2->( |
)as'! |
- [g'16-. g'-. g'-. g-.] [g'8-. g'-.] |
+ [g'16-. g'-. g'-. g'-.] [g'8-. g'-.] |
bes'4.-> g'8-. |
gis'2->( |
% )as'! |
)as' |
- [bes'16-. bes'-. bes'-. bes-.] [bes'8-. bes'-.] |
+ [bes'16-. bes'-. bes'-. bes'-.] [bes'8-. bes'-.] |
bes'4.-> g'8-. |
- [g'16-._"h\\^atez" g'-. g'-. g-.] [g'8-. g'-.] |
+ [g'16-._"h\\^atez" g'-. g'-. g'-.] [g'8-. g'-.] |
g'4.-> g'8-. |
es'4.-> es'8-. |
bes4.-> bes8-. |
g'4.->^"Presto" g'8-. |
\textstyle "italic";
es'4.-> es'8-. |
- [bes-. bes-. es'-. g-.] |
+ [bes-. bes-. es'-. g'-.] |
[bes'-. bes-. es'-. g'-.] |
bes'-. r r4 |
g'8-. r r4 |
>
a4 = \paper{
- \paper_twenty
+% \paper_twenty
linewidth= 185.\mm;
gourlay_maxmeasures = 10.0;
Staff = \translator {
}
a4sixteen = \paper{
+ \paper_sixteen
linewidth= 193.\mm;
Staff = \translator {
\type "Engraver_group_engraver";
copyright = "public domain";
description = "A schubert song in 20 pt";
}
+
\version "0.1.10";
% fool make-website
--- /dev/null
+\header{
+filename = "standchen-easy.ly";
+title = "St\"andchen";
+subtitle = "(Serenade)\\\``Leise flehen meine Lieder''";
+opus = "D. 957 No. 4";
+composer = "Franz Schubert (1797-1828)\\\ \hfill Text by Ludwig Rellstab (1799-1860)";
+enteredby = "JCN";
+copyright = "public domain";
+% transcribed version
+% simplified and transposed to d minor
+}
+
+%{
+ Tested Features: multivoice, accents, lyrics, chords, piano music,
+multiple \paper{}s in one \score
+%}
+
+\include "paper16.ly"
+\version "0.1.10";
+
+commands = \melodic{
+ \skip 2.*4;
+ \bar "|:";
+ \skip 2.*24;
+% volta1
+ \skip 2.*8;
+% volta2
+ \bar ":|";
+ \skip 2.*22;
+ \bar "|.";
+ }
+
+melodie = \melodic{
+ \meter 3/4;
+ \clef "violin";
+ \key bes;
+ \octave c';
+ \duration 8;
+ r \pp < [ d 'a-| > f-| < d 'a-| > f-| < d 'a-| ] > |
+%%2
+ r < [ d 'bes-| > f-| < d 'bes-| > f-| < d 'bes-| ] > |
+%%3
+ \textstyle "italic";
+ r_"simile" < [ d 'bes > e < d 'bes > e < d 'bes ] >|
+ \textstyle "roman";
+
+%%4
+ r < [ 'a cis > e < 'a cis > e < 'a cis ] > |
+%%5
+ [2/3 a() bes a ]1/1 d'4. a |
+%%6
+ [2/3 g() a g ]1/1 d'4 g r |
+
+%%7
+ a4.^> g [2/3 g() f e ]1/1 |
+%%8
+ f2 r4 |
+%%9
+ < { a'4.() g' [2/3 g'( f' )e' ]1/1 }
+ { cis'4. e'_"dolce" \[2/3 e' \] } > |
+%%10
+ < f'2. d'2. > |
+%%11
+ [2/3 a () bes a ]1/1 f'4. a |
+%%12
+ [2/3 g() a g ]1/1 e'4. d' |
+%%13
+ c'4. bes [2/3 bes() a g ]1/1 |
+%%14
+ a2 r
+ < { d'() c'4. g [2/3 bes a g ]1/1 }
+ { f \p () e4._"dolce" bes \[2/3 g \] } > |
+%%16
+ < a2. f2. > |
+%%17
+ \textstyle "italic";
+ [ a8._"cresc." cis'16 ] f'4. e'
+ \textstyle "roman";|
+%%18
+ [ d'8. a16 ] f4. d |
+%%19
+%#% c'\grace\stemup
+ [2/3 bes () a bes ]1/1 d'4. bes |
+%%20
+ a2. |
+%%21
+%#% a\grace
+ [2/3 g() fis g ]1/1 bes4.^> g |
+%%22
+ f!2. |
+%%23
+ [ a8. \mf cis'16 ] f'4. e' |
+%%24
+ [ d'8. a16 ] fis4. d |
+%%25
+ [2/3 b \mf() ais b ]1/1 d'4. b |
+%%26
+ < a2. fis2. > |
+%%27
+ [2/3 e' \f() dis' e' ]1/1 g'4. cis' |
+%%28
+ < d'2. fis2. > |
+%#%\volta1
+%%29
+ < { bes2( [ d'8.() )bes16 ] }
+ { g2 \mf [ bes8. g16 ] } > |
+%%30
+ < { a4. [ a-. a-. a-. ] }
+ { fis4. [ fis-.( fis-. )fis-. ] } > |
+%%31
+ < { a4. [ a-. a-. a-. ] }
+ { g4. [ cis-.( e-. )g-. ] } > |
+%%32
+ < a2 fis2 \pp > < a4 fis4 > |
+%%33
+ < { b2( [ d'8.() )b16 ] }
+ { g2 [ b8. g16 ] } > |
+%%34
+ < { a4. [ a-. a-. a-. ] }
+ { fis4. [ fis-.( fis-. )fis-. ] } > |
+%%35
+ < { a4. [ a-. a-. a-. ] }
+ { g4. [ cis-.( e-. )g-. ] } > |
+%%36
+ < a2. fis2. > |
+%#%\volta2
+%%37
+ [ a8. a16 ] [ cis'8. cis'16 ] [ e'8. e'16 ] |
+%%38
+ d'4() cis'4 r4 |
+%%39
+%#% > a4. [ cis' e'8. >! d'16 ] |
+ a4. \> [ cis' e'8. \! d'16 ] |
+%%40
+ cis'2 r4 |
+%%41
+ < fis'4. \> cis'4. \f > e' [2/3 e'() d' \! cis' ]1/1 |
+%%42
+ [ b8. cis'16 ] d'4^> b r |
+%%43
+
+ [ b8. \f cis'16 ] d'4^> b r |
+%%44
+ [ b8. \> cis'16 ] d'4^> b \! r |
+%%45
+ [2/3 b \p () ais b ]1/1 d'4. b |
+%%46
+ <a!2. fis2. > |
+%%47
+ [2/3 e' \f() dis' e' ]1/1 g'4.^> cis' |
+%%48
+ \textstyle "italic";
+ <
+ { fis2.(
+ %\group "+1";
+ \stemdown )f2. }
+ { d'2. ( \stemup
+ ) d'4 r4_"decresc." d'4 }
+ >
+ \textstyle "roman"; |
+%%50
+ < bes2. e2. > |
+%%51
+ < a2. cis2. > |
+%%52
+ < fis2 d2 > < a4 fis4 \pp > |
+%%53
+
+ < bes2 g2 > < [ d'8.^> bes8. > < bes16 g16 ] > |
+%%54
+ < { a4. [ a-. a-. a-. ] }
+ { fis4. [ fis-.( fis-. )fis-.] } > |
+%%55
+ < { a4. [ a-. a-. a-. ] }
+ { g4. [ cis-.( e-. )g-. ] } > |
+%%56
+ \textstyle "italic";
+ < a2. fis2._"dim." >
+ \textstyle "roman"; |
+%%57
+ < a2. fis2. > |
+%%58
+ < a2.^\fermata fis2. > |
+%#%\tighten
+}
+
+begeleiding = \melodic{
+ \meter 3/4;
+ \clef"bass";
+ \key bes;
+ \octave c';
+ \duration 2;
+ 'd r4 |
+%%2
+ ''bes r4 |
+
+%%3
+ ''g r4 |
+
+%%4
+ ''a r4 |
+%%5
+\duration 8;
+ \multi 2 < { \stemup
+ [ 'f 'a d 'a d 'a ]
+ [ 'd 'e 'g 'e 'g 'e ]
+ [ 'cis 'e 'g 'e 'g 'e ]
+ [ 'd 'a d 'a d 'a ]
+ }
+ { \stemdown
+ 'd2 r4
+ ''bes2 r4
+ ''a2 r4
+ 'd2 r4
+ } >
+%%9
+ \stemboth
+ [ 'a e g e g e ] |
+%%10
+ [ 'd 'a d 'a d 'a ] |
+%%11
+ \multi 2 <
+ { \stemup
+ [ 'f 'a d 'a d 'a ]
+ [ 'd 'e 'g 'e 'g 'e ]
+ [ 'e 'g 'bes 'g 'bes 'g ]
+ [ 'a c f c f c ]
+ } { \stemdown
+ 'd2 r4
+ ''bes2 r4
+ 'c2 r4
+ 'f2 r4 }
+ >
+%%15
+ \stemboth
+ [ 'c 'g 'bes 'g 'bes 'g ] |
+%%16
+ [ ''f 'c 'f 'c 'f 'c ] |
+ \multi 2 <
+ { \stemup
+ [ ''a 'e 'g 'e 'g 'e ][ 'd 'a d 'a d 'a ]
+ [ ''bes 'f 'bes 'f 'bes 'f ][ ''f 'c 'f 'c 'f 'c ] }
+ { \stemdown
+ ''a2 r4
+ 'd2 r4
+ ''bes2 r4
+ ''f2 r4
+ } >
+%%21
+ \stemboth
+ < [ 'e 'c > 'g c 'g c 'g ] |
+%%22
+ [ 'f 'a c 'a 'f 'c ] |
+ \multi 2 < {
+ \stemup
+ [ ''a 'e 'g 'e 'g 'e ]
+ [ 'd 'fis 'a 'fis 'a 'fis ]
+ [ ''g 'd 'b 'd 'b 'd ]
+ [ 'd 'a d 'a d 'a ]
+ }
+ {\stemdown
+ ''a2 r4
+ 'd2 r4
+ ''g2 r4
+ 'd2 r4
+ }
+ >
+ \stemboth
+ < [ 'cis ''a > 'e 'a 'e 'a 'e ] |
+%%28
+ [ 'd 'a d 'a d 'a ] |
+%%29
+ [ 'd 'g 'bes 'g 'bes 'g ] |
+%#%\volta1
+%%30
+ [ 'd 'fis 'a 'fis 'a 'fis ] |
+%%31
+ [ ''a 'e 'a 'e 'a 'e ] |
+%%32
+ [ 'd 'fis 'a 'fis 'a 'fis ] |
+%%33
+ [ 'd 'g 'b 'g 'b 'g ] |
+%%34
+ [ 'd 'fis 'a 'fis 'a 'fis ] |
+%%35
+ [ ''a 'e 'a 'e 'a 'e ] |
+%%36
+ [ 'd 'fis 'a 'fis 'a 'fis ] |
+%#%\volta2
+%%37
+ [ ''a 'e 'g 'e ''bes^> 'e ] |
+%%38
+ [ ''a < e cis 'a > < e cis 'a > < e cis 'a > < e cis 'a > < e cis 'a ] > |
+%%39
+ [ ''a 'e 'g 'e ''bes^> 'e ] |
+%%40
+ [ ''a < e cis 'a > < e cis 'a > < e cis 'a > < e cis 'a > < e cis 'a ] > |
+%%41
+ [ ''ais 'e 'fis 'e 'fis 'e ] |
+%%42
+ < [ 'd ''b > 'fis 'b 'fis 'b 'fis ] |
+%%43
+ < [ 'e ''b > 'g 'b 'g 'b 'g ] |
+%%44
+ < [ 'd ''b > 'fis 'b 'fis 'b 'fis ] |
+%%45
+ \multi 2 < { \stemup
+ [ ''g 'd 'b 'd 'b 'd ]
+ [ 'd 'a d 'a d 'a ]
+ } {
+ \stemdown
+ ''g2 r4
+ 'd2 r4
+ } >
+
+%%47
+ \stemboth
+ < [ 'cis ''a > 'e 'a 'e 'a 'e ] |
+%%48
+ [ 'd 'fis 'a 'fis 'a 'fis ] |
+%%49
+ [ 'd 'a d 'a d 'a ] |
+%%50
+ [ ''g 'e 'g 'e 'g 'e ] |
+%%51
+ [ ''a 'e 'g 'e 'g 'e ] |
+%%52
+ [ ''d 'd 'fis 'd 'fis 'd ] |
+%%53
+ [ 'd 'g 'bes 'g 'bes 'g ] |
+%%54
+ [ 'd 'fis 'a 'fis 'a 'fis ] |
+%%55
+ [ ''a 'e 'g 'e 'g 'e ] |
+%%56
+ [ ''d ''a 'd ''a 'd ''a ] |
+%%57
+ [ ''d ''a 'd ''a 'd ''a ]
+%%58
+ < 'd2.^\fermata ''d2. > |
+ }
+
+
+tekstI = \lyric{
+ \meter 3/4;
+ \duration 4;
+ _ _ _
+ _ _ _
+ _ _ _
+ _ _ _
+% 5
+ \[2/3 Lei- se8 \] fleh-4. en8
+ \[2/3 mei- ne8 \] Lie- der8 _8
+ Durch4. die8 \[2/3 Nacht zu8 \]
+ dir;2 _
+ _ _ _
+ _ _ _
+% 11
+ \[2/3 In den8 \] stil-4. len8
+ \[2/3 Hain her-8 \] nie-4. der,8
+ Lieb4. chen,8 \[2/3 komm zu8 \]
+ mir!2 _
+ _ _ _
+ _ _ _
+
+% 17
+ Fl\"us-8. ternd16 schlan-4. ke8
+ Wip-8. fel16 rau-4. schen8
+ \[2/3 In des8 \] Mon-4. des8
+ Licht;2.
+ _ _ _
+ _ _ _
+
+% 23
+ Des8. Ver-16 r\"a-4. ters8
+ feind-8. lich16 Lau-4. schen8
+ \[2/3 F\"urch- te,8 \] Hol-4. de,8
+ nicht.2.
+ _ _ _
+ _ _ _
+
+% volta 1
+% 29
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+
+% volta 2
+% 37
+ La\ss8. auch16 dir8. die16 Brust8. be-16
+ we- gen, _
+ Lieb-4. chen,8 h\"o-8. re16
+ mich!2 _
+ Be-8. bend16 harr' ich8 _8
+ dir8. ent-16 ge- gen!8 _8
+ \[2/3 Komm, be-8 \] gl\"u4. cke8
+ mich!2.
+ _ _ _ _ _ _
+% 47
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+% 57
+ _ _ _ _ _ _
+
+}
+
+tekstII = \lyric{
+ \meter 3/4;
+ \duration 4;
+ _ _ _
+ _ _ _
+ _ _ _
+ _ _ _
+% 5
+ \[2/3 H\"orst die8 \] Nach-4. ti-8
+ \[2/3 gal- len8 \] schla- gen?8 _8
+ Ach!4. sie8 \[2/3 fleh- en8 \]
+ dich,2 _
+ _ _ _
+ _ _ _
+
+% 11
+ \[2/3 Mit der8 \] T\"o-4. ne8
+ \[2/3 s\"u\ss- en8 \] Kla-4. gen8
+ Fleh-4. en8 \[2/3 sie f\"ur8 \]
+ mich.2 _
+ _ _ _
+ _ _ _
+
+% 17
+ Sie-8. ver-16 stehn4. des8
+ Bus-8. ens16 Seh-4. nen,8
+ \[2/3 Ken- nen8 \] Lieb-4. es-8
+ schmerz,2.
+ _ _ _
+ _ _ _
+
+% 23
+ R\"uh-8. ren16 mit4. den8
+ Sil-8. ber-16 t\"o-4. nen8
+ \[2/3 Jed- es8 \] wei-4. che8
+ Herz.2.
+ _ _ _
+ _ _ _
+% volta 1
+% 29
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+
+% volta 2
+% 37
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+% 47
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+ _ _ _ _ _ _
+% 57
+ _ _ _ _ _ _
+
+}
+
+$treble_staff = \type Staff = treble<
+ \commands
+ \melodie
+>
+
+$bass_staff = \type Staff = bass<
+ \commands
+ \begeleiding
+>
+
+$grand_staff = \type Grand_staff<
+ \$treble_staff
+ \$bass_staff
+>
+
+$lyric_staff = \type Lyrics = lyric<
+ \tekstI
+ \tekstII
+>
+
+themusic = <
+ \$lyric_staff
+ \$grand_staff
+>
+
+\score{
+ \themusic
+ \midi{
+ \tempo 4 = 54;
+ }
+ \paper{
+ % 20pt music uses whole pagewidth
+ % ja Vette Pech. Koop maar een A3 printer
+ % huh? [jcn]
+ linewidth= 193.\mm;
+% arithmetic_multiplier = 7.\pt;
+
+ gourlay_maxmeasures = 9.;
+ \output "standchen-20.out";
+ }
+ \paper{
+ \paper_sixteen
+ % 16pt mustn't use whole page width
+ linewidth= 160.\mm;
+% arithmetic_multiplier = 6.\pt;
+% gourlay_maxmeasures = 9.;
+ \output "standchen-16.out";
+ }
+}
typedef void *Paper_def;
bool experimental_features_global_b = true;
+//bool experimental_features_global_b = false;
#include "bezier.hh"
bow ((Point[6]){ 0,0, 20,-20, 40,-40, 60,-60, 80,-20, 100,-100 }, 6, 1);
bow ((Point[6]){ 0,0, 20,-20, 40,-40, 60,-60, 80,-140, 100,-100 }, 6, -1);
bow ((Point[7]){ 0,0, 20,40, 100,0, 150,0, 200,0, 280,40, 300,0 }, 7, 1);
- bow ((Point[7]){ 0,0, 20,40, 100,0, 150,0, 200,0, 280,40, 300,0 }, 7, 1);
+ bow ((Point[7]){ 0,0, 20,-40, 100,0, 150,0, 200,0, 280,-40, 300,0 }, 7, -1);
bow ((Point[7]){ 0,20, 20,40, 100,0, 150,0, 200,0, 280,40, 300,20 }, 7, 1);
bow ((Point[3]){ 0,0, 10,10, 20,-20 }, 3, 1);
+
+ bow ((Point[4]){ 0,0, 33,100, 75,0, 100,100 }, 4, -1);
+ bow ((Point[4]){ 0,0, 33,-100, 75,0, 100,-100 }, 4, 1);
#endif
#if 1
bow ((Point[6]){ 0,0, 20,20, 40,40, 60,60, 80,140, 100,100 }, 6, 1);
#endif
-
cout << "\\end" << endl;
return 0;
+\advance\topmargin-20mm
+\addtolength{\textheight}{40mm}
+\footskip5mm
+
\usepackage{fancyheadings}
\lhead{}
\rhead{}
\headrulewidth0mm
\pagestyle{fancy}
\thispagestyle{fancy}
+
plet_dx plet_dy lineto
stroke
} bind def
-staffheight 2 div /slurhtlimit exch def
+%
/draw_slur
{
staffrulethickness setlinewidth
fill
grestore
stroke
- } bind def
+} bind def
+%
+/draw_dashed_slur
+{
+ 1 setlinecap
+ 1 setlinejoin
+ setdash
+ setlinewidth
+ moveto
+ curveto
+ stroke
+} bind def
%
staffheight 4 div /interline exch def
%
\musixcalc
}
\def\musixelevendefs{
- \elevendefs
+ \elevenfonts
\musixcalc
}