]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.48.mb1
authorMats Bengtsson <mats.bengtsson@s3.kth.se>
Wed, 10 May 2000 19:46:32 +0000 (21:46 +0200)
committerMats Bengtsson <mats.bengtsson@s3.kth.se>
Wed, 10 May 2000 19:46:32 +0000 (21:46 +0200)
1.3.48.mb1
===========

* Changed noteHeadStyle properties to symbols, for example
  \property Voice.noteHeadStyle = #'cross

---
Generated by (address unknown),
From = lilypond-1.3.48, To = lilypond-1.3.48.mb1

usage

    cd lilypond-source-dir; patch -E -p1 < lilypond-1.3.48.mb1.diff

Patches do not contain automatically generated files
or (urg) empty directories,
i.e., you should rerun autoconf, configure

CHANGES
Documentation/user/properties.itely
VERSION
input/test/noteheadstyle.ly
lily/note-head.cc
lily/note-heads-engraver.cc
scm/generic-property.scm
scm/generic-property.scm.orig [new file with mode: 0644]
scm/lily.scm
scripts/convert-mudela.py

diff --git a/CHANGES b/CHANGES
index 901d0650abb8060b7b6d26813d4b9bf7ed2187b9..be6d5a4aa1acf2ed8aa22c6486fa8c543262e311 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,15 @@
-1.3.47.jcn3
+--- ../lilypond-1.3.48/CHANGES Mon May  8 10:48:49 2000
+++ b/CHANGES   Wed May 10 21:46:32 2000
+@@ -1,3 +1,9 @@
+1.3.48.mb1
+===========
+
+* Changed noteHeadStyle properties to symbols, for example
+  \property Voice.noteHeadStyle = #'cross
+
+ 1.3.47.mb2
+ ===========
+ 1.3.47.jcn3
 ===========
 
 * Rewrite of chord-name production in scheme.  There are two major styles
index 815f1a65fbc310de55df348f097f83e6ea76d67c..52af602fee4029054a7132329043c9d3db525d10 100644 (file)
@@ -47,24 +47,30 @@ TODO:
 @cindex properties!Thread
 
 @table @samp
-  @item @code{noteheadStyle}@indexcode{noteheadStyle} @propertytype{string}
-    Selects type of note head.  Choices are @code{cross},
-    @code{diamond}, @code{harmonic}, @code{transparent}, and @code{""}. 
-    They are shown in that order below.
+  @item @code{noteHeadStyle}@indexcode{noteHeadStyle} @propertytype{symbol}
+    Selects type of note head.  Choices are @code{'cross},
+    @code{'diamond}, @code{'harmonic}, @code{'transparent}, 
+    @code{'mensural}, @code{'baroque}, and @code{'default}. 
+    They are shown in that order below. The  @code{'baroque}, 
+    style gives the default symbols except for brevis and 
+    longa notes which are square shaped as in the @code{'mensural} 
+    style.
 
     @mudela[center,verbatim]
       \score {
         \notes { 
           \property Staff.barNonAuto = 1
-          \property Voice.noteHeadStyle = cross 
+          \property Voice.noteHeadStyle = #'cross 
           a'
-          \property Voice.noteHeadStyle = diamond
+          \property Voice.noteHeadStyle = #'diamond
           a'
-          \property Voice.noteHeadStyle = harmonic
+          \property Voice.noteHeadStyle = #'harmonic
           a'
-          \property Voice.noteHeadStyle = transparent
+          \property Voice.noteHeadStyle = #'transparent
           a' 
-          \property Voice.noteHeadStyle = ""
+          \property Voice.noteHeadStyle = #'mensural
+          a' 
+          \property Voice.noteHeadStyle = #'default
           a'
         }
         \paper {
diff --git a/VERSION b/VERSION
index f5024157bdc1c2eca5b99cd2e5eca894310b79c3..991b5d3fa34b785a5b47b70070f865df2094bac9 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=48
-MY_PATCH_LEVEL=jcn1
+MY_PATCH_LEVEL=mb1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 9ff6337dcfa6bc0f375847972458207c48d5e425..86202823cabeef98a881c07801feb27c21ca324c 100644 (file)
@@ -1,36 +1,36 @@
 \score { \notes \relative c{
 c''4 c2 c8  c16 c16 c1 c\breve 
-\property Voice.noteHeadStyle = "diamond"
+\property Voice.noteHeadStyle = #'diamond
 c4 c2 c8  c16 c16  c1 c\breve
-\property Voice.noteHeadStyle = "transparent"
+\property Voice.noteHeadStyle = #'transparent
 c4 c2 c8  c16 c16  c1 c\breve
-\property Voice.noteHeadStyle = "cross"
+\property Voice.noteHeadStyle = #'cross
 c4 c2 c8  c16 c16  c1 c\breve
-\property Voice.noteHeadStyle = "mensural"
+\property Voice.noteHeadStyle = #'mensural
 c4 c2 c8  c16 c16  c1 c\breve c\longa
-\property Voice.noteHeadStyle = "harmonic"
+\property Voice.noteHeadStyle = #'harmonic
 c4 c2 c8  c16 c16  c1 c\breve
-\property Voice.noteHeadStyle = "baroque"
+\property Voice.noteHeadStyle = #'baroque
 c4 c2 c8  c16 c16  c1 c\breve c\longa
 
    \context Voice <
     \context Thread = TA
-      { \property Thread.noteHeadStyle = "cross"
+      { \property Thread.noteHeadStyle = #'cross
         \property Voice.verticalDirection = \up c16} 
     \context Thread = TB
-      { \property Thread.noteHeadStyle = "" a16  }
+      { \property Thread.noteHeadStyle = #'default a16  }
     
     \context Thread = TC
-      { \property Thread.noteHeadStyle = "mensural" d16 }
+      { \property Thread.noteHeadStyle = #'mensural d16 }
     
   >
 
   
    \context Voice <\context Thread = TA {
-   \property Thread.noteHeadStyle = #'()
+   \property Thread.noteHeadStyle = #'default
    c4 c4 }
 \context Thread = TB {
-  \property Thread.noteHeadStyle = "mensural"
+  \property Thread.noteHeadStyle = #'mensural
   c'4 \stemdown c
 } >
 
index a89dee5aa072d292163c25f3cb64779b14d344a4..91dbeec61df487b793d88a762b99b1e2814f3558 100644 (file)
@@ -87,13 +87,13 @@ Note_head::do_brew_molecule() const
   SCM style  = get_elt_property ("style");
   if (style == SCM_UNDEFINED)
     {
-      style = ly_str02scm("");
+      style = ly_symbol2scm("default");
     }
   
   Molecule out = lookup_l()->afm_find (String ("noteheads-") + 
-               ly_scm2string (scm_eval (gh_list (ly_symbol2scm("noteheadsymbol"),
+               ly_scm2string (scm_eval (gh_list (ly_symbol2scm("find-notehead-symbol"),
                                                  gh_int2scm(balltype_i ()),
-                                                 style,
+                                                 ly_quote_scm(style),
                                                  SCM_UNDEFINED))));
 
   Box ledgerless = out.dim_;
index 9dcc8751922bf0383cfc889de9c1bc4533f24b56..780b6425007d9ab047777b46a80ef058ce58a957 100644 (file)
@@ -58,7 +58,6 @@ Note_heads_engraver::do_process_music()
   if (note_p_arr_.size ())
     return ;
   
-  SCM noteheadstyle = get_property ("noteHeadStyle");
   for (int i=0; i < note_req_l_arr_.size (); i++)
     {
       Note_head *note_p  = new Note_head;
@@ -86,15 +85,6 @@ Note_heads_engraver::do_process_music()
        }
       si.set_position(note_req_l->pitch_.steps ());
 
-      /*
-       TODO: transparent note heads.
-       */
-        
-      if (gh_string_p (noteheadstyle))
-       {
-         note_p->set_elt_property ("style", noteheadstyle);
-       }
-      
       Score_element_info itinf (note_p,note_req_l);
       announce_element (itinf);
       note_p_arr_.push (note_p);
index 1506982fb630c814a57f191fb446eef1b90f2fc5..57ef8859ba40faaa66deba9e753b733bc648b2e4 100644 (file)
 (define generic-All-properties
   (cons "all"  (list (list 'fontSize number? 'fontsize))))
 
+
+(define generic-notehead-properties
+  (cons "Note_head" (list (list 'noteHeadStyle symbol? 'style))))
+
+
 (define generic-rest-properties
   (cons "Rest" (list (list 'restStyle string? 'reststyle))))
 
    generic-tie-properties
    generic-tie-column-properties   
    generic-tuplet-spanner-properties
+   generic-notehead-properties
    generic-rest-properties
    generic-slur-properties
    generic-beam-properties
 
 (define generic-thread-properties
   (list generic-All-properties
+        generic-notehead-properties
        generic-dot-properties
        )
 
diff --git a/scm/generic-property.scm.orig b/scm/generic-property.scm.orig
new file mode 100644 (file)
index 0000000..1506982
--- /dev/null
@@ -0,0 +1,255 @@
+
+;
+; Format: 
+; (cons "Type name"
+;    (list PROPERTYDESCRIPTIONS))
+; 
+; where
+; PROPERTYDESCRIPTION
+; is
+;
+;  (list 'translatorPropertySymbol type-predicate backend-property-symbol)
+;
+; Descriptions earlier in the list take precedence over later descriptions.
+;
+
+
+(define generic-beam-properties
+  (cons "Beam"
+       (list
+        (list 'beamSlopeDamping number? 'damping)
+        (list 'autoKneeGap number? 'auto-knee-gap)
+        (list 'autoInterstaffKneeGap number? 'auto-interstaff-knee-gap)
+        (list 'beamDirAlgorithm symbol? 'beam-dir-algorithm)
+        (list 'beamHeight number? 'height-hs)
+        (list 'beamVerticalPosition number? 'y-position-hs)
+        )
+       )
+  )
+
+
+(define generic-stem-properties
+  (cons "Stem"
+       (list
+        (list 'stemVerticalDirection dir? 'direction)
+        (list 'verticalDirection dir? 'direction)       
+        (list 'stemLength number? 'length)
+        (list 'flagStyle string? 'flag-style)
+        (list 'stemCentered boolean? 'stem-centered)
+        (list 'noStemExtend boolean? 'no-stem-extend)
+        (list 'stemShorten number? 'shorten)
+        ))
+  )
+
+(define generic-dot-properties
+  (cons "Dots" (list
+               (list 'dotDirection dir? 'direction)
+               (list 'verticalDirection dir? 'direction)
+               )
+       ))
+
+(define generic-script-properties
+  (cons "Script" (list
+                 (list 'articulationScriptVerticalDirection dir? 'direction)
+                 (list 'articulationScriptPadding number? 'padding)
+
+                 ))
+  )
+
+
+
+(define generic-text-properties
+  (cons "Text_item" (list
+                    (list 'textStyle string? 'style)
+                    (list 'textScriptPadding number? 'padding)
+                    (list 'textVerticalAlignment dir? 'self-alignment-Y)
+                    (list 'textHorizontalAlignment dir? 'self-alignment-X)
+                    (list 'textScriptWordSpace number? 'word-space)
+                    )
+       ))
+
+(define generic-sustain-pedal-properties
+  (cons "Sustain_pedal" (list
+                        (list 'textScriptPadding number? 'padding)
+                        (list 'sustainPedalPadding number? 'padding))))
+
+(define generic-chord-name-properties
+  (cons "Chord_name" (list
+                     (list 'textScriptWordSpace number? 'word-space)
+                     (list 'chordNameWordSpace number? 'word-space)
+                     (list 'chordNameStyle string? 'style))))
+
+(define generic-crescendo-properties
+  (cons "Crescendo" (list
+                    (list 'dynamicDirection dir? 'direction)
+                    (list 'verticalDirection dir? 'direction)
+                    (list 'dynamicPadding number? 'padding) 
+                    (list 'dynamicMinimumSpace number? 'minimum-space) 
+                    )))
+  
+(define generic-dynamic-line-spanner-properties
+  (cons "Dynamic_line_spanner" (list
+                    (list 'dynamicDirection dir? 'direction)
+                    (list 'verticalDirection dir? 'direction)
+                    (list 'dynamicPadding number? 'padding) 
+                    (list 'dynamicMinimumSpace number? 'minimum-space) 
+                    )))
+  
+(define generic-volta-spanner-properties
+  (cons "Volta_spanner" (list
+                    (list 'voltaVerticalDirection dir? 'direction)
+                    (list 'voltaPadding number? 'padding) 
+                    (list 'voltaMinimumSpace number? 'minimum-space) 
+                    )))
+  
+(define generic-bar-properties
+  (cons "Staff_bar" (list
+                    (list 'barSize number? 'bar-size))
+       )
+  )    
+
+; don't do this yet. Depends on whennn the staff is really announced
+(define generic-staff-symbol-properties
+  (cons "Staff_symbol" (list
+                       )
+       )
+  )
+
+(define generic-breathing-sign-properties
+  (cons "Breathing_sign"
+       (list
+        (list 'breathingSignVerticalDirection dir? 'direction)
+        (list 'verticalDirection dir? 'direction)
+        )))
+
+(define generic-clef-properties
+  (cons "Clef_item"
+       (list
+        (list 'clefStyle string? 'style))
+       )
+  )
+
+(define generic-All-properties
+  (cons "all"  (list (list 'fontSize number? 'fontsize))))
+
+(define generic-rest-properties
+  (cons "Rest" (list (list 'restStyle string? 'reststyle))))
+
+(define generic-rest-collision-properties
+  (cons "Rest_collision" (list (list 'maximumRestCount number? 'maximum-rest-count))))
+
+(define generic-tie-properties
+  (cons "Tie" (list
+              (list 'tieVerticalDirection dir? 'direction)
+              (list 'verticalDirection dir? 'direction)
+(list 'tieDash number? 'dashed)
+  )))
+
+(define generic-tie-column-properties
+  (cons "Tie_column" (list
+                     (list 'tieVerticalDirection dir? 'direction)
+                     (list 'verticalDirection dir? 'direction)
+  )))
+
+(define generic-note-column-properties
+  (cons "Note_column"
+       (list
+        (list 'horizontalNoteShift number? 'horizontal-shift)
+        (list 'forceHorizontalShift number? 'force-hshift)
+        )))
+
+(define generic-collision-properties
+  (cons "Collision"
+       (list
+        (list 'collisionMergeDotted boolean? 'merge-differently-dotted)
+        )
+       )
+  )
+  
+(define generic-slur-properties
+  (cons "Slur"
+       (list
+        (list 'slurVerticalDirection dir? 'direction)
+        (list 'verticalDirection dir? 'direction)       
+        (list 'slurDash number? 'dashed))))
+
+(define generic-timesig-properties
+  (cons "Time_signature"
+       (list
+        (list 'timeSignatureStyle string? 'style))))
+
+(define (symbol-or-boolean? s)
+  (or (boolean? s) (symbol? s)))
+
+(define generic-tuplet-spanner-properties
+  (cons "Tuplet_spanner"
+       (list
+        (list 'tupletNumberVisibility symbol-or-boolean? 'tuplet-number-visibility)
+        (list 'tupletBracketVisibility symbol-or-boolean? 'tuplet-bracket-visibility)
+       ))
+)
+
+
+
+
+
+;;;;;;;;;;
+;; don't forget to add these to the Generic_property_list property in
+;; engraver.ly
+
+(define generic-voice-properties
+  (list
+   generic-stem-properties
+   generic-breathing-sign-properties
+   generic-crescendo-properties
+   generic-dynamic-line-spanner-properties
+   generic-tie-properties
+   generic-tie-column-properties   
+   generic-tuplet-spanner-properties
+   generic-rest-properties
+   generic-slur-properties
+   generic-beam-properties
+   generic-text-properties
+   generic-sustain-pedal-properties
+   generic-note-column-properties
+   generic-script-properties
+   generic-All-properties
+   ))
+
+(define generic-grace-properties generic-voice-properties)
+(define generic-staff-properties
+  (list
+   generic-text-properties   
+   generic-bar-properties
+   generic-timesig-properties
+   generic-clef-properties
+   generic-collision-properties
+   generic-sustain-pedal-properties
+   generic-rest-collision-properties
+   generic-volta-spanner-properties
+;   generic-staff-symbol-properties
+   generic-All-properties      
+   )
+  )
+(define generic-grand-staff-properties
+  (list
+   generic-text-properties   
+   generic-bar-properties
+   ))
+
+(define generic-thread-properties
+  (list generic-All-properties
+       generic-dot-properties
+       )
+
+  )
+   
+(define generic-lyrics-properties
+  (list generic-text-properties
+  )
+)
+
+(define generic-chord-staff-properties
+  (list generic-chord-name-properties
+  )
+)
index ab6d5ff38ec089dedfa5e8b8f5003a0a783c22d3..e7da9d43a9e12134c1cdeedbc5eb4fe49a637e26 100644 (file)
               '(minimum-space 0.0)))))
   
 
-(define (noteheadsymbol duration style)
-  (cond
-   ((equal? style "cross") "2cross")
-   ((equal? style "harmonic") "0mensural")
-   ((equal? style "baroque")
+(define (find-notehead-symbol duration style)
+  (case style
+   ((cross) "2cross")
+   ((harmonic) "0mensural")
+   ((baroque) 
     (string-append (number->string duration)
                   (if (< duration 0) "mensural" "")))
+   ((default) (number->string duration))
    (else
-    (string-append (number->string duration) style))))
+    (string-append (number->string duration) (symbol->string style)))))
 
 
 ;;;;;;;; TeX
index 1bfa4f6370ab617eceb7e2cb2eb296bc1b195615..e55c4db7ceea858fb84cd8a0ad3ffed1f779ad85 100644 (file)
@@ -455,7 +455,7 @@ if 1:
                return str
 
        conversions.append ((1,3,41), conv,
-                           '[:16 c4 d4 ] -> \repeat "tremolo" 2 { c16 d16 }')
+                           '[:16 c4 d4 ] -> \\repeat "tremolo" 2 { c16 d16 }')
 
 if 1:
        def conv (str):
@@ -465,6 +465,14 @@ if 1:
        conversions.append ((1,3,42), conv,
                            'Staff_margin_engraver deprecated, use Instrument_name_engraver')
 
+if 1:
+       def conv (str):
+               str = re.sub ('note[hH]eadStyle\\s*=\\s*"?(\\w+)"?' , "noteHeadStyle = #'\\1", str)
+               return str
+
+       conversions.append ((1,3,49), conv,
+                           'noteHeadStyle value: string -> symbol')
+
 ############################