+\bo Han-Wen Nienhuys <hanwen@stack.nl>,
http://www.stack.nl/~hanwen
- Main author, all files files except mentioned below
+ Main author.
- +\bo Jan Nieuwenhuizen <jan@digicash.com>,
+ +\bo Jan Nieuwenhuizen <jan@digicash.com>,
http://www.digicash.com/~jan
-
- lily/midi-*, mi2mu/*, parts flower/string*.cc,
- make/*.make, */Makefile parts of
- Documentation/mudela.pod, lib/*source-file*,
- lib/duration.cc, lib/source*, flower/*{list,cursor}*,
- lily/rest-collision*, lily/*abbreviation*, conflily,
- cygnus w32 stuff, lily/*perf*, some input files,
- mf/*{bolletjes,wat-zie-ik,eindelijk}
-
- and corresponding header files.
+ Main author
C\bC\bC\bCO\bO\bO\bON\bN\bN\bNT\bT\bT\bTR\bR\bR\bRI\bI\bI\bIB\bB\bB\bBU\bU\bU\bUT\bT\bT\bTO\bO\bO\bOR\bR\bR\bRS\bS\bS\bS
+\bo Mats Bengtsson <matsb@s3.kth.se>, parts of clef-
[And of course we sincerely thank J.S.Bach, F.Schubert, T.
Merula and W.A.Mozart for their beautiful music]
-
-
-
-21/Oct/97 LilyPond 0.1.25 1
-
-
-
-
-
-AUTHORS(1) LilyPond documentation AUTHORS(1)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-21/Oct/97 LilyPond 0.1.25 2
+27/Oct/97 LilyPond 0.1.26 1
Han-Wen Nienhuys <hanwen@stack.nl>, http://www.stack.nl/~hanwen
-Main author, all files files except mentioned below
+Main author.
-=item *
-
-Jan Nieuwenhuizen <jan@digicash.com>, http://www.digicash.com/~jan
-
-lily/midi-*, mi2mu/*, parts flower/string*.cc, make/*.make, */Makefile
-parts of Documentation/mudela.pod, lib/*source-file*, lib/duration.cc,
-lib/source*, flower/*{list,cursor}*, lily/rest-collision*,
-lily/*abbreviation*, conflily, cygnus w32 stuff, lily/*perf*, some
-input files, mf/*{bolletjes,wat-zie-ik,eindelijk}
+=item * Jan Nieuwenhuizen <jan@digicash.com>, http://www.digicash.com/~jan
-and corresponding header files.
+Main author
=back
name-stem= $(notdir $(basename $<))
$(outdir)/%.dvi: $(depth)/input/%.ly $(depth)/VERSION
(cd $(outdir); \
- lilypond -o $(name-stem) ../$< )
+ lilypond -I. -o $(name-stem) ../$< )
(cd $(outdir); \
if [ -f ../$(basename $< ).tex ]; \
then \
=head1 AUTHOR
-Han-Wen Nienhuys <hanwen@gnu.ai.mit.edu>
+Han-Wen Nienhuys <hanwen@gnu.org>
Q: Some of your neat scripts fail, what directories do you use:
-A:
+A: [This only applies if you don't do C<make install>, and develop out
+of the source directory]
~/something/
A.0: Reconsider. Try Linux. It's fun!
-A.1: Currently (patchlevel 27), GNU LilyPond (and flowerLib) compiles,
+A.1: Currently (0.0.27), GNU LilyPond (and flowerLib) compiles,
links and runs on Windows-nt, using Cygnus' gnu port (release b17.1).
I (JCN) only had to make a minor workaround for missing library calls.
Have a look at http://www.cygnus.com/gnu-win32. To make GNU LilyPond
GNU LilyPond is
updated very frequently, the latest version is always available at:
ftp://pcnov095.win.tue.nl/pub/lilypond and
-ftp://alpha.gnu.ai.mit.edu/gnu/lilypond/
+ftp://alpha.gnu.org/gnu/lilypond/
For programs which are part of the GNU music project, the following
=over 4
-=item http://www.gnu.ai.mit.edu/
+=item http://www.gnu.org/
LilyPond is part of the GNU Project started by the Free Software
Foundation to create a system of free software for the world-community
=item ftp://pcnov095.win.tue.nl/pub/lilypond/development
-=item ftp://alpha.gnu.ai.mit.edu/gnu/lilypond/development
+=item ftp://alpha.gnu.org/gnu/lilypond/development
=back
OSU-CISRC-3/88-TR10, Department of Computer and Information Science,
The Ohio State University, 1988.
-[Rules on formatting music formulated for use in computers HWN]
+[Rules on formatting music formulated for use in computers. Mainly distilled
+from [Ross] HWN]
+
=head2 Notation with computers
=head1 AUTHOR
-Han-Wen Nienhuys <hanwen@gnu.ai.mit.edu>
+Han-Wen Nienhuys <hanwen@gnu.org>
+pl 26
+ - bf: \transpose
+ - feta: numerals 0 - 9, rewrote flags.
+
+
+
+********
+oct 22
pl 25
- variable stemlength
* AFM for font input?
- * Make general "spanning"-elements and "placer"-elements
+ * naming Mozarella, Madeira, Muella?
- - naming Mozarella, Madeira, Muella?
+ * bf: abbrevs over whole note
- - bf: abbrevs over whole note
-
- - scoping for properties
+ * scoping for properties
{ c4
\multi 2 < { \stemup .. } { \stemdown .. } >
* Score_bar/Piano_braces, are *not* ordinary bars
3RD PARTY BUGS:
-
- * ICE: spring-spacer::calcideal()
-
- * collision.cc: 138, g++ errors
-
- * Rational infty(HUGE_VAL) on glibc / w32
+* Rational infty(HUGE_VAL) on glibc / w32
* Fix profiling. gprof bugreport?
TOPLEVEL_MAJOR_VERSION = 0
TOPLEVEL_MINOR_VERSION = 1
-TOPLEVEL_PATCH_LEVEL = 25
+TOPLEVEL_PATCH_LEVEL = 26
TOPLEVEL_MY_PATCH_LEVEL =
# use the above to send patches, always empty for released version:
# remove possibly stale .pk/.tfm files
echo> /tmp/cleaning-font
-FILES=`find /var/lib/texmf/ -name 'font-en-tja*'`
-# FILES=`find /var/lib/texmf/ -name 'font-en-tja*' -o -name 'vette-beam*' -o -name 'dyn10*'`
+FILES=`find /var/lib/texmf/ -name 'font-en-tja*' -o -name 'feta-*'`
+# FILES=`find /var/lib/texmf/ -name 'font-en-tja*' -o name 'feta-*" -o -name 'vette-beam*' -o -name 'dyn10*'`
echo removing $FILES
rm $FILES /tmp/cleaning-font
def main():
sys.stderr.write('This is make-patch version %s\n' % mp_version)
(cl_options, files) = getopt.getopt(sys.argv[1:],
- 'hf:o:t:', ['output=', 'help=', 'from=', 'to='])
+ 'hf:o:t:', ['output=', 'help', 'from=', 'to='])
outfn = ''
for opt in cl_options:
o = opt[0]
+++ /dev/null
-% generated at Fri Sep 26 14:26:49 1997 from out/dyn10.log
-% changes will be lost
-
-% dyn=\symboltables {
- % } % dyn
% generated automatically by mf-to-table.py version 0.4
-% on Mon Oct 20 23:14:01 1997
+% on Mon Oct 27 02:45:17 1997
% Do not edit
% input from out/font-en-tja16.log
% name=\symboltables {
"rests" = \table {
- "0" "\\wholerest" -0.00\pt 6.00\pt 1.50\pt 4.00\pt
+ "0" "\\wholerest" -0.00\pt 6.00\pt -2.50\pt 0.00\pt
"1" "\\halfrest" -0.00\pt 6.00\pt -0.00\pt 2.50\pt
- "0o" "\\outsidewholerest" -2.50\pt 8.50\pt 1.50\pt 4.00\pt
- "1o" "\\outsidehalfrest" -2.50\pt 8.50\pt -0.00\pt 2.50\pt
+ "0o" "\\outsidewholerest" -2.50\pt 8.50\pt -2.50\pt 0.40\pt
+ "1o" "\\outsidehalfrest" -2.50\pt 8.50\pt -0.40\pt 2.50\pt
"2" "\\quartrest" -0.00\pt 4.32\pt 3.00\pt 14.40\pt
"3" "\\eighthrest" -0.00\pt 5.33\pt 4.00\pt 11.47\pt
"4" "\\sixteenthrest" -0.00\pt 6.23\pt -0.00\pt 11.47\pt
"pedaltoe" "\\pedaltoe" -2.00\pt 2.00\pt -0.00\pt 6.00\pt
}
"flags" = \table {
- "u3" "\\eighthflag" -0.20\pt 4.16\pt -12.26\pt 0.20\pt
- "d3" "\\deighthflag" -0.20\pt 4.60\pt -0.20\pt 11.66\pt
- "u4" "\\sixteenthflag" -0.20\pt 4.16\pt -14.00\pt 0.20\pt
- "d4" "\\dsixteenthflag" -0.20\pt 4.60\pt -0.20\pt 12.00\pt
- "u5" "\\thirtysecondflag" -0.20\pt 4.16\pt -17.00\pt 0.20\pt
- "d5" "\\dthirtysecondflag" -0.20\pt 4.16\pt -0.20\pt 15.40\pt
- "u6" "\\sixtyfourthflag" -0.20\pt 4.16\pt -21.00\pt 0.20\pt
- "d6" "\\dsixtyfourthflag" -0.20\pt 4.16\pt -0.20\pt 17.40\pt
+ "u3" "\\eighthflag" -0.20\pt 4.10\pt -12.26\pt 0.20\pt
+ "u4" "\\sixteenthflag" -0.20\pt 4.10\pt -14.26\pt 0.20\pt
+ "u5" "\\thirtysecondflag" -0.20\pt 4.10\pt -17.26\pt 0.20\pt
+ "u6" "\\sixtyfourthflag" -0.20\pt 4.10\pt -21.26\pt 0.20\pt
+ "d3" "\\deighthflag" -0.20\pt 4.54\pt -0.20\pt 11.66\pt
+ "d4" "\\dsixteenthflag" -0.20\pt 4.54\pt -0.20\pt 12.26\pt
+ "d5" "\\dthirtysecondflag" -0.20\pt 4.54\pt -0.20\pt 15.66\pt
+ "d6" "\\dsixtyfourthflag" -0.20\pt 4.54\pt -0.20\pt 17.66\pt
}
% } % $name
% generated automatically by mf-to-table.py version 0.4
-% on Mon Oct 20 23:14:08 1997
+% on Mon Oct 27 02:45:24 1997
% Do not edit
% input from out/font-en-tja20.log
% name=\symboltables {
"rests" = \table {
- "0" "\\wholerest" -0.00\pt 7.50\pt 1.88\pt 5.00\pt
+ "0" "\\wholerest" -0.00\pt 7.50\pt -3.13\pt 0.00\pt
"1" "\\halfrest" -0.00\pt 7.50\pt -0.00\pt 3.13\pt
- "0o" "\\outsidewholerest" -3.13\pt 10.62\pt 1.88\pt 5.00\pt
- "1o" "\\outsidehalfrest" -3.13\pt 10.62\pt -0.00\pt 3.13\pt
+ "0o" "\\outsidewholerest" -3.13\pt 10.62\pt -3.13\pt 0.50\pt
+ "1o" "\\outsidehalfrest" -3.13\pt 10.62\pt -0.50\pt 3.13\pt
"2" "\\quartrest" -0.00\pt 5.40\pt 3.75\pt 18.00\pt
"3" "\\eighthrest" -0.00\pt 6.67\pt 5.00\pt 14.33\pt
"4" "\\sixteenthrest" -0.00\pt 7.79\pt -0.00\pt 14.33\pt
"pedaltoe" "\\pedaltoe" -2.50\pt 2.50\pt -0.00\pt 7.50\pt
}
"flags" = \table {
- "u3" "\\eighthflag" -0.25\pt 5.20\pt -15.33\pt 0.25\pt
- "d3" "\\deighthflag" -0.25\pt 5.75\pt -0.25\pt 14.58\pt
- "u4" "\\sixteenthflag" -0.25\pt 5.20\pt -17.50\pt 0.25\pt
- "d4" "\\dsixteenthflag" -0.25\pt 5.75\pt -0.25\pt 15.00\pt
- "u5" "\\thirtysecondflag" -0.25\pt 5.20\pt -21.25\pt 0.25\pt
- "d5" "\\dthirtysecondflag" -0.25\pt 5.20\pt -0.25\pt 19.25\pt
- "u6" "\\sixtyfourthflag" -0.25\pt 5.20\pt -26.25\pt 0.25\pt
- "d6" "\\dsixtyfourthflag" -0.25\pt 5.20\pt -0.25\pt 21.75\pt
+ "u3" "\\eighthflag" -0.25\pt 5.13\pt -15.33\pt 0.25\pt
+ "u4" "\\sixteenthflag" -0.25\pt 5.13\pt -17.83\pt 0.25\pt
+ "u5" "\\thirtysecondflag" -0.25\pt 5.13\pt -21.58\pt 0.25\pt
+ "u6" "\\sixtyfourthflag" -0.25\pt 5.13\pt -26.58\pt 0.25\pt
+ "d3" "\\deighthflag" -0.25\pt 5.68\pt -0.25\pt 14.58\pt
+ "d4" "\\dsixteenthflag" -0.25\pt 5.68\pt -0.25\pt 15.33\pt
+ "d5" "\\dthirtysecondflag" -0.25\pt 5.68\pt -0.25\pt 19.58\pt
+ "d6" "\\dsixtyfourthflag" -0.25\pt 5.68\pt -0.25\pt 22.08\pt
}
% } % $name
\meter 4/4;
\multi 2 < { \stemup e'\longa a\breve | }
{ \stemdown
- c1 g c' a'
+ c1 \clef "bass"; ''b \clef "violin"; c' a'
c2 g c' a'
} >
\stemboth
[c a'] [a' c] |
[c d e f] [as' ges' f' e']
[cis' dis' c' des'] [cisis' disis' ceses' deses'] |
+ \clef "bass";
r1 r2 r4 r8 r16 r32 r64 r128 r128 |
- \multi 2 < { \stemup r2 r2} {\stemdown c'' c''}>
- \multi 2 < { \stemup c1 } {\stemdown r1}>
+ \multi 2 < { \stemup r2 r2} {\stemdown c c }>
+ \multi 2 < { \stemup ''c1 } {\stemdown r1}>
\stemboth
-
+ \clef "violin";
e8_. g'8-> e16^^ g'16_^
e32 _| g'32^| g''32-\ltoe g''32-\lheel
e64 g'64 c4... |
+
+ \meter 1/2; a2 |
+ \meter 3/2; a1. |
+ \meter 2/4; a2 |
+ \meter 5/4; a1.. |
+ \meter 6/8; a2. |
+ \meter 7/8; a2.. |
+ \meter 9/8; a1... |
+ \meter 12/8; a1. |
}
\paper{
+ % don't change this.
+ % otherwise 16pt and 20pt layouts differ.
+ linewidth = 12.5 \cm;
gourlay_maxmeasures =5.;
}
- \paper{
+ \paper{
\paper_twenty
+ linewidth = 17.5 \cm;
gourlay_maxmeasures =5.;
\output "lelie20.tex";
}
< e'2 a2 \f >
[ d'8( e'16 )f'16 ] |
%%10
- < [ e'8 g8 > d' cis'_"2" e' a~ g8 ] |
+ < [ e'8 g8 > d' cis'_"2" e' a () g8 ] |
%%11
\multi 2 <
- {\stemup a4~ d'4 cis'4-. }
+ {\stemup a4() d'4 cis'4-. }
{ \stemdown f2 e4 } > |
\stemboth
%%12
- < [ g'8^"4" d8 > f' e' f' d'^"3"~ c' ] |
+ < [ g'8^"4" d8 > f' e' f' d'^"3"() c' ] |
%%13
\clef "alto";
\multi 2 <
{ \stemup bes2 c'4 }
- { \stemdown g4~ f4 e4 }% ugh
+ { \stemdown g4() f4 e4 }% ugh
> |
\stemboth
%%14
< [ a8 f8 > g8 a8 f8 ] < d'4-\upbow e4 'bes4 > |
%%15
- < c'4-\downbow f4 'a4 > [ bes8~ a8 g8 a8 ] |
+ < c'4-\downbow f4 'a4 > [ bes8() a8 g8 a8 ] |
%%16
[ f( e8 )f a8-. g8-. bes8-. ] |
%%17
< a2^"0" fis2_"3" > bes4 |
%%18
- < { [ c'8~ bes8 c' a8 ] } es8 > fis4 |
+ < { [ c'8 () bes8 c' a8 ] } es8 > fis4 |
%%19
< d'4-\downbow g4 'bes4 > < c'4-\upbow g4 c4 > < [ bes8 d8 > a8 ] |
%%20
- < { [ c'8 ( bes8 a8 )bes g~ bes8 ] } d8 g8 > |
+ < { [ c'8 ( bes8 a8 )bes g() bes8 ] } d8 g8 > |
%%21
\multi 2 <
{\stemup d'4( \stemup )cis'4 d'4 }
> |
\stemboth
%%22
- < { [ g8 ~ f8 g8 e8 ] } cis8 > < f4 d4 > |
+ < { [ g8 () f8 g8 e8 ] } cis8 > < f4 d4 > |
%%23
[ 'g8 g8 ] < e4. 'a4. > d8-\upbow |
%%24
MAJOR_VERSION = 0
MINOR_VERSION = 1
-PATCH_LEVEL = 25
+PATCH_LEVEL = 26
MY_PATCH_LEVEL =
/* *************** */
void
-Key_change_req::transpose (Melodic_req const & d) const
+Key_change_req::transpose (Melodic_req const * d) const
{
WARN << _("don't know how to transpose a key. \n");
for (int i=0; i < melodic_p_arr_.size(); i++)
/// return number of sharps in key
int sharps_i();
- void transpose (Melodic_req const & d) const;
+ void transpose (Melodic_req const * d) const;
/// is minor key?
int minor_b();
};
int height() const;
/// transpose. #delta# is relative to central c.
- void transpose (Melodic_req const &delta);
+ virtual void transpose (Melodic_req const *delta);
/// return pitch from central c (in halfnotes)
int pitch() const;
Melodic_req();
cout << String_convert::bin2hex_str (event_str) << endl;
}
assert (delta_time_i >= 0);
- assert(event_str.length_i());
+ assert (event_str.length_i());
Midi_chunk::add (i2varint_str (delta_time_i) + event_str);
}
{
#ifndef NPRINT
if (! check_debug)
- return ;
+ return ;
DOUT << name() << "{";
if (translator_type_str_.length_i ())
- DOUT << translator_type_str_ << " = " << translator_id_str_;
+ DOUT << translator_type_str_ << " = " << translator_id_str_;
do_print();
DOUT << "}\n";
#endif
IMPLEMENT_IS_TYPE_B1(Change_reg,Music)
+
}
void
-Melodic_req::transpose (Melodic_req const & delta)
+Melodic_req::transpose (Melodic_req const * delta)
{
int old_pitch = pitch();
- int delta_pitch = delta.pitch();
- octave_i_ += delta.octave_i_;
- notename_i_ += delta.notename_i_;
+ int delta_pitch = delta->pitch();
+ octave_i_ += delta->octave_i_;
+ notename_i_ += delta->notename_i_;
while (notename_i_ >= 7)
{
notename_i_ -= 7;
accidental_i_ -= delta_acc;
if (abs (accidental_i_) > 2)
{
- delta.warning (_("transposition makes accidental larger than 2"));
+ delta->warning (_("transposition makes accidental larger than 2"));
}
}
BUILD = $(shell cat $(build))
INCREASE_BUILD = echo `expr \`cat $(build)\` + 1` > .b; mv .b $(build)
#
-
+FOOBAR =
# the version:
#
-VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)$(MY_PATCH_LEVEL)
-TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)$(TOPLEVEL_MY_PATCH_LEVEL)
+ifneq ($(MY_PATCH_LEVEL),$(FOOBAR))
+VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL).$(MY_PATCH_LEVEL)
+else
+VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
+endif
+
+ifneq ($(TOPLEVEL_MY_PATCH_LEVEL),$(FOOBAR))
+TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL).$(TOPLEVEL_MY_PATCH_LEVEL)
+else
+TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)
+endif
+
#
Begin3
Titel: LilyPond
-Versie: 0.1.25
-Inschrijf datum: 21OCT97
+Versie: 0.1.26.
+Inschrijf datum: 27OCT97
Beschrijving: LilyPond is de muziek typesetter van het GNU Project.
Het programma genereert muziek in zichtbare of
hoorbare vorm uit uit een muzikale definitie file:
jan@digicash.com (Jan Nieuwenhuizen)
Onderhouden door: hanwen@stack.nl (Han-Wen Nienhuys)
Voornaamste plek: sunsite.unc.edu /pub/Linux/apps
- 395k lilypond-0.1.25.tar.gz
+ 395k lilypond-0.1.26..tar.gz
Oorspronkelijke plek: pcnov095.win.tue.nl /pub/lilypond/
- 395k lilypond-0.1.25.tar.gz
+ 395k lilypond-0.1.26..tar.gz
Copi"eer politie: GPL
End
Begin3
Title: LilyPond
-Version: 0.1.25
-Entered-date: 21OCT97
+Version: 0.1.26.
+Entered-date: 27OCT97
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
jan@digicash.com (Jan Nieuwenhuizen)
Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
Primary-site: sunsite.unc.edu /pub/Linux/apps
- 430k lilypond-0.1.25.tar.gz
+ 430k lilypond-0.1.26..tar.gz
Original-site: pcnov095.win.tue.nl /pub/lilypond/
- 430k lilypond-0.1.25.tar.gz
+ 430k lilypond-0.1.26..tar.gz
Copying-policy: GPL
End
Name: lilypond
-Version: 0.1.25
+Version: 0.1.26.
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.1.25.tar.gz
+Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.1.26..tar.gz
Summary: A preprocessor to make TeX typeset music.
URL: http://www.stack.nl/~hanwen/lilypond
Packager: Han-Wen Nienhuys <hanwen@stack.nl>
message "@{char@:"&charnamestr&"@:"&decimal charcode&"@:"&decimal charbp&"@:"&decimal charwd&"@:"&decimal chardp&"@:"&decimal charht&"@:"&idstr&"@:"&texstr&"@}";
enddef;
+def tand(expr alpha) =
+ (sind alpha/cosd alpha)
+ enddef;
%breapth, width, depth, height
% breapth x-depth
\font\slurs=xslhd16
\font\specfont=musixspx
\font\egler=opus16
-\def\thefont{\egler}
+\font\nummertjes=feta-nummer10
+%\def\thefont{\egler}
%\def\thefont{\specfont}
+\def\thefont{\nummertjes}
\def\mb#1{{\thefont\char#1}}
\newcount\n
\def\charn{\n=-1
- \loop\ifnum\n<255\advance\n by1
+% \loop\ifnum\n<255\advance\n by1
+ \loop\ifnum\n<10\advance\n by1
\doitem{\number\n}\endgraf\repeat}
% flags
%
-fet_begingroup("flags")
+fet_begingroup("flags")
+save outer_path;
+path outer_path;
% Flags pointing down overlap with the notehead (in x-direction), so
% the down-flag can be bigger
-upflag_width# = .750 black_notehead_width#;
-downflag_width# = .833 black_notehead_width#;
+upflag_width# = .750 black_notehead_width# + stemthickness#/2;
+downflag_width# = .833 black_notehead_width# + stemthickness#/2;
%
% Flags pointing down cannot overlap with the notehead in y-direction,
% for example, see POSTSCRIPT Language -- program design,
% page 119, and [Wanske], p 41,42
%
-def draw_flag(expr center, flare,
- hip_depth, hip_width, hip_thickness,
- foot_depth, foot_width, foot_thickness, flagcut) =
+
+def draw_flag(expr center, flare,
+ dims, hip_depth, foot_wid, hip_thickness, foot_thickness)=
clearxy;
penpos1(flare, 90);
- penpos2(whatever, 40);
+ penpos2(whatever, 0);
x2r - x2l = hip_thickness;
penpos3(foot_thickness, 0) ;
z1r = center;
- z2 = center + (hip_width, -flare - hip_depth);
- z3orig = center + (foot_width, -flare - foot_depth);
- z3 = (1-flagcut) [z2, z3orig];
+ z2r = center + (xpart dims, -ypart(dims) * hip_depth);
+ z3r = center + (xpart(dims) * foot_wid, -ypart dims);
+ outer_path := z3r{curl 0} .. z2r{up} .. {up}z1r;
- save bot_dir, bot_path;
- pair bot_dir;
- path bot_path;
- bot_path := z2{down} .. z3;
- bot_dir := direction 1 of bot_path;
-
+ penlabels(1, 2, 3);
fill z1l{curl 0}
- ..tension 1.1 .. z2l ..
- z3l{bot_dir} .. z3r{-bot_dir} ..
- z2r .. {up}z1r & z1r -- cycle;
+ ..tension 1.1 .. z2l{down} ..
+ {curl 0} simple_serif(z3l, z3r, 80) &
+ outer_path & z1r -- cycle;
enddef;
+%
+% TODO: calc intersectpoint
+% TODO: calc incision_depth
+%
+def add_flag(expr yoff, flare, hip_wid_multiplier,
+ hip_dep_multiplier,
+ intersectpoint, hip_thickness, foot_thickness) =
+ begingroup
+ save prev_center, prev_xextreme, prev_yextreme;
+ save rel_foot, ip, center, incision_depth;
+ save prev_hipwid, prev_footdep, prev_hipdep, wid, dep, hip_dep;
+ save hip_dep_ratio, foot_wid_ratio;
+ pair prev_center, center, foot, prev_xextreme, prev_yextreme;
+ pair ip, rel_foot;
+
+ incision_depth = 1.013;
+ prev_center = point 2 of outer_path;
+ prev_xextreme = point 1 of outer_path;
+ prev_yextreme = point 0 of outer_path;
+ prev_hipwid = xpart (prev_xextreme - prev_center);
+ prev_footdep = -ypart (prev_yextreme - prev_center);
+ prev_hipdep = -ypart(prev_xextreme - prev_center);
+ ip = point intersectpoint of outer_path;
+
+ wid = prev_hipwid * hip_wid_multiplier;
+ hip_dep = prev_hipdep * hip_dep_multiplier;
+
+ center = prev_center + (0,yoff);
+ rel_foot = incision_depth [(wid, hip_dep), ip - center];
+ dep = -ypart(rel_foot);
+ foot_wid_ratio = xpart(rel_foot ) / wid;
+ hip_dep_ratio = hip_dep / dep;
+
+ draw_flag(center, flare,
+ (wid, dep), hip_dep_ratio, foot_wid_ratio,
+ hip_thickness, foot_thickness);
+ endgroup
+enddef;
-
-% godbewaarme, wat een kutsymbolen
fet_beginchar("8th Flag (up)", "u3", "eighthflag")
save flare,
- hip_depth, hip_width,
- foot_depth, foot_width;
+ hip_depth_ratio, hip_width,
+ foot_depth, foot_width_ratio;
flare# = 1.0 interline#;
- hip_depth# = 8/15 foot_depth#;
+ hip_depth_ratio = .72;
+ foot_width_ratio = .8;
hip_width# = upflag_width# - hip_thickness#/2;
- foot_depth# + flare# = 3 interline#;
- foot_width# = .8 hip_width#;
+ foot_depth# = 3 interline#;
- set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2
+ set_char_box(stemthickness# /2, hip_width#
+ stemthickness#/2,
- flare# + foot_depth# + foot_thickness#/2, stemthickness#/2)
+ foot_depth# + foot_thickness#/2, stemthickness#/2)
- define_pixels(flare,
- hip_depth, hip_width, hip_thickness,
- foot_depth, foot_width, foot_thickness);
+ define_pixels(flare, hip_width, hip_thickness,
+ foot_depth, foot_thickness);
draw_flag((stemthickness/2,0), flare,
- hip_depth, hip_width, hip_thickness,
- foot_depth, foot_width, foot_thickness, 0)
- ;
- penlabels(1, 2, 3);
+ (hip_width, foot_depth),
+ hip_depth_ratio, foot_width_ratio, hip_thickness, foot_thickness);
+
pickup pencircle scaled stemthickness;
draw (0, 0) .. (0,-2 interline);
fet_endchar;
-fet_beginchar("8th Flag (down)", "d3", "deighthflag")
+fet_beginchar("16th Flag (up)", "u4", "sixteenthflag")
save flare,
- hip_depth, hip_width,
- foot_depth, foot_width;
+ hip_depth_ratio, hip_width,
+ foot_depth, foot_width_ratio;
+ save flagspace, total_depth, flag_count;
+ total_depth# = 3.5 interline#;
+ flag_count = 2;
+ flare# = .85 interline#;
+ flagspace# = .85 interline#;
+ hip_depth_ratio = .72 ;
+ hip_width# = upflag_width# - hip_thickness#/2;
+ flagspace# + foot_depth# = total_depth#;
- flare# = 1.0 interline#;
+ foot_width_ratio = .8;
- hip_depth# = 8/15 foot_depth#;
- hip_width# = downflag_width# - hip_thickness#/2;
+ set_char_box(stemthickness# /2, hip_width#
+ + stemthickness#/2,
+ total_depth# + foot_thickness#/2, stemthickness#/2)
- % 2.9 -> don't intersect staffline at foot
- foot_depth# + flare# = 2.85 interline#;
- foot_width# = .82 hip_width#;
+ define_pixels(flare, hip_width, hip_thickness,
+ flagspace,
+ foot_depth, foot_thickness);
- set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2
- + stemthickness#/2,
- flare# + foot_depth# + foot_thickness#/2, stemthickness#/2)
+ draw_flag((stemthickness/2,- flagspace), flare,
+ (hip_width, foot_depth),
+ hip_depth_ratio,foot_width_ratio, hip_thickness, foot_thickness);
- define_pixels(flare,
- hip_depth, hip_width, hip_thickness,
- foot_depth, foot_width, foot_thickness);
+ add_flag(flagspace, flare,
+ .97, 1.00, 1.25, hip_thickness, foot_thickness);
- draw_flag((stemthickness/2,0),flare,
- hip_depth, hip_width, hip_thickness,
- foot_depth, foot_width, foot_thickness, 0);
pickup pencircle scaled stemthickness;
draw (0, 0) .. (0,-2 interline);
-
- y_mirror_char;
fet_endchar;
-fet_beginchar("16th Flag (up)", "u4", "sixteenthflag")
- save flare, flagspace,
- hip_depth, hip_width,
- foot_depth, foot_width;
+fet_beginchar("32nd Flag (up)", "u5", "thirtysecondflag")
+ save flare,
+ hip_depth_ratio, hip_width,
+ foot_depth, foot_width_ratio;
+ save flagspace, total_depth, flag_count;
+ flag_count = 3;
+ total_depth#=4.25 interline#;
+ flare# = .85 interline#;
+ flagspace# = .87 interline#;
+ hip_depth_ratio = .72 ;
+ hip_width# = upflag_width# - hip_thickness#/2;
+ (flag_count-1) * flagspace# + foot_depth# = total_depth#;
- flare# = 0.85 interline#;
- flagspace# = .85 interline#;
- hip_depth# = 8/15 foot_depth#;
+ foot_width_ratio = .8;
- flagspace# + flare# + foot_depth# = 3.5 interline#;
+ set_char_box(stemthickness# /2, hip_width#
+ + stemthickness#/2,
+ total_depth# + foot_thickness#/2, stemthickness#/2)
- hip_width# = upflag_width# - hip_thickness#/2;
- foot_width# = .8 hip_width#;
+ define_pixels(flare, hip_width, hip_thickness,
+ flagspace,
+ foot_depth, foot_thickness);
- set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2
- + stemthickness#/2,
- 3.5 interline#, stemthickness#/2)
+ draw_flag((stemthickness/2,- 2 flagspace), flare,
+ (hip_width, foot_depth),
+ hip_depth_ratio,foot_width_ratio, hip_thickness, foot_thickness);
- define_pixels(flagspace);
- define_pixels(flare,
- hip_depth, hip_width, hip_thickness,
- foot_depth, foot_width, foot_thickness);
+ add_flag(flagspace, flare,
+ .97, 1.00, 1.25, hip_thickness, foot_thickness);
- draw_flag((stemthickness/2, 0),flare,
- 1.2 hip_depth, .97 hip_width, hip_thickness,
- foot_depth, .9 foot_width, foot_thickness, 0.5);
- draw_flag((stemthickness/2, -flagspace),flare,
- hip_depth, hip_width, hip_thickness,
- foot_depth, foot_width, foot_thickness, 0);
+ add_flag(flagspace, flare,
+ .95, 1.05, 1.25, hip_thickness, foot_thickness);
pickup pencircle scaled stemthickness;
draw (0, 0) .. (0,-2 interline);
-
fet_endchar;
+fet_beginchar("64th Flag (up)", "u6", "sixtyfourthflag")
+ save flare,
+ hip_depth_ratio, hip_width,
+ foot_depth, foot_width_ratio;
+ save flagspace, total_depth, flag_count;
+
+ flag_count = 4;
+ flare# = .85 interline#;
+ flagspace# = .9 interline#;
+ hip_depth_ratio = .72 ;
+ hip_width# = upflag_width# - hip_thickness#/2;
+ total_depth# = 5.25 interline#;
+ (flag_count-1) * flagspace# + foot_depth# = total_depth#;
-fet_beginchar("16th Flag (down)", "d4", "dsixteenthflag")
- save flare, flagspace,
- hip_depth, hip_width,
- foot_depth, foot_width;
-
- flare# = 0.87 interline#;
- flagspace# = .9 interline#;
- hip_depth# = .7 foot_depth#;
-
- flagspace# + flare# + foot_depth# = 3 interline#;
-
- hip_width# = downflag_width# - hip_thickness#/2;
-
- foot_width# = 1.00 hip_width#;
+ foot_width_ratio = .8;
- set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2
+ set_char_box(stemthickness# /2, hip_width#
+ stemthickness#/2,
- 3 interline#, stemthickness#/2)
+ total_depth# + foot_thickness#/2, stemthickness#/2)
- define_pixels(flagspace);
- define_pixels(flare,
- hip_depth, hip_width, hip_thickness,
- foot_depth, foot_width, foot_thickness);
+ define_pixels(flare, hip_width, hip_thickness,
+ flagspace,
+ foot_depth, foot_thickness);
- draw_flag((stemthickness/2, 0),flare,
- hip_depth, .97 hip_width, hip_thickness,
- 1.2 foot_depth, .95 foot_width, foot_thickness, 0.0);
+ draw_flag((stemthickness/2,- (flag_count-1)* flagspace), flare,
+ (hip_width, foot_depth),
+ hip_depth_ratio,foot_width_ratio, hip_thickness, foot_thickness);
- draw_flag((stemthickness/2, -flagspace),flare,
- hip_depth, hip_width, hip_thickness,
- foot_depth, foot_width, foot_thickness, 0);
+ add_flag(flagspace, flare,
+ .97, 1.00, 1.3, hip_thickness, foot_thickness);
+ add_flag(flagspace, flare,
+ 1.00, 1.00, 1.25, hip_thickness, foot_thickness);
+ add_flag(flagspace, flare,
+ .95, 1.05, 1.25, hip_thickness, foot_thickness);
pickup pencircle scaled stemthickness;
draw (0, 0) .. (0,-2 interline);
-
- y_mirror_char;
fet_endchar;
-fet_beginchar("32nd Flag (up)", "u5", "thirtysecondflag")
- save flare, flagspace,
- hip_depth, hip_width,
- foot_depth, foot_width;
+fet_beginchar("8th (down)", "d3", "deighthflag")
+ save flare,
+ hip_depth_ratio, hip_width,
+ foot_depth, foot_width_ratio;
+ save flagspace, total_depth, flag_count;
+
+ flag_count = 1;
+ flare# = .99 interline#;
+ flagspace# = .9 interline#;
+ hip_depth_ratio = .72 ;
+ hip_width# = downflag_width# - hip_thickness#/2;
+ total_depth# = 2.85 interline#;
+ (flag_count-1) * flagspace# + foot_depth# = total_depth#;
- flare# = 0.85 interline#;
- flagspace# = .87 interline#;
- hip_depth# = 8/15 foot_depth#;
+ foot_width_ratio = .8;
- 2 flagspace# + flare# + foot_depth# = 4.25 interline#;
+ set_char_box(stemthickness# /2, hip_width#
+ + stemthickness#/2,
+ total_depth# + foot_thickness#/2, stemthickness#/2)
- hip_width# = upflag_width# - hip_thickness#/2;
- foot_width# = .8 hip_width#;
+ define_pixels(flare, hip_width, hip_thickness,
+ flagspace,
+ foot_depth, foot_thickness);
- set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2
- + stemthickness#/2,
- 4.25 interline#, stemthickness#/2)
-
- define_pixels(flagspace);
- define_pixels(flare,
- hip_depth, hip_width, hip_thickness,
- foot_depth, foot_width, foot_thickness);
-
- draw_flag((stemthickness/2, 0),flare,
- 1.25 hip_depth, .95 hip_width, hip_thickness,
- .85 foot_depth, 1.1 foot_width, foot_thickness, 0.0);
- draw_flag((stemthickness/2, -flagspace),flare,
- 1.2 hip_depth, .97 hip_width, hip_thickness,
- foot_depth, .9 foot_width, foot_thickness, 0.37);
- draw_flag((stemthickness/2, -2 flagspace),flare,
- 1.1 hip_depth, hip_width, hip_thickness,
- foot_depth, 1.15 foot_width, foot_thickness, 0);
+ draw_flag((stemthickness/2,- (flag_count-1) *flagspace), flare,
+ (hip_width, foot_depth),
+ hip_depth_ratio,foot_width_ratio, hip_thickness, foot_thickness);
- pickup pencircle scaled stemthickness;
- draw (0, 0) .. (0,-3 interline);
+ pickup pencircle scaled stemthickness;
+ draw (0, 0) .. (0,-2 interline);
+ y_mirror_char;
fet_endchar;
+fet_beginchar("16th (down)", "d4", "dsixteenthflag")
+ save flare,
+ hip_depth_ratio, hip_width,
+ foot_depth, foot_width_ratio;
+ save flagspace, total_depth, flag_count;
+
+ flag_count = 2;
+ flare# = .8 interline#;
+ flagspace# = .9 interline#;
+ hip_depth_ratio = .85 ;
+ hip_width# = downflag_width# - hip_thickness#/2;
+ total_depth# = 3.0 interline#;
+ (flag_count-1) * flagspace# + foot_depth# = total_depth#;
+ foot_width_ratio = .95;
-fet_beginchar("32nd Flag (up)", "d5", "dthirtysecondflag")
- save flare, flagspace,
- hip_depth, hip_width,
- foot_depth, foot_width;
+ set_char_box(stemthickness# /2, hip_width#
+ + stemthickness#/2,
+ total_depth# + foot_thickness#/2, stemthickness#/2)
- flare# = 0.85 interline#;
- flagspace# = .85 interline#;
- hip_depth# = .57 foot_depth#;
- foot_width# = 1.0 hip_width#;
+ define_pixels(flare, hip_width, hip_thickness,
+ flagspace,
+ foot_depth, foot_thickness);
- 2 flagspace# + flare# + foot_depth# = 3.85 interline#;
- hip_width# = upflag_width# - hip_thickness#/2;
+ draw_flag((stemthickness/2,- (flag_count-1) *flagspace), flare,
+ (hip_width, foot_depth),
+ hip_depth_ratio,foot_width_ratio, hip_thickness, foot_thickness);
+ add_flag(flagspace, flare,
+ .95, 1.00, 1.25, hip_thickness, foot_thickness);
-
- set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2
- + stemthickness#/2,
- 3.85 interline#, stemthickness#/2)
-
- define_pixels(flagspace);
- define_pixels(flare,
- hip_depth, hip_width, hip_thickness,
- foot_depth, foot_width, foot_thickness);
-
- draw_flag((stemthickness/2, 0),flare,
- 1.3 hip_depth, .93 hip_width, hip_thickness,
- foot_depth, .9 foot_width, foot_thickness, 0.0);
- draw_flag((stemthickness/2, -flagspace),flare,
- 1.15 hip_depth, .97 hip_width, hip_thickness,
- foot_depth, .95 foot_width, foot_thickness, 0.0);
- draw_flag((stemthickness/2, -2 flagspace),flare,
- 1.0 hip_depth, hip_width, .95 hip_thickness,
- foot_depth, foot_width, .93 foot_thickness, 0);
+
pickup pencircle scaled stemthickness;
- draw (0, 0) .. (0,-3 interline);
+ draw (0, 0) .. (0,-2 interline);
y_mirror_char;
fet_endchar;
-fet_beginchar("64th Flag (up)", "u6", "sixtyfourthflag")
- save flare, flagspace,
- hip_depth, hip_width,
- foot_depth, foot_width;
+fet_beginchar("32nd (down)", "d5", "dthirtysecondflag")
+ save flare,
+ hip_depth_ratio, hip_width,
+ foot_depth, foot_width_ratio;
+ save flagspace, total_depth, flag_count;
+
+ flag_count = 3;
+ flare# = .84 interline#;
+ flagspace# = .9 interline#;
+ hip_depth_ratio = .85 ;
+ hip_width# = downflag_width# - hip_thickness#/2;
+ total_depth# = 3.85 interline#;
+ (flag_count-1) * flagspace# + foot_depth# = total_depth#;
- flare# = 0.85 interline#;
- flagspace# = .9 interline#;
- hip_depth# = 8/15 foot_depth#;
+ foot_width_ratio = .95;
- 3 flagspace# + flare# + foot_depth# = 5.25 interline#;
+ set_char_box(stemthickness# /2, hip_width#
+ + stemthickness#/2,
+ total_depth# + foot_thickness#/2, stemthickness#/2)
- hip_width# = upflag_width# - hip_thickness#/2;
- foot_width# = .8 hip_width#;
+ define_pixels(flare, hip_width, hip_thickness,
+ flagspace,
+ foot_depth, foot_thickness);
- set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2
- + stemthickness#/2,
- 5.25 interline#, stemthickness#/2)
-
- define_pixels(flagspace);
- define_pixels(flare,
- hip_depth, hip_width, hip_thickness,
- foot_depth, foot_width, foot_thickness);
-
- draw_flag((stemthickness/2, 0),flare,
- 1.25 hip_depth, .95 hip_width, hip_thickness,
- .85 foot_depth, 1.1 foot_width, foot_thickness, 0.0);
- draw_flag((stemthickness/2, -flagspace),flare,
- 1.2 hip_depth, .97 hip_width, hip_thickness,
- foot_depth, .9 foot_width, foot_thickness, 0.37);
- draw_flag((stemthickness/2, -2flagspace),flare,
- 1.2 hip_depth, .97 hip_width, hip_thickness,
- foot_depth, .9 foot_width, foot_thickness, 0.37);
- draw_flag((stemthickness/2, -3 flagspace),flare,
- 1.1 hip_depth, hip_width, hip_thickness,
- foot_depth, 1.15 foot_width, foot_thickness, 0);
+ draw_flag((stemthickness/2,- (flag_count-1) *flagspace), flare,
+ (hip_width, foot_depth),
+ hip_depth_ratio,foot_width_ratio, hip_thickness, foot_thickness);
+ add_flag(flagspace, flare,
+ .97, 1.00, 1.25, hip_thickness, foot_thickness);
- pickup pencircle scaled stemthickness;
- draw (0, 0) .. (0,-5 interline);
+ add_flag(flagspace, flare,
+ .95, 1.05, 1.25, hip_thickness, foot_thickness);
+
+
+ pickup pencircle scaled stemthickness;
+ draw (0, 0) .. (0,-2 interline);
+ y_mirror_char;
fet_endchar;
+fet_beginchar("64th (down)", "d6", "dsixtyfourthflag")
+ save flare,
+ hip_depth_ratio, hip_width,
+ foot_depth, foot_width_ratio;
+ save flagspace, total_depth, flag_count;
+
+ flag_count = 4;
+ flare# = .8 interline#;
+ flagspace# = .9 interline#;
+ hip_depth_ratio = .85 ;
+ hip_width# = downflag_width# - hip_thickness#/2;
+ total_depth# = 4.35 interline#;
+ (flag_count-1) * flagspace# + foot_depth# = total_depth#;
+ foot_width_ratio = .98;
-fet_beginchar("64th Flag (down)", "d6", "dsixtyfourthflag")
- save flare, flagspace,
- hip_depth, hip_width,
- foot_depth, foot_width;
- save lastcut;
- flare# = 0.85 interline#;
- flagspace# = .9 interline#;
- hip_depth# = .57 foot_depth#;
- foot_width# = 1.0 hip_width#;
+ set_char_box(stemthickness# /2, hip_width#
+ + stemthickness#/2,
+ total_depth# + foot_thickness#/2, stemthickness#/2)
- lastcut = .7;
+ define_pixels(flare, hip_width, hip_thickness,
+ flagspace,
+ foot_depth, foot_thickness);
- 3 flagspace# + flare# + hip_depth# +
- (foot_depth# - hip_depth#) * (1-lastcut) = 4.35 interline#;
- hip_width# = upflag_width# - hip_thickness#/2;
+ draw_flag((stemthickness/2,- (flag_count-1) *flagspace), flare,
+ (hip_width, foot_depth),
+ hip_depth_ratio,foot_width_ratio, hip_thickness, foot_thickness);
+ add_flag(flagspace, flare,
+ .97, 1.20, 1.175, hip_thickness, foot_thickness);
+ add_flag(flagspace, flare,
+ .97, 1.10, 1.175, hip_thickness, foot_thickness);
+ add_flag(flagspace, flare,
+ .95, 1.03, 1.175, hip_thickness, foot_thickness);
- set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2
- + stemthickness#/2,
- 4.35 interline#, stemthickness#/2)
-
- define_pixels(flagspace);
- define_pixels(flare,
- hip_depth, hip_width, hip_thickness,
- foot_depth, foot_width, foot_thickness);
-
- draw_flag((stemthickness/2, 0),flare,
- 1.33 hip_depth, .92 hip_width, hip_thickness,
- 1.15 foot_depth, .9 foot_width, foot_thickness, 0.0);
- draw_flag((stemthickness/2, -flagspace),flare,
- 1.15 hip_depth, .97 hip_width, hip_thickness,
- 1.14 foot_depth, .92 foot_width, foot_thickness, 0.0);
- draw_flag((stemthickness/2, -2 flagspace),flare,
- 1.15 hip_depth, .97 hip_width, hip_thickness,
- 1.12 foot_depth, .95 foot_width, foot_thickness, 0.0);
- draw_flag((stemthickness/2, -3flagspace),flare,
- 1.0 hip_depth, hip_width, .95 hip_thickness,
- foot_depth, foot_width, .93 foot_thickness, lastcut);
+
pickup pencircle scaled stemthickness;
- draw (0, 0) .. (0,-5 interline);
+ draw (0, 0) .. (0,-2 interline);
y_mirror_char;
fet_endchar;
-
-
fet_endgroup("flags");
--- /dev/null
+% flags
+%
+
+fet_begingroup("flagst")
+save bot_path;
+path bot_path;
+% Flags pointing down overlap with the notehead (in x-direction), so
+% the down-flag can be bigger
+upflag_width# = .750 black_notehead_width# + stemthickness#/2;
+downflag_width# = .833 black_notehead_width# + stemthickness#/2;
+
+%
+% Flags pointing down cannot overlap with the notehead in y-direction,
+% so they have less slant.
+
+%
+% Because of optical illusion, the utmost flag
+% (bottom for down-pointing, top
+% for up-pointing) should be smaller than the other flags
+%
+
+save hip_thickness, foot_thickness;
+hip_thickness# = 1.3 stemthickness#;
+foot_thickness# = hip_thickness#;
+
+%
+% Inspired by Adobe Sonata and [Wanske]
+% for example, see POSTSCRIPT Language -- program design,
+% page 119, and [Wanske], p 41,42
+%
+
+def draw_flag(expr center, flare,
+ dims, hip_depth, foot_wid, hip_thickness, foot_thickness)=
+ clearxy;
+
+ penpos1(flare, 90);
+ penpos2(whatever, 0);
+ x2r - x2l = hip_thickness;
+ penpos3(foot_thickness, 0) ;
+
+ z1r = center;
+ z2r = center + (xpart dims, -ypart(dims) * hip_depth);
+ z3r = center + (xpart(dims) * foot_wid, -ypart dims);
+
+ bot_path := z3r{curl 0} .. z2r{up} .. {up}z1r;
+
+ penlabels(1, 2, 3);
+ fill z1l{curl 0}
+ ..tension 1.1 .. z2l{down} ..
+ {curl 0} simple_serif(z3l, z3r, 80) &
+ bot_path & z1r -- cycle;
+enddef;
+
+def add_flag(expr yoff, flare, hip_wid_multiplier,
+ hip_dep_multiplier,
+ intersectpoint, hip_thickness, foot_thickness) =
+ begingroup
+ save prev_center, prev_xextreme, prev_yextreme;
+ save rel_foot, ip, center;
+ save prev_hipwid, prev_footdep, prev_hipdep, wid, dep, hip_dep;
+ save hip_dep_ratio, foot_wid_ratio;
+ pair prev_center, center, foot, prev_xextreme, prev_yextreme;
+ pair ip, rel_foot;
+
+
+ prev_center = point 2 of bot_path;
+ prev_xextreme = point 1 of bot_path;
+ prev_yextreme = point 0 of bot_path;
+ prev_hipwid = xpart (prev_xextreme - prev_center);
+ prev_footdep = -ypart (prev_yextreme - prev_center);
+ prev_hipdep = -ypart(prev_xextreme - prev_center);
+ ip = point intersectpoint of bot_path;
+
+ wid = prev_hipwid * hip_wid_multiplier;
+ hip_dep = prev_hipdep * hip_dep_multiplier;
+
+ center = prev_center + (0,yoff);
+ rel_foot = 1.013 [(wid, hip_dep), ip - center];
+ dep = -ypart(rel_foot);
+ foot_wid_ratio = xpart(rel_foot ) / wid;
+ hip_dep_ratio = hip_dep / dep;
+
+ draw_flag(center, flare,
+ (wid, dep), hip_dep_ratio, foot_wid_ratio,
+ hip_thickness, foot_thickness);
+ endgroup
+enddef;
+
+fet_beginchar("8th Flag (up)", "u3", "eighthflag")
+ save flare,
+ hip_depth_ratio, hip_width,
+ foot_depth, foot_width_ratio;
+
+ flare# = 1.0 interline#;
+ hip_depth_ratio = .72;
+ foot_width_ratio = .8;
+ hip_width# = upflag_width# - hip_thickness#/2;
+
+ foot_depth# = 3 interline#;
+
+ set_char_box(stemthickness# /2, hip_width#
+ + stemthickness#/2,
+ foot_depth# + foot_thickness#/2, stemthickness#/2)
+
+ define_pixels(flare, hip_width, hip_thickness,
+ foot_depth, foot_thickness);
+ draw_flag((stemthickness/2,0), flare,
+ (hip_width, foot_depth),
+ hip_depth_ratio, foot_width_ratio, hip_thickness, foot_thickness);
+
+ pickup pencircle scaled stemthickness;
+ draw (0, 0) .. (0,-2 interline);
+fet_endchar;
+
+fet_beginchar("16th Flag (up)", "u4", "sixteenthflag")
+ save flare,
+ hip_depth_ratio, hip_width,
+ foot_depth, foot_width_ratio;
+ save flagspace, total_depth, flag_count;
+ total_depth# = 3.5 interline#;
+ flag_count = 2;
+ flare# = .85 interline#;
+ flagspace# = .85 interline#;
+ hip_depth_ratio = .72 ;
+ hip_width# = upflag_width# - hip_thickness#/2;
+ flagspace# + foot_depth# = total_depth#;
+
+ foot_width_ratio = .8;
+
+ set_char_box(stemthickness# /2, hip_width#
+ + stemthickness#/2,
+ total_depth# + foot_thickness#/2, stemthickness#/2)
+
+ define_pixels(flare, hip_width, hip_thickness,
+ flagspace,
+ foot_depth, foot_thickness);
+
+ draw_flag((stemthickness/2,- flagspace), flare,
+ (hip_width, foot_depth),
+ hip_depth_ratio,foot_width_ratio, hip_thickness, foot_thickness);
+
+ add_flag(flagspace, flare,
+ .97, 1.00, 1.25, hip_thickness, foot_thickness);
+
+ pickup pencircle scaled stemthickness;
+ draw (0, 0) .. (0,-2 interline);
+fet_endchar;
+
+
+fet_beginchar("32nd Flag (up)", "u5", "thirtysecondflag")
+ save flare,
+ hip_depth_ratio, hip_width,
+ foot_depth, foot_width_ratio;
+ save flagspace, total_depth, flag_count;
+ flag_count = 3;
+ total_depth#=4.25 interline#;
+ flare# = .85 interline#;
+ flagspace# = .87 interline#;
+ hip_depth_ratio = .72 ;
+ hip_width# = upflag_width# - hip_thickness#/2;
+ (flag_count-1) * flagspace# + foot_depth# = total_depth#;
+
+ foot_width_ratio = .8;
+
+ set_char_box(stemthickness# /2, hip_width#
+ + stemthickness#/2,
+ total_depth# + foot_thickness#/2, stemthickness#/2)
+
+ define_pixels(flare, hip_width, hip_thickness,
+ flagspace,
+ foot_depth, foot_thickness);
+
+ draw_flag((stemthickness/2,- 2 flagspace), flare,
+ (hip_width, foot_depth),
+ hip_depth_ratio,foot_width_ratio, hip_thickness, foot_thickness);
+
+ add_flag(flagspace, flare,
+ .97, 1.00, 1.25, hip_thickness, foot_thickness);
+
+ add_flag(flagspace, flare,
+ .95, 1.05, 1.25, hip_thickness, foot_thickness);
+
+ pickup pencircle scaled stemthickness;
+ draw (0, 0) .. (0,-2 interline);
+fet_endchar;
+
+fet_beginchar("64th Flag (up)", "u6", "sixtyfourthflag")
+ save flare,
+ hip_depth_ratio, hip_width,
+ foot_depth, foot_width_ratio;
+ save flagspace, total_depth, flag_count;
+
+ flag_count = 4;
+ flare# = .85 interline#;
+ flagspace# = .9 interline#;
+ hip_depth_ratio = .72 ;
+ hip_width# = upflag_width# - hip_thickness#/2;
+ total_depth# = 5.25 interline#;
+ (flag_count-1) * flagspace# + foot_depth# = total_depth#;
+
+ foot_width_ratio = .8;
+
+ set_char_box(stemthickness# /2, hip_width#
+ + stemthickness#/2,
+ total_depth# + foot_thickness#/2, stemthickness#/2)
+
+ define_pixels(flare, hip_width, hip_thickness,
+ flagspace,
+ foot_depth, foot_thickness);
+
+ draw_flag((stemthickness/2,- (flag_count-1)* flagspace), flare,
+ (hip_width, foot_depth),
+ hip_depth_ratio,foot_width_ratio, hip_thickness, foot_thickness);
+
+ add_flag(flagspace, flare,
+ .97, 1.00, 1.3, hip_thickness, foot_thickness);
+
+ add_flag(flagspace, flare,
+ 1.00, 1.00, 1.25, hip_thickness, foot_thickness);
+ add_flag(flagspace, flare,
+ .95, 1.05, 1.25, hip_thickness, foot_thickness);
+ pickup pencircle scaled stemthickness;
+ draw (0, 0) .. (0,-2 interline);
+fet_endchar;
+
+fet_beginchar("8th (down)", "d3", "deighthflag")
+ save flare,
+ hip_depth_ratio, hip_width,
+ foot_depth, foot_width_ratio;
+ save flagspace, total_depth, flag_count;
+
+ flag_count = 1;
+ flare# = .99 interline#;
+ flagspace# = .9 interline#;
+ hip_depth_ratio = .72 ;
+ hip_width# = downflag_width# - hip_thickness#/2;
+ total_depth# = 2.85 interline#;
+ (flag_count-1) * flagspace# + foot_depth# = total_depth#;
+
+ foot_width_ratio = .8;
+
+ set_char_box(stemthickness# /2, hip_width#
+ + stemthickness#/2,
+ total_depth# + foot_thickness#/2, stemthickness#/2)
+
+ define_pixels(flare, hip_width, hip_thickness,
+ flagspace,
+ foot_depth, foot_thickness);
+
+ draw_flag((stemthickness/2,- (flag_count-1) *flagspace), flare,
+ (hip_width, foot_depth),
+ hip_depth_ratio,foot_width_ratio, hip_thickness, foot_thickness);
+
+
+ pickup pencircle scaled stemthickness;
+ draw (0, 0) .. (0,-2 interline);
+ y_mirror_char;
+fet_endchar;
+
+fet_beginchar("16th (down)", "d4", "dsixteenthflag")
+ save flare,
+ hip_depth_ratio, hip_width,
+ foot_depth, foot_width_ratio;
+ save flagspace, total_depth, flag_count;
+
+ flag_count = 2;
+ flare# = .8 interline#;
+ flagspace# = .9 interline#;
+ hip_depth_ratio = .85 ;
+ hip_width# = downflag_width# - hip_thickness#/2;
+ total_depth# = 3.0 interline#;
+ (flag_count-1) * flagspace# + foot_depth# = total_depth#;
+
+ foot_width_ratio = .95;
+
+ set_char_box(stemthickness# /2, hip_width#
+ + stemthickness#/2,
+ total_depth# + foot_thickness#/2, stemthickness#/2)
+
+ define_pixels(flare, hip_width, hip_thickness,
+ flagspace,
+ foot_depth, foot_thickness);
+
+ draw_flag((stemthickness/2,- (flag_count-1) *flagspace), flare,
+ (hip_width, foot_depth),
+ hip_depth_ratio,foot_width_ratio, hip_thickness, foot_thickness);
+ add_flag(flagspace, flare,
+ .95, 1.00, 1.25, hip_thickness, foot_thickness);
+
+
+
+ pickup pencircle scaled stemthickness;
+ draw (0, 0) .. (0,-2 interline);
+ y_mirror_char;
+fet_endchar;
+
+fet_beginchar("32nd (down)", "d5", "dthirtysecondflag")
+ save flare,
+ hip_depth_ratio, hip_width,
+ foot_depth, foot_width_ratio;
+ save flagspace, total_depth, flag_count;
+
+ flag_count = 3;
+ flare# = .84 interline#;
+ flagspace# = .9 interline#;
+ hip_depth_ratio = .85 ;
+ hip_width# = downflag_width# - hip_thickness#/2;
+ total_depth# = 3.85 interline#;
+ (flag_count-1) * flagspace# + foot_depth# = total_depth#;
+
+ foot_width_ratio = .95;
+
+ set_char_box(stemthickness# /2, hip_width#
+ + stemthickness#/2,
+ total_depth# + foot_thickness#/2, stemthickness#/2)
+
+ define_pixels(flare, hip_width, hip_thickness,
+ flagspace,
+ foot_depth, foot_thickness);
+
+ draw_flag((stemthickness/2,- (flag_count-1) *flagspace), flare,
+ (hip_width, foot_depth),
+ hip_depth_ratio,foot_width_ratio, hip_thickness, foot_thickness);
+ add_flag(flagspace, flare,
+ .97, 1.00, 1.25, hip_thickness, foot_thickness);
+
+ add_flag(flagspace, flare,
+ .95, 1.05, 1.25, hip_thickness, foot_thickness);
+
+
+
+ pickup pencircle scaled stemthickness;
+ draw (0, 0) .. (0,-2 interline);
+ y_mirror_char;
+fet_endchar;
+fet_beginchar("64th (down)", "d6", "dsixtyfourthflag")
+ save flare,
+ hip_depth_ratio, hip_width,
+ foot_depth, foot_width_ratio;
+ save flagspace, total_depth, flag_count;
+
+ flag_count = 4;
+ flare# = .8 interline#;
+ flagspace# = .9 interline#;
+ hip_depth_ratio = .85 ;
+ hip_width# = downflag_width# - hip_thickness#/2;
+ total_depth# = 4.35 interline#;
+ (flag_count-1) * flagspace# + foot_depth# = total_depth#;
+
+ foot_width_ratio = .98;
+
+ set_char_box(stemthickness# /2, hip_width#
+ + stemthickness#/2,
+ total_depth# + foot_thickness#/2, stemthickness#/2)
+
+ define_pixels(flare, hip_width, hip_thickness,
+ flagspace,
+ foot_depth, foot_thickness);
+
+ draw_flag((stemthickness/2,- (flag_count-1) *flagspace), flare,
+ (hip_width, foot_depth),
+ hip_depth_ratio,foot_width_ratio, hip_thickness, foot_thickness);
+ add_flag(flagspace, flare,
+ .97, 1.20, 1.175, hip_thickness, foot_thickness);
+ add_flag(flagspace, flare,
+ .97, 1.10, 1.175, hip_thickness, foot_thickness);
+
+ add_flag(flagspace, flare,
+ .9, 1.03, 1.175, hip_thickness, foot_thickness);
+
+
+
+ pickup pencircle scaled stemthickness;
+ draw (0, 0) .. (0,-2 interline);
+ y_mirror_char;
+fet_endchar;
+fet_endgroup("flags");
save p;
path p;
p:=z1 -- z2 -- z3 -- z4 -- cycle;
- draw_rounded_path(p, blot_diameter);
+
+ filldraw p;
enddef;
fet_beginchar( "whole rest", "0", "wholerest");
currentpicture:=currentpicture shifted (0,interline);
fet_endchar;
-def tand(expr alpha) =
- (sind alpha/cosd alpha);
- enddef;
-
fet_beginchar("16th rest","4","sixteenthrest");
save alpha,cw,h,w;
alpha=74;
input feta-bolletjes;
input feta-schrift;
input feta-banier;
+% input feta-klef;
else:
-% input feta-bolletjes; input feta-banier;
- input feta-eindelijk;
+ input feta-bolletjes;
+ input feta-bant;
+% input feta-eindelijk;
+% input feta-klef;
+
fi
--- /dev/null
+
+fet_begingroup("klef");
+
+def draw_bass_clef(expr reduction, center) =
+ save thinness, left_shoot, reduced_il;
+ save left_fat, right_fat, dot_size, dot_sep;
+ save hip_factor;
+
+ left_shoot = 0.3;
+ left_fat = .3;
+ right_fat = .5;
+ dot_size = .4;
+ dot_sep = 1.2;
+ hip_factor = 0.95;
+ thinness = stafflinethickness;
+
+
+ reduced_il# = interline# * reduction;
+ define_pixels(reduced_il);
+ set_char_box(left_fat * reduced_il#,
+ (1 + hip_factor + right_fat/2)* reduced_il# +
+ (dot_sep+ 1) * dot_size *reduced_il#
+ , 2.5 reduced_il#, 1.0 reduced_il#)
+
+ z2 - z1 = (1.1 reduced_il, reduced_il);
+ z3 = (x2 + hip_factor* reduced_il, y1);
+ z4 - z1 = (- left_shoot * reduced_il, -2.5 reduced_il);
+
+ z1extreme = z1l - ( thinness/2, 0);
+ penpos1(left_fat* reduced_il , 0);
+ z1r = (center, 0);
+ z5 = (x3l + dot_sep * dot_size * interline, .5 interline);
+
+ %
+ % [Wanske] says that the extreme x point should be exactly between
+ % the dots, but her picture shows that the extreme is ~ 0.2 ss lower
+ % hence 170 (and not 180). (.2 is a big amount, but because of
+ % the near vertical shape, it is not very clear.
+ %
+ penpos3(right_fat * reduced_il, 180);
+
+ penlabels(1,3);
+ labels(2,4);
+
+
+ pickup pencircle scaled thinness;
+ filldraw z1r{up} .. z2{right} .. z3r{down} .. {curl 0} z4 {curl 0}
+ .. z3l{up} .. z2{left} .. z1l{down} -- cycle;
+
+ draw_bulb(1, z1r, z1extreme, 1.2 , 1.2);
+
+ pickup pencircle scaled (dot_size * interline);
+ draw z5;
+ draw z5 yscaled -1;
+
+enddef;
+
+
+fet_beginchar("F clef", "bass", "ughbassclef")
+ draw_bass_clef(1.0, .5 interline); % .5 -> silly hack to accomodate
+ % motex
+fet_endchar;
+
+fet_beginchar("reduced F clef", "bass_change", "ughcbassclef")
+ draw_bass_clef(.8, .5 interline);
+fet_endchar;
+
+fet_endgroup("klef");
endgroup;
enddef;
-def draw_rounded_path(expr p, thick) =
- push_pen(currentpen);
- fill p;
- pickup pencircle scaled thick;
- draw p;
- currentpen := pop_pen;
-enddef;
-
%
%
%
currentpicture := currentpicture scaled -1;
set_char_box(charwd, charbp, charht, chardp);
enddef;
+
+
+%
+% center_factor: typically .5, the larger, the larger the radius of the bulb
+% radius factor: how much the bulb curves inward
+%
+def draw_bulb(expr turndir, zl, zr, center_factor, radius_factor)=
+ begingroup;
+ clearxy;
+ save rad, ang;
+
+ ang = angle(zr-zl);
+ z0 = center_factor [zr, zl];
+ rad = length(zr - z0);
+
+ z1 = z0 + radius_factor* rad * dir(ang + turndir* 100);
+ z2 = z0 + rad * dir(ang + turndir*270);
+ labels(0,1,2);
+ fill zr{dir (ang + turndir* 90)} .. z1 .. z2 -- cycle;
+
+ endgroup
+enddef;
--- /dev/null
+% feta-nummer.mf
+% part of LilyPond's pretty-but-neat music font
+
+fet_begingroup("nummer")
+
+define_pixels(height,thick,norm,thin,hair);
+foot_top#:=2thin#;
+foot_width#:=2thick#+thin#;
+define_pixels(foot_top,foot_width);
+define_pixels(kuulleke);
+
+def calc_kuulleke(expr w,alpha) =
+ begingroup;
+ save beta; beta=(alpha-90)/2;
+ save gamma; gamma=(90+alpha)/2;
+
+ penpos1(w/cosd(alpha),alpha);
+ penpos2(hair,90+beta);
+ z2=z1l+(1/2hair/tand((alpha+90)/2))*dir(beta);
+
+ penpos3(hair,gamma-90);
+ z3=z1r-(1/2hair/tand((90-alpha)/2))*dir(gamma);
+ z4=z1+kuulleke*dir(alpha-90);
+ endgroup;
+ enddef;
+
+% should make generic macro?
+%
+def draw_foot(expr xpos) =
+ begingroup;
+ clearxy;
+ penpos1(thick,0);
+ z1=(xpos,foot_top);
+ penpos2(foot_width,0);
+ z2=(x1,0);
+ penpos3(hair,-90);
+ z3r=z2r;
+ penpos4(hair,90);
+ z4l=z2l;
+ z5=(x1,hair/2);
+ fill z1..{right}z1r{down}..{right}z3l..z3r{left}..z5..{left}z4l..z4r{right}..{up}z1l{right}..z1..cycle;
+ endgroup;
+ enddef;
+
+def draw_flare(expr pos,alpha,beta,line,flare) =
+ begingroup;
+ clearxy;
+ penpos1(line,180+beta+alpha);
+ z1r=pos;
+ penpos2(flare,180+beta+alpha);
+ z2=z3;
+ penpos3(flare,0+alpha);
+ z3l=z1r+(1/2+0.43)*flare*dir(alpha+beta);
+ z4=z2r-1/6flare*dir(alpha);
+ penlabels(1,2,3,4);
+ pickup pencircle;
+ save t; t=0.833;
+ fill z1r{dir(alpha)}..z3r{dir(180+alpha-beta)}..z2l{dir(alpha+180)}
+ ..z3l{dir(180+alpha+beta)}..tension t..z4{dir(180+alpha+beta)}..z1l{dir(alpha+180)}..cycle;
+ endgroup;
+ enddef;
+
+def draw_six =
+ set_char_box(0, 2thick#+2thin#, 0, height#);
+ message "w:"&decimal w;
+ message "h:"&decimal h;
+
+ penpos1(thin,90);
+ z1=(norm,h/2+thin);
+ penpos2(hair,90);
+ z2=(w/2,y1);
+ penpos3(norm-hair,0);
+ % yup, should use the path [] "everywhere"
+ z3r=(w,1/2[0,y1]);
+ penpos4(hair,-90);
+ z4r=(x2,0);
+ penpos5(norm-hair,180);
+ z5r=(0,y1);
+ penpos6(hair,90);
+ z6r=(w-norm,h);
+ penpos7(norm-hair,180);
+ z7r=(0,h/2);
+ penpos10(norm-hair,180);
+ z10r=(0,y3);
+ penlabels(1,2,3,4,5,6,7,8,9,10,11);
+ save t; t=0.833;
+ fill z5{right}..z2r{right}..z3r{down}..z4r{left}
+ ..tension t..z7r{up}..tension t..z6r{right}
+ ..z6l{left}..tension t..z7l{down}..z10l{up}..cycle;
+ draw_flare(z6r,0,-90,hair,norm);
+ unfill z2l{right}..tension t..z3l{down}..tension t
+ ..z4l{left}..tension t..z10l{up}..tension t..cycle;
+ enddef;
+
+fet_beginchar("Numeral 0", "0", "zero")
+ set_char_box(0, 3thick#, 0, height#);
+ message "w:"&decimal w;
+ message "h:"&decimal h;
+ penpos1(thin,90);
+ z1r=(w/2,h);
+ penpos2(thick,0);
+ z2r=(w,h/2);
+ penpos3(thin,-90);
+ z3r=(w/2,0);
+ penpos4(thick,180);
+ z4r=(0,h/2);
+ fill z1r..z2r..z3r..z4r..cycle;
+ save t; t=1.2;
+ unfill z1l..tension t..z2l..tension t..z3l..tension t..z4l..tension t..cycle;
+fet_endchar;
+
+fet_beginchar("Numeral 1", "1", "one")
+ set_char_box(0, 5/2thick#+thin#, 0, height#);
+ message "w:"&decimal w;
+ message "h:"&decimal h;
+
+ save alpha; alpha=0;
+ calc_kuulleke(thick,alpha);
+ z1=(thick+thick/2,height);
+
+ penpos5(thick,0);
+ z5=(x1,foot_top);
+
+ z6=(0,h/2);
+ save beta; beta=angle(z1l-z6);
+ penpos7(thin,beta-90);
+ z7l=z6;
+ penpos8(thin/cosd(beta),-90);
+ z8l=z1l;
+ penpos9(thin,beta-90);
+ z9r=z8r+(thin/cosd(beta))*(0,-1);
+ penlabels(1,2,3,4,5,6,7,8,9);
+ save gamma; gamma=angle(length(z1r-z1),+2kuulleke);
+ fill z2r{dir(alpha-gamma)}..z4..{dir(alpha+gamma)}z3l..z3r{down}..{down}z5r{left}..z5..{left}z5l{up}..{up}z2l..cycle;
+ fill z7l{dir(beta)}..{dir(beta)}z1l..z2r..z9r{up}..z9l{dir(180+beta)}..{dir(180+beta)}z7r..cycle;
+ penlabels(7,8,9);
+
+ draw_foot(x1);
+fet_endchar;
+
+fet_beginchar("Numeral 2", "2", "two")
+ set_char_box(0, 3thick#-thin#, 0, height#);
+ message "w:"&decimal w;
+ message "h:"&decimal h;
+ clearxy;
+ save alpha; alpha=-50;
+ save beta; beta=75;
+ penpos1(thin,90+beta);
+ z1=(0,0)+(1/2sqrt(2)*thin)*dir(45);
+ penpos3(hair,90+beta);
+ z3=(w,thick)+(1/2sqrt(2)*hair)*dir(-135);
+ penpos2(norm,90+alpha);
+ x2-x1=x3-x2; y2=thick/2+hair/2;
+ penlabels(1,2,3);
+ fill z1r{dir(beta)}..{dir(alpha)}z2r..{dir(beta)}z3r
+ ..z3l{dir(180+beta)}..{dir(180+alpha)}z2l
+ ..{dir(180+beta)}z1l..cycle;
+
+ penpos4(thin,90);
+ z4r=(thick,2/5h);
+ penpos5(norm,0);
+ z5r=(w-thin,.72h);
+ penpos6(thin,90);
+ z6r=(w/2-thin-hair,h);
+ penlabels(4,5,6);
+ fill z1l{dir(beta)}..z4l{dir(15)}..z5r{up}..z6r{left}
+ ..z6l{right}..z5l{down}..z4r{dir(180+15)}
+ ..{dir(180+beta)}z1r..cycle;
+ draw_flare(z6r,180,90,thin,thick);
+fet_endchar;
+
+fet_beginchar("Numeral 3", "3", "three")
+ set_char_box(0, 2thick#+2thin#, 0, height#);
+ message "w:"&decimal w;
+ message "h:"&decimal h;
+ penpos1(hair,-90);
+ z1l=(norm+hair/2,h);
+ penpos2(norm-hair,180);
+ z2l=(w-hair,3/4h+hair/2);
+ penpos3(hair,90);
+ z3=(w/2,h/2+hair);
+ penpos4(hair,90);
+ z4=(1/2norm+hair,y3);
+ penpos5(norm,0);
+ z5r=(w,1/4h+hair/2);
+ penpos6(hair,-90);
+ z6r=(norm+hair,0);
+ penpos7(thin+hair,90);
+ z7=(x2,y3);
+ penlabels(1,2,3,4,5,6,7);
+ save alpha; alpha=25;
+ save t; t=0.833;
+ fill z1l{right}..z2l{down}..z7r{dir(180+alpha)}
+ ..z7l{dir(-alpha)}..z5r{down}..z6r{left}
+ ..z6l{right}..tension t..z5l{up}
+ ..tension t..z3l{left}..z4l{left}
+ ..z4r{right}..z3r{right}..tension t..z2r{up}
+ ..tension t..z1r{left}..cycle;
+ draw_flare(z1l,180,90,hair,norm);
+ draw_flare(z6r,180,-90,hair,norm+hair);
+fet_endchar;
+
+fet_beginchar("Numeral 4", "4", "four")
+ set_char_box(0, 3/2thick#+6thin#, 0, height#);
+ message "w:"&decimal w;
+ message "h:"&decimal h;
+
+ save alpha; alpha=0;
+ calc_kuulleke(3/2thick,alpha);
+ z1r=(w-3thin,height);
+
+ z5=(thin,1/4height+thin);
+ save beta; beta=angle(z3r-z5);
+ penpos6(thin,-90);
+ z6l=z5;
+ penpos7(thin,-90);
+ y7=y6; x7=w-1/2thin;
+ penpos8(thin,-alpha);
+ z8r=z5;
+ penlabels(1,2,3,4,5,6,7);
+ save gamma; gamma=angle(length(z1r-z1),+2kuulleke);
+ fill z2r{dir(alpha-gamma)}..z4..{dir(alpha+gamma)}z3l..z3r{dir(180+beta)}..{dir(180+beta)}z8r{right}..{right}z7l..z7r{left}..{left}z6r..z8l{dir(beta)}..{up}z2l..cycle;
+
+ clearxy;
+
+ save alpha; alpha=beta;
+ calc_kuulleke(thick,alpha);
+ z1r=(w-3thin,height-(thin+hair)/cosd(alpha));
+
+ penpos5(thick,0);
+ z5=(x1,foot_top);
+
+ save gamma; gamma=angle(length(z1r-z1),+2kuulleke);
+ fill z2r{dir(alpha-gamma)}..z4..{dir(alpha+gamma)}z3l..z3r{down}..{down}z5r{left}..z5..{left}z5l{up}..{up}z2l..cycle;
+ penlabels(1,2,3,4,5);
+
+ draw_foot(x5);
+fet_endchar;
+
+fet_beginchar("Numeral 5", "5", "five")
+ set_char_box(0, 2thick#+thin#+hair#, 0, height#);
+ message "w:"&decimal w;
+ message "h:"&decimal h;
+ calc_kuulleke(w-thin,0);
+ z1=(w/2+thin/2,h);
+ save alpha; alpha=0;
+ penpos5(thin,0);
+ z5l=(x1l,h-norm);
+ penpos6(hair,90-45);
+ z6=z5r+1/2hair*dir(-45);
+ penpos7(thin,0);
+ z7l=(x1l,h/2+thin/2);
+ penlabels(1,2,3,4,5,6,7);
+ save gamma; gamma=angle(length(z1r-z1),+2kuulleke);
+ fill z2r{dir(alpha-gamma)}..z4..{dir(alpha+gamma)}z3l
+ ..z3r{dir(-135)}..{left}z6r..z6l{down}..z7r{down}
+ ..z7l{up}..{up}z2l..cycle;
+ penpos8(hair,90);
+ z8=z7r;
+ penpos9(hair,90);
+ z9l=(x11,y7+thin);
+ penpos10(norm,0);
+ z10r=(w,1/2[y9r,y11r]);
+ penpos11(hair,-90);
+ z11r=(norm+hair,0);
+ penlabels(8,9,10,11);
+ save beta; beta=45;
+ save t; t=0.833;
+ fill z8r{dir(beta)}..z9r{right}..z10r{down}..z11r{left}
+ ..z11l{right}..tension t..z10l{up}..tension t
+ ..z9l{left}..z8l{dir(180+beta)}..cycle;
+ draw_flare(z11r,180,-90,hair,norm+hair);
+fet_endchar;
+
+fet_beginchar("Numeral 6", "6", "six")
+ draw_six;
+fet_endchar;
+
+fet_beginchar("Numeral 7", "7", "seven")
+ set_char_box(0, 5/2thick#+thin#, 0, height#);
+ message "w:"&decimal w;
+ message "h:"&decimal h;
+
+ save alpha; alpha=-180;
+if true:
+ penpos1(3/2thick,180+alpha);
+ penpos2(hair,180+alpha-45);
+ z2=z1l+(1/4sqrt(2)*hair)*dir(alpha-135);
+ penpos3(hair,180+alpha+45);
+ z3=z1r+(1/4sqrt(2)*hair)*dir(alpha-45);
+ z4=z1+kuulleke*dir(alpha-90);
+else:
+ % shit, does not work
+ calc_kuulleke(3/2thick,-alpha);
+fi
+ z1l=(thin,0);
+
+ save beta; beta=50;
+ penpos5(thin,90+beta);
+ z5=(w,h)+(1/2sqrt(2)*thin)*dir(-135);
+
+ save gamma; gamma=angle(length(z1r-z1),+2kuulleke);
+ save delta; delta=12;
+ pickup pencircle;
+ fill z3l{dir(alpha-gamma)}..z4..{dir(alpha+gamma)}z2r..
+ z2l{dir(beta+delta)}..{dir(beta)}z5r
+ ..z5l{dir(180+beta)}..{dir(delta-90)}z3r..cycle;
+ penlabels(1,2,3,4,5);
+
+ clearxy;
+ save alpha; alpha=-50;
+ penpos1(2thin,90);
+ z1=(3/2thin,h-(thick+thin)/2);
+ penpos3(thin,90+beta);
+ z3=(w,h)+(1/2sqrt(2)*thin)*dir(-135);
+ penpos2(norm,90+alpha);
+ x2-x1=x3-x2; y2=h-thick/2;
+
+ penpos4(thin,0);
+ z4l=(0,h-thin/2);
+ penpos5(thin,0);
+ z5l=(0,h/2+thin/2);
+
+ penpos6(4thin,90);
+ z6r=(thin,y1r+thin/2);
+
+ fill z1r{dir(beta)}..{dir(alpha)}z2r..{dir(beta)}z3r
+ ..z3l{dir(180+beta)}..{dir(180+alpha)}z2l
+ ..{dir(180+beta)}z1l..z6l{down}..{down}z5r
+ ..z5l{up}..{up}z4l..z4r{down}..{down}z6r..{right}cycle;
+ penlabels(1,2,3,4,5,6);
+fet_endchar;
+
+fet_beginchar("Numeral 8", "8", "eight")
+ set_char_box(0, 2thick#+3thin#, 0, height#);
+ message "w:"&decimal w;
+ message "h:"&decimal h;
+ save alpha; alpha=60;
+ save beta; beta=alpha-15;
+ z1=(w/2,h/2+hair);
+ penpos2(hair,90+180+beta);
+ z2=(w/4,h/2+thin);
+ z3=(0,h/4+thin/2);
+ penpos4(hair,90);
+ z4l=(x1,0);
+ penpos5(norm,90+90+alpha);
+ z5=z1+w/4*dir(alpha-90);
+ penpos6(norm,90+90+alpha);
+ z6=z1+w/4*dir(90+alpha);
+ penpos7(hair,90);
+ z7r=(x1,h);
+ z8=(w-hair,3/4h+thin/2);
+ penpos9(hair,90+180+beta);
+ z9=(3/4w,h/2);
+ penlabels(1,2,3,4,5,6,7,8,9);
+ save t; t=0.85;
+ fill z2r{dir(180+beta)}..tension t..z4r{right}..z5r{dir(90+alpha)}..z6r{dir(90+alpha)}..tension t..z7r{right}..z8{down}..z9r{dir(180+beta)}..z9l{dir(beta)}..tension t..z7l{left}..z6l{dir(alpha-90)}..z5l{dir(alpha-90)}..tension t..z4l{left}..z3{up}..z2l{dir(beta)}..cycle;
+fet_endchar;
+
+fet_beginchar("Numeral 9", "9", "nine")
+ draw_six;
+% xy_mirror_char;
+ currentpicture := currentpicture scaled -1;
+ currentpicture := currentpicture shifted (w,h);
+fet_endchar;
+
+fet_endgroup("nummer")
+
--- /dev/null
+% feta-nummer10.mf
+% part of LilyPond's pretty-but-neat music font
+
+input autometric;
+
+fet_beginfont("feta-nummer", 10);
+
+mode_setup;
+
+test:=0;
+input feta-macros;
+
+height#:=designsize;
+%thick#:=height#/4;
+thick#:=8/30height#;
+%norm#:=3/4thick#;
+norm#:=7/8thick#;
+thin#:=thick#/4;
+hair#:=thin#/2;
+kuulleke#:=hair#;
+%kuulleke#:=0;
+
+input feta-nummer;
+
+fet_endfont("feta-nummer");
+
+end.
+
--- /dev/null
+% feta-nummer8.mf
+% part of LilyPond's pretty-but-neat music font
+
+input autometric;
+
+fet_beginfont("feta-nummer", 8);
+
+mode_setup;
+
+test:=0;
+input feta-macros;
+
+% copied from 10; will it work?
+height#:=designsize;
+%thick#:=height#/4;
+thick#:=8/30height#;
+%norm#:=3/4thick#;
+norm#:=7/8thick#;
+thin#:=thick#/4;
+hair#:=thin#/2;
+kuulleke#:=hair#;
+%kuulleke#:=0;
+
+input feta-nummer;
+
+fet_endfont("feta-nummer");
+
+end.
+
+++ /dev/null
-% feta-orator.mf
-% part of LilyPond's pretty-but-neat music font
-
-fet_begingroup("orator")
-
-height#:=designsize;
-thick#:=height#/4;
-thin#:=thick#/4;
-hair#:=thin#/2;
-kuulleke#:=thin#;
-
-define_pixels(height,thick,thin,hair);
-foot_top#:=2thin#;
-foot_width#:=2thick#+thin#;
-define_pixels(foot_top,foot_width);
-define_pixels(kuulleke);
-
-def draw_foot(expr xpos) =
- begingroup;
- clearxy;
- penpos1(thick,0);
- z1=(xpos,foot_top);
- penpos2(foot_width,0);
- z2=(x1,0);
- penpos3(hair,-90);
- z3r=z2r;
- penpos4(hair,90);
- z4l=z2l;
- z5=(x1,hair/2);
- fill z1..{right}z1r{down}..{right}z3l..z3r{left}..z5..{left}z4l..z4r{right}..{up}z1l{right}..z1..cycle;
- endgroup;
-enddef;
-
-fet_beginchar("Numeral 0", "0", "zero")
- set_char_box(0, 3thick#, 0, height#);
- penpos1(thin,90);
- z1r=(w/2,h);
- penpos2(thick,0);
- z2r=(w,h/2);
- penpos3(thin,-90);
- z3r=(w/2,0);
- penpos4(thick,180);
- z4r=(0,h/2);
- fill z1r..z2r..z3r..z4r..cycle;
- unfill z1l..tension1.2..z2l..tension1.2..z3l..tension1.2..z4l..tension1.2..cycle;
-fet_endchar;
-
-fet_beginchar("Numeral 1", "1", "one")
- set_char_box(0, 5/2thick#+thin#, 0, height#);
- penpos1(thick,0);
- z1=(thick+thick/2,height);
- penpos2(hair,45);
- z2=z1l+(1/4sqrt(2)*hair)*(1,-1);
- penpos3(hair,-45);
- z3=z1r+(1/4sqrt(2)*hair)*(-1,-1);
- x4=x1; y4=y1-kuulleke;
-
- penpos5(thick,0);
- z5=(x1,foot_top);
-
- z6=(0,h/2);
- save alpha; alpha=angle(z1l-z6);
- penpos7(thin,alpha-90);
- z7l=z6;
- penpos8(thin/cosd(alpha),-90);
- z8l=z1l;
- penpos9(hair,alpha-90);
- z9r=z8r+(hair/cosd(alpha))*(0,-1);
- fill z2r{(1,-1)}..z4..{(1,1)}z3l..z3r{down}..{down}z5r{left}..z5..{left}z5l{up}..{up}z2l..cycle;
-% fill z7l{dir(alpha)}..{dir(alpha)}z2l{down}..z9r{up}..z9l{dir(180+alpha)}..{dir(180+alpha)}z7r..cycle;
- fill z7l{dir(alpha)}..{dir(alpha)}z1l..z2r..z9r{up}..z9l{dir(180+alpha)}..{dir(180+alpha)}z7r..cycle;
- penlabels(7,8,9);
-
- draw_foot(x1);
-fet_endchar;
-
-fet_beginchar("Numeral 4", "4", "four")
- set_char_box(0, 5/2thick#+3thin#, 0, height#);
- penpos1(3/2thick,0);
- z1r=(w-3thin,height);
- z2=(thin,1/4height+thin);
- penpos3(hair,45);
- z3=z1l+(1/4sqrt(2)*hair)*(1,-1);
- penpos4(hair,-45);
- z4=z1r+(1/4sqrt(2)*hair)*(-1,-1);
- x5=x1; y5=y1-kuulleke;
- save alpha; alpha=angle(z4r-z2);
- penpos6(thin,-90);
- z6l=z2;
- penpos7(thin,-90);
- y7=y6; x7=w-1/2thin;
- penpos8(thin,-alpha);
- z8r=z2;
- fill z3r{(1,-1)}..z5..{(1,1)}z4l..z4r{dir(180+alpha)}..{dir(180+alpha)}z8r{right}..{right}z7l..z7r{left}..{left}z6r..z8l{dir(alpha)}..{up}z3l..cycle;
- penlabels(1,2,3,4,5,6,7);
-
- clearxy;
- penpos1(thick/cosd(alpha),alpha);
- % ugh, must be just > foot_width/2!
- z1r=(w-3thin,height-(thin+hair)/cosd(alpha));
- penpos2(hair,alpha+45);
- z2=z1l+(1/4sqrt(2)*hair)*dir(alpha-45);
- penpos3(hair,alpha-45);
- z3=z1r+(1/4sqrt(2)*hair)*dir(alpha-135);
- z4=z1+kuulleke*dir(alpha-90);
-
- % ugh
- % the angle alpha may just let the hair penposes 3 and 4
- % stick-out to the right of the vertical...
-% penpos5(thick,0);
-% z5=(x1,foot_top);
- penpos5(whatever,0);
- x5r-x5l=x3r-x2l; x5r=x3r; y5=foot_top;
-
- fill z2r{dir(alpha-45)}..z4..{dir(alpha+45)}z3l..z3r{down}..{down}z5r{left}..z5..{left}z5l{up}..{up}z2l..cycle;
- penlabels(1,2,3,4,5);
-
- draw_foot(x5);
-fet_endchar;
-
-fet_endgroup("orator")
+++ /dev/null
-% feta-orator20.mf
-% part of LilyPond's pretty-but-neat music font
-
-input autometric;
-fet_beginfont("feta-orator", 10);
-
-mode_setup;
-
-input feta-orator;
-
-fet_endfont("feta-orator");
-
-end.
-
xy_mirror_char;
fet_endchar;
+%
+% used in french horn music todo
+%
+% TODO: too light at 20pt
fet_beginchar("open (unstopped)", "open", "ouvert")
save thin, height, width, thick;
height# = 5/4 width#;
x4 = x3;
save p;
path p;
- p := z1 -- z2 -- z3 -- z4 --cycle;
- draw_rounded_path(p, blot_diameter);
+ filldraw z1 -- z2 -- z3 -- z4 --cycle;
+
pickup pencircle scaled stemthick;
bot y5 =0;
fet_endchar;
-
-
-def draw_bulb(expr zl, zr, center_factor, radius_factor)=
- begingroup;
- clearxy;
- save rad, ang;
-
- ang = angle(zr-zl);
- z0 = center_factor [zr, zl];
- rad = center_factor * length(zr-zl);
-
- z1 = z0 + radius_factor* rad * dir(ang - 100);
- z2 = z0 + rad * dir(ang - 270);
- labels(0,1,2);
- fill zr{dir (ang - 90)} .. z1 .. z2 -- cycle;
-
- endgroup
-enddef;
%
% Inspired by a (by now) PD edition of Durand & C'ie edition of
fill z11r{dir 70} .. z13r{down} -- z13l{up} .. z11l{dir 250} -- cycle;
penlabels(range 1 thru 15);
- draw_bulb(z13r, z13l, bulb_size, 1.5);
+ draw_bulb(-1, z13r, z13l, bulb_size, 1.5);
fet_endchar;
fet_beginchar("organ-heel", "pedalheel", "pedalheel")
+ vspan -- -hspan -vspan -- hspan - vspan -- cycle )
shifted center;
- draw_rounded_path((beam shifted (0,-interbeam/2)), roundness);
- draw_rounded_path((beam shifted (0,interbeam/2)), roundness);
+ pickup pencircle scaled roundness;
+ filldraw (beam shifted (0,-interbeam/2));
+ filldraw (beam shifted (0,interbeam/2));
pickup pencircle scaled stemwidth;
x3 = x4 = xpart center;
z5 = z1 reflectedabout((0,0), (1,1));
labels(1,2,3,4,5);
- draw_rounded_path(
- z1{dir 45} .. {right}z2 -- z3 -- z4{down} .. {dir 225}z5 .. cycle,
- 1/20 interline);
+ pickup pencircle scaled 1/20 interline;
+ filldraw
+ z1{dir 45} .. {right}z2 -- z3 --
+ z4{down} .. {dir 225}z5 .. cycle;
+
addto currentpicture also currentpicture yscaled (-d/h);
addto currentpicture also currentpicture xscaled (-1);
\def\fetsixteendefs{
\font\fontentja=font-en-tja16
\font\vetfont=vette-beams16
+ \font\fetanummer=feta-nummer8
}
\def\fettwentydefs{
\font\fontentja=font-en-tja20
\font\vetfont=vette-beams20
+ \font\fetanummer=feta-nummer10
}
% \def\fetdef#1#2{\def#1{\fetchar{#2}}}
\def\beamslope#1#2{{\count0=#2\advance\count0 by#1
\advance\count0by128
{\vetfont\char\count0}}}
+
+% stacked numbers; overrules def in lilyponddefs
+% oeps: \meter 12/8;
+\def\generalmeter#1#2{%
+ \vbox to 0pt{\vss%
+ \hbox to0.42\balkheight{\hss\fetanummer\char#1\hss}%
+ \nointerlineskip%
+ \hbox to0.42\balkheight{\hss\fetanummer\char#2\hss}%
+ \vss}}
% generated automatically by mf-to-table.py version 0.4
-% on Mon Oct 20 23:14:01 1997
+% on Mon Oct 27 02:45:17 1997
% Do not edit
% input from out/font-en-tja16.log
% name
% flags
\fetdef\eighthflag{38}
-\fetdef\deighthflag{39}
-\fetdef\sixteenthflag{40}
-\fetdef\dsixteenthflag{41}
-\fetdef\thirtysecondflag{42}
-\fetdef\dthirtysecondflag{43}
-\fetdef\sixtyfourthflag{44}
+\fetdef\sixteenthflag{39}
+\fetdef\thirtysecondflag{40}
+\fetdef\sixtyfourthflag{41}
+\fetdef\deighthflag{42}
+\fetdef\dsixteenthflag{43}
+\fetdef\dthirtysecondflag{44}
\fetdef\dsixtyfourthflag{45}
% generated automatically by mf-to-table.py version 0.4
-% on Mon Oct 20 23:14:08 1997
+% on Mon Oct 27 02:45:24 1997
% Do not edit
% input from out/font-en-tja20.log
% name
% flags
\fetdef\eighthflag{38}
-\fetdef\deighthflag{39}
-\fetdef\sixteenthflag{40}
-\fetdef\dsixteenthflag{41}
-\fetdef\thirtysecondflag{42}
-\fetdef\dthirtysecondflag{43}
-\fetdef\sixtyfourthflag{44}
+\fetdef\sixteenthflag{39}
+\fetdef\thirtysecondflag{40}
+\fetdef\sixtyfourthflag{41}
+\fetdef\deighthflag{42}
+\fetdef\dsixteenthflag{43}
+\fetdef\dthirtysecondflag{44}
\fetdef\dsixtyfourthflag{45}
\ledgerlinethickness=2\staffrulethickness
}
+% stacked numbers; may be overruled in fetdefs
+\def\generalmeter#1#2{\vbox to 0pt{\vss\hbox{\meterfont
+ #1}\nointerlineskip
+ \hbox{\meterfont #2}\vss}}
+
+% stacked horizontal lines
\input dyndefs
\def\hslurcharh#1{{\hslurhfont\char#1}}
\def\hslurcharu#1{{\hslurufont\char#1}}
\def\hslurchard#1{{\hslurdfont\char#1}}
-% stacked numbers
-\def\generalmeter#1#2{\vbox to 0pt{\vss\hbox{\meterfont
- #1}\nointerlineskip
- \hbox{\meterfont #2}\vss}}
-% stacked horizontal lines
\def\lines#1#2#3{%
\vbox{\kern-\interstaffrule
\n=0\nointerlineskip%