--- /dev/null
+#!/bin/sh
+
+rm -f feta-sleur-[0-9x\-]*.mf
+rm -f feta-sleur-[0-9x\-]*.log
+rm -f feta-beum-[0-9x\-]*.mf
+rm -f feta-beum-[0-9x\-]*.log
+rm -f feta-embed.aux
+rm -f missfont.log
+clean-fonts sleur
+clean-fonts beum
--- /dev/null
+#!@PYTHON@
+
+#
+# flower.py -- python flower lib
+#
+# source file of the GNU LilyPond music typesetter
+#
+# (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+#
+
+class File:
+ """silly wrapper for Python file object."""
+ def __init__ (self,nm, mode='r'):
+ if nm:
+ self.file_ = open (nm, mode);
+ elif mode == 'w':
+ self.file_ = sys.stdout
+ else:
+ self.file_ = sys.stdin
+
+ self.eof_ = 0;
+ def readline (self):
+ l= self.file_.readline ();
+ if not l:
+ self.eof_ = 1;
+ return l;
+ def write (self, str):
+ self.file_.write (str)
+ def eof (self):
+ return self.eof_
+ def close (self):
+ self.file_.close ()
+ def __del__ (self):
+ self.close ();
+
static String i2dec_str (int i, int length_i, char ch);
static String rational_str (Rational);
static String pointer_str (void const *);
+ static String precision_str (double x, int n);
static String i64_str (I64, char const * fmt = 0);
};
}
/**
- Make a string from a single character.
+Make a string from a single character.
@param
#n# is a repetition count, default value is 1
snprintf (buffer, STRING_BUFFER_LEN, "%p", l); // assume radix 10
return String (buffer);
}
+
+/**
+ Convert a double to a string.
+
+ @param
+ #n# is the number of nonzero digits
+ */
+String
+String_convert::precision_str (double x, int n)
+{
+ String format = "%." + String (0 >? n - 1) + "e";
+ String str = double_str (abs (x), format.ch_C ());
+
+ int exp = str.right_str (3).value_i ();
+ str = str.left_str (str.len () - 4);
+
+ while (str[str.len () - 1] == '0')
+ str = str.left_str (str.len () - 1);
+ if (str[str.len () - 1] == '.')
+ str = str.left_str (str.len () - 1);
+
+ if (exp == 0)
+ return (sign (x) > 0 ? str : "-" + str);
+
+ str = str.left_str (1) + str.cut (2, INT_MAX);
+ int dot = 1 + exp;
+ if (dot <= 0)
+ str = "0." + String ('0', -dot) + str;
+ else if (dot >= str.len ())
+ str += String ('0', dot - str.len ());
+ else if (( dot > 0) && (dot < str.len ()))
+ str = str.left_str (dot) + '.' + str.cut (dot, INT_MAX);
+ else
+ assert (0);
+
+ return (sign (x) > 0 ? str : "-" + str);
+}
+
"(Feta definitively is not an abbreviation of Font-En-TjA)";
}
-%{ remember to:
-rm `find /var/lib/texmf -name "feta-sleur-*"`
-%}
-
\version "0.1.7";
+shortlong = \melodic{
+ c4()c( c c |
+ c c c c |
+ c c c c |
+ c c c )c |
+}
+
+dirs = \melodic {
+ \octave c';
+ c'1() g' () c () g () c |
+}
+
+complex = \melodic{
+ \octave c';
+ 'c16( 'e( 'g( 'b( d( f( a( c'~ )))))))c4 c4 |
+ \octave c''';
+ 'c16( a( f( d( 'b( 'g( 'e( 'c~ )))))))c4 c4 |
+}
+
+beum = \melodic{
+ [c8 c] c4 c4 c4 |
+}
+
\score{
\melodic{
- \octave c'
- ;c'1() g' () c () g () c
+ \shortlong
+ \dirs
+ \complex
+ \beum
}
\paper{ }
}
\score{
\melodic{\octave c';
\duration "last";
+
'c4 ~ 'c c'' ~ c'' ~ g ~ c ~
d ~ e ~ f ~ g ~
a ~ b ~ 'c ~ c
< { c ~ d }
{ e ~ f }
>
- \multi 2 <
- { \stemup c'8 ~g ~e( ~c~ [c'~ g' e' )c'] c'' ~ c'' c~c }
- { \stemdown c (e g )c'~( [b a g )d] r2 }
- >
+% \multi 2 <
+% { \stemup c'8 ~g ~e( ~c~ [c'~ g' e' )c'] c'' ~ c'' c~c }
+% { \stemdown c (e g )c'~( [b a g )d] r2 }
+% >
+
+ {
+% \octave c';
+% 'c16( 'e( 'g( 'b( d( f( a( c'~ )))))))c4 c4 |
+% \octave c''';
+% 'c16( a( f( d( 'b( 'g( 'e( 'c~ )))))))c4 c4 |
+% \octave c';
+% c'1() g' () c () g () c |
+ c4()c( c c |
+ c c c c |
+ c c c c |
+ c c c )c |
+ }
+ }
}
}
{0, "debug", 'd'},
{1, "init", 'i'},
{1, "include", 'I'},
- {0, "no-midi", 'M'},
+ {0, "no-paper", 'M'},
{0, "no-postscript", 'P'},
{0, "ignore-version", 'V'},
{0,0,0}
encompass_arr_.sort (Note_column_compare);
if (!dir_)
set_default_dir();
- Real inter_f = paper()->internote_f ();
+ Real interline_f = paper ()->interline_f ();
+ Real inter_f = interline_f / 2;
+
+ /*
+ [OSU]: slur and tie placement
+
+ slurs:
+ * x = centre of head (upside-down: inner raakpunt stem) - d * gap
+
+ * 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_f / 2; // 5;
Drul_array<Note_column*> extrema;
extrema[LEFT] = encompass_arr_[0];
*(spanned_drul_[d]->width ().length () -0.5*nw_f);
}
else if (extrema[d]->stem_l_ && !extrema[d]->stem_l_->transparent_b_)
- dy_f_drul_[d] = (int)rint (extrema[d]->stem_l_->height()[dir_]);
+ {
+ dy_f_drul_[d] = (int)rint (extrema[d]->stem_l_->height()[dir_]);
+ /* normal slur from notehead centre to notehead centre, minus gap */
+ dx_f_drul_[d] += -d * gap_f;
+ }
else
- dy_f_drul_[d] = (int)rint (extrema[d]->head_positions_interval()[dir_])* inter_f;
- dy_f_drul_[d] += dir_ * inter_f;
+ {
+ dy_f_drul_[d] = (int)rint (extrema[d]->head_positions_interval()[dir_])* inter_f;
+ }
+ dy_f_drul_[d] += dir_ * interline_f;
}
while ((d *= -1) != LEFT);
}
void
Tie::do_post_processing()
{
- Real nw_f = paper()->note_width ();
- Real space_f = paper()->interline_f ();
+ Real nw_f = paper ()->note_width ();
+ Real interline_f = paper ()->interline_f ();
assert (head_l_drul_[LEFT] || head_l_drul_[RIGHT]);
+ /*
+ [OSU]: slur and tie placement
+
+ ties:
+ * x = inner raakpunt - d * gap
+
+ * 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;
+
Direction d = LEFT;
do
{
- dy_f_drul_[d] =
- .5 *space_f * (head_l_drul_[d]
+ dy_f_drul_[d] = .5 * interline_f * (head_l_drul_[d]
? head_l_drul_[d]->position_i_
: head_l_drul_[(Direction)-d]->position_i_);
}
{
if (head_l_drul_[d] && head_l_drul_[d]->extremal_i_)
{
- dy_f_drul_[d] += dir_ * space_f;
- dx_f_drul_[d] += d * 0.25 * nw_f;
+ /* normal tie between noteheads, with gap of space */
+ dx_f_drul_[d] += -d * (0.5 * nw_f + gap_f);
+ /* attach to outer 3/4 end of head */
+ dy_f_drul_[d] += dir_ * 0.25 * interline_f;
}
else if (head_l_drul_[d])
- dx_f_drul_[d] += d*0.5 * nw_f;
+ {
+ dx_f_drul_[d] += d*0.5 * nw_f;
+ }
else
{
dy_f_drul_[d] = dy_f_drul_[(Direction) -d];
- dx_f_drul_[d] = -d *(spanned_drul_[d]->width ().length ()
- -0.5* nw_f);
+ dx_f_drul_[d] = -d * (spanned_drul_[d]->width ().length ()
+ -0.5 * nw_f);
}
}
while ((d *= -1) != LEFT);
}
-
-
void
Tie::do_substitute_dependency (Score_elem*o, Score_elem*n)
{
def hround_pixels(expr sharped) = hround(sharped * hppp) enddef;
def vround_pixels(expr sharped) = vround(sharped * vppp) enddef;
-
-
def tand(expr alpha) =
(sind alpha/cosd alpha)
enddef;