diff options
author | Jan Nieuwenhuizen <janneke@gnu.org> | 1998-11-03 17:24:25 +0100 |
---|---|---|
committer | Jan Nieuwenhuizen <janneke@gnu.org> | 1998-11-03 17:24:25 +0100 |
commit | 8ef3c0a1a21dfa4d86481130b9a61bbdd27d9e22 (patch) | |
tree | 6a9e6c29c42f84b056ad522746613dc7c2d218bb | |
parent | b4d5d1145b0d59ae1ac42c9bc9c43c6d5b055c1c (diff) |
patch::: 1.1.2.jcn1: geile ps vixen enzode
pl 2.jcn1
- commented-out Level-2 PostScript in lily.ps (J. Buehler)
- moved tex/*.ps to ps/
- merged lilyponddefs.ps, lily-ps-defs: tex/lily.ps
- be sure to set:
export GS_LIB=$HOME/usr/src/lilypond/ps
- added tex and empty ps-symbols
pl 1.jcn4
- more little website fixes
pl 2
-rw-r--r-- | Documentation/tex/fonts.doc | 8 | ||||
-rw-r--r-- | NEWS | 14 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rwxr-xr-x | buildscripts/set-lily.sh | 4 | ||||
-rw-r--r-- | init/lily.scm | 111 | ||||
-rw-r--r-- | ps/GNUmakefile | 2 | ||||
-rw-r--r-- | ps/lily.ps | 184 | ||||
-rw-r--r-- | ps/lilyponddefs.ps | 175 | ||||
-rw-r--r-- | tex/GNUmakefile | 2 | ||||
-rw-r--r-- | tex/fetdefs.tex | 1 | ||||
-rw-r--r-- | tex/lily-ps-defs.tex | 220 | ||||
-rw-r--r-- | tex/lilyponddefs.ps | 325 |
12 files changed, 483 insertions, 565 deletions
diff --git a/Documentation/tex/fonts.doc b/Documentation/tex/fonts.doc index 9248bb815c..76e7304328 100644 --- a/Documentation/tex/fonts.doc +++ b/Documentation/tex/fonts.doc @@ -28,10 +28,10 @@ typography of all. % stupid test to check convert-mudela.py. % % (so sue me) -% well, make website breaks... -% \begin{mudela}[fragment,center] -% \clef bass; c1 \clef alto; c'2 \clef treble; c''4 -% \end{mudela} +% well, mudela-book:fragment is a bit broken +\begin{mudela}[fragment,center] + \notes {\clef bass; c1 \clef alto; c'2 \clef treble; c''4} +\end{mudela} \section{Bezier curves for slurs} @@ -1,3 +1,16 @@ +pl 2.jcn1 + - commented-out Level-2 PostScript in lily.ps (J. Buehler) + - moved tex/*.ps to ps/ + - merged lilyponddefs.ps, lily-ps-defs: tex/lily.ps + - be sure to set: + export GS_LIB=$HOME/usr/src/lilypond/ps + - added tex and empty ps-symbols + +pl 1.jcn4 + - more little website fixes + +pl 2 + pl 1.mb1 - Support for cautionary accidentals. , i.e. accidentals within parantheses. Syntax: 'cis?'. Try input/test/accid.fly @@ -6,6 +19,7 @@ pl 1.mb1 - Added optional second argument of \key. Set to \major or \minor to get a major or minor key. Default: major. - bf: Compilation error in midi-walker.cc + pl 1.jcn2 - fixes for htmldoc, website - silly jcn1 fixes @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=1 PATCH_LEVEL=2 -MY_PATCH_LEVEL= +MY_PATCH_LEVEL=jcn1 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/buildscripts/set-lily.sh b/buildscripts/set-lily.sh index d44317dc8e..bbacf89292 100755 --- a/buildscripts/set-lily.sh +++ b/buildscripts/set-lily.sh @@ -27,6 +27,10 @@ if [ "x$LILYINCLUDE" = "x" ]; then MFINPUTS=$MFINPUTS:$LILYPOND_SOURCEDIR/mf TEXINPUTS=$TEXINPUTS:$LILYPOND_SOURCEDIR/mf/out export LILYINCLUDE MFINPUTS TEXINPUTS + GS_LIB=$HOME/usr/src/lilypond/ps + GS_FONTPATH=$HOME/usr/src/lilypond/mf/out + GUILE_LOAD_PATH=$HOME/usr/src/lilypond/init + export GS_LIB GS_FONTPATH GUILE_LOAD_PATH cat <<EOF LILYINCLUDE=$LILYPOND_SOURCEDIR/init:$LILYPOND_SOURCEDIR/mf/out MFINPUTS=\$MFINPUTS:\$LILYPOND_SOURCEDIR/mf diff --git a/init/lily.scm b/init/lily.scm index ce384d2617..d0f1dc57fb 100644 --- a/init/lily.scm +++ b/init/lily.scm @@ -4,6 +4,11 @@ ; ; (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org> +; TODO +; - naming +; - ready ps code (draw_bracket) vs tex/ps macros/calls (pianobrace), +; all preparations from ps,tex to scm + ;;; graphical lisp element (define (add-column p) (display "adding column (in guile): ") (display p) (newline)) @@ -37,6 +42,30 @@ (string-append (number->string (car c)) " ") (string-append (number->string (cadr c)) " "))) +(define + (embedded-ps-tex s) + (string-append "\\embeddedps{" s "}")) + +(define + (invoke-char-ps s i) + (string-append + "(\\" (inexact->string i 8) ") " s " " )) + +(define + (invoke-char-tex s i) + (string-append + "\n\\" s "{" (inexact->string i 10) "}" )) + +(define + (invoke-dim1-ps s d) + (string-append + (number->string d) " " s )) + +(define + (invoke-dim1-tex s d) + (string-append + "\n\\" s "{" (number->dim-tex d) "}")) + (define (invoke-output o s) (eval-string (string-append s "-" o))) @@ -54,27 +83,23 @@ (define (beam-tex width slope thick) - (string-append - "\\embeddedps{" - (beam-ps width slope thick) - "}")) + (embedded-ps-tex (beam-ps width slope thick))) (define - (bracket o h) (empty o)) + (bracket o h) + ((invoke-output o "bracket") h)) (define - (char o n) - ((invoke-output o "char") n)) + (bracket-ps h) + (invoke-dim1-ps "draw_bracket" h)) (define - (char-ps n) - (string-append - "(\\" (inexact->string n 8) ") show")) + (bracket-tex h) + (embedded-ps-tex (bracket-ps h))) (define - (char-tex n) - (string-append - "\\char" (inexact->string n 10))) + (char o n) + ((invoke-output o "invoke-char") "show" n)) (define (dashed-slur o thick dash l) @@ -92,10 +117,11 @@ (define (dashed-slur-tex thick dash l) - (string-append - "\\embeddedps{" - (dashed-slur-ps thick dash l) - "}")) + (embedded-ps-tex (dashed-slur-ps thick dash l))) + +(define + (doublebar o h) + ((invoke-output o "invoke-dim1") "doublebar" h)) (define (empty o) @@ -110,6 +136,9 @@ "%\n\\empty%\n") (define + (emptybar o h) (empty o)) + +(define (end-output o) ((invoke-output o "end-output"))) @@ -132,7 +161,8 @@ (experimental-on-tex) "\\turnOnExperimentalFeatures") (define - (finishbar o h) (empty o)) + (finishbar o h) + ((invoke-output o "invoke-dim1") "finishbar" h)) (define (font i) @@ -143,8 +173,8 @@ (define (font-def o i s) - (empty o)) -; ((invoke-output o "font-def") i s)) + ((invoke-output o "font-def") i s)) +; (empty o)) (define (font-def-ps i s) @@ -225,20 +255,11 @@ (define (maatstreep o h) - ((invoke-output o "maatstreep") h)) + ((invoke-output o "invoke-dim1") "maatstreep" h)) (define - (maatstreep-ps h) - (string-append - (number->string h) " maatstreep " )) - -(define - (maatstreep-tex h) - (string-append - "\n\\maatstreep{" (number->dim-tex h) "}")) - -(define - (pianobrace o h) (empty o)) + (pianobrace o i) + ((invoke-output o "invoke-char") "pianobrace" i)) (define (placebox o x y b) @@ -256,7 +277,12 @@ (number->dim-tex y) "}{" (number->dim-tex x) "}{" s "}")) (define - (repeatbar o h) (empty o)) + (repeatbar o h) + ((invoke-output o "invoke-dim1") "repeatbar" h)) + +(define + (repeatbarstartrepeat o h) + ((invoke-output o "invoke-dim1") "repeatbarstartrepeat" h)) (define (rulesym o x y) @@ -302,10 +328,18 @@ ((invoke-output o "text") "Large" s)) (define + (setnumber o s) + ((invoke-output o "text") "number" s)) + +(define (settext o s) ((invoke-output o "text") "text" s)) (define + (settypewriter o s) + ((invoke-output o "text") "typewriter" s)) + +(define (slur o l) ((invoke-output o "slur") l)) @@ -317,10 +351,7 @@ (define (slur-tex l) - (string-append - "\\embeddedps{" - (slur-ps l) - "}")) + (embedded-ps-tex (slur-ps l))) (define (stem o kern width height depth) @@ -356,7 +387,8 @@ "\\hbox{%\n")) (define - (startrepeat o h) (empty o)) + (startrepeat o h) + ((invoke-output o "invoke-dim1") "startrepeat" h)) (define (stop-line o) @@ -371,7 +403,8 @@ "}\\interscoreline") (define - (stoprepeat o h) (empty o)) + (stoprepeat o h) + ((invoke-output o "invoke-dim1") "stoprepeat" h)) (define (text-ps f s) diff --git a/ps/GNUmakefile b/ps/GNUmakefile index a94b37ef8a..4803038f59 100644 --- a/ps/GNUmakefile +++ b/ps/GNUmakefile @@ -1,4 +1,4 @@ -# tex/Makefile +# ps/Makefile depth = .. diff --git a/ps/lily.ps b/ps/lily.ps new file mode 100644 index 0000000000..f1be1d4bcc --- /dev/null +++ b/ps/lily.ps @@ -0,0 +1,184 @@ +%!PS-Adobe-1.0: lily.ps +% +staffrulethickness /stafflinethickness exch def +% +% round cappings +1 setlinecap +% +/draw_beam % width slope thick +{ + 2 div /beam_thick exch def + /beam_slope exch def + /beam_wd exch def + beam_slope beam_wd mul /beam_ht exch def + 0 beam_thick neg moveto + beam_wd beam_ht rlineto + 0 beam_thick 2 mul rlineto + 0 beam_thick lineto + closepath fill +} bind def +% +/draw_decresc +{ + stafflinethickness setlinewidth + /cresc_cont exch def + /cresc_ht exch def + /cresc_wd exch def +% + cresc_wd cresc_cont moveto + 0 cresc_ht lineto + stroke + cresc_wd cresc_cont neg moveto + 0 cresc_ht neg lineto + stroke +} bind def +% +/draw_cresc +{ + stafflinethickness setlinewidth + /cresc_cont exch def + /cresc_ht exch def + /cresc_wd exch def +% + 0 cresc_cont moveto + cresc_wd cresc_ht lineto + stroke + 0 cresc_cont neg moveto + cresc_wd cresc_ht neg lineto + stroke +} bind def +% +/lily_distance +{ + 1 copy mul exch 1 copy mul add sqrt +} bind def +% +stafflinethickness 1.2 mul /plet_t exch def +/draw_plet +{ + plet_t setlinewidth +% urg: the only Level-2 PS, check effect in print +% true setstrokeadjust + 1 setlinecap + 1 setlinejoin + /dir exch def + /plet_dy exch def + /plet_dx exch def + staffheight 2 div /plet_gapx exch def + plet_dy plet_dx div plet_gapx mul /plet_gapy exch def + staffheight 4 div dir mul /plet_h exch def +% + 0 0 moveto + 0 plet_h lineto + plet_dx plet_gapx sub 2 div + plet_dy plet_gapy sub 2 div plet_h add lineto + plet_dx plet_gapx add 2 div + plet_dy plet_gapy add 2 div plet_h add moveto + plet_dx plet_dy plet_h add lineto + plet_dx plet_dy lineto + stroke +} bind def +% +/draw_slur +{ + stafflinethickness setlinewidth + moveto + curveto + lineto + curveto + gsave + fill + grestore + stroke +} bind def +% +/draw_dashed_slur +{ + 1 setlinecap + 1 setlinejoin + setdash + setlinewidth + moveto + curveto + stroke +} bind def +% +staffheight 4 div /interline exch def +% +/bracket_traject +{ + /traject_ds exch def + /traject_alpha exch def + traject_ds traject_alpha sin mul add + exch + traject_ds traject_alpha cos mul add + exch +} bind def +% +interline 3 div /bracket_b exch def +interline 2 mul /bracket_w exch def +stafflinethickness 2 mul /bracket_t exch def +interline 1.5 mul /bracket_v exch def +bracket_v /bracket_u exch def +50 /bracket_alpha exch def +% +/half_bracket +{ +%6 + 0 0 +%5a + bracket_b bracket_v add bracket_h bracket_t sub bracket_u add + bracket_alpha bracket_v -0.15 mul bracket_traject +%5b + 1 bracket_h + 0 bracket_v 0.5 mul bracket_traject +%5c + 0 bracket_h +%4a + bracket_b bracket_h bracket_t sub + 0 bracket_v 0.4 mul bracket_traject +%4b + bracket_b bracket_v add bracket_h bracket_t sub bracket_u add + bracket_alpha bracket_v -0.25 mul bracket_traject +%4c + bracket_b bracket_v add bracket_h bracket_t sub bracket_u add +%3 + bracket_b bracket_h bracket_t sub +%2 + bracket_b 0 +%1 + 0 0 +} bind def +% +/draw_half_bracket { + moveto + lineto + lineto + curveto + curveto + lineto + gsave + fill + grestore +} bind def +% +/draw_bracket % height +{ + 2 div bracket_b add /bracket_h exch def + bracket_t setlinewidth +% urg: the only Level-2 PS, check effect in print +% true setstrokeadjust + 1 setlinecap + 1 setlinejoin + half_bracket + 20 copy + 1 -1 scale + draw_half_bracket + stroke + 1 -1 scale +% ugh, ugh: + 0.05 0 translate + draw_half_bracket + stroke +} bind def +% diff --git a/ps/lilyponddefs.ps b/ps/lilyponddefs.ps new file mode 100644 index 0000000000..ffa7053bb3 --- /dev/null +++ b/ps/lilyponddefs.ps @@ -0,0 +1,175 @@ +%!PS-Adobe-1.0: lilyponddefs + +% hmm +/setgray { 1 add } bind def + +/xoffset 30 def +/yoffset 700 def +/staffrulethickness 1 def +/staffheight 20 def + +/placebox +{ + /object exch def + gsave + %exch translate + translate + 0 0 moveto + object + grestore +} bind def + +/settext % '(' text ')' +{ + gsave + % urg + /Times-Roman findfont 12 scalefont setfont + show + grestore +} bind def + +/setfinger % '(' text ')' +{ + gsave + % urg + /feta-nummer5 findfont 12 scalefont setfont + show + grestore +} bind def + +/setitalic % '(' text ')' +{ + gsave + % urg + /Times-Italic findfont 12 scalefont setfont + show + grestore +} bind def + +/vrule % width height depth +{ + gsave + 3 -1 roll setlinewidth + neg 0 exch moveto + 0 exch lineto stroke + grestore +} bind def + +/draw_stem % kern width height depth +{ + gsave + 4 -1 roll neg 0 translate + vrule + grestore +} bind def + +/widthbar % height width +{ + gsave + setlinewidth + 2 div dup neg 0 exch moveto + 0 exch lineto stroke + 2 div + grestore +} bind def + +/thickbar % height +{ + stafflinethickness 2 mul widthbar +} bind def + +/thinbar % height +{ + stafflinethickness 1.6 mul widthbar +} bind def + +/maatstreep % height +{ + thinbar +} bind def + +/finishbar +{ + thickbar +} bind def + +/generalmeter % num den +{ + pop pop +} bind def + +/pianobrace % '(' char ')' +{ + gsave + /feta-braces20 findfont 12 scalefont setfont% + show + grestore +} bind def + +/doublebar +{ + thinbar +} bind def + +/repeatbar +{ + thickbar +} bind def + +/repeatbarstartrepeat +{ + thickbar +} bind def + +/startrepeat +{ + thickbar +} bind def + +/stoprepeat +{ + thickbar +} bind def + +/start_line +{ + gsave + xoffset yoffset translate +} bind def + +/stop_line +{ + /object exch def + 0 0 moveto pathbbox exch pop sub exch pop + object + grestore + yoffset add /yoffset exch def + % urg... + yoffset staffheight 8 mul sub /yoffset exch def +} bind def + +/unknown { (U) show} bind def +/empty {(E) show} bind def + +/turnOnExperimentalFeatures { } bind def + +/rulesym % thick length +{ + gsave + exch setlinewidth + 0 lineto stroke + grestore +} bind def + +(lily.ps) findlibfile +{ + exch pop //systemdict /run get exec +} +{ + /undefinedfilename signalerror +} ifelse + +stafflinethickness setlinewidth + +% see if we're there... +% 10 setlinewidth 0 0 moveto 400 800 lineto stroke diff --git a/tex/GNUmakefile b/tex/GNUmakefile index 1befb1f496..f69214c2f5 100644 --- a/tex/GNUmakefile +++ b/tex/GNUmakefile @@ -5,7 +5,7 @@ depth = .. TEX_FILES = $(wildcard *.tex) -EXTRA_DIST_FILES = $(TEX_FILES) lilyponddefs.ps +EXTRA_DIST_FILES = $(TEX_FILES) STEPMAKE_TEMPLATES=install INSTALLATION_DIR=$(datadir)/tex/ diff --git a/tex/fetdefs.tex b/tex/fetdefs.tex index efa71663b4..b86d308249 100644 --- a/tex/fetdefs.tex +++ b/tex/fetdefs.tex @@ -78,6 +78,7 @@ \def\fetdef#1#2{% \def#1{\hbox{\fetchar{#2}}}} \def\fetchar#1{\char#1} +\def\show#1{\char#1} %\input feta16 %\input feta20 diff --git a/tex/lily-ps-defs.tex b/tex/lily-ps-defs.tex index 7740d62496..99a7e13c2c 100644 --- a/tex/lily-ps-defs.tex +++ b/tex/lily-ps-defs.tex @@ -4,11 +4,6 @@ % % -% Should put in a lily-ps.ps header? -% -% - -% % header info (macros/defs, etc) should go into a \special{! ... }, % note the ! sign. See dvips.info for details. % @@ -19,216 +14,53 @@ % ``compiles'' operatorname binding in the body of foo, making % the code faster, and more reliable (less flexible) - % transplant a TeX dimension into the PS output. \def\PSsetTeXdimen#1{\expandafter\special{! /#1 (\the\csname #1\endcsname) deftexdimen}} \def\turnOnPostScript{% -\def\embeddedps##1{% - % This sets CTM so that you get to the currentpoint - % by executing a 0 0 moveto - \special{ps: @beginspecial @setspecial ##1 @endspecial} -} -% -% width, slope, height -% -\special{! % round cappings -1 setlinecap -/draw_beam -{ - 2 div /beam_thick exch def - /beam_slope exch def - /beam_wd exch def - beam_slope beam_wd mul /beam_ht exch def - 0 beam_thick neg moveto - beam_wd beam_ht rlineto - 0 beam_thick 2 mul rlineto - 0 beam_thick lineto - closepath fill -} bind def +\special{! % PS helper: convert (0.2pt) to the token 0.2 -/settexdimen { /thestring exch def +/settexdimen +{ + /thestring exch def thestring 0 thestring length 2 sub getinterval token - pop exch pop } -def + pop exch pop +} def % -/deftexdimen { +/deftexdimen +{ settexdimen def } def } -% \PSsetTeXdimen{staffrulethickness} \PSsetTeXdimen{staffheight} -\special{! % -/draw_decresc - { - staffrulethickness setlinewidth - /cresc_cont exch def - /cresc_ht exch def - /cresc_wd exch def -% - cresc_wd cresc_cont moveto - 0 cresc_ht lineto - stroke - cresc_wd cresc_cont neg moveto - 0 cresc_ht neg lineto - stroke - } - bind def - /draw_cresc - { - staffrulethickness setlinewidth - /cresc_cont exch def - /cresc_ht exch def - /cresc_wd exch def -% - 0 cresc_cont moveto - cresc_wd cresc_ht lineto - stroke - 0 cresc_cont neg moveto - cresc_wd cresc_ht neg lineto - stroke - } - bind def - /lily_distance { - 1 copy mul exch 1 copy mul add sqrt - } bind def -staffrulethickness 1.2 mul /plet_t exch def -/draw_plet +% urg, no dvips.info over here... +%\special{! \input lily.ps } +\special{! +(lily.ps) findlibfile { - plet_t setlinewidth - true setstrokeadjust - 1 setlinecap - 1 setlinejoin - /dir exch def - /plet_dy exch def - /plet_dx exch def - staffheight 2 div /plet_gapx exch def - plet_dy plet_dx div plet_gapx mul /plet_gapy exch def - staffheight 4 div dir mul /plet_h exch def -% - 0 0 moveto - 0 plet_h lineto - plet_dx plet_gapx sub 2 div - plet_dy plet_gapy sub 2 div plet_h add lineto - plet_dx plet_gapx add 2 div - plet_dy plet_gapy add 2 div plet_h add moveto - plet_dx plet_dy plet_h add lineto - plet_dx plet_dy lineto - stroke -} bind def -% -/draw_slur -{ - staffrulethickness setlinewidth - moveto - curveto - lineto - curveto - gsave - fill - grestore - stroke -} bind def -% -/draw_dashed_slur -{ - 1 setlinecap - 1 setlinejoin - setdash - setlinewidth - moveto - curveto - stroke -} bind def -% -staffheight 4 div /interline exch def -% -/bracket_traject -{ - /traject_ds exch def - /traject_alpha exch def - traject_ds traject_alpha sin mul add - exch - traject_ds traject_alpha cos mul add - exch -} bind def -% -% too fat for 20pt -% interline 2 div /bracket_b exch def -interline 3 div /bracket_b exch def -interline 2 mul /bracket_w exch def -staffrulethickness /stafflinethickness exch def -stafflinethickness 2 mul /bracket_t exch def -interline 1.5 mul /bracket_v exch def -bracket_v /bracket_u exch def -50 /bracket_alpha exch def + exch pop //systemdict /run get exec +} +{ + /undefinedfilename signalerror +} ifelse +} % -/half_bracket -{ -%6 - 0 0 -%5a - bracket_b bracket_v add bracket_h bracket_t sub bracket_u add - bracket_alpha bracket_v -0.15 mul bracket_traject -%5b - 1 bracket_h - 0 bracket_v 0.5 mul bracket_traject -%5c - 0 bracket_h -%4a - bracket_b bracket_h bracket_t sub - 0 bracket_v 0.4 mul bracket_traject -%4b - bracket_b bracket_v add bracket_h bracket_t sub bracket_u add - bracket_alpha bracket_v -0.25 mul bracket_traject -%4c - bracket_b bracket_v add bracket_h bracket_t sub bracket_u add -%3 - bracket_b bracket_h bracket_t sub -%2 - bracket_b 0 -%1 - 0 0 -} bind def +\def\embeddedps##1{% + % This sets CTM so that you get to the currentpoint + % by executing a 0 0 moveto + \special{ps: @beginspecial @setspecial ##1 @endspecial} +} % -/draw_half_bracket { - moveto - lineto - lineto - curveto - curveto - lineto - gsave - fill - grestore -} bind def % -/draw_bracket -{ - 2 div bracket_b add /bracket_h exch def - bracket_t setlinewidth - true setstrokeadjust - 1 setlinecap - 1 setlinejoin - half_bracket - 20 copy - 1 -1 scale - draw_half_bracket - stroke - 1 -1 scale -% ugh, ugh: - 0.05 0 translate - draw_half_bracket - stroke -} bind def -}} +%\PSsetTeXdimen{staffrulethickness} +%\PSsetTeXdimen{staffheight} +} \def\turnOnExperimentalFeatures{% -% draw a slur in embedded postscript \special{ps: }} diff --git a/tex/lilyponddefs.ps b/tex/lilyponddefs.ps index 07e3845d15..e69de29bb2 100644 --- a/tex/lilyponddefs.ps +++ b/tex/lilyponddefs.ps @@ -1,325 +0,0 @@ -%!PS-Adobe-3.0: lilyponddefs - -% hmm -/setgray { 1 add } bind def - -/xoffset 30 def -/yoffset 700 def -/staffrulethickness 1 def -/staffheight 20 def - -% round cappings -1 setlinecap - -/placebox -{ - /object exch def - gsave - %exch translate - translate - 0 0 moveto - object - grestore -} bind def - -/settext % '(' text ')' -{ - gsave - % urg - /Times-Roman findfont 12 scalefont setfont - show - grestore -} bind def - -/setfinger % '(' text ')' -{ - gsave - % urg - /feta-nummer5 findfont 12 scalefont setfont - show - grestore -} bind def - -/setitalic % '(' text ')' -{ - gsave - % urg - /Times-Italic findfont 12 scalefont setfont - show - grestore -} bind def - -/vrule % width height depth -{ - gsave - 3 -1 roll setlinewidth - neg 0 exch moveto - 0 exch lineto stroke - grestore -} bind def - -/draw_stem % kern width height depth -{ - gsave - 4 -1 roll neg 0 translate - vrule - grestore -} bind def - -/widthbar % height width -{ - gsave - setlinewidth - 2 div dup neg 0 exch moveto - 0 exch lineto stroke - 2 div - grestore -} bind def - -/thickbar % height -{ - stafflinethickness 2 mul widthbar -} bind def - -/thinbar % height -{ - stafflinethickness 1.6 mul widthbar -} bind def - -/maatstreep % height -{ - thinbar -} bind def - -/finishbar -{ - thickbar -} bind def - -/generalmeter % num den -{ - pop pop -} bind def - -/pianobrace -{ - gsave - /feta-braces20 findfont 12 scalefont setfont% - show - grestore -} bind def - -/repeatbar -{ -} bind def - -/start_line -{ - gsave - xoffset yoffset translate -} bind def - -/stop_line -{ - /object exch def - 0 0 moveto pathbbox exch pop sub exch pop - object - grestore - yoffset add /yoffset exch def - % urg... - yoffset staffheight 8 mul sub /yoffset exch def -} bind def - -/unknown { (U) show} bind def -/empty {(E) show} bind def - -/turnOnExperimentalFeatures { } bind def - -/rulesym % thick length -{ - gsave - exch setlinewidth - 0 lineto stroke - grestore -} bind def - -/draw_beam % width slope thick -{ - 2 div /beam_thick exch def - /beam_slope exch def - /beam_wd exch def - beam_slope beam_wd mul /beam_ht exch def - 0 beam_thick neg moveto - beam_wd beam_ht rlineto - 0 beam_thick 2 mul rlineto - 0 beam_thick lineto - closepath fill -} bind def -% -/draw_decresc - { - staffrulethickness setlinewidth - /cresc_cont exch def - /cresc_ht exch def - /cresc_wd exch def -% - cresc_wd cresc_cont moveto - 0 cresc_ht lineto - stroke - cresc_wd cresc_cont neg moveto - 0 cresc_ht neg lineto - stroke - } - bind def - /draw_cresc - { - staffrulethickness setlinewidth - /cresc_cont exch def - /cresc_ht exch def - /cresc_wd exch def -% - 0 cresc_cont moveto - cresc_wd cresc_ht lineto - stroke - 0 cresc_cont neg moveto - cresc_wd cresc_ht neg lineto - stroke - } - bind def - /lily_distance { - 1 copy mul exch 1 copy mul add sqrt - } bind def -staffrulethickness 1.2 mul /plet_t exch def -/draw_plet -{ - plet_t setlinewidth - true setstrokeadjust - 1 setlinecap - 1 setlinejoin - /dir exch def - /plet_dy exch def - /plet_dx exch def - staffheight 2 div /plet_gapx exch def - plet_dy plet_dx div plet_gapx mul /plet_gapy exch def - staffheight 4 div dir mul /plet_h exch def -% - 0 0 moveto - 0 plet_h lineto - plet_dx plet_gapx sub 2 div - plet_dy plet_gapy sub 2 div plet_h add lineto - plet_dx plet_gapx add 2 div - plet_dy plet_gapy add 2 div plet_h add moveto - plet_dx plet_dy plet_h add lineto - plet_dx plet_dy lineto - stroke -} bind def -% -/draw_slur -{ - staffrulethickness setlinewidth - moveto - curveto - lineto - curveto - gsave - fill - grestore - stroke -} bind def -% -/draw_dashed_slur -{ - 1 setlinecap - 1 setlinejoin - setdash - setlinewidth - moveto - curveto - stroke -} bind def -% -staffheight 4 div /interline exch def -% -/bracket_traject -{ - /traject_ds exch def - /traject_alpha exch def - traject_ds traject_alpha sin mul add - exch - traject_ds traject_alpha cos mul add - exch -} bind def -% -% too fat for 20pt -% interline 2 div /bracket_b exch def -interline 3 div /bracket_b exch def -interline 2 mul /bracket_w exch def -staffrulethickness /stafflinethickness exch def -stafflinethickness 2 mul /bracket_t exch def -interline 1.5 mul /bracket_v exch def -bracket_v /bracket_u exch def -50 /bracket_alpha exch def -% -/half_bracket -{ -%6 - 0 0 -%5a - bracket_b bracket_v add bracket_h bracket_t sub bracket_u add - bracket_alpha bracket_v -0.15 mul bracket_traject -%5b - 1 bracket_h - 0 bracket_v 0.5 mul bracket_traject -%5c - 0 bracket_h -%4a - bracket_b bracket_h bracket_t sub - 0 bracket_v 0.4 mul bracket_traject -%4b - bracket_b bracket_v add bracket_h bracket_t sub bracket_u add - bracket_alpha bracket_v -0.25 mul bracket_traject -%4c - bracket_b bracket_v add bracket_h bracket_t sub bracket_u add -%3 - bracket_b bracket_h bracket_t sub -%2 - bracket_b 0 -%1 - 0 0 -} bind def -% -/draw_half_bracket { - moveto - lineto - lineto - curveto - curveto - lineto - gsave - fill - grestore -} bind def -% -/draw_bracket -{ - 2 div bracket_b add /bracket_h exch def - bracket_t setlinewidth - true setstrokeadjust - 1 setlinecap - 1 setlinejoin - half_bracket - 20 copy - 1 -1 scale - draw_half_bracket - stroke - 1 -1 scale -% ugh, ugh: - 0.05 0 translate - draw_half_bracket - stroke -} bind def - -stafflinethickness setlinewidth - -% see if we're there... -% 10 setlinewidth 0 0 moveto 400 800 lineto stroke |