Document Really Ugly Bugs (coredumps, assert fails, etc)
-[Solaris, fixed in pl13]
-
-Stack frame overwrite on Solaris 2.x (this will produce a seg
-fault, signal 11). Stacktrace
-
- Engraver_group_engraver::Engraver_group_engraver(int)
- Score_engraver::Score_engraver( )
- get_group_engraver_p()
-
-We don't know a fix or workaround, but compiling without optimisation
-might help (Without -O2 optimisation, my execs run fine on Solaris;
-without -O2, but with purify, it dumps core)
-
[Linux Intel]
I get bitten by this every once in a while, and I am very interested
-in hints what might be wrong.
+in hints what might be wrong. This problem has only been identified
+with libc-5.3 and libc-5.4 platforms, so you might try upgrading to
+6.0, ie. GNU libc-2.
+
+
=head1 DESCRIPTION
-GNU LilyPond is a program which converts music definition files into
-visual or auditive output: it can typeset formatted sheet music to a
-TeX file and and (mechanical) performances to MIDI files.
+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 MIDI file.
This is not a Fanmail/Hype page. These pages were entirely created from
the LilyPond package-sources.
=head1 DESCRIPTION
-GNU LilyPond is a program which converts music definition files into
-visual or auditive output: it can typeset formatted sheet music to a
-TeX file and play (mechanical) performances to MIDI files.
+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 MIDI file.
=head1 OPTIONS
are entered as follows:
\begin[verbatim,fragment]{mudela}
a-^ % marcato, direction: default
- a^- % portato, direction: above note
+ %a^- % portato, direction: above note
a_. % staccato, direction: below note
a^\fermata % predefined identifier
c_"marcato" % add a text
+pl 20
+ - don't swallow non lyric-stuff in lyrics
+ - x-position of Stem
+ - more feta changes
+ - move scripts to right
+ - genheader.py replaces genheader.perl
+
+pl 19.jcn2
+ - bf's mi2mu:
+ * Midi_track_parser::note_end_all
+ * staff output uses key, meter, tempo read
+ * command line read minor key
+ * minor key notenames
+
+pl 19.jcn1
+ - small changes to sharp, fermata
+ - small changes to lilypond.lsm+doc, lelievijver.lsm
+ - mi2mu updeet + bf
+
pl 19
- bf: keyword.cc rm'd struct defs
- dots: support for feta dots.
7. CAVEATS
-Please read the file BUGS for some ugly bugs. This especially
-applies to Solaris 2.x and Linux-Intel unix users.
+Please read the file BUGS for some ugly bugs. This especially applies
+Linux-Intel unix users.
Most of the items are marked in the code as well, with full explanation.
grep for TODO and ugh/ugr
- * adapt Script for new font conventions
+ * accidental placement
- * AFM for font input.
+ * bar-checking lyrics.
+
+ * check IO error on writing (disk full?)
+
+ * AFM for font input?
* Make general "spanning"-elements and "placer"-elements
- MIDI instrument
- staff title
- * check out egcs
-
* give Items/Spanners access to unbroken originals
* Score_bar/Piano_braces, are *not* ordinary bars
TOPLEVEL_MAJOR_VERSION = 0
TOPLEVEL_MINOR_VERSION = 1
-TOPLEVEL_PATCH_LEVEL = 19
+TOPLEVEL_PATCH_LEVEL = 20
TOPLEVEL_MY_PATCH_LEVEL =
# use the above to send patches, always empty for released version:
--- /dev/null
+#!@PYTHON@
+
+#
+# genheader.py -- do headers (like these)
+#
+# source file of the GNU LilyPond music typesetter
+#
+# (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+#
+
+
+
+import posix
+import pwd
+import regex
+import regsub
+import string
+import sys
+import os
+import getopt
+
+class My_options:
+ def __init__(self):
+ self.commentify = None
+ self.add_hdr_def = 0
+ self.classname = ''
+
+my_options = My_options()
+
+def mail():
+ return os.environ['MAILADDRESS']
+
+def name():
+ return pwd.getpwuid(posix.getuid())[4]
+
+def c_commentify(str):
+ return '/* ' + regsub.gsub('^',' ', str) + '\n */';
+
+def sh_commentify(str):
+ return regsub.gsub('^', '# ', str)
+
+def tex_commentify(str):
+ return regsub.gsub('^', '% ', str)
+
+def project_str():
+ cwd = posix.getcwd()
+ if regex.search('flower', cwd) <> -1:
+ PROJECT = "the Flower Library"
+ elif regex.search('mf$', cwd) <> -1:
+ PROJECT = "the Feta (Font-En-Tja) music font"
+ else:
+ PROJECT = "the GNU LilyPond music typesetter"
+ return PROJECT
+
+def head_str(filename):
+ if my_options.add_hdr_def:
+ what = "declare "
+ else:
+ what=" implement "
+
+
+ headstr = '\n%s -- %s\n\nsource file of %s\n\n(c) 1997 %s <%s>\n' \
+ %(filename, what, project_str(), name(), mail())
+ return headstr
+
+
+def c_include(filename):
+ startdef= filename;
+ trans = string.maketrans( string.lowercase + '.', string.uppercase + '_')
+ startdef = string.translate(filename, trans)
+
+
+ headstr = "\n\n#ifndef %s\n#define %s\n" % (startdef, startdef)
+ terminatestr = "#endif /* %s */\n" % (startdef);
+
+ return headstr+ '\n\n'+ terminatestr;
+
+
+
+
+
+(options, files) = getopt.getopt(sys.argv[1:], 'tcsh', ['class'])
+
+for opt in options:
+ o = opt[0]
+ a = opt[1]
+ if o == '-c':
+ my_options.commentify = c_commentify
+ elif o == '-t':
+ my_options.commentify = tex_commentify
+ elif o == '-s':
+ my_options.commentify = sh_commentify
+ elif o == '-h':
+ my_options.add_hdr_def = 1
+ elif o == '--class':
+ my_options.classname = a
+
+
+
+#
+# FIXME: should create xxx.cc and include/xxx.hh, with implement/declare Xxx
+# in one run
+if my_options.classname:
+ pass
+
+def do_file(nm):
+ s = my_options.commentify(head_str(nm))
+ if my_options.add_hdr_def:
+ s = s + c_include(nm)
+ return s
+
+
+def extension(ext,nm):
+ ext = '\.' + ext
+ return regex.search(ext, nm) <> -1
+
+def select_commentification(nm):
+ if extension('hh',nm) or extension('cc',nm):
+ return c_commentify
+ elif extension('py',nm) or extension('pl',nm) or extension('sh',nm):
+ return sh_commentify
+ elif extension('mf',nm) or extension('tex',nm) or extension('ly',nm):
+ return tex_commentify
+ else:
+ raise 'help'
+
+for nm in files:
+ if extension('hh', nm):
+ my_options.add_hdr_def = 1
+ if my_options.commentify == None:
+ my_options.commentify = select_commentification(nm)
+ print do_file(nm)
"gallina",
"twinkle",
"collisions",
- "scales",
+ "font",
+ #"scales",
"rhythm",
"multi" );
#!@PYTHON@
+#
+# mf-deps.py -- dependencies for metafont
+#
+# source file of the GNU LilyPond music typesetter
+#
+# (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+#
+
+
"""look into metafont source for dependencies.
fixme: python path
#!@PYTHON@
+#
+# mf-to-table.py -- convert spacing info in MF logs .ly and .tex
+#
+# source file of the GNU LilyPond music typesetter
+#
+# (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+#
+
import getopt
from string import *
import regex
import os
import sys
import time
+
begin_autometric_re = regex.compile('@{')
end_autometric_re = regex.compile('@}')
autometric_re = regex.compile('@{\([^@]*\)@}')
\consists "Lyric_engraver";
\consists "Line_group_engraver";
- \consists "Swallow_engraver";
+ %\consists "Swallow_engraver";
}
Lyrics = \translator {
-% generated automatically by mf-to-table.py version 0.3
+% generated automatically by mf-to-table.py version 0.3
+% on Wed Oct 8 16:18:13 1997
% Do not edit
% input from out/font-en-tja16.log
% name=\symboltables {
"rests" = \table {
- "0" "\wholerest" -0.00\pt 6.00\pt 2.00\pt 4.00\pt
- "1" "\halfrest" -0.00\pt 6.00\pt -0.00\pt 2.00\pt
- "0o" "\outsidewholerest" -2.00\pt 8.00\pt 2.00\pt 4.00\pt
- "1o" "\outsidehalfrest" -2.00\pt 8.00\pt -0.00\pt 2.00\pt
+ "0" "\wholerest" -0.00\pt 6.00\pt 1.50\pt 4.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
"2" "\quartrest" -0.00\pt 4.00\pt 3.00\pt 14.00\pt
"3" "\eighthrest" -0.00\pt 5.33\pt 4.00\pt 11.47\pt
"4" "\sixteenthrest" -0.00\pt 5.33\pt -0.00\pt 11.47\pt
"dot" "\dot" -0.00\pt 1.80\pt -0.90\pt 0.90\pt
}
"balls" = \table {
- "0" "\wholeball" -0.00\pt 8.28\pt -2.30\pt 2.30\pt
- "1" "\halfball" -0.00\pt 5.76\pt -2.30\pt 2.30\pt
- "2" "\quartball" -0.00\pt 5.52\pt -2.30\pt 2.30\pt
- "-1" "\breveball" -0.00\pt 8.00\pt -2.00\pt 2.00\pt
- "-2" "\longaball" -0.00\pt 8.00\pt -2.00\pt 2.00\pt
+ "-1" "\brevisball" -0.00\pt 8.00\pt -2.20\pt 2.20\pt
+ "-2" "\longaball" -0.00\pt 8.00\pt -2.20\pt 2.20\pt
+ "0" "\wholeball" -0.00\pt 7.92\pt -2.20\pt 2.20\pt
+ "1" "\halfball" -0.00\pt 5.51\pt -2.20\pt 2.20\pt
+ "2" "\quartball" -0.00\pt 5.28\pt -2.20\pt 2.20\pt
}
"foobars" = \table {
- "ufermata" "\ufermata" -6.20\pt 6.20\pt -0.00\pt 6.80\pt
- "dfermata" "\dfermata" -6.20\pt 6.20\pt -6.80\pt 0.00\pt
- "accent" "\accent" -3.60\pt 3.60\pt -2.00\pt 2.00\pt
+ "ufermata" "\ufermata" -6.30\pt 6.30\pt -0.00\pt 6.80\pt
+ "dfermata" "\dfermata" -6.30\pt 6.30\pt -6.80\pt 0.00\pt
+ "accent" "\sforzatoaccent" -3.60\pt 3.60\pt -2.00\pt 2.00\pt
"staccato" "\staccato" -0.50\pt 0.50\pt -0.50\pt 0.50\pt
"ustaccatissimo" "\ustaccatissimo" -0.80\pt 0.80\pt -0.20\pt 4.00\pt
"dstaccatissimo" "\dstaccatissimo" -0.80\pt 0.80\pt -4.00\pt 0.20\pt
"tenuto" "\tenuto" -3.60\pt 3.60\pt -0.24\pt 0.24\pt
"umarcato" "\umarcato" -2.00\pt 2.00\pt -0.00\pt 4.40\pt
"dmarcato" "\dmarcato" -2.00\pt 2.00\pt -4.40\pt 0.00\pt
+ "open" "\ouvert" -1.40\pt 1.40\pt -0.00\pt 3.50\pt
+ "stopped" "\plusstop" -2.20\pt 2.20\pt -2.20\pt 2.20\pt
+ "upbow" "\upbow" -2.60\pt 2.60\pt -0.00\pt 7.80\pt
+ "downbow" "\downbow" -3.50\pt 3.50\pt -0.00\pt 4.00\pt
+ "turn" "\turn" -4.38\pt 4.38\pt -2.12\pt 2.12\pt
+ }
+ "floogbars" = \table {
+ "3u" "\eighthflag" -0.20\pt 5.17\pt -12.77\pt 0.20\pt
+ "3d" "\deighthflag" -0.20\pt 5.17\pt -0.20\pt 12.77\pt
}
% } % $name
-% generated automatically by mf-to-table.py version 0.3
+% generated automatically by mf-to-table.py version 0.3
+% on Wed Oct 8 16:18:16 1997
% Do not edit
% input from out/font-en-tja20.log
% name=\symboltables {
"rests" = \table {
- "0" "\wholerest" -0.00\pt 7.50\pt 2.50\pt 5.00\pt
- "1" "\halfrest" -0.00\pt 7.50\pt -0.00\pt 2.50\pt
- "0o" "\outsidewholerest" -2.50\pt 10.00\pt 2.50\pt 5.00\pt
- "1o" "\outsidehalfrest" -2.50\pt 10.00\pt -0.00\pt 2.50\pt
+ "0" "\wholerest" -0.00\pt 7.50\pt 1.88\pt 5.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
"2" "\quartrest" -0.00\pt 5.00\pt 3.75\pt 17.50\pt
"3" "\eighthrest" -0.00\pt 6.67\pt 5.00\pt 14.33\pt
"4" "\sixteenthrest" -0.00\pt 6.67\pt -0.00\pt 14.33\pt
"dot" "\dot" -0.00\pt 2.25\pt -1.13\pt 1.13\pt
}
"balls" = \table {
- "0" "\wholeball" -0.00\pt 10.35\pt -2.88\pt 2.88\pt
- "1" "\halfball" -0.00\pt 7.20\pt -2.88\pt 2.88\pt
- "2" "\quartball" -0.00\pt 6.91\pt -2.88\pt 2.88\pt
- "-1" "\breveball" -0.00\pt 10.00\pt -2.50\pt 2.50\pt
- "-2" "\longaball" -0.00\pt 10.00\pt -2.50\pt 2.50\pt
+ "-1" "\brevisball" -0.00\pt 10.00\pt -2.75\pt 2.75\pt
+ "-2" "\longaball" -0.00\pt 10.00\pt -2.75\pt 2.75\pt
+ "0" "\wholeball" -0.00\pt 9.90\pt -2.75\pt 2.75\pt
+ "1" "\halfball" -0.00\pt 6.89\pt -2.75\pt 2.75\pt
+ "2" "\quartball" -0.00\pt 6.61\pt -2.75\pt 2.75\pt
}
"foobars" = \table {
- "ufermata" "\ufermata" -7.75\pt 7.75\pt -0.00\pt 8.50\pt
- "dfermata" "\dfermata" -7.75\pt 7.75\pt -8.50\pt 0.00\pt
- "accent" "\accent" -4.50\pt 4.50\pt -2.50\pt 2.50\pt
+ "ufermata" "\ufermata" -7.88\pt 7.88\pt -0.00\pt 8.50\pt
+ "dfermata" "\dfermata" -7.88\pt 7.88\pt -8.50\pt 0.00\pt
+ "accent" "\sforzatoaccent" -4.50\pt 4.50\pt -2.50\pt 2.50\pt
"staccato" "\staccato" -0.63\pt 0.63\pt -0.63\pt 0.63\pt
"ustaccatissimo" "\ustaccatissimo" -1.00\pt 1.00\pt -0.20\pt 5.00\pt
"dstaccatissimo" "\dstaccatissimo" -1.00\pt 1.00\pt -5.00\pt 0.20\pt
"tenuto" "\tenuto" -4.50\pt 4.50\pt -0.30\pt 0.30\pt
"umarcato" "\umarcato" -2.50\pt 2.50\pt -0.00\pt 5.50\pt
"dmarcato" "\dmarcato" -2.50\pt 2.50\pt -5.50\pt 0.00\pt
+ "open" "\ouvert" -1.75\pt 1.75\pt -0.00\pt 4.38\pt
+ "stopped" "\plusstop" -2.75\pt 2.75\pt -2.75\pt 2.75\pt
+ "upbow" "\upbow" -3.25\pt 3.25\pt -0.00\pt 9.75\pt
+ "downbow" "\downbow" -4.38\pt 4.38\pt -0.00\pt 5.00\pt
+ "turn" "\turn" -5.47\pt 5.47\pt -2.65\pt 2.65\pt
+ }
+ "floogbars" = \table {
+ "3u" "\eighthflag" -0.25\pt 6.46\pt -15.91\pt 0.25\pt
+ "3d" "\deighthflag" -0.25\pt 6.46\pt -0.25\pt 15.91\pt
}
% } % $name
lftoe = \script { "ftoe" 0 0 -1 0 0 }
rftoe = \script { "ftoe" 0 0 1 0 0 }
turn = \script { "turn" 0 0 1 0 0 }
+open = \script { "open" 0 0 1 0 0 }
%
% left toe: right heel:
% index TeXstring, xmin xmax ymin ymax
"scripts" = \table {
+ "stopped" "\plusstop" -2.20\pt 2.20\pt -2.20\pt 2.20\pt
+ "open" "\ouvert" -1.07\pt 1.07\pt -0.00\pt 2.67\pt
"fermata" "\ufermata" 0.0\pt 0.0\pt 0.0\pt 6.0\pt
"-fermata" "\dfermata" 0.0\pt 0.0\pt -6.0\pt 0.0\pt
"portato" "\portato" 0.0\pt 4.0\pt 0.0\pt 2.0\pt
"-portato" "\iportato" 0.0\pt 4.0\pt -2.0\pt 0.0\pt
"tenuto" "\utenuto" 0.0\pt 4.0\pt -1.0\pt 1.0\pt
"-tenuto" "\dtenuto" 0.0\pt 4.0\pt -1.0\pt 1.0\pt
- "sforzato" "\accent" -0.8\pt 4.0\pt -1.92\pt 1.92\pt
+ "sforzato" "\sforzatoaccent" -0.8\pt 4.0\pt -1.92\pt 1.92\pt
"marcato" "\umarcato" 0.0\pt 4.0\pt 0.0\pt 4.0\pt
"-marcato" "\dmarcato" 0.0\pt 4.0\pt -4.0\pt 0.0\pt
"staccato" "\staccato" 0.0\pt 0.0\pt -1.1\pt 1.1\pt
"half" "\hslurchar%{%}"
}
- "accidentals" = \table {
- "-2" "\flatflat" 0.0\pt 8.16\pt -2.5\pt 7.5\pt
- "-1" "\flat" 0.0\pt 4.8\pt -2.5\pt 7.5\pt
- "0" "\natural" 0.0\pt 4.0\pt -6.\pt 6.\pt
- "1" "\sharp" 0.0\pt 4.4\pt -6.\pt 6.\pt
- "2" "\sharpsharp" 0.0\pt 4.8\pt -2.5\pt 7.5\pt
- }
-
"streepjes" = \table {
- "toplines" "\toplines{%}{%}" -1.0\pt 7.0\pt 0.0\pt 0.0\pt
- "botlines" "\botlines{%}{%}" -1.0\pt 7.0\pt 0.0\pt 0.0\pt
+ "toplines" "\topledgerlines{%}{%}" -1.0\pt 7.0\pt 0.0\pt 0.0\pt
+ "botlines" "\botledgerlines{%}{%}" -1.0\pt 7.0\pt 0.0\pt 0.0\pt
}
"bars" = \table {
}
"beamslopes" = \table {
- "slope" "\beamslope{%}{%}" 2.0\pt 64.0\pt 0.0\pt 0.0\pt
+ "slope" "\beamslope{%}{%}" 2.0\pt 64.0\pt 0.0\pt 0.0\pt
"horizontal" "\rulesym{%}{%}"
}
- % ugh what's our outdir called?
\include "font-en-tja16.ly"
-
-
}
% index TeXstring, xmin xmax ymin ymax
"scripts" = \table {
- "fermata" "\ufermata" 0.0\pt 0.0\pt 0.0\pt 6.0\pt
+ "open" "\ouvert" -1.33\pt 1.33\pt -0.00\pt 3.33\pt
+ "stopped" "\plusstop" -2.75\pt 2.75\pt -2.75\pt 2.75\pt
+ "fermata" "\ufermata" 0.0\pt 0.0\pt 0.0\pt 6.0\pt
"-fermata" "\dfermata" 0.0\pt 0.0\pt -6.0\pt 0.0\pt
"portato" "\portato" 0.0\pt 4.0\pt 0.0\pt 2.0\pt
"-portato" "\iportato" 0.0\pt 4.0\pt -2.0\pt 0.0\pt
"tenuto" "\utenuto" 0.0\pt 4.0\pt -1.0\pt 1.0\pt
"-tenuto" "\dtenuto" 0.0\pt 4.0\pt -1.0\pt 1.0\pt
- "sforzato" "\accent" -0.8\pt 4.0\pt -1.92\pt 1.92\pt
+ "sforzato" "\sforzatoaccent" -0.8\pt 4.0\pt -1.92\pt 1.92\pt
"marcato" "\umarcato" 0.0\pt 4.0\pt 0.0\pt 4.0\pt
"-marcato" "\dmarcato" 0.0\pt 4.0\pt -4.0\pt 0.0\pt
"staccato" "\staccato" 0.0\pt 0.0\pt -1.1\pt 1.1\pt
}
"streepjes" = \table {
- "toplines" "\toplines{%}{%}" -3.0\pt 9.0\pt 0.0\pt 0.0\pt
- "botlines" "\botlines{%}{%}" -3.0\pt 9.0\pt 0.0\pt 0.0\pt
+ "toplines" "\topledgerlines{%}{%}" -3.0\pt 9.0\pt 0.0\pt 0.0\pt
+ "botlines" "\botledgerlines{%}{%}" -3.0\pt 9.0\pt 0.0\pt 0.0\pt
}
"bars" = \table {
\header{
enteredby jcn
copyright PD
-TestedFeatures font-en-tja
+TestedFeatures This file tests the Feta music-font
+ (Feta definitively is not an abbreviation of Font-En-TjA)
}
\version "0.1.6";
\melodic{
\octave c';
\meter 4/4;
- a\longa
- a\breve |
+ \multi 2 < { \stemup g''\longa a''\breve | }
+ { \stemdown
c1 g c' a'
- c2 g c' a'
+ c2 g } >
+ \stemboth
+ c' a'
c4 g c' a' |
- a\ppp a\pp a\p a\mp |
- a\mf a\f a\ff a\fff|
- a\fp a\sf a\sfz a | % a\fz a\rf
+ a\ppp-\upbow a\pp-\downbow a\p^\turn a\mp^\fermata |
+ a\mf_\fermata a\f-\stopped a\ff-\open a\fff|
+ a\fp a4.\sf a4.\sfz | % a\fz a\rf
[c8 c] [a' a']
[c a'] [a' c] |
[c d e f] [as' ges' f' e']
[cis' dis' c' des'] [cisis' disis' ceses' deses'] |
r1 r2 r4 r8 r16 r32 r64 r128 r128 |
- c'1.^\fermata c'1._\fermata
\multi 2 < { \stemup r1} {\stemdown c''}>
\multi 2 < { \stemup c1 } {\stemdown r1}>
\stemboth
- c4_. c4-> c4^^ c4_^
+ c8_. c''8-> c4^^ c4_^
c4 _| c4^|
}
\paper{
\addtolength{\topmargin}{-1cm}
\setlength{\textwidth}{15cm}
\input lilyponddefs
+\musixsixteendefs
\input titledefs
\begin{document}
\textwidth\hsize\advance\textwidth-15mm
\begin{document}
\input lilyponddefs
+\musixsixteendefs
\input titledefs
-\def\interscoreline{\vskip12pt}
+\def\interscoreline{\vskip6pt}
\title{Solo Cello Suites\normalsize\\[2ex]Suite II}
% \subtitle{Suite II}
\composer{J.\ S.\ Bach}
%\pagestyle{empty}
\begin{document}
\input lilyponddefs
+\musixsixteendefs
\input titledefs
\def\interscoreline{\vskip3mm}
\title{St\"andchen\normalsize\\[2ex](Serenade)}
\pagestyle{empty}
\begin{document}
\input lilyponddefs
+\musixtwentydefs
\input titledefs
\def\interscoreline{\vskip3mm}
\title{St\"andchen\normalsize\\[2ex](Serenade)}
MAJOR_VERSION = 0
MINOR_VERSION = 1
-PATCH_LEVEL = 19
+PATCH_LEVEL = 20
# use to send patches, always empty for released version:
# include separator: ".postfix", "-pl" makes rpm barf
{
int staff_size_i_ =8;
bool streepjes_b = (position_i_<-1) || (position_i_ > staff_size_i_+1);
+ if (balltype_i_ < 0 || balltype_i_ > 1)
+ streepjes_b = false;
Atom s(paper ()->lookup_l()->rest (balltype_i_, streepjes_b));
Molecule * m = new Molecule ( Atom (s));
Script::brew_molecule_p() const
{
Real dy = paper()->internote_f ();
+ Real dx = paper()->note_width()/2;
Molecule*out = new Molecule (specs_l_->get_atom (paper(), dir_));
out->translate (dy * pos_i_, Y_AXIS);
+ out->translate (dx, X_AXIS); // FIXME! ugh
return out;
}
}
Molecule*
- Stem::brew_molecule_p () const
+Stem::brew_molecule_p () const
{
Molecule *mol_p =new Molecule;
Real r=0;
if (head_l_arr_.size())
{
- r += head_l_arr_[0]->width ().length() * (stem_xdir_+1.0)/2.0;
- if (stem_xdir_ == RIGHT)
- r -= paper ()->rule_thickness ();
+ Interval head_wid(0, head_l_arr_[0]->width ().length ());
+ Real rule_thick(paper ()->rule_thickness ());
+ Interval stem_wid(-rule_thick/2, rule_thick/2);
+ r = head_wid[stem_xdir_] - stem_wid[stem_xdir_];
}
return r;
}
# two outdir files are distributed, since they make sense to have without running
# configure and make.
-EXTRA_DISTFILES = Configure_variables.make.in lilypond.spec.in Toplevel.make.in \
- lilypond.lsm.in $(outdir)/lilypond.spec $(outdir)/lilypond.lsm
-
+IN_FILES = $(wildcard *.in)
+EXTRA_DISTFILES = $(IN_FILES) $(outdir)/lilypond.spec $(outdir)/lilypond.lsm $(outdir)/lelievijver.lsm
#
# generic variables:
$(outdir)/lilypond.spec: lilypond.spec.in $(depth)/VERSION
cat $< | $(sed-version) | $(sed-docs) | $(sed-examples) > $@
-$(outdir)/lilypond.lsm: lilypond.lsm.in $(depth)/VERSION
+$(outdir)/%.lsm: %.lsm.in $(depth)/VERSION
cat $< | $(sed-version) | $(sed-date) > $@
+
--- /dev/null
+Begin3
+Titel: LilyPond
+Versie: @TOPLEVEL_VERSION@
+Inschrijf datum: @DATE@
+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:
+ voor bladmuziek wordt typeset informatie naar een
+ TeX file geschreven, voor een (mechanische) uitvoering
+ wordt een MIDI file geschreven. Enkele kunstjes zijn
+ verscheidene notenbalken, maatsoorten, sleutels,
+ toonsoorten, teksten, krachtige invoer taal, cadensen,
+ balken, boogjes, triolen.
+Trefwoorden: muziek typezetten midi notatie
+Auteur: hanwen@stack.nl (Han-Wen Nienhuys)
+ jan@digicash.com (Jan Nieuwenhuizen)
+Onderhouden door: hanwen@stack.nl (Han-Wen Nienhuys)
+Voornaamste plek: sunsite.unc.edu /pub/Linux/apps
+ 395k lilypond-@TOPLEVEL_VERSION@.tar.gz
+Oorspronkelijke plek: pcnov095.win.tue.nl /pub/lilypond/
+ 395k lilypond-@TOPLEVEL_VERSION@.tar.gz
+Copi"eer politie: GPL
+End
Title: LilyPond
Version: @TOPLEVEL_VERSION@
Entered-date: @DATE@
-Description: LilyPond is the GNU Project music typesetter. This
- program converts music definition files into
- visual or auditive output: it can typeset formatted
- sheet music to a TeX file and and (mechanical)
- performances to MIDI files. Features include multiple
- staffs, meters, clefs, keys, lyrics, versatile
- input-language, cadenzas beams, slurs, triplets.
+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
+ MIDI file. Features include multiple staffs, meters,
+ clefs, keys, lyrics, versatile input-language,
+ cadenzas, beams, slurs, triplets.
Keywords: music typesetting midi notation
Author: hanwen@stack.nl (Han-Wen Nienhuys)
jan@digicash.com (Jan Nieuwenhuizen)
+ - design macro for penstroke with rounded endings
- y-refpoint for rests should be the 4th staffline (gclef: b')
- more symbols
* flags
- {up, down}bow
- toe/heel
- piano pedals,
- - braces.
- - trills
+ * braces.
+ * trills
+ * maxima notehead
* coda signs.
* 0 - 9
- lilyrules.mf for different rules (lines) ?
- check out Adobe Sonata/Petrucci font layout. They are the
standard for Music fonts
- - hack up GS to do round pixels iso. square pixels.
+ - hack up GS to do round pixels iso. square pixels. (Printers
+don't do square pixels.)
-% autometric.mf
-% part of LilyPond's pretty-but-neat music font
+%
+% autometric.mf -- administrative MF routines
+%
+% source file of the Feta (Font-En-Tja) pretty-but-neat music font
+%
+% (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
%
% these macros help create ascii logging output
% to automate generation of lily tables and tex backend
-% parsed by the mf-to-table script
+% The output should be parsed by the mf-to-table script
def fet_begingroup(expr name) =
message "@{group:"&name&"@}";
message "";
- enddef;
+ begingroup
+enddef;
def fet_endgroup(expr name) =
+ endgroup;
message "@{puorg:"&name&"@}";
message "";
- enddef;
+enddef;
def autometric_output_char=
message "@{char:"&charnamestr&":"&decimal charcode&":"&decimal charbp&":"&decimal charwd&":"&decimal chardp&":"&decimal charht&":"&idstr&":"&texstr&"@}";
\font\vet=vette-beams16
\font\slurs=xslhd16
\font\specfont=musixspx
-\def\thefont{\slurs}
+\font\egler=opus16
+\def\thefont{\egler}
%\def\thefont{\specfont}
\def\mb#1{{\thefont\char#1}}
--- /dev/null
+% flags
+%
+
+
+fet_begingroup("floogbars")
+
+save flag_angle, flare;
+save hip_thickness, hip_depth, hip_width;
+save foot_thickness, foot_depth, foot_width;
+
+flag_angle = 32;
+
+hip_thickness# = stafflinethickness#;
+foot_thickness# = blot_diameter#;
+flare# = 1.0 interline#;
+
+hip_depth# = 15/7 interline#;
+hip_width# = 8/7 interline# + hip_thickness# /2 + stemthickness#/2;
+
+foot_depth# = flare# + 15/7 interline#;
+foot_width# = .885 hip_width#;
+
+
+define_pixels(flare,
+ hip_depth, hip_width, hip_thickness,
+ foot_depth, foot_width, foot_thickness
+);
+
+%treq;
+
+
+%
+% Inspired by Adobe Sonata,
+% for example, see POSTSCRIPT Language -- program design,
+% page 119
+%
+def draw_eight_flag =
+
+
+ penpos0(stemthickness, 0);
+ penpos1(flare, 90);
+ penpos2(hip_thickness, 0);
+ penpos3(foot_thickness, 0) ;
+ penpos4(stemthickness, 0);
+
+ z0r = z1r;
+ z0 = (0,0);
+ z2 = (hip_width, -hip_depth);
+ z3 = (foot_width, -foot_depth);
+ z4r = z1l;
+
+ save bot_dir, bot_path;
+ pair bot_dir;
+ path bot_path;
+ bot_path := z2{down} .. z3;
+ bot_dir := direction 1 of bot_path;
+
+ fill z1l{dir -flag_angle} .. z2l{down} ..
+ z3l{bot_dir} .. z3r{-bot_dir} ..
+ {up}z2r .. {up}z1r ..
+ z0l{down} -- z4l -- cycle;
+
+ ;
+
+enddef;
+
+
+fet_beginchar("8th Flag (up)", "3u", "eighthflag")
+ set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2,
+ foot_depth# + foot_thickness#/2, stemthickness#/2)
+
+ draw_eight_flag;
+ penlabels(0, 1, 2, 3, 4);
+fet_endchar;
+
+fet_beginchar("8th Flag (down)", "3d", "deighthflag")
+ set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2,
+ foot_depth# + foot_thickness#/2, stemthickness#/2)
+
+ draw_eight_flag;
+ y_mirror_char;
+fet_endchar;
+
+fet_endgroup("floogbars")
--- /dev/null
+% bolletjes.mf
+% part of LilyPond's pretty-but-neat music font
+
+% most beautiful noteheads are pronounced, not circular,
+% and not even symmetric.
+% These examples are inspired by [Wanske] [see literature list]
+
+
+fet_begingroup("balls");
+
+noteheight#:=interline#+ (1 + overdone_heads) *stafflinethickness#;
+
+define_pixels(noteheight);
+
+
+
+def draw_brevis =
+ save beamheight, head_width;
+ save holeheight, stem_width;
+ save serif_size;
+
+ head_width# = 2 interline#;
+ holeheight = 3 stafflinethickness;
+ stem_width = 1.2 stafflinethickness;
+
+
+ define_pixels(head_width);
+ set_char_box(0, head_width#, noteheight#/2, noteheight#/2);
+
+ 2 beamheight + holeheight = noteheight;
+ serif_size = (holeheight - stafflinethickness)/2;
+
+ penpos1(stem_width, 0);
+ penpos2(stem_width, 0);
+ penpos3(beamheight, 90);
+ penpos4(beamheight, 90);
+ penpos5(stem_width, 180);
+
+ z1l = (0, 0);
+ z2l = (0, -stafflinethickness/2);
+ z3r = z2r + serif_size *(1,-1);
+ y4r = y3r;
+ x4r = head_width/2;
+ z5l = z3l + serif_size * (-1,-1);
+
+ penlabels(1,2,3,4, 5);
+ fill z1r -- z1l -- z5r{down} .. z5l{up} .. z3l{right}
+ -- z4l -- z4r -- z3r{left} .. z2r{up} -- cycle;
+
+ addto currentpicture also currentpicture yscaled -1;
+ addto currentpicture also currentpicture reflectedabout(z4r, z4l);
+enddef;
+
+fet_beginchar("Brevis notehead", "-1", "brevisball")
+ draw_brevis;
+fet_endchar;
+
+
+%
+% Some sources (eg Musix/OpusTeX think that the appendage should be on
+% the right, my only other ref [Willemze], shows an appendage to the left
+%
+fet_beginchar("Longa notehead", "-2", "longaball");
+ draw_brevis;
+ save theta;
+ z7 = z5;
+ z6 - z7 = (-stem_width/2, -interline);
+ theta = angle(z6-z7)+ 90;
+ penpos7(stafflinethickness, theta);
+ penpos6(stem_width, theta);
+
+ fill z7r .. z6r{z6-z7} .. {z7-z6} z6l -- z7l -- cycle;
+ penlabels(6,7);
+fet_endchar;
+
+% setup user vars
+def setup_notehead_vars =
+ save a_b,err_y_a,tilt,superness;
+ save ai_a,ai_bi,err_y_ai,err_x_bi,inner_tilt,inner_superness;
+ save b_h,a_w;
+ enddef;
+
+% setup addititional vars and calc them
+def notehead_calc =
+ save a,beta,ai,bi, ht, wd;
+ ht# =noteheight#;
+ 2beta#=ht#*b_h;
+ a# = beta#*a_b;
+ wd# = 2a# / a_w;
+ ai# = a# * ai_a;
+ bi# = ai#/ai_bi;
+ define_pixels(a,beta);
+ define_pixels(ai,bi);
+ set_char_box(0, wd#, .5 ht#, .5 ht#);
+ enddef;
+
+
+% draw the outer and inner ellipse.
+def notehead_draw =
+ path black,white;
+ black=distorted_ellipse(a,beta,a*err_y_a,0,superness);
+ white=distorted_ellipse(ai,bi,ai*err_y_ai,bi*err_x_bi,inner_superness);
+if test>1: %fixme
+ save x;
+ x1=-x3=a; x2=x4=0; y1=y3=0; y2=-y4=b;
+ penlabels(1,2,3,4);
+ test_grid;
+else:
+ black:=black rotated tilt;
+ black:=black shifted (w/2,0);
+ white:=white rotated inner_tilt;
+ white:=white shifted (w/2,0);
+fi
+ fill black;
+ unfill white;
+
+
+ enddef;
+
+% whole note
+% Wanske, p.38
+fet_beginchar("Whole notehead", "0", "wholeball")
+ setup_notehead_vars;
+
+ a_b:=1.80;
+ err_y_a:=0; % no slant
+ tilt:=0;
+ superness:=0.707;
+ ai_a:=0.508;
+ % ai_bi:=1.23;
+ ai_bi:=1.30; % jcn
+ % err_y_ai:=0.0938;
+ % err_x_bi:=0;
+ err_y_ai:=0;
+ err_x_bi:=0.115;
+ % inner_tilt:=135;
+ inner_tilt:=125; % jcn
+ % inner_superness:=0.69;
+ inner_superness:=0.68; % jcn
+ b_h:=1; %no rotate-> no height correction
+ a_w:=1; % no rotate-> no width correction
+
+ notehead_calc;
+ notehead_draw;
+fet_endchar;
+
+
+% half note
+% Wanske, p.39
+fet_beginchar("Half notehead", "1",
+ "halfball")
+ setup_notehead_vars;
+ % a_b:=1.49; % after text
+ a_b:=1.50; % after drawing
+ err_y_a:=0.157;
+ tilt:=34;
+ % superness:=0.66;
+ superness:=0.67; % jcn
+ % ai_a:=0.863;
+ ai_a:=0.850; % jcn
+ % ai_bi:=3.14;
+ ai_bi:=3.30; % jcn
+ err_y_ai:=0;
+ err_x_bi:=-0.12;
+ inner_tilt:=tilt;
+ inner_superness:=0.80;
+ b_h:=0.935;
+ a_w:=1.12;
+
+ notehead_calc;
+ notehead_draw;
+fet_endchar;
+
+
+% quarter note
+% Wanske p.38
+fet_beginchar("Quart notehead", "2", "quartball")
+ setup_notehead_vars;
+ % a_b:=1.57; % after text
+ a_b:=1.54; % after drawing
+ err_y_a:=0.044;
+ tilt:=32;
+ superness:=0.707;
+ ai_a:=0;
+ ai_bi:=1;
+ err_y_ai:=0;
+ err_x_bi:=0;
+ inner_tilt:=0;
+ inner_superness:=0.707;
+ b_h:=0.85;
+ a_w:=1.09;
+
+ notehead_calc;
+ notehead_draw;
+fet_endchar;
+
+
+
+
+fet_endgroup("balls");
+
--- /dev/null
+% eindelijk.mf
+% LilyPond's own rest(s)
+
+% todo breve/longa rests
+
+
+fet_begingroup("rests");
+
+begingroup
+
+med#:=1/33designsize;
+thick#:=1/16designsize;
+define_blacker_pixels(med,thick);
+pen med_pen;
+med_pen:= pencircle scaled med;
+
+rthin:=1/8interline;
+% rthick:=2rthin;
+rthick:=2thick+rthin;
+
+def shift_pic (expr pone, ptwo) =
+ currentpicture:=currentpicture shifted (round(pone),round(ptwo))
+enddef;
+
+% stuff for 8th,16th etc rests
+%
+save stem, ball_crook_stem, ball_crook_balldiam, flare;
+
+define_pixels(stem,flare);
+% stem#:=1/8interline#;
+stem# = 1/5interline#;
+ball_crook_stem = stem;
+ball_crook_balldiam =flare;
+flare# = 2/3interline#;
+
+save block_rest_y, block_rest_x;
+
+block_rest_y# = 5/8 interline#;
+block_rest_x# = 3/2 interline#;
+
+define_pixels(block_rest_y, block_rest_x);
+
+def block_rest=
+ pickup pencircle scaled blot_diameter;
+
+ bot y1 = 0;
+ top y2 = block_rest_y;
+ y3 = y2;
+ y4 = y1;
+
+ rt x1 = block_rest_x;
+ x2 = x1;
+ lft x3 = 0;
+ x4 = x3;
+ save p;
+ path p;
+ p:=z1 -- z2 -- z3 -- z4 -- cycle;
+ draw_rounded_path(p, blot_diameter);
+enddef;
+
+fet_beginchar( "whole rest", "0", "wholerest");
+set_char_box(0, block_rest_x#, -interline# + block_rest_y#, interline# );
+ block_rest;
+ currentpicture := currentpicture shifted (0,interline - block_rest_y);
+fet_endchar;
+
+fet_beginchar("half rest", "1", "halfrest");
+ set_char_box(0, block_rest_x#, 0, block_rest_y#);
+ block_rest;
+fet_endchar;
+
+
+%
+% should use ledgerline thickness?
+%
+fet_beginchar( "whole rest (outside staff)", "0o", "outsidewholerest");
+ set_char_box(block_rest_y#, block_rest_x# + block_rest_y#,
+ -interline# + block_rest_y#, interline#);
+ block_rest;
+ currentpicture := currentpicture shifted (0,interline - block_rest_y);
+ pickup pencircle scaled ledgerlinethickness;
+ draw (-block_rest_y, interline)
+ .. (block_rest_x + block_rest_y, interline);
+fet_endchar;
+
+fet_beginchar("half rest (outside staff)", "1o", "outsidehalfrest");
+ set_char_box(block_rest_y#, block_rest_x#+ block_rest_y#,
+ 0, block_rest_y#);
+ block_rest;
+ pickup pencircle scaled ledgerlinethickness;
+ draw (-block_rest_y,0) .. (block_rest_x + block_rest_y,0);
+fet_endchar;
+
+def rest_crook(expr a, w) =
+ balled_crook(a, w, ball_crook_balldiam, ball_crook_stem)
+enddef;
+
+fet_beginchar("Quarter rest","2","quartrest");
+ alpha:=-50;
+ penpos1(rthin,alpha+90);
+ penpos2(5/4rthick,alpha);
+ penpos4(5/4rthick,alpha);
+ penpos3(3/4rthick,alpha);
+ penpos6(rthin,alpha-20);
+% penpos6(rthick,alpha-20);
+% penpos7(4/3thick,alpha);
+ penpos7(5/8rthick,alpha);
+ penpos8(rthin,-10);
+ y1l=7/2interline; x1l=1/3interline;
+ z2r=z1+(interline*right) rotated alpha;
+ z3=1/2[z2,z4];
+ x4=3/8interline; y4=2interline;
+ z6=z4l+(5/4interline*right) rotated alpha;
+% x7l=x4l; y7r=y6l;
+ x7l=x4l; y7l=y4r;
+ x8=2/5interline; y8= 3/4 interline;
+ z5=z6r shifted (sqrt(2)*rthin/4,sqrt(2)*rthin/4);
+
+ pickup penrazor scaled rthin rotated 45;
+ draw z1--z2r;
+ draw z4l--z5;
+ penstroke z2e..z3e..z4e;
+ penstroke z6e..tension1.4..z7e..tension1.4..z8e;
+ penlabels(1,2,3,4,5,6,7,8);
+ set_char_box(0, interline#, -3/4 interline#, 7/2 interline#);
+ fet_endchar;
+
+fet_beginchar("8th rest","3","eighthrest");
+ set_char_box(0, 4/3interline#,-interline#, 8/3interline#+2stafflinethickness#);
+ save x,y, ht;
+ ht = h + d;
+ x1=w-stem/6; y1=ht-flare/4;
+ rest_crook (z1,w-stem/6);
+ z2-z1=whatever*dir70;
+ y2=stem/2;
+ brush (z1,stem/3,z2,stem);
+ % ugh
+ currentpicture:=currentpicture shifted (0,interline);
+% currentpicture:=currentpicture shifted (0,interline+2stafflinethickness);
+ fet_endchar;
+
+fet_beginchar("16th rest","4","sixteenthrest");
+ set_char_box(0,4/3interline#,0, 5/3interline#+interline#+2stafflinethickness#);
+ save x,y;
+ x1=w-stem/6; y1=h-flare/4;
+ z2-z1=whatever*dir74;
+ y2=stem/2;
+ brush (z1,stem/2,z2,stem);
+ rest_crook (z1,7/8w);
+ z3-z1=whatever*dir74;
+ y3=y1-interline;
+ rest_crook (z3,7/8w);
+% currentpicture:=currentpicture shifted (0,2stafflinethickness);
+ fet_endchar;
+
+fet_beginchar("32th rest","5","thirtysecondrest");
+ set_char_box(0,4/3interline#,0, 5/3interline#+2interline#+2stafflinethickness#);
+ save x,y;
+ x1=w-stem/6; y1=h-flare/4;
+ z2-z1=whatever*dir76;
+ y2=stem/2;
+ brush (z1,stem/2,z2,stem);
+ rest_crook (z1,7/8w);
+ z3-z1=whatever*dir76;
+ y3=y1-interline;
+ rest_crook (z3,7/8w);
+ z4-z1=whatever*dir76;
+ y4=y1-2interline;
+ rest_crook (z4,7/8w);
+% currentpicture:=currentpicture shifted (0,2stafflinethickness);
+ fet_endchar;
+
+fet_beginchar("64th rest","6","sixtyfourthrest");
+ set_char_box(0,4/3interline#,0, 5/3interline#+3interline#+2stafflinethickness#);
+ save x,y;
+ x1=w-stem/6; y1=h-flare/4;
+ z2-z1=whatever*dir78;
+ y2=stem/2;
+ brush (z1,stem/2,z2,stem);
+ rest_crook (z1,7/8w);
+ z3-z1=whatever*dir78;
+ y3=y1-interline;
+ rest_crook (z3,7/8w);
+ z4-z1=whatever*dir78;
+ y4=y1-2interline;
+ rest_crook (z4,7/8w);
+ z5-z1=whatever*dir78;
+ y5=y1-3interline;
+ rest_crook (z5,7/8w);
+% currentpicture:=currentpicture shifted (0,2stafflinethickness);
+ fet_endchar;
+
+fet_beginchar("128th rest","7","hundredtwentyeighthrest");
+ set_char_box(0, 4/3interline#, 0, 5/3interline#+4interline#+2stafflinethickness#);
+ save x,y;
+ x1=w-stem/6; y1=h-flare/4;
+ z2-z1=whatever*dir80;
+ y2=stem/2;
+ brush (z1,stem/2,z2,stem);
+ rest_crook (z1,7/8w);
+ z3-z1=whatever*dir80;
+ y3=y1-interline;
+ rest_crook (z3,7/8w);
+ z4-z1=whatever*dir80;
+ y4=y1-2interline;
+ rest_crook (z4,7/8w);
+ z5-z1=whatever*dir80;
+ y5=y1-3interline;
+ rest_crook (z5,7/8w);
+ z6-z1=whatever*dir80;
+ y6=y1-4interline;
+ rest_crook (z6,7/8w);
+% currentpicture:=currentpicture shifted (0,2stafflinethickness);
+ fet_endchar;
+
+endgroup;
+fet_endgroup("rests");
+
--- /dev/null
+
+input feta-macros;
+
+make_pen_stack;
+make_picture_stack;
+input feta-params;
+
+
+test:= 0;
+if test = 0:
+ input feta-eindelijk;
+ input feta-toevallig;
+ input feta-puntje;
+ input feta-bolletjes;
+ input feta-schrift;
+ input feta-banier;
+else:
+ input foo;
+fi
--- /dev/null
+%
+% debugging
+%
+def test_grid =
+if test>1:
+ proofrulethickness 1pt#;
+ makegrid(0pt,0pt for i:=-5pt step 1pt until 5pt: ,i endfor)
+ (0pt,0pt for i:=-5pt step 1pt until 5pt: ,i endfor);
+ proofrulethickness .1pt#;
+ makegrid(0pt,0pt for i:=-4.8pt step .2pt until 4.8pt: ,i endfor)
+ (0pt,0pt for i:=-4.8pt step .2pt until 4.8pt: ,i endfor);
+fi
+ enddef;
+
+def treq =
+ tracingequations := tracingonline := 1;
+enddef;
+
+
+%
+% Transforms
+%
+
+def scaledabout(expr point, scale) =
+ shifted -point scaled scale shifted point
+enddef;
+
+%
+% Urgh! Want to do parametric types
+%
+
+def del_picture_stack=
+ save save_picture_stack, picture_stack_idx;
+enddef;
+
+% better versions of Taupin/Egler savepic cmds
+%
+%
+def make_picture_stack =
+ % override previous stack.
+ del_picture_stack;
+ picture save_picture_stack[];
+ numeric picture_stack_idx;
+ picture_stack_idx := 0;
+ def push_picture(expr p) =
+ save_picture_stack[picture_stack_idx] := p ;
+ picture_stack_idx := picture_stack_idx + 1;
+ enddef;
+ def pop_picture = save_picture_stack[decr picture_stack_idx] enddef;
+ def top_picture = save_picture_stack[picture_stack_idx] enddef;
+enddef;
+
+
+% save/restore pens
+% why can't I delete individual pens?
+def make_pen_stack =
+ del_pen_stack;
+ pen save_pen_stack[];
+ numeric pen_stack_idx;
+ pen_stack_idx := 0;
+ def push_pen(expr p) =
+ save_pen_stack[pen_stack_idx] := p ;
+ pen_stack_idx := pen_stack_idx +1;
+ enddef;
+ def pop_pen = save_pen_stack[decr pen_stack_idx] enddef;
+ def top_pen = save_pen_stack[pen_stack_idx] enddef;
+enddef;
+def del_pen_stack=
+ save save_pen_stack, pen_stack_idx;
+enddef;
+
+%
+% drawing
+%
+
+% a: x diameter
+% b: y diameter
+% err_x: drift of y axis at top
+% err_y: drift of x axis at right
+def distorted_ellipse(expr a,b,err_y,err_x,super) =
+ superellipse((a,err_x),(-err_y,b),(-a,-err_x),(err_y,-b),super);
+ enddef;
+
+def draw_brush(expr a,w,b,v) =
+ save x,y;
+ z1=a; z2=b;
+ penpos3(w,angle(z2-z1)+90);
+ penpos4(w,angle(z2-z1));
+ penpos5(v,angle(z1-z2)+90);
+ penpos6(v,angle(z1-z2));
+ z3 = z4 = z1;
+ z5 = z6 = z2;
+
+ fill z3r{z3r-z5l}..z4l..{z5r-z3l}z3l..z5r{z5r-z3l}..z6l..{z3r-z5l}z5l..cycle;
+enddef;
+
+def brush(expr a,w,b,v) =
+ begingroup;
+ draw_brush(a,w,b,v);
+ penlabels(3,4,5,6);
+ endgroup;
+enddef;
+
+def draw_rounded_path(expr p, thick) =
+ push_pen(currentpen);
+ fill p;
+ pickup pencircle scaled thick;
+ draw p;
+ currentpen := pop_pen;
+enddef;
+
+%
+%
+%
+def balled_crook(expr a, w, balldiam, stem) =
+begingroup;
+ save x,y;
+ penpos1(balldiam/2,-90);
+ penpos2(balldiam/2,0);
+ penpos3(balldiam/2,90);
+ penpos4(balldiam/2,180);
+ x4r=xpart a-w; y3r=ypart a+balldiam/4;
+ x1l=x2l=x3l=x4l;
+ y1l=y2l=y3l=y4l;
+ penpos5(stem,250);
+ x5=x4r+9/8balldiam; y5r=y1r;
+ penpos6(stem,260);
+ x6l=xpart a; y6l=ypart a;
+ penstroke z1e..z2e..z3e..z4e..z1e..z5e{right}..z6e;
+ penlabels(1,2,3,4,5,6);
+endgroup;
+enddef;
+
+def y_mirror_char =
+ currentpicture := currentpicture yscaled -1;
+ set_char_box(charbp, charwd, charht, chardp);
+enddef;
+
+
+def xy_mirror_char =
+ currentpicture := currentpicture scaled -1;
+ set_char_box(charwd, charbp, charht, chardp);
+enddef;
--- /dev/null
+
+interline#:=staffsize#/(stafflines-1);
+
+%
+% [D.K.Roush & J.S.Gourlay] say this should be 0.072
+% We know better
+% generally, the "blackness" of most chars depends on this.
+%
+stafflinethickness#:=0.1 interline#;
+
+stemthickness# := stafflinethickness#;
+ledgerlinethickness# := 1.5 stafflinethickness#;
+
+define_pixels(interline, stemthickness);
+define_pixels(stafflinethickness,ledgerlinethickness);
+
+%
+% Hand-engraved music often has balls extending above and below
+% the lines. If you like that, modify overdone heads (unit:
+% stafflinethickness)
+%
+
+numeric overdone_heads;
+overdone_heads = 0.0;
+
+%
+% Because of the engraving/stamping process, no traditional
+% characters have sharp edges and corners
+% The following variable controls the amount of "roundness"
+%
+% this is not a meta variable: it is related to absolute sizes.
+%
+numeric blot_diameter;
+blot_diameter# = .4pt#;
+define_pixels(blot_diameter);
--- /dev/null
+fet_begingroup("dots");
+
+fet_beginchar("duration dot","dot", "dot")
+ save dot_diam;
+ 2 dot_diam# = interline# - stafflinethickness#;
+ define_pixels(dot_diam)
+ pickup pencircle scaled dot_diam;
+ draw (dot_diam/2,0);
+ set_char_box(0, dot_diam#, dot_diam#/2, dot_diam#/2);
+fet_endchar;
+
+
+fet_endgroup("dots");
--- /dev/null
+%
+% scripts
+%
+
+
+fet_begingroup("foobars")
+
+
+def draw_fermata =
+ save alpha, radius, crook_thinness, crook_fatness, dot_diam;
+
+ % [Wanske] and some Baerenreiter editions
+ % suggest ca 80 degrees iso half-circle
+ alpha := 10;
+
+ radius# = 1.5 interline#;
+ crook_thinness# = 1.5stafflinethickness#;
+ crook_fatness# = 4 stafflinethickness#;
+
+ radius# + crook_fatness#/2 = h#;
+ radius# + crook_thinness#/2 = w#;
+ set_char_box(w#, w#, 0, h#);
+
+ define_pixels(radius, crook_thinness, crook_fatness);
+ dot_diam = 4/3 crook_fatness;
+
+
+ penpos1(crook_thinness, 0);
+ penpos2(crook_fatness, -90);
+ z1 = (-radius,0);
+ z2 = (0, radius);
+
+ fill z1l{dir (-alpha-90)}..{dir (90-alpha)}z1r..
+ {right}z2r -- z2l{left} .. cycle;
+
+ addto currentpicture also
+ currentpicture xscaled -1;
+
+ pickup pencircle scaled dot_diam;
+ x4 =0;
+ bot y4 = - crook_thinness/2;
+ draw z4;
+enddef;
+
+fet_beginchar("fermata up", "ufermata", "ufermata")
+ draw_fermata;
+ penlabels(1,2,4);
+fet_endchar;
+
+fet_beginchar("fermata down", "dfermata", "dfermata")
+ draw_fermata;
+ currentpicture:=currentpicture yscaled -1 ;
+ set_char_box(w#, w#, h#, 0);
+
+fet_endchar;
+
+
+%
+% FIXME: rounded endings
+%
+% `\accent' is TeX reserved.
+fet_beginchar("> accent", "accent", "sforzatoaccent")
+ set_char_box(.9 interline#, .9 interline#, .5 interline#, .5 interline#);
+ save thickness, diminish;
+
+ thickness = 2 stafflinethickness;
+
+ % prevent blobs at crossing lines
+ diminish = .75;
+
+ y1 + thickness/2 = h;
+ x1 = -b;
+ x2 = w;
+ y2 = .25 thickness* diminish;
+
+ z4 = (w,0);
+ x3 =0;
+ z3 = whatever [z1, z4];
+
+ penpos2(thickness*(2 - diminish)/2 , 90);
+ penpos1(thickness, 90);
+ penpos3(thickness, 90);
+
+ penstroke z1e .. z3e .. z2e;
+ penstroke (z1e .. z3e .. z2e) yscaled -1;
+
+ penlabels(1,2,3);
+fet_endchar;
+
+fet_beginchar("staccato dot", "staccato", "staccato")
+ save radius;
+ radius# = 1.25 stafflinethickness#;
+ define_pixels(radius);
+ pickup pencircle scaled 2 radius;
+ draw (0,0);
+ set_char_box(radius#, radius#, radius#, radius#);
+fet_endchar;
+
+def draw_staccatissimo =
+ save radius, height;
+ height# = .8 interline#;
+ radius# = 2 stafflinethickness#;
+ define_pixels(radius, height);
+
+ draw_brush((0,0), blot_diameter, (0, height),2 radius);
+ set_char_box(radius#,radius#, blot_diameter#/2, height# + radius#);
+enddef;
+
+fet_beginchar("staccatissimo/martellato up", "ustaccatissimo",
+ "ustaccatissimo")
+ draw_staccatissimo;
+fet_endchar;
+
+%
+% FIXEM: scale labels too.
+%
+fet_beginchar("staccatissimo/martellato down", "dstaccatissimo", "dstaccatissimo")
+ draw_staccatissimo;
+ y_mirror_char;
+fet_endchar;
+
+fet_beginchar("portato/single tenuto", "tenuto", "tenuto")
+ save thick;
+ thick# = 1.2 stafflinethickness#;
+ define_pixels(thick);
+
+ set_char_box(.9 interline#, .9 interline#, thick#/2,thick#/2);
+ pickup pencircle scaled thick;
+ lft x1 = -b;
+ rt x2 = w;
+ y1 = y2 = 0;
+ draw z1 .. z2;
+fet_endchar;
+
+
+def draw_marcato =
+ save fatness, thinness;
+ set_char_box(interline#/2, interline#/2, 0, 1.1 interline#);
+
+ fatness = 3 stafflinethickness;
+ thinness = .8 stafflinethickness;
+ x2 - x1 + blot_diameter = fatness;
+ x2 + thinness/2 = w;
+
+ y1 = y2;
+ y1 = thinness/2;
+ z2 - z3 = whatever * (charwd, -charht);
+ z1 - z4 = whatever * (charwd, -charht);
+ z3 - z4 = whatever * (charwd, charht);
+ y3 + thinness/2 = h;
+ draw_rounded_path(z1 -- z2 -- z3 -- z4 -- cycle, thinness);
+
+ pickup pencircle scaled thinness;
+ z3 - z5 = whatever* (z3 - z4);
+ bot y5 = 0;
+ draw z3 .. z5;
+enddef;
+
+fet_beginchar("marcato up", "umarcato", "umarcato")
+ draw_marcato;
+ labels(1,2,3,4,5);
+fet_endchar;
+
+
+%
+% The down marcato char (not very much used).
+% Contrary to what some MF/TeX `gurus' believe
+% it is *point*-symmetric with the "up" version; (at least [Chlapik]
+% agrees with us)
+%
+fet_beginchar("marcato down", "dmarcato", "dmarcato")
+ draw_marcato;
+ xy_mirror_char;
+fet_endchar;
+
+fet_beginchar("open (unstopped)", "open", "ouvert")
+ save thin, height, width, thick;
+ height# = 5/4 width#;
+ height# = 7/8 interline#;
+ thin = 1.2 stafflinethickness;
+ thick = 1.4 thin;
+ set_char_box(width#/2, width#/2, 0, height#);
+
+ penpos1(thick, 0);
+ penpos2(thin, 90);
+ z1r = (w,h/2);
+ z2r = (0, h);
+ penlabels(1,2);
+ penstroke z1e{up} .. {left}z2e;
+ addto currentpicture also currentpicture xscaled -1;
+ addto currentpicture also currentpicture reflectedabout((w,h/2), (0,h/2));
+fet_endchar;
+
+
+fet_beginchar("plus (stopped)", "stopped", "plusstop")
+ save thick, size;
+ thick = 2 stafflinethickness;
+ size# = 1.1 interline#;
+
+ set_char_box(size#/2, size#/2, size#/2, size#/2);
+ pickup pencircle scaled thick;
+
+ rt x1 = w;
+ y1 = 0;
+ z2 = -z1;
+
+ draw z1 .. z2;
+ draw (z1 .. z2) rotated 90;
+fet_endchar;
+
+%
+% FIXME: blotting
+%
+fet_beginchar("Upbow", "upbow", "upbow")
+ save ht, wd, thick;
+
+ thick = 1.4 stafflinethickness;
+ wd# = 1.3 interline#;
+ ht# = 3/2 wd#;
+
+
+ set_char_box(wd#/2, wd#/2, 0, ht#);
+ pickup pencircle scaled thick;
+
+ x1 = 0;
+ bot y1 = 0;
+ rt x2 = w;
+ top y2 = h;
+
+ labels(1,2);
+ draw z2 -- z1 -- (z2 xscaled -1);
+fet_endchar;
+
+
+fet_beginchar("Downbow", "downbow", "downbow")
+ save stemthick, beamheight;
+ save wd;
+ define_pixels(wd)
+
+ wd# = 7/4 interline#;
+ stemthick = 1.2 stafflinethickness;
+
+ set_char_box(wd#/2, wd#/2, 0, interline#);
+
+ beamheight = 4/10 h;
+
+
+ pickup pencircle scaled blot_diameter;
+ top y2 - bot y1 = beamheight;
+ top y2 = h;
+ rt x1 = w;
+ x1 = x2;
+ y2 = y3;
+ y1 = y4;
+ x3 = 0;
+ x4 = x3;
+ save p;
+ path p;
+ p := z1 -- z2 -- z3 -- z4 --cycle;
+ draw_rounded_path(p, blot_diameter);
+ pickup pencircle scaled stemthick;
+
+ bot y5 =0;
+ rt x5 = rt x6 = w;
+ y6 = h - beamheight;
+ draw z6 -- z5;
+ labels(1, 2,3,4,5,6);
+ addto currentpicture also currentpicture xscaled -1;
+fet_endchar;
+
+%
+% FIXME the middle part (NW -> SE) may have some more (ok; it is
+% negative: less) slope
+%
+fet_beginchar("Turn","turn","turn")
+ save thin, thick, ball_diam, darkness;
+ save wd, ht, thick_nibangle, ball_nib_thick;
+ save turndir;
+ pair turndir;
+
+ wd# = 35/16 interline#;
+ ht# = 18/17 interline#;
+ darkness = 1.3 stafflinethickness;
+
+ set_char_box(wd#/2, wd#/2, ht#/2, ht#/2);
+
+ thick_nibangle = 60;
+ thick = 3 darkness;
+ thin = darkness;
+ ball_nib_thick = 2.7 darkness;
+ ball_diam = ball_nib_thick + (h - ball_nib_thick) / 10;
+
+
+ x3l = w;
+ y3 = 0;
+ y4l = h;
+ x4 = x2;
+ x2l = w/2;
+ y2l = -d;
+ z1 = (0,0);
+
+ penpos1(1.1 thick, thick_nibangle);
+ penpos2(thick, thick_nibangle);
+ penpos3(thin, 180);
+ penpos4(ball_nib_thick, -90);
+
+ path swoosh, ploop;
+ swoosh := z1l{curl 0} .. z2l .. z3l{up} .. {left}z4l
+ -- z4r .. z3r{down} .. z2r{left} ;
+ fill swoosh .. (swoosh scaled -1) .. cycle;
+ penlabels(2,3,4);
+
+ x5r = x4;
+ y5r = y4l - ball_diam /2;
+ z6r = z5r;
+
+ penpos5(1.6 ball_diam/2, 10);
+ penpos6(ball_diam/2, 150);
+
+ ploop := z4l{left} .. z5l .. z6l -- cycle;
+ fill ploop;
+ fill ploop scaled -1;
+
+
+ penlabels(5,6,7);
+
+fet_endchar;
+
+fet_endgroup("foobars");
--- /dev/null
+%
+% Accidentals from various sources, notably
+%
+% Baerenreiter edition of Schuberts `Auf dem Strom' (sharp, natural, flat)
+% F Hofmeister edition of Muellers `Etueden fuer Horn' (double sharp)
+%
+
+
+%tracingall;
+%proofing := 2;
+%\tracingequations:= tracingonline := 1;
+
+fet_begingroup("accidentals");
+
+fet_beginchar("Sharp" , "1", "sharp");
+ set_char_box(0, 1.1 interline#, 1.5 interline#,
+ 1.5 interline#);
+
+ save interbeam, interstem, beamheight, beamwidth,
+ stemwidth;
+
+ interbeam := 1.1 interline;
+ interstem := 7/16 ;
+ beamheight := 4 stafflinethickness;
+ beamwidth := w;
+ stemwidth := 1.3 stafflinethickness;
+ roundness := blot_diameter;
+ pair center;
+ center := (.5 w, 0);
+
+ roundness + 2 spanwidth = beamwidth;
+ roundness + 2 spanheight = beamheight;
+
+ 2 horizontal_protrusion + interstem * beamwidth + stemwidth
+ = beamwidth;
+
+% wanske: whole beamheight; or ca 18 degrees
+% z2 - z1 = (beamwidth - roundness, beamheight/2);
+ z2 - z1 = (beamwidth - roundness, beamheight);
+ z1 + z2 = 2*center;
+ beamslope = (y2-y1)/(x2-x1);
+
+ pair hspan, vspan;
+ hspan = (spanwidth, beamslope * spanwidth);
+ vspan = (0, spanheight);
+
+
+ path beam;
+ beam := (hspan + vspan -- -hspan
+ + 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 stemwidth;
+ x3 = x4 = xpart center;
+ bot y3 = -1.5 interline + ypart center;
+ top y4 = 1.5 interline + ypart center;
+
+ path stem;
+ stem := z3 .. z4;
+ numeric xs;
+ xs := interstem* beamwidth / 2;
+ draw stem shifted (- xs, - xs* beamslope);
+ draw stem shifted (xs , xs *beamslope);
+ labels(1,2,3,4);
+ fet_endchar;
+
+fet_beginchar( "Natural", "0", "natural")
+ set_char_box(0, 8/12 interline#, 1.5 interline#, 1.5 interline#);
+
+ save interbeam, interstem, beamheight, beamwidth,
+ stemwidth;
+
+ beamheight = 4.5 stafflinethickness;
+ interstem + stemwidth = w;
+ stemwidth = 1.3 stafflinethickness;
+
+ z2 -z1 = (interstem, slope * interstem);
+ xpart .5 [z2,z1] = xcenter ;
+ xcenter = w/2;
+
+
+ pickup penrazor scaled beamheight rotated 90;
+ top y2 = interline - 3/2 stafflinethickness ;
+ slope = stafflinethickness / interstem;
+
+ draw z1 .. z2;
+ draw (xpart z1, -y2) .. (xpart z2, -y1);
+ beamtop = top y2;
+
+ pickup pencircle scaled stemwidth;
+ xpart z3 = xpart z1;
+ xpart z4 = xpart z2;
+ top y3 = 1.5 interline;
+ top y4 = beamtop;
+
+ draw (xpart z1, -y4) .. z3;
+ draw (xpart z2, -y3) .. z4;
+
+ labels(1,2,3,4);
+ fet_endchar;
+
+%
+% Dedicated to my mom. (3/10/97)
+%
+% Mamma, ik hou van je; kom je alsjeblieft terug?
+% -- HW
+%
+
+%
+% FIXME more metaness
+% FIXME distribution of the crooks' thickness
+%
+% FIXME probably doesn't look quite right.
+%
+
+def flat_meta_symbol(expr w, d, h,
+ stemwidth, crook_fatness, crook_thinness,
+ bottom_stem_thick, top_stem_thick)=
+
+ z1 = (0, h);
+ z2 = (0, -d);
+ brush(z1, top_stem_thick , z2, bottom_stem_thick);
+
+ z3 = (0, 7/16 interline);
+ z4 = z3 + whatever * (dir 30);
+ y4 = 1/2 interline ;
+ y5 = 4/16 interline;
+ x5 + crook_fatness/2 = w;
+ z6 = z2 + (0,-1) * (bottom_stem_thick - crook_thinness);
+
+ penpos3(crook_thinness, 90);
+ penpos4(crook_thinness, 90);
+ penpos5(crook_fatness, 0);
+ penpos6(crook_thinness, -90);
+ labels(1,2,3,4,5,6);
+ penstroke z3e{dir 32} .. z4e{dir 30} .. z5e{down} .. {dir 220}z6e;
+ enddef;
+
+def flat_symbol (expr w, d, h)=
+ save stemwidth, bottom_stem_thick, top_stem_thick,
+ crook_thinness, crook_fatness;
+ stemwidth = stafflinethickness;
+ crook_fatness = 1/4 interline;
+ crook_thinness = stemwidth;
+ bottom_stem_thick = 5/4 stemwidth;
+ top_stem_thick = 2 stemwidth;
+ flat_meta_symbol(w,d,h, stemwidth, crook_fatness, crook_thinness,
+ bottom_stem_thick, top_stem_thick);
+ enddef;
+
+%
+% unfortunately, 600dpi is not enough to show the brush of the stem.
+%
+fet_beginchar("Flat", "-1", "flat")
+ set_char_box(0, 9/12 interline#, .5 interline#, 2 interline#);
+ flat_symbol (w, d, h);
+ fet_endchar;
+
+fet_beginchar("Double flat", "-2", "flatflat")
+ set_char_box(0, 18/12 interline#, .5 interline#, 2 interline#);
+ flat_symbol(w/2, d, h);
+ addto currentpicture also currentpicture
+ shifted (w/2 - stafflinethickness/2,0);
+ fet_endchar;
+
+
+fet_beginchar("Double sharp", "2", "sharpsharp")
+ set_char_box(0, interline#, .5 interline#, .5 interline#);
+ save klaverblad, klaversteel;
+
+ klaversteel = 1/12 interline;
+ klaverblad = 1/3 interline;
+
+ z1 = (klaversteel, 0);
+ z2 = (w/2 - klaverblad / 10, h - klaverblad);
+ z3 = (w/2, h);
+ z4 = z2 reflectedabout((0,0), (1,1));
+ 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);
+
+ addto currentpicture also currentpicture yscaled (-d/h);
+ addto currentpicture also currentpicture xscaled (-1);
+
+ % ugh
+ currentpicture := currentpicture shifted (w/2,0);
+
+
+ fet_endchar;
+
+
+fet_endgroup("accidentals");
+
stafflines:=5;
code:=-1;
-input generic-tja;
+input feta-generic;
fet_endfont("font-en-tja");
stafflinethickness#:=0.4pt#;
code:=-1;
-input generic-tja;
+input feta-generic;
fet_endfont("font-en-tja");
--- /dev/null
+% is this OK? Or is it a bug;
+% changing the order of z1l and z1r in reflectedabout
+% stops mf from complaining
+fet_beginchar("open (unstopped)", "open", "ouvert")
+ save thin, height, width, thick;
+ height# = 5/4 width#;
+ height# = 2/3 interline#;
+ thin = .9 stafflinethickness;
+ thick = 1.4 thin;
+ set_char_box(width#/2, width#/2, 0, height#);
+
+ penpos1(thick, 0);
+ penpos2(thin, 90);
+ z1r = (w,h/2);
+ z2r = (0, h);
+ penlabels(1,2);
+ penstroke z1e{up} .. {left}z2e;
+ addto currentpicture also currentpicture xscaled -1;
+ addto currentpicture also currentpicture reflectedabout(z1l, z1r);
+fet_endchar;
+fet_endgroup("foobars");
MAJOR_VERSION = 0
MINOR_VERSION = 0
-PATCH_LEVEL = 20
+PATCH_LEVEL = 21
# use to send patches, always empty for released version:
MY_PATCH_LEVEL =
#
{
public:
- Midi_track_parser (Midi_parser_info* info_l);
+ Midi_track_parser (Midi_parser_info* info_l, int i);
~Midi_track_parser ();
Moment at_mom ();
class Mudela_staff {
public:
Mudela_staff (int number_i, String copyright_str, String track_name_str, String instrument_str);
- ~Mudela_staff();
void add_item (Mudela_item* mudela_item_p);
void eat_voice (Link_list<Mudela_item*>& items);
String name_str();
void output (Mudela_stream& mudela_stream_r);
void process();
- void set_meter (int num_i, int den_i, int clocks_i, int count_32_i);
- void set_tempo (int useconds_i);
String copyright_str_;
String instrument_str_;
String name_str_;
- Mudela_meter* mudela_meter_p_;
- Mudela_tempo* mudela_tempo_p_;
+ Mudela_key* mudela_key_l_;
+ Mudela_meter* mudela_meter_l_;
+ Mudela_tempo* mudela_tempo_l_;
int number_i_;
private:
int i = str.index_i (':');
i = (i >=0 ? i : str.length_i ());
key.accidentals_i_ = String_convert::dec2_i (str.left_str (i));
- key.minor_i_ = (int)(bool)String_convert::dec2_i (str.mid_str (i,1));
+ key.minor_i_ = (int)(bool)String_convert::dec2_i (str.mid_str (i + 1,1));
break;
}
case 'n':
if (!score_p)
return 1;
- if (!score_p->mudela_key_l_)
- score_p->mudela_key_l_ = &key;
+ // if given on command line: override
+ score_p->mudela_key_l_ = &key;
mudela_score_l_g = score_p;
score_p->process();
Link_array<Midi_track_parser> tracks;
for (int i = 0; i < info_l_->tracks_i_; i++)
- tracks.push (new Midi_track_parser (info_l_));
+ tracks.push (new Midi_track_parser (info_l_, i));
LOGOUT (NORMAL_ver) << "Parsing...\n";
while (tracks.size ())
#include "mudela-score.hh"
#include "mudela-staff.hh"
-Midi_track_parser::Midi_track_parser (Midi_parser_info* info_l)
+Midi_track_parser::Midi_track_parser (Midi_parser_info* info_l, int i)
{
info_l_ = info_l;
at_mom_ = 0;
track_info_p_ = 0;
- mudela_staff_p_ = new Mudela_staff (0, "", "", "");
+ mudela_staff_p_ = new Mudela_staff (i, "", "", "");
parse_header ();
parse_delta_time ();
}
assert (col_l);
- for (PCursor<Mudela_note*> i (open_note_l_list_.top ()); i.ok (); i++)
+ for (PCursor<Mudela_note*> i (open_note_l_list_.top ()); i.ok (); )
{
if ((i->pitch_i_ == pitch_i) && (i->channel_i_ == channel_i))
{
i.remove_p();
return;
}
+ else
+ i++;
}
warning (String ("junking note-end event: ")
+ " channel = " + String_convert::i2dec_str (channel_i, 0, ' ')
{
// find
assert (col_l);
- for (PCursor<Mudela_note*> i (open_note_l_list_.top ()); i.ok (); i++)
+ for (PCursor<Mudela_note*> i (open_note_l_list_.top ()); i.ok (); )
{
i->end_column_l_ = col_l;
- i.remove_p();
- // ugh
- if (!i.ok())
- break;
+ i.remove_p ();
}
}
Mudela_tempo* p = new Mudela_tempo ( useconds_per_4_u );
item_p = p;
info_l_->score_l_->mudela_tempo_l_ = p;
+ mudela_staff_p_->mudela_tempo_l_ = p;
}
// SMPTE_OFFSET [\x54][\x05]
else if ((byte == 0x54) && (next == 0x05))
item_p = p;
info_l_->score_l_->mudela_meter_l_ = p;
info_l_->bar_mom_ = p->bar_mom ();
+ mudela_staff_p_->mudela_meter_l_ = p;
}
// KEY [\x59][\x02]
else if ((byte == 0x59) && (next == 0x02))
Mudela_key* p = new Mudela_key (accidentals_i, minor_i);
item_p = p;
info_l_->score_l_->mudela_key_l_ = p;
+ mudela_staff_p_->mudela_key_l_ = p;
}
// SSME [\0x7f][\x03]
else if ((byte == 0x7f) && (next == 0x03))
int notename_i = notename_i_a[ (minor_i_ * 5 + pitch_i) % 12 ];
static int accidentals_i_a[ 12 ] = { 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0 };
- int accidental_i = accidentals_i_a[ minor_i_ * 5 + pitch_i % 12 ];
+ int accidental_i = accidentals_i_a[ (minor_i_ * 5 + pitch_i) % 12 ];
if (accidental_i && (accidentals_i_ < 0))
{
accidental_i = - accidental_i;
mudela_stream << "\\score{\n";
if (mudela_staff_p_list_.size() > 1)
- mudela_stream << "<\n\\multi 3;\n";
+ mudela_stream << "\\multi 3 < \\type Staff\n";
for (PCursor<Mudela_staff*> i (mudela_staff_p_list_); i.ok(); i++)
{
if ( (mudela_staff_p_list_.size() != 1)
&& (i == mudela_staff_p_list_.top()))
continue;
- mudela_stream << "\\melodic{ ";
+ mudela_stream << "< \\melodic{ ";
mudela_stream << "\\$" << i->id_str();
- mudela_stream << " }\n";
+ mudela_stream << " } >\n";
}
if (mudela_staff_p_list_.size() > 1)
mudela_stream << ">\n";
mudela_stream << "\\midi{\n";
// let's not use silly 0 track
- mudela_staff_p_list_.bottom()->mudela_tempo_p_->output (mudela_stream);
+ mudela_staff_p_list_.bottom()->mudela_tempo_l_->output (mudela_stream);
mudela_stream << "}\n";
mudela_stream << "}\n";
copyright_str_ = copyright_str;
instrument_str_ = instrument_str;
name_str_ = track_name_str;
- mudela_meter_p_ = new Mudela_meter (4, 2, 24, 8);
- mudela_tempo_p_ = new Mudela_tempo (1000000);
-}
-
-Mudela_staff::~Mudela_staff()
-{
- delete mudela_meter_p_;
- delete mudela_tempo_p_;
+ mudela_key_l_ = 0;
+ mudela_meter_l_ = 0;
+ mudela_tempo_l_ = 0;
}
void
void
Mudela_staff::output_mudela_begin_bar (Mudela_stream& mudela_stream_r, Moment now_mom, int bar_i)
{
- Moment bar_mom = mudela_meter_p_->bar_mom();
+ Moment bar_mom = mudela_meter_l_->bar_mom();
Moment into_bar_mom = now_mom - Moment (bar_i - 1) * bar_mom;
if (bar_i > 1)
{
void
Mudela_staff::output_mudela_rest (Mudela_stream& mudela_stream_r, Moment begin_mom, Moment end_mom)
{
- Moment bar_mom = mudela_meter_p_->bar_mom();
+ Moment bar_mom = mudela_meter_l_->bar_mom();
Moment now_mom = begin_mom;
int begin_bar_i = (int) (now_mom / bar_mom) + 1;
group items into voices
*/
+ assert (mudela_score_l_g);
+ mudela_key_l_ = mudela_score_l_g->mudela_key_l_;
+ mudela_meter_l_ = mudela_score_l_g->mudela_meter_l_;
+ mudela_tempo_l_ = mudela_score_l_g->mudela_tempo_l_;
+
Link_list<Mudela_item*> items;
for (PCursor<Mudela_item*> i (mudela_item_p_list_); i.ok(); i++)
items.bottom().add (*i);
eat_voice (items);
}
-void
-Mudela_staff::set_tempo (int useconds_per_4_i)
-{
- delete mudela_tempo_p_;
- mudela_tempo_p_ = new Mudela_tempo (useconds_per_4_i);
-}
-
-void
-Mudela_staff::set_meter (int num_i, int den_i, int clocks_i, int count_32_i)
-{
- delete mudela_meter_p_;
- mudela_meter_p_ = new Mudela_meter (num_i, den_i, clocks_i, count_32_i);
-}
-
*os_p_ << filename_str_g;
*os_p_ << "\n\n";
// ugh
- *os_p_ << "\\version \"0.1.2\";\n";
+ *os_p_ << "\\version \"0.1.6\";\n";
}
void
mudela_stream_r << "\n";
int current_bar_i = 0;
- Moment bar_mom = mudela_staff_l_->mudela_meter_p_->bar_mom();
+ Moment bar_mom = mudela_staff_l_->mudela_meter_l_->bar_mom();
for (PCursor<Mudela_item*> i (mudela_item_l_list_); i.ok(); i++)
{
\def\fetdef#1#2{\def#1{\lower.3884\staffrulethickness\hbox{\fetchar{#2}}}}
\def\fetchar#1{\fontentja\char#1}
+%\input font-en-tja16
\input font-en-tja20
\def\beamslope#1#2{{\count0=#2\advance\count0 by#1
-% generated automatically by mf-to-table.py version 0.3
+% generated automatically by mf-to-table.py version 0.3
+% on Wed Oct 8 16:18:13 1997
% Do not edit
% input from out/font-en-tja16.log
\fetdef\dot{15}
% balls
-\fetdef\wholeball{16}
-\fetdef\halfball{17}
-\fetdef\quartball{18}
-\fetdef\breveball{19}
-\fetdef\longaball{20}
+\fetdef\brevisball{16}
+\fetdef\longaball{17}
+\fetdef\wholeball{18}
+\fetdef\halfball{19}
+\fetdef\quartball{20}
% foobars
\fetdef\ufermata{21}
\fetdef\dfermata{22}
-\fetdef\accent{23}
+\fetdef\sforzatoaccent{23}
\fetdef\staccato{24}
\fetdef\ustaccatissimo{25}
\fetdef\dstaccatissimo{26}
\fetdef\tenuto{27}
\fetdef\umarcato{28}
\fetdef\dmarcato{29}
+\fetdef\ouvert{30}
+\fetdef\plusstop{31}
+\fetdef\upbow{32}
+\fetdef\downbow{33}
+\fetdef\turn{34}
+
+% floogbars
+\fetdef\eighthflag{35}
+\fetdef\deighthflag{36}
-% generated automatically by mf-to-table.py version 0.3
+% generated automatically by mf-to-table.py version 0.3
+% on Wed Oct 8 16:18:16 1997
% Do not edit
% input from out/font-en-tja20.log
\fetdef\dot{15}
% balls
-\fetdef\wholeball{16}
-\fetdef\halfball{17}
-\fetdef\quartball{18}
-\fetdef\breveball{19}
-\fetdef\longaball{20}
+\fetdef\brevisball{16}
+\fetdef\longaball{17}
+\fetdef\wholeball{18}
+\fetdef\halfball{19}
+\fetdef\quartball{20}
% foobars
\fetdef\ufermata{21}
\fetdef\dfermata{22}
-\fetdef\accent{23}
+\fetdef\sforzatoaccent{23}
\fetdef\staccato{24}
\fetdef\ustaccatissimo{25}
\fetdef\dstaccatissimo{26}
\fetdef\tenuto{27}
\fetdef\umarcato{28}
\fetdef\dmarcato{29}
+\fetdef\ouvert{30}
+\fetdef\plusstop{31}
+\fetdef\upbow{32}
+\fetdef\downbow{33}
+\fetdef\turn{34}
+
+% floogbars
+\fetdef\eighthflag{35}
+\fetdef\deighthflag{36}
\parindent=0pt
\newdimen\smallspace
\newdimen\interlinedist
+\newdimen\ledgerlinethickness
+\newdimen\stemthickness
\newcount\n
\newdimen\balkheight
\newdimen\notewidth
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% do derivative calcs
+% FIXME: should read from TFM/AFM/fetalog
+%
+
+% this has to be synced with the font definition
\def\musixcalc{
\interlinedist=\fontdimen5\musicfnt
\smallspace=.3\interlinedist
% [D.K.Roush & J.S.Gourlay] say this should be 0.072
% We know better
\staffrulethickness=0.1\interlinedist
+ \stemthickness=\staffrulethickness
+ \ledgerlinethickness=1.5\staffrulethickness
}
\loop\ifnum\n<#1\advance\n by1%
\kern\interstaffrule
\nointerlineskip
- \vbox to 0pt{\hrule height #3 width#2%
+ \vbox to 0pt{\hrule height .5#3 depth .5#3 width#2%
\vss}\nointerlineskip
\repeat
}}
%%
% Ugh. Need to redo this. Wish we had PS.
%
-\def\toplines#1#2{\dist#1
- \topalign{\hbox{\kern-.25\dist\lines{#2}{1.5\dist}{2\staffrulethickness}}}}
+\def\topledgerlines#1#2{\dist#1
+ \topalign{\hbox{\kern-.25\dist\lines{#2}{1.5\dist}{\ledgerlinethickness}}}}
-\def\botlines#1#2{\dist#1
- \botalign{\hbox{\kern-.25\dist\lines{#2}{1.5\dist}{2\staffrulethickness}}}}
+\def\botledgerlines#1#2{\dist#1
+ \botalign{\hbox{\kern-.25\dist\lines{#2}{1.5\dist}{\ledgerlinethickness}}}}
%
% a staffsymbol with #1 lines, width #2
% bottom at baseline
\def\linestafsym#1#2{\leftalign{\botalign{\lines{#1}{#2}{\staffrulethickness}}}}
-\def\stem#1#2{\vrule height#2 depth-#1}
+\def\stem#1#2{\hbox{\kern -.5\stemthickness
+ \vrule width\stemthickness height#2 depth-#1}}
\def\placebox#1#2#3{%
\botalign{\hbox{\raise #1\leftalign{\kern #2{}#3}}}%