]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.1.0.jcn1: tegen nul
authorJan Nieuwenhuizen <janneke@gnu.org>
Fri, 23 Oct 1998 13:51:45 +0000 (16:51 +0300)
committerJan Nieuwenhuizen <janneke@gnu.org>
Fri, 23 Oct 1998 13:51:45 +0000 (16:51 +0300)
pl 0.jcn1
pl 17.jcn7
- added: set*text, timesig, beam
- guile-1.3 is fine; my egcs-1.0.2's -O2 is broken

BUGS
NEWS
VERSION
init/scm.ly
lily/include/lookup.hh
lily/include/time-signature.hh
lily/lookup.cc
lily/time-signature-engraver.cc
lily/time-signature.cc
tex/lilyponddefs.ps

diff --git a/BUGS b/BUGS
index 054d425246941e3b94db75c303ab66b7b7458f03..1651e800d6de2645b96bb1c12d9c065dc7031491 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -9,6 +9,12 @@ Compiling with -O2 -finline-functions will cause crashes during
 parsing stage.
 
 
+[Linux ppc, egcs-1.0.2]
+
+All compiling with -O2 is suspect, in particular guile-1.3, and
+Lily herself will break.
+
+
 [All platforms] 
 
 When dealing with beaming that is not correct (eg quarter notes in
diff --git a/NEWS b/NEWS
index 4cf107903c189aca1ee2d2aa4ffddc095e574f7c..147d1a9977d7fc1472d4924be139eb1b88a69416 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+pl 0.jcn1
+pl 17.jcn7
+       - added: set*text, timesig, beam
+       - guile-1.3 is fine; my egcs-1.0.2's -O2 is broken
+
 1.1.0
 
 pl 18.exp
diff --git a/VERSION b/VERSION
index ef23e353b8b9a7e4c2aa93a00e89d5589b2471a6..c427fb2b3253c4ad767f8899a8003dc328534e7a 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=1
 PATCH_LEVEL=0
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=jcn1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index bd27dec6f49e5cf11826f70e1fa49137d83f7687..f576ea8875e94cdb225d4ee78febe839d1edeb49 100644 (file)
    (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 
   (generalmeter-ps num den)
-  (string-append num \" \" den \" generalmeter \"))
+  (string-append (number->string (inexact->exact num)) \" \" (number->string (inexact->exact den)) \" generalmeter \"))
 
 (define 
   (generalmeter-tex num den)
   (string-append 
-   \"\\\\generalmeter{\" num \"}{\" den \"}\"))
+   \"\\\\generalmeter{\" (number->string (inexact->exact num)) \"}{\" (number->string (inexact->exact den)) \"}\"))
 
 (define 
   (header o creator generate) 
    \"\\\\rulesym{\" (number->dim-tex x) \"}{\" (number->dim-tex y) \"}\"))
 
 (define 
-  (setitalic o s) (empty o))
+  (setbold o s) 
+  ((invoke-output o \"text\") \"bold\" s))
+
+(define 
+  (setfinger o s) 
+  ((invoke-output o \"text\") \"finger\" s))
 
 (define 
-  (settext o s) (empty o))
+  (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) 
   (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\")
index 6b7047651de193661c48a8068d463071618d84fb..1781679920ecb921bf60429097ef6b1816603221 100644 (file)
@@ -34,7 +34,7 @@ public:
   Atom afm_find (String) const;
   Atom ball (int) const;
   Atom bar (String, Real height) const;
-  Atom beam (Real,Real, Real) const;
+  Atom beam (Real, Real, Real) const;
   Atom clef (String) const;
   Atom dashed_slur (Array<Offset> controls, Real thick, Real dash) const;
   Atom dots () const;
@@ -44,7 +44,6 @@ public:
   Atom hairpin (Real width, bool decresc, bool continued) const;
   Atom plet (Real dy, Real dx, Direction dir) const;
   void print () const;
-  Atom ps_beam (Real slope, Real width, Real thick) const;
   Atom rest (int, bool outside) const;
   Atom rule_symbol (Real height, Real width) const;
   Atom script (String idx) const;
@@ -54,8 +53,8 @@ public:
   Atom text (String style, String text) const;
   Atom vbrace (Real &dy) const;
   Atom vbracket (Real &dy) const;
-  Atom special_time_signature (String, Array<Scalar>) const;
-  Atom time_signature (Array<Scalar>) const;
+  Atom special_time_signature (String, Array<Real>) const;
+  Atom time_signature (Array<Real>) const;
 
   Paper_def * paper_l_;
   Symtables *symtables_p_;
index ed079a29ff746f2051631925f5b44c5f3fabb9ac..55c8133d3885da3314dc40017509950f51c40fd5 100644 (file)
@@ -6,9 +6,10 @@
 
 #ifndef METER_HH
 #define METER_HH
+
 #include "item.hh"
 #include "array.hh"
-#include "scalar.hh"
+#include "real.hh"
 
 /**
    Print a time_signature sign.
@@ -25,7 +26,7 @@ protected:
   virtual Molecule*brew_molecule_p() const;
 public:
   Time_signature () ;
-  Array<Scalar> args_;
+  Array<Real> args_;
   String time_sig_type_str_;
   
   DECLARE_MY_RUNTIME_TYPEINFO;
index 9d85d63ba9ec3282c8703e3e2174dfc515f4e861..a8a4af3dd5d35f02efe1b0c5682634f314a0beff 100644 (file)
@@ -115,11 +115,17 @@ Lookup::bar (String str, Real h) const
 Atom 
 Lookup::beam (Real slope, Real width, Real thick) const
 {
-  Atom a (ps_beam (slope, width, thick));
   Real height = slope * width; 
   Real min_y = (0 <? height) - thick/2;
   Real max_y = (0 >? height) + thick/2;
-  
+
+  Array<Real> arr;
+  arr.push (width);
+  arr.push (slope);
+  arr.push (thick);
+
+  Atom a;
+  a.lambda_ = lambda_scm ("beam", arr);
   a.dim_[X_AXIS] = Interval (0, width);
   a.dim_[Y_AXIS] = Interval (min_y, max_y);
   return a;
@@ -223,19 +229,26 @@ Lookup::script (String str) const
 }
 
 Atom
-Lookup::special_time_signature (String s, Array<Scalar> arr) const
+Lookup::special_time_signature (String s, Array<Real> arr) const
 {
-#if 0
-  String symbolname = "timesig-"+s+"%/%";
-  Atom a (afm_find (lambda_scm (symbolname, arr)));
+  String symbolname = "timesig-" + s;
+  if (!arr.empty ())
+    symbolname += to_str (arr[0]);
+  if (arr.size () >1)
+    symbolname += "/" + to_str (arr[1]);
+  
+  Atom a = afm_find (symbolname);
   if (!a.empty ()) 
     return a;
+
+#if 0 //guess we covered this
   // Try if the full name was given
   a = afm_find ("timesig-"+s);
   if (!a.empty ()) 
     return a;
-  // Resort to default layout with numbers
 #endif
+
+  // Resort to default layout with numbers
   return time_signature (arr);
 }
 
@@ -289,7 +302,7 @@ Lookup::text (String style, String text) const
 }
 
 Atom
-Lookup::time_signature (Array<Scalar> a) const
+Lookup::time_signature (Array<Real> a) const
 {
   Atom s ((*symtables_p_) ("param")->lookup ("time_signature"));
   s.lambda_ = lambda_scm (s.str_, a);
@@ -370,18 +383,6 @@ Lookup::plet (Real dy , Real dx, Direction dir) const
   return s;
 }
 
-Atom
-Lookup::ps_beam (Real slope, Real width, Real thick) const
-{
-  String ps;
-  ps += to_str (width) + " "+ to_str (slope) + " " + to_str (thick)
-    + " draw_beam ";
-
-  Atom s;
-  s.str_ = ps;
-  return s;
-}
-
 Atom
 Lookup::slur (Array<Offset> controls) const
 {
index 89e29e61ed882bebbf8eac0e32c8c2a94e03ea1e..739bae67121116643e6856e509d63bb9a695847a 100644 (file)
@@ -35,7 +35,7 @@ Time_signature_engraver::do_process_requests()
   Time_signature_change_req *req = timing_grav_l->time_signature_req_l();
   if (req)
     {
-      Array<Scalar> args;
+      Array<Real> args;
       args.push (req->beats_i_);
       args.push (req->one_beat_i_);
        
index 7e18f0e05dc7d93f9535fc40403021a0b02c2623..edee3d9fbee96cdb15e18722995dc7566b82970c 100644 (file)
@@ -26,13 +26,13 @@ Time_signature::brew_molecule_p () const
     {
       if (time_sig_type_str_[0]=='1')
        {
-         Array<Scalar> tmparr=args_;
-         tmparr[1]=Scalar(0);
+         Array<Real> tmparr = args_;
+         tmparr[1]= 0;
          s = lookup_l ()->time_signature (tmparr);
        }
       else
        {
-         s = lookup_l ()-> special_time_signature (time_sig_type_str_,args_);
+         s = lookup_l ()-> special_time_signature (time_sig_type_str_ ,args_);
        }
     }
   else
index 467dc4589afbaff7c55921fcc79294f5c44fb200..07e3845d1542f3d79c30655dffb6313a33b92a3e 100644 (file)
@@ -22,7 +22,7 @@
        grestore
 } bind def
 
-/settext
+/settext % '(' text ')'
 {
        gsave
        % urg
        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
        grestore
 } bind def
 
-/draw_beam
+/draw_beam % width slope thick
 {
         2 div /beam_thick exch def
         /beam_slope exch def