]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/translator-scheme.cc (LY_DEFINE): add !
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 27 Aug 2003 23:56:26 +0000 (23:56 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 27 Aug 2003 23:56:26 +0000 (23:56 +0000)
* scm/music-functions.scm (set-stop-grace-properties)
(set-start-grace-properties, add-grace-property): new functions
for modular grace tweak control.

12 files changed:
ChangeLog
Documentation/topdocs/NEWS.texi
input/les-nereides.ly
input/test/bagpipe.ly
input/test/bar-lines-lyric-only.ly
input/test/chord-names-german.ly
input/test/chord-names-jazz.ly
input/test/cue-notes.ly
input/test/divisiones.ly
lily/translator-scheme.cc
scm/music-functions.scm
scripts/convert-ly.py

index c670ca2abba86b72be5cf84cb6c1e05464313974..1274a9338ff5ed0d4c2c33763a3ba6053a82c8c6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2003-08-28  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
+       * lily/translator-scheme.cc (LY_DEFINE): add !
+
        * input/*/*.ly (vmus): use \new everywhere.
 
        * lily/my-lily-lexer.cc: add \accacciatura and \appoggiatura
index 60a6fa8bc4c26ece18fc7e9c97bd00eb2e80d9cf..0afa422dfb9e226352a506519c68a2a25fe1ad11 100644 (file)
 @itemize
 
 @item
-Two new commands for grace note have been added, @code{\accacciatura}
-and @code{\appogiatura}. Both reflect the traditional meanings of
-accacciatura and ap
+Two new commands for grace notes have been added, @code{\accacciatura}
+and @code{\appoggiatura},
 
+@example
+  \appoggiatura f8 e4
+  \accacciatura g8 f4
+@end example
 
+Both reflect the traditional meanings of accacciatura and appogiatura,
+and both insert insert a slur from the first grace note to the main
+note.
+
+@item 
+Layout options for grace notes are now stored in a context property,
+and may now be set separately from musical content.
 
 @item
 The @code{\new} command will create a context with a unique
index f47077e10930a0aa3a686fb992236dae872f2b46..a9ba1ba5bc4cd6fdc3551c389d852da93cf5f446 100644 (file)
@@ -32,7 +32,7 @@ possibly more impressive to render without tweaks?
   (lambda (elt) (equal? text (ly:get-grob-property elt 'text))))
 
 
-treble = \context Voice=treble \notes\relative c''{
+treble = \new Voice \notes\relative c''{
     \key a \major
     r2
     | %2
@@ -96,7 +96,7 @@ treble = \context Voice=treble \notes\relative c''{
     \bar "||"
 }
 
-trebleTwo =  \context Voice=trebleTwo \notes\relative c''{
+trebleTwo =  \new Voice \notes\relative c''{
     \stemDown
     \slurDown
     % \fingerDown
@@ -121,7 +121,7 @@ trebleTwo =  \context Voice=trebleTwo \notes\relative c''{
     <<a cis,>>)]
 }
 
-bass =  \context Voice=bass \notes\relative c{
+bass =  \new Voice \notes\relative c{
     \partial 2
     \key a \major
     
@@ -211,7 +211,7 @@ bass =  \context Voice=bass \notes\relative c{
     a)]
 }
 
-bassTwo =  \context Voice=bassTwo \notes\relative c{
+bassTwo =  \new Voice \notes\relative c{
     \skip 2
     \skip 1*2
     \skip 2
@@ -222,7 +222,7 @@ bassTwo =  \context Voice=bassTwo \notes\relative c{
     cis'4( bis)
 }
 
-middleDynamics =  \context Dynamics=middle \notes{
+middleDynamics = \notes{
     \property Dynamics.TextScript \set #'padding = #-1 %tweak
     s2
     s1*2
@@ -248,7 +248,7 @@ middleDynamics =  \context Dynamics=middle \notes{
     s8\!
 }
 
-lowerDynamics = \context Dynamics=lower \notes{
+lowerDynamics = \notes{
     s2
     | %2
     s2\sustainDown s8. s16\sustainUp s4
@@ -305,7 +305,7 @@ lowerDynamics = \context Dynamics=lower \notes{
            \treble
            \trebleTwo
         >
-       \context Dynamics=middle <
+       \new Dynamics <
            \middleDynamics
        >
         \context Staff=bass <
@@ -313,7 +313,7 @@ lowerDynamics = \context Dynamics=lower \notes{
            \bass
            \bassTwo
         >
-       \context Dynamics=lower <
+       \new Dynamics <
            \lowerDynamics
        >
     >
index 98297007ec336d47be850194a77c073dbe77c97c..ad8e400213da6165f3eb5cc2bc0d170293ef6913 100644 (file)
@@ -6,9 +6,6 @@ Here's an example of bagpipe music.
 "
 }
 
-#(add-to-grace-init "Voice" 'Stem 'length 6)
-#(add-to-grace-init "Voice" 'Stem 'stroke-style '())
-
 % doen't work??  
 %#(add-to-grace-init "Voice" 'Stem 'font-relative-size )
 
@@ -51,6 +48,11 @@ gcdg =  \notes{ \grace {  g'32[ c d]}}
 % 
 \score {
   \notes  { \time 6/8 \partial 4
+
+ #(add-grace-property "Voice" 'Stem 'length 6)
+ #(add-grace-property "Voice" 'Stem 'stroke-style '())
+
+           
   \tieUp
   \slurUp
 f4 |
index d1de8adf3b6659b31d038f2d2080d1356945d097..7709d8b618b08fe2e93aca70cfc375c6486165ed 100644 (file)
@@ -6,13 +6,13 @@ You can move around @code{Bar_engraver} and
 
 \score {
 \notes \relative c' \context ChoirStaff <
- \newcontext Staff { c1 c1 c1}
+ \new Staff { c1 c1 c1}
  \context Lyrics \lyrics <
   { bla1 die bla }
   { foo bar foo }
   { foo bar foo }  
  >
- \newcontext Staff { c1 c1 c1} 
+ \new Staff { c1 c1 c1} 
  >
 
 
index 9dac83696aca0adf7df3508fc17dd8308a644451..ec02957f579b763d0d2f6018cb72689e52db7887 100644 (file)
@@ -22,10 +22,10 @@ scm = \chords {
 \score {
 \notes <
     \context ChordNames { \scm }
-    \newcontext ChordNames {
+    \new ChordNames {
        \property ChordNames.instrument = #"german"
        \germanChords \scm }
-    \newcontext ChordNames {
+    \new ChordNames {
        \property ChordNames.instrument =#"semi-german"
        \semiGermanChords \scm }
     \context Voice {  \scm } >
index e8c1060ad16703a31d681bf666f4f26d00e652c0..3923f309d4f4f953b5f90f438df5d1b19edce2a6 100644 (file)
@@ -116,7 +116,7 @@ banterProperties = \sequential {
            \property ChordNames.instrument = #"Ignatzek (default)"
            \property ChordNames.instr = #"Def"
            \chs }
-       \newcontext ChordNames {
+       \new ChordNames {
            \property ChordNames.instrument = #"Alternative"
            \property ChordNames.instr = #"Alt"
            \jazzAltProperties
@@ -127,7 +127,7 @@ banterProperties = \sequential {
        % making this file take up to 4 pages.
        
 %{
-               \newcontext ChordNames  {
+               \new ChordNames  {
            \banterProperties
            \chs
            }
index 9bb990967080e06acab6906f4ab34a4bf2a10193..e8b92a7cff81a369d630a2b3a941c9bda32a620b 100644 (file)
@@ -19,7 +19,7 @@ Cue notes should be set in smaller type. "
            R1
            \property Voice.MultiMeasureRest \revert #'staff-position
        }
-     \newcontext Voice { s2
+     \new Voice { s2
        \clef tenor
 
        %% this should probably be put into an identifier.
index 1e05635d1fc1a7ef61ebda0d3f7c1c1e9e3362e3..64085768385191ec473cc3a1aacc19b7f4b5c114 100644 (file)
@@ -13,7 +13,7 @@ Choices are @code{divisioMinima}, @code{divisioMaior}
 
 \score {
     \notes {
-       \newcontext Staff \addlyrics \notes \transpose c c' {
+       \new Staff \addlyrics \notes \transpose c c' {
            \property Score.timing = ##f
            \property Score.barAlways = ##t
            \property Voice.TextScript \set #'padding = #3
@@ -40,7 +40,7 @@ Choices are @code{divisioMinima}, @code{divisioMaior}
            \caesura
             g4( a) g e( f) e
        }
-       \newcontext Lyrics \lyrics {
+       \new Lyrics \lyrics {
            Blah blub, blah blam.
            Blah blub, blah blam.
            Blah blub, blah blam.
index 2a51a7438f77e72a8e408e41c80fb780d7dcd2d2..ed42abdb1889f036685795677d1e97ce4afd7b7a 100644 (file)
@@ -28,7 +28,7 @@ LY_DEFINE(ly_get_context_property,
 }
 
 LY_DEFINE(ly_set_context_property,
-         "ly:set-context-property", 3, 0, 0,
+         "ly:set-context-property!", 3, 0, 0,
          (SCM context, SCM name, SCM val),
          "set value of property @var{name} in context @var{context} to @var{val}.")
 {
index ba31d6dea19e401cc1ef36f3961ecada0b879a34..b7c6730469b51cd283e0413c6129deaf76c48052 100644 (file)
@@ -626,7 +626,8 @@ Rest can contain a list of beat groupings
   
   (let*
       ((props (ly:get-context-property context 'graceSettings)))
-    (vector-map execute-1 props)))
+    (if (vector? props)
+       (vector-map execute-1 props))))
 
 (define-public (set-stop-grace-properties context)
   (define (execute-1 x)
@@ -638,8 +639,8 @@ Rest can contain a list of beat groupings
   
   (let*
       ((props (ly:get-context-property context 'graceSettings)))
-    
-    (vector-reverse-map execute-1 props)))
+    (if (vector? props)
+       (vector-reverse-map execute-1 props))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; switch it on here, so parsing and init isn't checked (too slow!)
index dd6c5aed4436b77ae4ddec96736c1a412e65bc64..f138c70a47402359b43a9ebc09ca978672a1f6eb 100644 (file)
@@ -1424,6 +1424,8 @@ if 1:
        conversions.append (((1,9,1), conv, """Remove - before articulation"""))
 if 1:
        def conv (str):
+               str = re.sub ('ly:set-context-property',
+                             'ly:set-context-property!', str)
                str = re.sub ('\\\\newcontext', '\\\\new', str)
                str = re.sub ('\\\\grace[\t\n ]*([^{ ]+)',
                              r'\\grace { \1 }', str)