]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'master' of ssh+git://jneem@git.sv.gnu.org/srv/git/lilypond
authorJoe Neeman <joeneeman@gmail.com>
Tue, 12 Dec 2006 14:35:31 +0000 (16:35 +0200)
committerJoe Neeman <joeneeman@gmail.com>
Tue, 12 Dec 2006 14:35:31 +0000 (16:35 +0200)
lily/glissando-engraver.cc
lily/line-spanner.cc
ly/engraver-init.ly
scm/define-grob-properties.scm
scm/define-grobs.scm
scm/lily-library.scm
scm/lily.scm
scripts/lilypond-invoke-editor.scm

index 91dd733cb8cac7badc37e4d80d523fe3312ab005..4c506df38d14efc8d4e9e47cdc327bea35a8f72e 100644 (file)
@@ -73,6 +73,7 @@ Glissando_engraver::stop_translation_timestep ()
 {
   if (last_line_ && last_line_->get_bound (RIGHT))
     last_line_ = 0;
+
   if (line_)
     {
       if (last_line_)
index 48d4b3aa9b5aab0757cf8faac4bd9be6c135eef3..2f99a0dce2fcfad53815a1eacbc4a113c0c91d57 100644 (file)
@@ -205,6 +205,9 @@ Line_spanner::print (SCM smob)
   Offset my_off;
   Offset his_off;
 
+  Real extra_dy = robust_scm2double (me->get_property ("extra-dy"),
+                                    0.0);
+  
   if (bound[RIGHT]->break_status_dir ())
     {
       if (bound[LEFT]->break_status_dir ())
@@ -247,11 +250,11 @@ Line_spanner::print (SCM smob)
       Real yoff = this_common_y->relative_coordinate (all_common_y, Y_AXIS);
 
       Offset p1 (bound[LEFT]->extent (commonx, X_AXIS)[RIGHT],
-                this_ext.center () + yoff);
+                this_ext.center () + yoff - extra_dy / 2);
       Offset p2 (bound[RIGHT]->extent (commonx, X_AXIS)[LEFT],
-                next_ext.center () + yoff);
+                next_ext.center () + yoff + extra_dy / 2);
 
-      Offset dz (p2 -p1);
+      Offset dz (p2 - p1);
       Real len = dz.length ();
 
       Offset dir = dz * (1 / len);
@@ -288,13 +291,15 @@ Line_spanner::print (SCM smob)
          his_off[ax] = bound[LEFT]->relative_coordinate (common[a], ax);
        }
 
-      ofxy = dxy * (off / dxy.length ());
+      ofxy = dxy * (off / dxy.length ()) ;
       dxy -= 2*ofxy;
 
+      dxy[Y_AXIS] += extra_dy;
+      
       Stencil line = line_stencil (me, Offset (0, 0), dxy);
 
       line.translate_axis (bound[LEFT]->extent (bound[LEFT], X_AXIS).length () / 2, X_AXIS);
-      line.translate (ofxy - my_off + his_off);
+      line.translate (ofxy - my_off + his_off + Offset (0, -extra_dy/2));
       return line.smobbed_copy ();
     }
 }
@@ -305,7 +310,8 @@ ADD_INTERFACE (Line_spanner,
               "@code{dashed-line}, @code{trill}, \n"
               "@code{dotted-line} or @code{zigzag}.\n"
               "\n",
-              
+
+              "extra-dy "
               "arrow "
               "gap "
               "thickness "
index 938a0c856e0cb1a666f62f90619080a8ed9c2fd3..afb0be2dc4b663d43f0f6b9742e4e924a06d0f0a 100644 (file)
@@ -654,7 +654,7 @@ AncientRemoveEmptyStaffContext = \context {
   \alias "Voice"
   \consists "Tab_note_heads_engraver"
   \consists "Tab_harmonic_engraver"
-
+  
   \remove "Note_heads_engraver"
   \remove "Fingering_engraver"
   \remove "New_fingering_engraver"
@@ -669,6 +669,8 @@ AncientRemoveEmptyStaffContext = \context {
 
   %% No accidental in tablature !
   \remove Accidental_engraver
+
+  \override Glissando #'extra-dy = #0.75
 }
 
 \context {
index 9d0d665b88b296768033835c256e9f75e9f1b038..24f1fe0a2be4ff1e7611a1c976a901cffb3621a4 100644 (file)
@@ -136,7 +136,8 @@ edges '(@var{left-text} . @var{right-text}).")
                     "How much of the bound a spanner should enclose:
 +1 = completely, 0 = center, -1 not at all.")
      (expand-limit ,integer? "maximum number of measures expanded in church rests.")
-     ;; remove me? 
+     ;; remove me?
+     (extra-dy ,number? "Slope glissandi this much extra.")
      (extra-X-extent ,number-pair? "A grob is enlarged in X dimension
 by this much.")
      (extra-Y-extent ,number-pair? "See @code{extra-X-extent}.")
index 22a81789eb2fa21d15bc49fdb7233ba95ba2f356..4f5f9a6f51af9cce35233ecd7148ea34a36ce8b3 100644 (file)
        (style . line)
        (gap . 0.5)
        (zigzag-width . 0.75)
-       (non-musical . #t)
        (X-extent . #f)
        (Y-extent . #f)
        (stencil . ,ly:line-spanner::print)
index fc8d291dec662e041b4513336aaea10b94934230..0d09beae53b5c6f9e994c10cbc5dbe0cd192eb47 100644 (file)
@@ -6,6 +6,8 @@
 ;;;; (c) 1998--2006 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;; Han-Wen Nienhuys <hanwen@xs4all.nl>
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; constants.
 
 (define-public X 0)
 (define-public Y 1)
 (define-safe-public DOUBLE-SHARP 4)
 (define-safe-public SEMI-TONE 2)
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; moments
+
 (define-public ZERO-MOMENT (ly:make-moment 0 1)) 
 
 (define-public (moment-min a b)
   (if (ly:moment<? a b) a b))
 
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; arithmetic
 (define-public (average x . lst)
   (/ (+ x (apply + lst)) (1+ (length lst))))
 
 
 ;;;;;;;;;;;;;;;;
 ;; alist
+
 (define-public assoc-get ly:assoc-get)
 
 (define-public (uniqued-alist alist acc)
@@ -192,6 +201,7 @@ found."
 
 ;;;;;;;;;;;;;;;;
 ;; vector
+
 (define-public (vector-for-each proc vec)
   (do
       ((i 0 (1+ i)))
@@ -269,6 +279,7 @@ found."
 
 (define-public (count-list lst)
   "Given lst (E1 E2 .. ) return ((E1 . 1) (E2 . 2) ... )  "
+
   (define (helper l acc count)
     (if (pair? l)
        (helper (cdr l) (cons (cons (car l) count) acc) (1+ count))
@@ -305,19 +316,17 @@ found."
   "Return list of elements in A that are not in B."
   (lset-difference eq? a b))
 
-;; TODO: use the srfi-1 partition function.
 (define-public (uniq-list lst)
-  
   "Uniq LST, assuming that it is sorted"
-  (define (helper acc lst) 
-    (if (null? lst)
-       acc
-       (if (null? (cdr lst))
-           (cons (car lst) acc)
-           (if (equal? (car lst) (cadr lst))
-               (helper acc (cdr lst))
-               (helper (cons (car lst) acc)  (cdr lst))))))
-  (reverse! (helper '() lst) '()))
+
+  (reverse! 
+   (fold (lambda (x acc)
+          (if (null? acc)
+              (list x)
+              (if (eq? x (car acc))
+                  acc
+                  (cons x acc))))
+        '() lst) '()))
 
 (define (split-at-predicate predicate lst)
  "Split LST = (a_1 a_2 ... a_k b_1 ... b_k)
@@ -326,6 +335,7 @@ found."
   L1 is copied, L2 not.
 
   (split-at-predicate (lambda (x y) (= (- y x) 2)) '(1 3 5 9 11) (cons '() '()))"
  ;; " Emacs is broken
 
  (define (inner-split predicate lst acc)
index 32ab98e88e2a486b72c88d054380da72f3e9063b..d64fd57f4e11327109cfc2bc0d8024b546cec3fc 100644 (file)
@@ -106,6 +106,7 @@ on errors, and print a stack trace.")
 
 (if (ly:get-option 'verbose)
     (begin
+      (ly:set-option 'protected-scheme-parsing #f)
       (debug-enable 'debug)
       (debug-enable 'backtrace)
       (read-enable 'positions)))
index 048ac3f53b3021fa005478e3ace188f1e3fd02f4..275aa901d88304e05d08f1cd1cbaffddbdf1c8f9 100755 (executable)
@@ -12,6 +12,7 @@
 (use-modules
  (ice-9 getopt-long)
  (ice-9 regex)
+ (srfi srfi-1)
  (srfi srfi-13)
  (srfi srfi-14))
 
@@ -23,7 +24,6 @@
 
 ;; argv0 relocation -- do in wrapper?
 
-
 (define LILYPONDPREFIX
   (let* ((prefix
          (or (getenv "LILYPONDPREFIX")
@@ -124,6 +124,19 @@ Options:
        (format "~a ~a" (getenv "BROWSER") uri)
        (format #f "firefox -remote 'OpenURL(~a,new-tab)'" uri))))
 
+
+(define (strip-framework-path var)
+  (define pat "lilypond/usr")
+  (let*
+      ((val (getenv var))
+       (paths (string-split val #\:))
+       (without (remove (lambda (s) (string-contains s pat))
+                       paths)))
+
+    (if (not (= (length without)
+               (length paths)))
+       (setenv var (string-join without ":")))))
+
 (define (main args)
   (let ((files (parse-options args)))
     (if (running-from-gui?)
@@ -138,8 +151,10 @@ Options:
          (show-help (current-error-port))
          (exit 2)))
     (set! %load-path (cons LILYPONDPREFIX %load-path))
+
     (primitive-eval '(use-modules (scm editor)))
 
+    (strip-framework-path "LD_LIBRARY_PATH")
     (let* ((uri (car files)))
       (if (is-textedit-uri? uri)
          (run-editor uri)