]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.1.1.jcn1: Re: geil
authorJan Nieuwenhuizen <janneke@gnu.org>
Mon, 2 Nov 1998 17:09:59 +0000 (18:09 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Mon, 2 Nov 1998 17:09:59 +0000 (18:09 +0100)
pl 0.jcn4
-set:
   export GUILE_LOAD_PATH=$HOME/usr/src/lilypond/init
- dstream: Score_element, Column_info
- -fscm debug hack: lilypond -fscm a; guile a.scm > a.tex; tex a
- init/lily.scm

12 files changed:
Documentation/tex/feta.tex
NEWS
VERSION
dstreamrc
init/GNUmakefile
init/lily.scm [new file with mode: 0644]
init/paper16.ly
init/paper20.ly
init/scm.ly
lily/lookup.cc
lily/paper-def.cc
lily/paper-outputter.cc

index cf2f881c9474327cc06d847fbb28d85382b56008..032c1dcf69c47585d2f817faf9d7ee383a44f517 100644 (file)
 \font\fetanumber = feta-nummer12
 \font\fetafinger = feta-nummer5
 \font\fetadyn = feta-din10 scaled \magstep 2
+\font\title = cmbx12 scaled \magstep 4
+\font\subtitle = cmr9
 
-\def\setchar#1#2{\hbox to\charwidth{\hss{#1\char#2}}}
+\def\lilyfooter{Lily was here, 1.1.0}
+\def\setchar#1#2{\hbox to\charwidth{\hss{#1\char#2}\hss}}
 
 \def\charsperline{6}
 \def\charheight{55pt}
         \loop\ifnum\n<#3
        \advance\n by\charsperline
        \i=0
-       \vbox to\charheight{\vss\hbox{
+       {\vbox to\charheight{\vss\centerline{
        {\loop\ifnum\i<\charsperline
        \advance\i by1
        \advance\n by1
         {\setchar{#1}{\number\n}}
-       \repeat}}}\repeat}
+       \repeat}}}}\repeat}
+
+
+\centerline{\title FETA}
+
+\centerline{\subtitle (definately not an abbreviation for Font-En-Tja)}
+
+\vskip5mm
 
 \listfont{\fetatwenty}{0}{78}
 % urg
@@ -43,4 +53,6 @@
 \listfont{\fetadyn}{0}{6}
 \vskip-\charheight
 
+\lilyfooter
+
 \bye
diff --git a/NEWS b/NEWS
index c11ce8fd55a429bac86f50823a519c01299ac110..6b9b37174da87046b79c0a3854560a3077963a3d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,10 @@
+pl 0.jcn4
+       -set:
+          export GUILE_LOAD_PATH=$HOME/usr/src/lilypond/init
+       - dstream: Score_element, Column_info
+       - -fscm debug hack: lilypond -fscm a; guile a.scm > a.tex; tex a
+       - init/lily.scm
+
 pl 0.uu5
        - fixed MIDI output.
 
diff --git a/VERSION b/VERSION
index deeabc172bca7a1156bdac5eb84c52081a6b0339..6ad281102eb9d0ad6484ed1aa7782f21bee0bca6 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=1
 PATCH_LEVEL=1
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=jcn1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 2d4ef5938b01b201462caa6f74584755fdc9be6a..330a276b849e50b650c0bf9e728d138cfc09face 100644 (file)
--- a/dstreamrc
+++ b/dstreamrc
@@ -41,9 +41,8 @@ Clef_item             1
 Clef_change_req                1
 Col_configuration      1
 Col_hpositions         1
-Colinfo                        1
-Colinfo                        1
 Collision              1
+Column_info            1
 Column_rod             1
 Duration_identifier    1
 Engraver               0
@@ -92,7 +91,7 @@ Rhythmic_req          1
 Scope                  1
 Score                  0
 Score_column           0
-Score_elem             0
+Score_element          0
 Score_engraver         0
 Score_performer                1
 Script_column          1
index 7b213816c7ecb249bcc69d7fa5252ae069d624a2..105ca5fc69c748d693f27e1e625dd065a15b8eb9 100644 (file)
@@ -3,7 +3,8 @@
 depth = ..
 
 INI_FILES = $(FLY_FILES) $(LY_FILES)
-# DIST_FILES = Makefile $(INI_FILES)
+SCM_FILES = $(wildcard *.scm)
+EXTRA_DIST_FILES = $(SCM_FILES)
 
 INSTALLATION_DIR=$(datadir)/ly/
 INSTALLATION_FILES=$(INI_FILES)
diff --git a/init/lily.scm b/init/lily.scm
new file mode 100644 (file)
index 0000000..cc47c8e
--- /dev/null
@@ -0,0 +1,389 @@
+; lily.scm -- implement Scheme output routines for TeX and PostScript
+;
+;  source file of the GNU LilyPond music typesetter
+; 
+; (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
+
+;;; graphical lisp element
+(define (add-column p) (display "adding column (in guile): ") (display p) (newline))
+
+;;; library funtions
+(define
+  (numbers->string l)
+  (apply string-append 
+  (map (lambda (n) (string-append (number->string n) " ")) l)))
+
+(define (number->octal-string x)
+  (let* ((n (inexact->exact x))
+         (n64 (quotient n 64))
+         (n8 (quotient (- n (* n64 64)) 8)))
+        (string-append
+         (number->string n64)
+         (number->string n8)
+         (number->string (remainder (- n (+ (* n64 64) (* n8 8))) 8)))))
+
+(define (inexact->string x radix)
+  (let ((n (inexact->exact x)))
+       (number->string n radix)))
+
+(define 
+  (number->dim-tex x)
+  (string-append 
+   (number->string x) "pt "))
+
+(define
+  (control->string c)
+  (string-append
+    (string-append (number->string (car c)) " ")
+    (string-append (number->string (cadr c)) " ")))
+
+(define
+  (invoke-output o s)
+   (eval-string (string-append s "-" o)))
+
+;;; output definitions
+
+(define 
+  (beam o width slope thick) 
+  ((invoke-output o "beam") width slope thick))
+
+(define 
+  (beam-ps width slope thick)
+  (string-append
+   (numbers->string (list width slope thick)) " draw_beam " ))
+
+(define 
+  (beam-tex width slope thick)
+  (string-append 
+    "\\embeddedps{"
+    (beam-ps width slope thick)
+   "}"))
+
+(define 
+  (char o n) 
+  ((invoke-output o "char") n))
+
+(define 
+  (char-ps n) 
+  (string-append 
+   "(\\" (inexact->string n 8) ") show"))
+
+(define 
+  (char-tex n) 
+  (string-append 
+   "\\char" (inexact->string n 10)))
+
+(define 
+  (dashed-slur o thick dash l) 
+  ((invoke-output o "dashed-slur") thick dash l))
+
+(define 
+  (dashed-slur-ps thick dash l)
+  (string-append 
+    (apply string-append (map control->string l)) 
+    (number->string thick) 
+   " [ "
+   (if (> 1 dash) (number->string (- (* thick dash) thick)) "0") " "
+   (number->string (* 2 thick))
+   " ] 0 draw_dashed_slur"))
+
+(define 
+  (dashed-slur-tex thick dash l)
+  (string-append 
+    "\\embeddedps{"
+    (dashed-slur-ps thick dash l)
+   "}"))
+
+(define 
+  (empty o) 
+  ((invoke-output o "empty")))
+
+(define 
+  (empty-ps) 
+  "\n empty\n")
+
+(define 
+  (empty-tex) 
+  "%\n\\empty%\n")
+
+(define 
+  (end-output o) 
+  ((invoke-output o "end-output")))
+
+(define 
+  (end-output-ps)
+  "\nshowpage\n")
+
+(define 
+  (end-output-tex) 
+  "\n\\EndLilyPondOutput")
+
+(define 
+  (experimental-on o) 
+  ((invoke-output o "experimental-on")))
+
+(define
+  (experimental-on-ps) "")
+
+(define
+  (experimental-on-tex) "\\turnOnExperimentalFeatures")
+
+(define
+  (finishbar o h) (empty o))
+
+(define
+  (font i)
+  (string-append
+   "font"
+   (make-string 1 (integer->char (+ (char->integer #\A) i)))
+   ))
+
+(define 
+  (font-def o i s) 
+  (empty o))
+;  ((invoke-output o "font-def") i s))
+
+(define 
+  (font-def-ps i s)
+  (string-append
+   "\n/" (font i) " {/" 
+   (substring s 0 (- (string-length s) 3))
+   " findfont 12 scalefont setfont} bind def\n"))
+
+(define 
+  (font-def-tex i s)
+  (string-append
+   "\\font" (font-switch-tex i) "=" s "\n"))
+
+(define 
+  (font-switch o i) 
+  ((invoke-output o "font-switch") i))
+
+(define 
+  (font-switch-ps i)
+  (string-append (font i) " "))
+
+(define 
+  (font-switch-tex i)
+  (string-append
+   "\\" (font i) "\n"))
+
+(define 
+  (generalmeter o num den)
+   ((invoke-output o "generalmeter") num den))
+
+(define 
+  (generalmeter-ps num den)
+  (string-append (number->string (inexact->exact num)) " " (number->string (inexact->exact den)) " generalmeter "))
+
+(define 
+  (generalmeter-tex num den)
+  (string-append 
+   "\\generalmeter{" (number->string (inexact->exact num)) "}{" (number->string (inexact->exact den)) "}"))
+
+(define 
+  (header o creator generate) 
+  ((invoke-output o "header") creator generate))
+
+(define 
+  (header-ps creator generate) 
+  (string-append
+   "%!PS-Adobe-3.0\n"
+   "%%Creator: " creator generate "\n"))
+
+(define 
+  (header-tex creator generate) 
+  (string-append
+   "%created by: " creator generate "\n"))
+
+(define 
+  (header-end o) 
+  ((invoke-output o "header-end")))
+
+(define
+  (header-end-ps) "")
+
+(define
+  (header-end-tex) "\\turnOnPostScript")
+
+(define
+  (lily-def o key val)
+  ((invoke-output o "lily-def") key val))
+
+(define
+  (lily-def-ps key val)
+  (string-append
+   "/" key " {" val "} bind def\n"))
+
+(define
+  (lily-def-tex key val)
+  (string-append
+   "\\def\\" key "{" val "}\n"))
+
+(define 
+  (maatstreep o h) 
+  ((invoke-output o "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))
+
+(define 
+  (placebox o x y b) 
+  ((invoke-output o "placebox") x y (b o)))
+
+(define 
+  (placebox-ps x y s) 
+  (string-append 
+   (number->string x) " " (number->string y) " {" s "} placebox "))
+
+(define 
+  (placebox-tex x y s) 
+  (string-append 
+   "\\placebox{"
+   (number->dim-tex y) "}{" (number->dim-tex x) "}{" s "}"))
+
+(define
+  (repeatbar o h) (empty o))
+
+(define 
+  (rulesym o x y) 
+  ((invoke-output o "rulesym") x y))
+
+(define 
+  (rulesym-ps x y) 
+  (string-append 
+   (number->string x) " "
+   (number->string y) " "
+   "rulesym"))
+
+(define 
+  (rulesym-tex x y) 
+  (string-append 
+   "\\rulesym{" (number->dim-tex x) "}{" (number->dim-tex y) "}"))
+
+(define 
+  (setbold o s) 
+  ((invoke-output o "text") "bold" s))
+
+(define 
+  (setfinger o s) 
+  ((invoke-output o "text") "finger" s))
+
+(define 
+  (sethuge o s) 
+  ((invoke-output o "text") "huge" s))
+
+(define 
+  (setitalic o s) 
+  ((invoke-output o "text") "italic" s))
+
+(define 
+  (setlarge o s) 
+  ((invoke-output o "text") "large" s))
+
+(define 
+  (setLarge o s) 
+  ((invoke-output o "text") "Large" s))
+
+(define 
+  (settext o s) 
+  ((invoke-output o "text") "text" s))
+
+(define 
+  (slur o l) 
+  ((invoke-output o "slur") l))
+
+(define 
+  (slur-ps l)
+  (string-append 
+   (apply string-append (map control->string l)) 
+   " draw_slur"))
+
+(define 
+  (slur-tex l)
+  (string-append 
+   "\\embeddedps{"
+   (slur-ps l)
+   "}"))
+
+(define 
+  (stem o kern width height depth) 
+  ((invoke-output o "stem") kern width height depth))
+
+(define 
+  (stem-ps kern width height depth) 
+  (string-append (numbers->string (list kern width height depth))
+                "draw_stem" ))
+
+(define 
+  (stem-tex kern width height depth) 
+  (string-append 
+   "\\kern" (number->dim-tex kern)
+   "\\vrule width " (number->dim-tex width)
+   "depth " (number->dim-tex depth)
+   "height " (number->dim-tex height) " "))
+
+(define 
+  (start-line o) 
+  ((invoke-output o "start-line")))
+
+(define 
+  (start-line-ps) 
+  (string-append
+   (urg-fix-font-ps)
+   "\nstart_line {\n"))
+
+(define 
+  (start-line-tex) 
+  (string-append 
+   (urg-fix-font-tex)
+   "\\hbox{%\n"))
+
+(define
+  (startrepeat o h) (empty o))
+
+(define 
+  (stop-line o) 
+  ((invoke-output o "stop-line")))
+
+(define 
+  (stop-line-ps) 
+  "}\nstop_line\n")
+
+(define 
+  (stop-line-tex) 
+  "}\\interscoreline")
+
+(define
+  (stoprepeat o h) (empty o))
+
+(define
+  (text-ps f s)
+  (string-append "(" s ") set" f " "))
+
+(define
+  (text-tex f s)
+  (string-append "\\set" f "{" s "}"))
+
+(define
+  (urg-fix-font-ps)
+  "/fontA { /feta20 findfont 12 scalefont setfont} bind def fontA\n")
+
+(define
+  (urg-fix-font-tex)
+  "\\font\\fontA=feta20.afm\\fontA\n")
+
+(define 
+  (urg-font-switch-ps i)
+  "\n/feta20 findfont 12 scalefont setfont \n")
+
index 11aa7a8fd218bbd1712960269b9fdec886de000a..53ab49363decf4e4ebb986a094916579f1bcd086 100644 (file)
@@ -20,6 +20,8 @@ paper_sixteen = \paper {
         arithmetic_multiplier = 4.8\pt;
        texsetting = "\\input lilyponddefs \\musixsixteendefs ";
        pssetting = "(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec} { /undefinedfilename signalerror } ifelse\n";
+       scmsetting = "(display \"(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec} { /undefinedfilename signalerror } ifelse\");\n";
+       scmsetting = "(display \"\\\\input lilyponddefs \\\\musixsixteendefs\");\n";
 
        0 = \symboltables { \table_sixteen }
        -1 = \symboltables { \table_thirteen }
index 226cfb6a7414adfa7e84d1ab4fb259c1adfaed1d..e799f529bc36b463ac7425bb20587c34c6bc7b2f 100644 (file)
@@ -20,7 +20,8 @@ paper_twenty = \paper {
        texsetting = "\\input lilyponddefs \\musixtwentydefs ";
        pssetting = "(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec} { /undefinedfilename signalerror } ifelse\n";
        % urg, debugging only
-       scmsetting = "(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec} { /undefinedfilename signalerror } ifelse\n";
+       scmsetting = "(display \"(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec} { /undefinedfilename signalerror } ifelse\");\n";
+       scmsetting = "(display \"\\\\input lilyponddefs \\\\musixtwentydefs\");\n";
 
        -2 = \symboltables { \table_thirteen }  
        -1 = \symboltables { \table_sixteen }
index f576ea8875e94cdb225d4ee78febe839d1edeb49..c2c3155fb2e9f96f0fcb67ed7d703321f083c8b3 100644 (file)
@@ -5,384 +5,8 @@
 % (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
 
 \scm "
-
-;;; graphical lisp element
-(define (add-column p) (display \"adding column (in guile): \") (display p) (newline))
-
-;;; library funtions
-(define
-  (numbers->string l)
-  (apply string-append 
-  (map (lambda (n) (string-append (number->string n) \" \")) l)))
-
-(define (number->octal-string x)
-  (let* ((n (inexact->exact x))
-         (n64 (quotient n 64))
-         (n8 (quotient (- n (* n64 64)) 8)))
-        (string-append
-         (number->string n64)
-         (number->string n8)
-         (number->string (remainder (- n (+ (* n64 64) (* n8 8))) 8)))))
-
-(define (inexact->string x radix)
-  (let ((n (inexact->exact x)))
-       (number->string n radix)))
-
-(define 
-  (number->dim-tex x)
-  (string-append 
-   (number->string x) \"pt \"))
-
-(define
-  (control->string c)
-  (string-append
-    (string-append (number->string (car c)) \" \")
-    (string-append (number->string (cadr c)) \" \")))
-
-(define
-  (invoke-output o s)
-   (eval-string (string-append s \"-\" o)))
-
-;;; output definitions
-
-(define 
-  (beam o width slope thick) 
-  ((invoke-output o \"beam\") width slope thick))
-
-(define 
-  (beam-ps width slope thick)
-  (string-append
-   (numbers->string (list width slope thick)) \" draw_beam \" ))
-
-(define 
-  (beam-tex width slope thick)
-  (string-append 
-    \"\\\\embeddedps{\"
-    (beam-ps width slope thick)
-   \"}\"))
-
-(define 
-  (char o n) 
-  ((invoke-output o \"char\") n))
-
-(define 
-  (char-ps n) 
-  (string-append 
-   \"(\\\\\" (inexact->string n 8) \") show\"))
-
-(define 
-  (char-tex n) 
-  (string-append 
-   \"\\\\char\" (inexact->string n 10)))
-
-(define 
-  (dashed-slur o thick dash l) 
-  ((invoke-output o \"dashed-slur\") thick dash l))
-
-(define 
-  (dashed-slur-ps thick dash l)
-  (string-append 
-    (apply string-append (map control->string l)) 
-    (number->string thick) 
-   \" [ \"
-   (if (> 1 dash) (number->string (- (* thick dash) thick)) \"0\") \" \"
-   (number->string (* 2 thick))
-   \" ] 0 draw_dashed_slur\"))
-
-(define 
-  (dashed-slur-tex thick dash l)
-  (string-append 
-    \"\\\\embeddedps{\"
-    (dashed-slur-ps thick dash l)
-   \"}\"))
-
-(define 
-  (empty o) 
-  ((invoke-output o \"empty\")))
-
-(define 
-  (empty-ps) 
-  \"\n empty\n\")
-
-(define 
-  (empty-tex) 
-  \"%\n\\\\empty%\n\")
-
-(define 
-  (end-output o) 
-  ((invoke-output o \"end-output\")))
-
-(define 
-  (end-output-ps)
-  \"\nshowpage\n\")
-
-(define 
-  (end-output-tex) 
-  \"\n\\\\EndLilyPondOutput\")
-
-(define 
-  (experimental-on o) 
-  ((invoke-output o \"experimental-on\")))
-
-(define
-  (experimental-on-ps) \"\")
-
-(define
-  (experimental-on-tex) \"\\\\turnOnExperimentalFeatures\")
-
-(define
-  (finishbar o h) (empty o))
-
-(define
-  (font i)
-  (string-append
-   \"font\"
-   (make-string 1 (integer->char (+ (char->integer #\\A) i)))
-   ))
-
-(define 
-  (font-def o i s) 
-  (empty o))
-;  ((invoke-output o \"font-def\") i s))
-
-(define 
-  (font-def-ps i s)
-  (string-append
-   \"\n/\" (font i) \" {/\" 
-   (substring s 0 (- (string-length s) 3))
-   \" findfont 12 scalefont setfont} bind def\n\"))
-
-(define 
-  (font-def-tex i s)
-  (string-append
-   \"\\\\font\" (font-switch-tex i) \"=\" s \"\n\"))
-
-(define 
-  (font-switch o i) 
-  ((invoke-output o \"font-switch\") i))
-
-(define 
-  (font-switch-ps i)
-  (string-append (font i) \" \"))
-
-(define 
-  (font-switch-tex i)
-  (string-append
-   \"\\\\\" (font i) \"\n\"))
-
-(define 
-  (generalmeter o num den)
-   ((invoke-output o \"generalmeter\") num den))
-
-(define 
-  (generalmeter-ps num den)
-  (string-append (number->string (inexact->exact num)) \" \" (number->string (inexact->exact den)) \" generalmeter \"))
-
-(define 
-  (generalmeter-tex num den)
-  (string-append 
-   \"\\\\generalmeter{\" (number->string (inexact->exact num)) \"}{\" (number->string (inexact->exact den)) \"}\"))
-
-(define 
-  (header o creator generate) 
-  ((invoke-output o \"header\") creator generate))
-
-(define 
-  (header-ps creator generate) 
-  (string-append
-   \"%!PS-Adobe-3.0\n\"
-   \"%%Creator: \" creator generate \"\n\"))
-
-(define 
-  (header-tex creator generate) 
-  (string-append
-   \"%created by: \" creator generate \"\n\"))
-
-(define 
-  (header-end o) 
-  ((invoke-output o \"header-end\")))
-
-(define
-  (header-end-ps) \"\")
-
-(define
-  (header-end-tex) \"\\\\turnOnPostScript\")
-
-(define
-  (lily-def o key val)
-  ((invoke-output o \"lily-def\") key val))
-
-(define
-  (lily-def-ps key val)
-  (string-append
-   \"/\" key \" {\" val \"} bind def\n\"))
-
-(define
-  (lily-def-tex key val)
-  (string-append
-   \"\\\\def\\\\\" key \"{\" val \"}\n\"))
-
-(define 
-  (maatstreep o h) 
-  ((invoke-output o \"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))
-
-(define 
-  (placebox o x y b) 
-  ((invoke-output o \"placebox\") x y (b o)))
-
-(define 
-  (placebox-ps x y s) 
-  (string-append 
-   (number->string x) \" \" (number->string y) \" {\" s \"} placebox \"))
-
-(define 
-  (placebox-tex x y s) 
-  (string-append 
-   \"\\\\placebox{\"
-   (number->dim-tex y) \"}{\" (number->dim-tex x) \"}{\" s \"}\"))
-
-(define
-  (repeatbar o h) (empty o))
-
-(define 
-  (rulesym o x y) 
-  ((invoke-output o \"rulesym\") x y))
-
-(define 
-  (rulesym-ps x y) 
-  (string-append 
-   (number->string x) \" \"
-   (number->string y) \" \"
-   \"rulesym\"))
-
-(define 
-  (rulesym-tex x y) 
-  (string-append 
-   \"\\\\rulesym{\" (number->dim-tex x) \"}{\" (number->dim-tex y) \"}\"))
-
-(define 
-  (setbold o s) 
-  ((invoke-output o \"text\") \"bold\" s))
-
-(define 
-  (setfinger o s) 
-  ((invoke-output o \"text\") \"finger\" s))
-
-(define 
-  (sethuge o s) 
-  ((invoke-output o \"text\") \"huge\" s))
-
-(define 
-  (setitalic o s) 
-  ((invoke-output o \"text\") \"italic\" s))
-
-(define 
-  (setlarge o s) 
-  ((invoke-output o \"text\") \"large\" s))
-
-(define 
-  (setLarge o s) 
-  ((invoke-output o \"text\") \"Large\" s))
-
-(define 
-  (settext o s) 
-  ((invoke-output o \"text\") \"text\" s))
-
-(define 
-  (slur o l) 
-  ((invoke-output o \"slur\") l))
-
-(define 
-  (slur-ps l)
-  (string-append 
-   (apply string-append (map control->string l)) 
-   \" draw_slur\"))
-
-(define 
-  (slur-tex l)
-  (string-append 
-   \"\\\\embeddedps{\"
-   (slur-ps l)
-   \"}\"))
-
-(define 
-  (stem o kern width height depth) 
-  ((invoke-output o \"stem\") kern width height depth))
-
-(define 
-  (stem-ps kern width height depth) 
-  (string-append (numbers->string (list kern width height depth))
-                \"draw_stem\" ))
-
-(define 
-  (stem-tex kern width height depth) 
-  (string-append 
-   \"\\\\kern\" (number->dim-tex kern)
-   \"\\\\vrule width \" (number->dim-tex width)
-   \"depth \" (number->dim-tex depth)
-   \"height \" (number->dim-tex height) \" \"))
-
-(define 
-  (start-line o) 
-  ((invoke-output o \"start-line\")))
-
-(define 
-  (start-line-ps) 
-  (string-append
-   (urg-fix-font-ps)
-   \"\nstart_line {\n\"))
-
-(define 
-  (start-line-tex) 
-  (string-append 
-   (urg-fix-font-tex)
-   \"\\\\hbox{%\n\"))
-
-(define 
-  (stop-line o) 
-  ((invoke-output o \"stop-line\")))
-
-(define 
-  (stop-line-ps) 
-  \"}\nstop_line\n\")
-
-(define 
-  (stop-line-tex) 
-  \"}\\\\interscoreline\")
-
-(define
-  (text-ps f s)
-  (string-append \"(\" s \") set\" f \" \"))
-
-(define
-  (text-tex f s)
-  (string-append \"\\\\set\" f \"{\" s \"}\"))
-
-(define
-  (urg-fix-font-ps)
-  \"/fontA { /feta20 findfont 12 scalefont setfont} bind def fontA\n\")
-
-(define
-  (urg-fix-font-tex)
-  \"\\\\font\\\\fontA=feta20.afm\\\\fontA\n\")
-
-(define 
-  (urg-font-switch-ps i)
-  \"\n/feta20 findfont 12 scalefont setfont \n\")
-
+; huh?
+;(append %load-path 'init)
+;(load-patch 'lily.scm)
+(load 'init/lily.scm)
 ";
-
-
index c763bb56e1a97ad8093477232ae0fd5bd2faca02..2ca4bdddde79f9af99b661bccfc7b1de7766a946 100644 (file)
@@ -56,7 +56,8 @@ Lookup::~Lookup ()
 Atom
 Lookup::accidental (int j) const
 {
-  return afm_find (String ("accidentals") + String ("-") + to_str (j));
+  Atom a = afm_find (String ("accidentals") + String ("-") + to_str (j));
+  return a;
 }
 
 void
@@ -87,6 +88,7 @@ Lookup::afm_find (String s) const
   Array<Real> arr;
   arr.push (m.code ());
   a.lambda_ =  (lambda_scm ("char", arr));
+  a.str_ = "afm_find: " + s;
   a.font_ = font_;
   return a;
 }
@@ -107,6 +109,7 @@ Lookup::bar (String str, Real h) const
   arr.push (h);
   Atom a = (*symtables_p_) ("bars")->lookup (str);
   a.lambda_ =  (lambda_scm (a.str_, arr));
+  a.str_ = "bar";
   a.dim_.y () = Interval (-h/2, h/2);
   a.font_ = font_;
   return a;
@@ -126,6 +129,7 @@ Lookup::beam (Real slope, Real width, Real thick) const
 
   Atom a;
   a.lambda_ =  (lambda_scm ("beam", arr));
+  a.str_ = "beam";
   a.dim_[X_AXIS] = Interval (0, width);
   a.dim_[Y_AXIS] = Interval (min_y, max_y);
   return a;
@@ -162,6 +166,7 @@ Lookup::dashed_slur (Array<Offset> controls, Real thick, Real dash) const
     gh_cons (ly_list2 (gh_double2scm (controls[0].x ()), gh_double2scm (controls[0].y ())),
     SCM_EOL))))))))))));
 
+  a.str_ = "dashed_slur";
   return a;
 }
 
@@ -189,7 +194,8 @@ Atom
 Lookup::flag (int j, Direction d) const
 {
   char c = (d == UP) ? 'u' : 'd';
-  return afm_find (String ("flags") + String ("-") + to_str (c) + to_str (j));
+  Atom a = afm_find (String ("flags") + String ("-") + to_str (c) + to_str (j));
+  return a;
 }
 
 void
@@ -212,14 +218,14 @@ Lookup::rest (int j, bool o) const
 Atom
 Lookup::rule_symbol (Real height, Real width) const
 {
-  Atom bs= (*symtables_p_) ("param")->lookup ("rule");
-  Array<Real> args;
-  args.push (height);
-  args.push (width);
-  bs.lambda_ =  (lambda_scm (bs.str_, args));
-  bs.dim_.x () = Interval (0, width);
-  bs.dim_.y () = Interval (0, height);
-  return bs;
+  Atom = (*symtables_p_) ("param")->lookup ("rule");
+  Array<Real> arr;
+  arr.push (height);
+  arr.push (width);
+  a.lambda_ = lambda_scm (a.str_, arr);
+  a.str_ = "rule_symbol";
+  a.dim_.x () = Interval (0, width);
+  a.dim_.y () = Interval (0, height);
 }
 
 Atom
@@ -261,22 +267,22 @@ Lookup::stem (Real y1, Real y2) const
       y1 = y2;
       y2 = t;
     }
-  Atom s;
+  Atom a;
 
-  s.dim_.x () = Interval (0,0);
-  s.dim_.y () = Interval (y1,y2);
+  a.dim_.x () = Interval (0,0);
+  a.dim_.y () = Interval (y1,y2);
 
-  Array<Real> a;
+  Array<Real> arr;
 
   Real stem_width = paper_l_->get_var ("stemthickness");
-  a.push (-stem_width /2);
-  a.push (stem_width);
-  a.push (y2);
-  a.push (-y1);
-
-  s.lambda_ =  (lambda_scm ("stem", a));
-  s.font_ = font_;
-  return s;
+  arr.push (-stem_width /2);
+  arr.push (stem_width);
+  arr.push (y2);
+  arr.push (-y1);
+
+  a.lambda_ = lambda_scm ("stem", arr);
+  a.str_ = "stem";
+  a.font_ = font_;
 }
 
 Atom
@@ -285,29 +291,28 @@ Lookup::streepje (int type) const
   if (type > 2)
     type = 2;
 
-  return  afm_find ("balls" + String ("-") +to_str (type) + "l");
+  Atom a = afm_find ("balls" + String ("-") + to_str (type) + "l");
+  return a;
 }
 
 Atom
 Lookup::text (String style, String text) const
 {
-  Array<Scalar> a;
-
-  a.push (text);
-  Atom s =  (*symtables_p_) ("style")->lookup (style);
-  s.lambda_ =  (lambda_scm (s.str_, a));
-  s.font_ = font_;
+  Array<Scalar> arr;
 
-  return s;
+  arr.push (text);
+  Atom a =  (*symtables_p_) ("style")->lookup (style);
+  a.lambda_ = lambda_scm (a.str_, arr);
+  a.str_ = "text";
+  a.font_ = font_;
 }
 
 Atom
 Lookup::time_signature (Array<Real> a) const
 {
-  Atom s ((*symtables_p_) ("param")->lookup ("time_signature"));
-  s.lambda_ =  (lambda_scm (s.str_, a));
-
-  return s;
+  Atom a ((*symtables_p_) ("param")->lookup ("time_signature"));
+  a.lambda_ = lambda_scm (a.str_, arr);
+  a.str_ = "time_signature";
 }
 
 /*
@@ -316,8 +321,8 @@ Lookup::time_signature (Array<Real> a) const
 Atom
 Lookup::vbrace (Real &y) const
 {
-  Atom brace = (*symtables_p_) ("param")->lookup ( "brace");
-  Interval ydims = brace.dim_[Y_AXIS];
+  Atom a = (*symtables_p_) ("param")->lookup ( "brace");
+  Interval ydims = a.dim_[Y_AXIS];
   Real min_y = ydims[LEFT];
   Real max_y = ydims[RIGHT];
   Real step = 1.0 PT;
@@ -338,14 +343,13 @@ Lookup::vbrace (Real &y) const
   
   int idx = int (rint ( (y- min_y)/step)) + 1;
   
-  Array<Real> a;
-  a.push (idx);
-  brace.lambda_ =  (lambda_scm (brace.str_, a));
-  brace.dim_[Y_AXIS] = Interval (-y/2,y/2);
-
-  brace.font_ = font_;
-
-  return brace;
+  Array<Real> arr;
+  arr.push (idx);
+  a.lambda_ = lambda_scm (a.str_, arr);
+  a.str_ = "brace";
+  a.dim_[Y_AXIS] = Interval (-y/2,y/2);
+  a.font_ = font_;
+  return a;
 }
 
 Atom
@@ -378,9 +382,9 @@ Lookup::plet (Real dy , Real dx, Direction dir) const
     + String_convert::int_str ( (int)dir) +
     " draw_plet ";
 
-  Atom s;
-  s.str_ = ps;
-  return s;
+  Atom a;
+  a.str_ = ps;
+  return a;
 }
 
 Atom
@@ -408,6 +412,7 @@ Lookup::slur (Array<Offset> controls) const
     gh_cons (ly_list2 (gh_double2scm (controls[3].x ()), gh_double2scm (controls[3].y ())),
     gh_cons (ly_list2 (gh_double2scm (controls[0].x ()), gh_double2scm (controls[0].y ())),
     SCM_EOL))))))))))))));
+  a.str_ = "slur";
 
   a.dim_[X_AXIS] = Interval (0, dx);
   a.dim_[Y_AXIS] = Interval (0 <? dy,  0 >? dy);
@@ -429,6 +434,7 @@ Lookup::vbracket (Real &y) const
   Array<Real> arr;
   arr.push (y);
   a.lambda_ =  (lambda_scm ("bracket", arr));
+  a.str_ = "vbracket";
   a.dim_[Y_AXIS] = Interval (-y/2,y/2);
   a.dim_[X_AXIS] = Interval (0,4 PT);
   return a;
index 85abdd931b075e7b7dc7a0c7036bc86106ed9437..c94fe3e8d9389112f87654ca5b0e68d4d218fb0c 100644 (file)
@@ -269,8 +269,11 @@ Paper_def::paper_outputter_p (Paper_stream* os_p, Header* header_l, String origi
   Paper_outputter* p = new Paper_outputter (os_p);
 
   output_header (p, header_global_p);
+#if 0
+  // for now; breaks -fscm output
   p->output_comment (_ ("outputting Score, defined at: "));
   p->output_comment (origin_str);
+#endif
 
   output_header (p, header_l);
 
index 033fbf3f06dcc24cbdebbeca0bdf21856958e0f0..487b3d2b9ae3d6a6d9f1118e73812c5685bf5980 100644 (file)
@@ -8,6 +8,7 @@
 */
 
 #include <time.h>
+#include <fstream.h>
 #include "paper-outputter.hh"
 #include "paper-stream.hh"
 #include "molecule.hh"
@@ -94,6 +95,7 @@ Paper_outputter::output_molecule (Molecule const*m, Offset o, char const *nm)
 #ifndef NPRINT
       if (check_debug && !monitor->silent_b ("Guile"))
        {
+         DOUT << i->str_ << "\n";
          gh_display (i->lambda_); gh_newline ();
        }
 #endif
@@ -139,10 +141,29 @@ Paper_outputter::output_scheme (SCM scm)
   // urg; temporary hack to debug scheme error #unknown
   if (String (output_global_ch) == "scm")
     {
-//      char* c = gh_scm2newstr (scm, NULL);
-//      *outstream_l_ << c << "\n";
-//      free (c);
-       gh_display (scm); gh_newline ();
+      static SCM port = 0;
+      // urg
+      if (!port)
+        {
+         int fd = 1;
+         ofstream * of = dynamic_cast <ofstream*> (outstream_l_->os);
+         if (of)
+           fd = of->rdbuf()->fd();
+         FILE *file = fdopen (fd, "a");
+         port = scm_standard_stream_to_port (file, "a", "");
+         scm_display (gh_str02scm ("(load 'lily.scm)\n"), port);
+       }
+#if 0
+      *outstream_l_ << "(display ((eval ";
+      scm_write (scm, port);
+      *outstream_l_ << ") 'tex))\n";
+#else
+      scm_display (gh_str02scm ("(display ((eval "), port);
+      scm_write (scm, port);
+      scm_display (gh_str02scm (") 'tex))\n"), port);
+      scm_newline (port);
+      scm_fflush (port);
+#endif
       return;
     }
   SCM str_scm = gh_call1 (ly_eval (scm), gh_eval_str (o.ch_l ()));