]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/output-lib.scm (note-head-style->attachment-coordinates):
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 17 Jul 2003 10:20:19 +0000 (10:20 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 17 Jul 2003 10:20:19 +0000 (10:20 +0000)
note about triangle note heads.

* scm/drums.scm: use alist for instrument-settings. This fixes the
bug with assigning to drums in the .ly file.

* mf/feta-autometric.mf (code): start font at 32. WARNING: FONT
CHANGED.

ChangeLog
configure.in
input/template/jazz-combo.ly
mf/feta-autometric.mf
scm/drums.scm
scm/output-lib.scm

index d661053f7a13194811ade38e61d242329959b890..d630a4488cba1064dc13fe9e3df419b74d2c3d22 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2003-07-17  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
+       * scm/output-lib.scm (note-head-style->attachment-coordinates):
+       note about triangle note heads.
+
+       * scm/drums.scm: use alist for instrument-settings. This fixes the
+       bug with assigning to drums in the .ly file.
+
+       * mf/feta-autometric.mf (code): start font at 32. WARNING: FONT
+       CHANGED.
+
        * scm/define-grob-interfaces.scm (cluster-beacon-interface): add
        cluster-beacon-interface
 
index f70ea752a8f26c037ba0232c50dddd07dc2eee91..e987b5aad59e05e345d725c13a64023b1a673d12 100644 (file)
@@ -60,7 +60,7 @@ STEPMAKE_GUILE(OPTIONAL)
 # perl for help2man.
 STEPMAKE_PERL(OPTIONAL)
 # mftrace for generating pfa's, pfb's
-STEPMAKE_PROGS(MFTRACE, pktrace mftrace, OPTIONAL, 1.0.9)
+STEPMAKE_PROGS(MFTRACE, pktrace mftrace, OPTIONAL, 1.0.18)
 # new makeinfo for multi-page website docs
 STEPMAKE_PROGS(MAKEINFO, makeinfo, OPTIONAL, 4.1)
 
index bf1a54fb90dd7ca08fe5c978454f2b14cfdd6215..358350755ae7e78db83306459ae5a26d88d40bfd 100644 (file)
@@ -196,7 +196,7 @@ down = \notes {
         bd4 s bd s bd s bd s bd s bd s
 }
 
-drumNotes = \context Staff = drums {
+drums = \context Staff = drums {
        \global
        \property Staff.instrument = #"Drums"
        \clef percussion
@@ -229,7 +229,7 @@ drumNotes = \context Staff = drums {
                 
                 \context Staff = bass \bass
                 
-                \apply #(drums->paper 'drums) \drumNotes
+                \apply #(drums->paper 'drums) \drums
         >
 >
         \midi { \tempo 4 = 75 }
index 4ca7325088ea89c4b35631081d6b3c09fff72253..f8dc9bd94408d783c83484da7bbe22531cc23c6c 100644 (file)
@@ -85,7 +85,11 @@ def no_dimen_beginchar(expr c) =
        scantokens extra_beginchar;
 enddef;
 
-code:=-1;
+
+%
+% we leave the ctrl characters alone.
+%
+code:=32;
 
 % starts just as plain mf's beginchar:
 %     charcode, 
index 50e40d4095a219001658933dc3bfc489262bafe1..426c0e8b1ff70c13656ec305c58b1c52e09149ce 100644 (file)
@@ -3,6 +3,8 @@
 
 ;;;; changed eval to primitive-eval for guile 1.4/1.4.1 compatibility --jcn
 
+;; TODO: the design of this hack should be rethought.
+
 
 ;; ugh. Should make separate module?
 (define-public drum-pitch-names `(
        (fivedown         de    ,(ly:make-pitch -1 2 0))
 ))
 
-(define-public drums `(
-       (acousticbassdrum default       #f        ,(ly:make-pitch -1 4 0))
-       (bassdrum         default       #f        ,(ly:make-pitch -1 4 0))
-       (sidestick        cross         #f        ,(ly:make-pitch 0 1 0))
-       (acousticsnare    default       #f        ,(ly:make-pitch 0 1 0))
-       (snare            default       #f        ,(ly:make-pitch 0 1 0))
-       (handclap         triangle      #f        ,(ly:make-pitch 0 1 0))
-       (electricsnare    default       #f        ,(ly:make-pitch 0 1 0))
-       (lowfloortom      default       #f        ,(ly:make-pitch -1 3 0))
-       (closedhihat      cross         "stopped" ,(ly:make-pitch 0 3 0))
-       (hihat            cross         #f        ,(ly:make-pitch 0 3 0))
-       (highfloortom     default       #f        ,(ly:make-pitch -1 5 0))
-       (pedalhihat       cross         #f        ,(ly:make-pitch -1 2 0))
-       (lowtom           default       #f        ,(ly:make-pitch -1 6 0))
-       (openhihat        cross         "open"    ,(ly:make-pitch 0 3 0))
-       (halfopenhihat    xcircle       #f        ,(ly:make-pitch 0 3 0))
-       (lowmidtom        default       #f        ,(ly:make-pitch 0 0 0))
-       (himidtom         default       #f        ,(ly:make-pitch 0 2 0))
-       (crashcymbala     xcircle       #f        ,(ly:make-pitch 0 5 0))
-       (crashcymbal      xcircle       #f        ,(ly:make-pitch 0 5 0))
-       (hightom          default       #f        ,(ly:make-pitch 0 4 0))
-       (ridecymbala      cross         #f        ,(ly:make-pitch 0 5 0))
-       (ridecymbal       cross         #f        ,(ly:make-pitch 0 5 0))
-       (chinesecymbal    mensural      #f        ,(ly:make-pitch 0 5 0))
-       (ridebell         default       #f        ,(ly:make-pitch 0 5 0))
-       (splashcymbal     diamond       #f        ,(ly:make-pitch 0 5 0))
-       (cowbell          triangle      #f        ,(ly:make-pitch 0 5 0))
-       (crashcymbalb     cross         #f        ,(ly:make-pitch 0 5 0))
-       (vibraslap        diamond       #f        ,(ly:make-pitch 0 4 0))
-       (ridecymbalb      cross         #f        ,(ly:make-pitch 0 5 0))
- ))
+(define-public (get-drum-kit kit)
+  (assoc-get-default kit percussive-instrument-settings '()))
+
+;;
+;; all settings for percussive instruments.
+;; public so people can add their own stuff.
+;;
+
+(define-public
+  percussive-instrument-settings
+  `((drums
+    . (
+          (acousticbassdrum default    #f        ,(ly:make-pitch -1 4 0))
+          (bassdrum      default       #f        ,(ly:make-pitch -1 4 0))
+          (sidestick     cross         #f        ,(ly:make-pitch 0 1 0))
+          (acousticsnare         default       #f        ,(ly:make-pitch 0 1 0))
+          (snare                 default       #f        ,(ly:make-pitch 0 1 0))
+          (handclap      triangle      #f        ,(ly:make-pitch 0 1 0))
+          (electricsnare         default       #f        ,(ly:make-pitch 0 1 0))
+          (lowfloortom   default       #f        ,(ly:make-pitch -1 3 0))
+          (closedhihat   cross         "stopped" ,(ly:make-pitch 0 3 0))
+          (hihat                 cross         #f        ,(ly:make-pitch 0 3 0))
+          (highfloortom          default       #f        ,(ly:make-pitch -1 5 0))
+          (pedalhihat    cross         #f        ,(ly:make-pitch -1 2 0))
+          (lowtom                default       #f        ,(ly:make-pitch -1 6 0))
+          (openhihat     cross         "open"    ,(ly:make-pitch 0 3 0))
+          (halfopenhihat         xcircle       #f        ,(ly:make-pitch 0 3 0))
+          (lowmidtom     default       #f        ,(ly:make-pitch 0 0 0))
+          (himidtom      default       #f        ,(ly:make-pitch 0 2 0))
+          (crashcymbala          xcircle       #f        ,(ly:make-pitch 0 5 0))
+          (crashcymbal   xcircle       #f        ,(ly:make-pitch 0 5 0))
+          (hightom       default       #f        ,(ly:make-pitch 0 4 0))
+          (ridecymbala   cross         #f        ,(ly:make-pitch 0 5 0))
+          (ridecymbal    cross         #f        ,(ly:make-pitch 0 5 0))
+          (chinesecymbal         mensural      #f        ,(ly:make-pitch 0 5 0))
+          (ridebell      default       #f        ,(ly:make-pitch 0 5 0))
+          (splashcymbal          diamond       #f        ,(ly:make-pitch 0 5 0))
+          (cowbell       triangle      #f        ,(ly:make-pitch 0 5 0))
+          (crashcymbalb          cross         #f        ,(ly:make-pitch 0 5 0))
+          (vibraslap     diamond       #f        ,(ly:make-pitch 0 4 0))
+          (ridecymbalb   cross         #f        ,(ly:make-pitch 0 5 0))
+          ))
+
+  (timbales
+   . (
+      (losidestick       cross         #f        ,(ly:make-pitch -1 6 0))
+      (lotimbale         default       #f        ,(ly:make-pitch -1 6 0))
+      (cowbell   triangle      #f        ,(ly:make-pitch 0 2 0))
+      (hisidestick       cross         #f        ,(ly:make-pitch 0 1 0))
+      (hitimbale         default       #f        ,(ly:make-pitch 0 1 0))
+      ))
+
+  (congas
+   . (
+      (losidestick       cross         #f        ,(ly:make-pitch -1 6 0))
+      (loconga   default       #f        ,(ly:make-pitch -1 6 0))
+      (openloconga      default       "open"    ,(ly:make-pitch -1 6 0))
+      (muteloconga      default       "stopped" ,(ly:make-pitch -1 6 0))
+      (hisidestick       cross         #f        ,(ly:make-pitch 0 1 0))
+      (hiconga   default       #f        ,(ly:make-pitch 0 1 0))
+      (openhiconga      default       "open"    ,(ly:make-pitch 0 1 0))
+      (mutehiconga      default       "stopped" ,(ly:make-pitch 0 1 0))
+      ))
 
-(define-public timbales `(
-       (losidestick      cross         #f        ,(ly:make-pitch -1 6 0))
-       (lotimbale        default       #f        ,(ly:make-pitch -1 6 0))
-       (cowbell          triangle      #f        ,(ly:make-pitch 0 2 0))
-       (hisidestick      cross         #f        ,(ly:make-pitch 0 1 0))
-       (hitimbale        default       #f        ,(ly:make-pitch 0 1 0))
- ))
+  (bongos
+    . (
+       (losidestick      cross         #f        ,(ly:make-pitch -1 6 0))
+       (lobongo          default       #f        ,(ly:make-pitch -1 6 0))
+       (openlobongo      default       "open"    ,(ly:make-pitch -1 6 0))
+       (mutelobongo      default       "stopped" ,(ly:make-pitch -1 6 0))
+       (hisidestick      cross         #f        ,(ly:make-pitch 0 1 0))
+       (hibongo          default       #f        ,(ly:make-pitch 0 1 0))
+       (openhibongo      default       "open"    ,(ly:make-pitch 0 1 0))
+       (mutehibongo      default       "stopped" ,(ly:make-pitch 0 1 0))
+       ))
 
-(define-public congas `(
-       (losidestick      cross         #f        ,(ly:make-pitch -1 6 0))
-       (loconga          default       #f        ,(ly:make-pitch -1 6 0))
-       (openloconga      default       "open"    ,(ly:make-pitch -1 6 0))
-       (muteloconga      default       "stopped" ,(ly:make-pitch -1 6 0))
-       (hisidestick      cross         #f        ,(ly:make-pitch 0 1 0))
-       (hiconga          default       #f        ,(ly:make-pitch 0 1 0))
-       (openhiconga      default       "open"    ,(ly:make-pitch 0 1 0))
-        (mutehiconga      default       "stopped" ,(ly:make-pitch 0 1 0))
-  
- ))
 
-(define-public bongos `(
-       (losidestick      cross         #f        ,(ly:make-pitch -1 6 0))
-       (lobongo          default       #f        ,(ly:make-pitch -1 6 0))
-       (openlobongo      default       "open"    ,(ly:make-pitch -1 6 0))
-       (mutelobongo      default       "stopped" ,(ly:make-pitch -1 6 0))
-       (hisidestick      cross         #f        ,(ly:make-pitch 0 1 0))
-       (hibongo          default       #f        ,(ly:make-pitch 0 1 0))
-       (openhibongo      default       "open"    ,(ly:make-pitch 0 1 0))
-       (mutehibongo      default       "stopped" ,(ly:make-pitch 0 1 0))
- ))
+  (percussion
+   . (
+      (opentriangle      cross         "open"    ,(ly:make-pitch 0 0 0))
+      (mutetriangle      cross         "stopped" ,(ly:make-pitch 0 0 0))
+      (triangle          cross         #f        ,(ly:make-pitch 0 0 0))
+      (shortguiro        default       "staccato",(ly:make-pitch 0 0 0))
+      (longguiro         default       "tenuto"  ,(ly:make-pitch 0 0 0))
+      (guiro             default       #f        ,(ly:make-pitch 0 0 0))
+      (cowbell   triangle      #f        ,(ly:make-pitch 0 0 0))
+      (claves            default       #f        ,(ly:make-pitch 0 0 0))
+      (tambourine        default       #f        ,(ly:make-pitch 0 0 0))
+      (cabasa            cross         #f        ,(ly:make-pitch 0 0 0))
+      (maracas   default       #f        ,(ly:make-pitch 0 0 0))
+      (handclap          default       #f        ,(ly:make-pitch 0 0 0))
+      ))
+  ))
 
 
-(define-public percussion `(
-       (opentriangle     cross         "open"    ,(ly:make-pitch 0 0 0))
-       (mutetriangle     cross         "stopped" ,(ly:make-pitch 0 0 0))
-       (triangle         cross         #f        ,(ly:make-pitch 0 0 0))
-       (shortguiro       default       "staccato",(ly:make-pitch 0 0 0))
-       (longguiro        default       "tenuto"  ,(ly:make-pitch 0 0 0))
-       (guiro            default       #f        ,(ly:make-pitch 0 0 0))
-       (cowbell          triangle      #f        ,(ly:make-pitch 0 0 0))
-       (claves           default       #f        ,(ly:make-pitch 0 0 0))
-       (tambourine       default       #f        ,(ly:make-pitch 0 0 0))
-       (cabasa           cross         #f        ,(ly:make-pitch 0 0 0))
-       (maracas          default       #f        ,(ly:make-pitch 0 0 0))
-       (handclap         default       #f        ,(ly:make-pitch 0 0 0))
- ))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
              (begin
               (display p) ;; UGH. FIXME. pitch->string ???
               (ly:warn " unknown drumpitch.")
-              (cdar (primitive-eval kit))
+              (cdar (get-drum-kit kit))
           ))
          ((eq? p (caddr (car pitches))) ((name->paper kit) (caar pitches)) )
         (else                          (p2p (cdr pitches) ) )
  )
 
 (define ((name->paper kit) n)
-   (let n2p ((pitches (primitive-eval kit)))
+   (let n2p ((pitches (get-drum-kit kit)))
      (cond ((eq? pitches '())
              (begin
               (ly:warn (string-append "Kit `" (symbol->string kit) "' doesn't contain drum `" n
                                       "'\nSee ly/drumpitch-init.ly for supported drums."))
-              (cdar (primitive-eval kit))
+              (cdar (get-drum-kit kit))
             ))
            ((eq? n (caar pitches))  (cdar pitches) )
           (else                    (n2p (cdr pitches) ) )
    )
  )
 
-
+;;
 ;; converts a midi-pitched (ly/drumpitch.ly) file to paper output.
+;;
 (define-public ((drums->paper kit) music)
   (begin
    (if (equal? (ly:get-mus-property music 'name) 'EventChord)
           (ly:set-mus-property!
            music 'element
            ((drums->paper kit) e))
-        )
-      )
-    )
-   )
+        ))))
    music
-  )
- )
+  ))
index d03fb732adadfe0a3b64c20794f156a3e1bb6aef..9cb6ed627fd3293d608d337b723ad581a33bb7a0 100644 (file)
 bounding box, where to attach the stem. e.g.: X==0 means horizontally
 centered, X==1 is at the right, X == -1 is at the left."
 
+
   (case style
     ((default)
      (if (< duration -1)
@@ -198,6 +199,10 @@ centered, X==1 is at the right, X == -1 is at the left."
     ((transparent) '(1.0 . 1.0))
     ((slash) '(1.0 . 1.0))
     ((harmonic) '(1.0 0.0))
+
+    ;;
+    ;;UGH this needs to be changed: triangle is not point-symmetric, has different attachments
+    ;;  for up/down stem
     ((triangle) '(0.75 . 0.15))
     ((baroque)
      (if (< duration 0)