]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/lexer.ll (init_signature_has_table): Add
authorWerner Lemberg <wl@gnu.org>
Wed, 17 May 2006 15:21:49 +0000 (15:21 +0000)
committerWerner Lemberg <wl@gnu.org>
Wed, 17 May 2006 15:21:49 +0000 (15:21 +0000)
`scm-scm-music-music'.

* lily/parser.yy (MUSIC_FUNCTION_SCM_SCM_MUSIC_MUSIC): New token.
(Generic_prefix_music_scm): Add rule for it.

* lily/quote-iterator.cc (Quote_iterator::process): Handle
`quoted-transposition' property.

* ly/music-functions-init.ly (transposedCueDuring): New function.

* scm/define-music-properties.scm (all-music-properties): Updated.

* Documenation/topdocs/NEWS.itely: Document it.

ChangeLog
Documentation/topdocs/NEWS.tely
lily/lexer.ll
lily/parser.yy
lily/quote-iterator.cc
ly/music-functions-init.ly
scm/define-music-properties.scm

index 299c91d9723cc07b592cf65a5128c1873fe8f968..badcb475139b7b76f2faca460e24c5384a320dbb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2006-05-17  Werner Lemberg  <wl@gnu.org>
+
+       * lily/lexer.ll (init_signature_has_table): Add
+       `scm-scm-music-music'.
+
+       * lily/parser.yy (MUSIC_FUNCTION_SCM_SCM_MUSIC_MUSIC): New token.
+       (Generic_prefix_music_scm): Add rule for it.
+
+       * lily/quote-iterator.cc (Quote_iterator::process): Handle
+       `quoted-transposition' property.
+
+       * ly/music-functions-init.ly (transposedCueDuring): New function.
+
+       * scm/define-music-properties.scm (all-music-properties): Updated.
+
+       * Documenation/topdocs/NEWS.itely: Document it.
+
 2006-05-17  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
        * VERSION (PATCH_LEVEL): release 2.9.5
index d6a3c9275b6e433c2d710708300c39e90efce8fd..a53cff5e0930e4580b8785475c64863f80960046 100644 (file)
@@ -67,6 +67,16 @@ which scares away people.
 @end ignore
 
 
+@item
+A new command @code{\transposedCueDuring} has been added which overrides
+the cue's transposition locally.  Its intended use is to octavate cues
+up or down to avoid an excessive number of ledger lines.  The syntax form
+is
+
+@example
+\transposedCueDuring #NAME #UPDOWN PITCH MUSIC
+@end example
+
 @item
 By setting @code{hairpinToBarline}, hairpins will stop at
 the barline preceding the ending note.
@@ -77,7 +87,6 @@ the barline preceding the ending note.
 c4\< c2. c4\!
 @end lilypond
 
-
 This feature was sponsored by Andrew Sidwell and Trevor Bača.
 
 @item
index f9601985f40b6bed668c7853e61bb359f2ab1f13..d69dbb5ffde1e825a8356408e829a96749a0979e 100644 (file)
@@ -895,6 +895,7 @@ static void init_signature_hash_table ()
                {"scm-scm", MUSIC_FUNCTION_SCM_SCM},
                {"music-music", MUSIC_FUNCTION_MUSIC_MUSIC},
                {"scm-music-music", MUSIC_FUNCTION_SCM_MUSIC_MUSIC},
+               {"scm-scm-music-music", MUSIC_FUNCTION_SCM_SCM_MUSIC_MUSIC},
                {"scm-scm-music", MUSIC_FUNCTION_SCM_SCM_MUSIC},
                {"scm-scm-scm-music", MUSIC_FUNCTION_SCM_SCM_SCM_SCM_MUSIC},
                {"scm-scm-scm-scm-music", MUSIC_FUNCTION_SCM_SCM_SCM_MUSIC},
index 9266860f378155d4e1487753fe5aad460bc3f980..d7972de0b56e479a9a0d48989082b7df9765144a 100644 (file)
@@ -282,6 +282,7 @@ If we give names, Bison complains.
 %token <scm> MUSIC_FUNCTION_SCM 
 %token <scm> MUSIC_FUNCTION_SCM_MUSIC 
 %token <scm> MUSIC_FUNCTION_SCM_MUSIC_MUSIC 
+%token <scm> MUSIC_FUNCTION_SCM_SCM_MUSIC_MUSIC 
 %token <scm> MUSIC_FUNCTION_SCM_SCM 
 %token <scm> MUSIC_FUNCTION_SCM_SCM_MUSIC 
 %token <scm> MUSIC_FUNCTION_SCM_SCM_SCM 
@@ -994,6 +995,11 @@ Generic_prefix_music_scm:
                $4->unprotect ();
                $3->unprotect ();
        }
+       | MUSIC_FUNCTION_SCM_SCM_MUSIC_MUSIC function_scm_argument function_scm_argument Music Music {
+               $$ = scm_list_n ($1, make_input (@$), $2, $3, $4->self_scm (), $5->self_scm (), SCM_UNDEFINED);
+               $4->unprotect ();
+               $5->unprotect ();
+       }
        | MUSIC_FUNCTION_MARKUP_MUSIC_MUSIC full_markup Music Music {
                $$ = scm_list_5 ($1, make_input (@$), $2, $3->self_scm (), $4->self_scm ());
                $3->unprotect ();
index f0a2d46e6b1c9d92e8601394a48dde20b6825182..820d0ed1587fbd36826a2b7cf022e6ed6c36ef65 100644 (file)
@@ -222,7 +222,9 @@ Quote_iterator::process (Moment m)
       /*
        The pitch that sounds like central C
       */
-      Pitch *me_pitch = unsmob_pitch (get_outlet ()->get_property ("instrumentTransposition"));
+      Pitch *me_pitch = unsmob_pitch (get_music ()->get_property ("quoted-transposition"));
+      if (!me_pitch)
+       me_pitch = unsmob_pitch (get_outlet ()->get_property ("instrumentTransposition"));
 
       for (SCM s = scm_cdr (entry); scm_is_pair (s); s = scm_cdr (s))
        {
index 16ac73ef728b5656c72d5b620faf616a6440baf4..030426ea1e84a402b7612ee074b5cce602e72a45 100644 (file)
@@ -207,6 +207,27 @@ cueDuring =
              'origin location))
 
 
+transposedCueDuring = #
+(define-music-function
+  (parser location what dir pitch-note main-music)
+  (string? ly:dir? ly:music? ly:music?)
+
+  "Insert notes from the part @var{what} into a voice called @code{cue},
+using the transposition defined by @var{pitch-note}.  This happens
+simultaneously with @var{main-music}, which is usually a rest.  The
+argument @var{dir} determines whether the cue notes should be notated
+as a first or second voice."
+
+  (make-music 'QuoteMusic
+             'element main-music
+             'quoted-context-type 'Voice
+             'quoted-context-id "cue"
+             'quoted-music-name what
+             'quoted-voice-direction dir
+             'quoted-transposition (pitch-of-note pitch-note)
+             'origin location))
+
+
 quoteDuring = #
 (define-music-function
   (parser location what main-music)
@@ -217,7 +238,6 @@ quoteDuring = #
              'origin location))
 
 
-
 pitchedTrill =
 #(define-music-function
    (parser location main-note secondary-note)
index bb0e4e4dfe58020c1ce410e3c098ad2077e566bc..b330534d75041ff4545938a34cb9bf7383f5bcdc 100644 (file)
@@ -80,6 +80,7 @@ It must take a single argument, being the context.")
      (quoted-voice-direction ,ly:dir? "Should the quoted voice be up-stem or down-stem?")
      (quoted-context-type ,symbol? "The name of the context to direct quotes to, eg., @code{Voice}.")
      (quoted-context-id ,string? "The id of the context to direct quotes to, eg., @code{cue}.")
+     (quoted-transposition ,ly:pitch? "The pitch used for the quote, overriding \\transposition")
      (to-relative-callback ,procedure? "How to transform a piece of music to relative pitches")
      (tweaks ,list? "An alist of properties to override in the backend
 for the grob made of this event.")