]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/music-types.scm: junk compat glue
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 13 Oct 2002 19:38:44 +0000 (19:38 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 13 Oct 2002 19:38:44 +0000 (19:38 +0000)
* scripts/convert-ly.py: add rules for stuff below, junk
compatibility glue for spanrequest.

* lily/parser.yy (verbose_event): remove \spanrequest,
\commandspanrequest, \script.

* lily/identifier-smob.cc (LY_DEFINE): change name to ly-export

* lily/parser.yy: remove arpeggio keyword; use identifier. Idem
for \penalty, \glissando.

23 files changed:
ChangeLog
Documentation/user/internals.itely
Documentation/user/refman.itely
input/les-nereides.ly
input/mutopia/W.A.Mozart/mozart-hrn3-defs.ly
input/regression/break.ly
input/test/ac-extra-voice.ly
input/test/ottava.ly
input/test/scheme-interactions.ly
input/test/text-spanner.ly
input/test/trill.ly
lily/dynamic-engraver.cc
lily/identifier-smob.cc
lily/my-lily-lexer.cc
lily/parser.yy
ly/accordion-defs-init.ly
ly/declarations-init.ly
ly/property-init.ly
ly/script-init.ly
ly/spanners-init.ly
scm/music-functions.scm
scm/music-types.scm
scripts/convert-ly.py

index 71b6d05a68c3c5c071bcccb59ef727429af9d6f2..e4e71ac089fa48e7e51325627eff7f2037840657 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2002-10-13  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * scm/music-types.scm: junk compat glue
+
+       * scripts/convert-ly.py: add rules for stuff below, junk
+       compatibility glue for spanrequest.
+
+       * lily/parser.yy (verbose_event): remove \spanrequest,
+       \commandspanrequest, \script. 
+       
+       * lily/identifier-smob.cc (LY_DEFINE): change name to ly-export
+
+       * lily/parser.yy: remove arpeggio keyword; use identifier. Idem
+       for \penalty, \glissando.
+
 2002-10-13  Rune Zedeler  <rune@zedeler.dk>
 
        * lily/accidental-engraver.cc: Fix
index c60766df946b4aad711b50884af2ba23f8057934..81d7e672ff25cac324d0e65dab3d8db1361404de 100644 (file)
@@ -707,43 +707,6 @@ music = \notes { c'4 d'4( e'4 f'4 }
 More examples are given in the distributed example files in
 @code{input/test/}.
 
-
-@c .   {Span requests}
-@menu
-* Span requests::               
-@end menu
-
-@node Span requests
-@subsection Span requests
-@cindex Span requests
-
-Notational constructs that start and end on different notes can be
-entered using span requests.  The syntax is as follows:
-
-@example
-\spanrequest @var{startstop} @var{type}
-@end example
-
-@cindex @code{\start}
-@cindex @code{\stop}
-
-@noindent
-This defines a spanning request.  The @var{startstop} parameter is either
--1 (@code{\start}) or 1 (@code{\stop}) and @var{type} is a string that
-describes what should be started.  Much of the syntactic sugar is a
-shorthand for @code{\spanrequest}, for example
-
-@lilypond[fragment,verbatim,center]
-c'4-\spanrequest \start "slur"
-c'4-\spanrequest \stop "slur"
-@end lilypond
-
-Among the supported types are @code{crescendo}, @code{decrescendo},
-@code{beam}, @code{slur}.  This is an internal command.  Users are
-encouraged to use the shorthands which are defined in the initialization
-file @file{spanners.ly}.
-
-
 @c .   {Assignments}
 @node Assignments
 @subsection Assignments
index 787d21dcd416310cd4e654cdc0aadc4653cdd420..20adac1d36e2f4df219a378d6a65ba7cfcfaa117 100644 (file)
@@ -1770,8 +1770,8 @@ over many measures. This is indicated by following the text with a
 dotted line.  You can create such texts using text spanners. The syntax
 is as follows:
 @example
-\spanrequest \start "text"
-\spanrequest \stop "text"
+ \startTextSpan
+ \stopTextSpan
 @end example
 LilyPond will respond by creating a @internalsref{TextSpanner} object (typically
 in @internalsref{Voice} context).  The string to be printed, as well as the
@@ -1784,7 +1784,7 @@ An application---or rather, a hack---is to fake octavation indications.
   \property Voice.TextSpanner \set #'edge-height = #'(0 . 1.5)
   \property Voice.TextSpanner \set #'edge-text = #'("8va " . "")
   \property Staff.centralCPosition = #-13
-  a\spanrequest \start "text" b c a \spanrequest \stop "text" }
+  a\startTextSpan b c a \stopTextSpan }
 @end lilypond
 
 
@@ -1916,7 +1916,6 @@ finger changes, use markup texts:
 @end lilypond
 
 
-@cindex @code{\script}
 @cindex scripts
 @cindex superscript
 @cindex subscript
@@ -2837,14 +2836,6 @@ Piano pedal instruction can be expressed using
 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp}.
 
-These identifiers are shorthands for spanner commands of the types
-@internalsref{Sustain}, @internalsref{UnaCorda} and @internalsref{Sostenuto}:
-
-@lilypond[fragment,verbatim]
-c''4 \spanrequest \start "Sustain" c''4
-c''4 \spanrequest \stop "Sustain"
-@end lilypond
-
 The symbols that are printed can be modified by setting
 @code{pedal@var{X}Strings}, where @var{X} is one of the pedal types:
 Sustain, Sostenuto or UnaCorda.  Refer to the generated documentation of
index 97ebe1921a2250347d7627b7dbffa53d4edaa490..ce04d52dcb10c380d89c592ab93c90b2b922d892 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.6.4"
+\version "1.7.2"
 
 \header {
     composer =   "ARTHUR GRAY"
@@ -85,7 +85,7 @@ treble =  \context Voice=treble \notes\relative c''{
            
     % currently, this can't be (small) italic, because in the paperblock
     % we set italic_magnifictation to get large italics.
-    cis''''4^"m.g."\arpeggio \spanrequest \start "text" (
+    cis''''4^"m.g."\arpeggio #(ly-export (make-span-event 'TextSpanEvent START)) (
 
     \property Voice.Stem \revert #'direction
 
@@ -93,7 +93,7 @@ treble =  \context Voice=treble \notes\relative c''{
         )cis8
        \property Voice.Stem \revert #'direction
        \property Voice.Stem \override #'direction = #0
-        [a16-5( fis dis \spanrequest \stop "text" ]
+        [a16-5( fis dis #(ly-export (make-span-event 'TextSpanEvent STOP)) ]
        \property Staff.centralCPosition = #-6
        
        [cis32 a-1 fis-4 dis] [cis a )fis-2]
index 2be2b1cbcad0e083b65826d78e8bb4ce250d9215..3ef3d9eba8feba353d29fdeb437d0ad523aa9435 100644 (file)
@@ -6,7 +6,7 @@ longgrace = \property Voice.Stem \override #'stroke-style = #'()
 endlonggrace = \property Voice.Stem \revert #'stroke-style
 ritenuto = \textscript #'(italic  "rit.")
 
-\version "1.6.4"
+\version "1.7.2"
 
 #(define italic-bf '((font-shape . italic) (font-series . bold)))
 
@@ -22,7 +22,7 @@ ritenuto = \textscript #'(italic  "rit.")
                                      (font-relative-size . 3)))
   
 cresc = \notes {
-    \commandspanrequest \start "crescendo" 
+    #(ly-export (make-event-chord (list (make-span-event 'CrescendoEvent START)))) 
     \property Voice.crescendoText = #`(,italic-bf "cresc.")
     \property Voice.crescendoSpanner = #'dashed-line
 }
index 4f7887346bf6a843e7f69a985aa10a2168b5c0e6..116fe8242e15969d19ae4368c5ee8b1e14a5797b 100644 (file)
@@ -3,13 +3,12 @@
 \header{
 texidoc="
 Breaks can be encouraged and discouraged using @code{\\break} and
-@code{\\noBreak}.  They are abbrevs for @code{\\penalty} commands.
-"
+@code{\\noBreak}."
 }
 
 
 \score{
-       \notes\context Voice{
+       \notes\relative c'' \context Voice{
        \emptyText
        c1 \noBreak c1 \noBreak \mark "nobreak" c1 \noBreak
        c1 \break \mark "break" c1 \break \mark "break" c1 
index f1a7c6738ee6be98cf0477448195b22afc0bb4b7..1a526e0fd90703e9d2fe1aed89c932641c64444e 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.5.68"
+\version "1.7.2"
 %
 % TODO: what's this?
 %
index ad8aecc860a857593ef1209ae4e8115707cc0b9b..3bfe76b22b2d88faa2c624c7f7c32dfa6ba80c60 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.5.68"
+\version "1.7.2"
 
 
 fragment = \notes {
@@ -7,7 +7,7 @@ fragment = \notes {
   \property Voice.TextSpanner \set #'edge-height = #'(0 . 1.5)
   \property Voice.TextSpanner \set #'edge-text = #'("8va " . "")
   \property Staff.centralCPosition = #-13
-  a\spanrequest \start "text" b c a \spanrequest \stop "text"
+  a#(ly-export (make-span-event 'TextSpanEvent START)) b c a #(ly-export (make-span-event 'TextSpanEvent STOP))
 }
 
 \paper { linewidth = -1. } 
index 76710822ef5adeaf4be27434d6ead72466aae2e2..e7802cad2423123c7ed431b0d5ffee4c1725bd1a 100644 (file)
@@ -1,3 +1,4 @@
+\version "1.7.2"
 
 \header {
 
@@ -14,7 +15,7 @@ bra = \notes \transpose c' { e'4-. }
 \score { 
   \context Voice \notes\relative c' {
       c4
-      #(ly-id (make-sequential-music (list foo foo foo )))
+      #(ly-import (make-sequential-music (list foo foo foo )))
       #(begin (define baz (make-simultaneous-music (list foo bra)))
        (empty-music))
       c4
index fce5b92e2420239ea09416ca659d5000372207b9..22b30373d95b4e376893f14f3a87094134a03dd5 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.5.68"
+\version "1.7.2"
 
 \header {
 texidoc = "ottava spanners."
@@ -7,31 +7,31 @@ texidoc = "ottava spanners."
 \score{
     \notes\relative c''{
         \property Voice.TextSpanner \override #'edge-text = #'("8 " . "")
-        a \spanrequest \start "text"
+        a #(ly-export (make-span-event 'TextSpanEvent START))
        b c 
-        a \spanrequest \stop "text"
+        a #(ly-export (make-span-event 'TextSpanEvent STOP))
 
         \property Voice.TextSpanner \revert #'type
         \property Voice.TextSpanner \override #'type = #'dotted-line
-        a \spanrequest \start "text"
+        a #(ly-export (make-span-event 'TextSpanEvent START))
        b c 
-        a \spanrequest \stop "text"
+        a #(ly-export (make-span-event 'TextSpanEvent STOP))
 
         \property Voice.TextSpanner \revert #'type
         \property Voice.TextSpanner \override #'type = #'dashed-line
         \property Voice.TextSpanner \override #'edge-height = #'(1 . -2)
-        a \spanrequest \start "text"
+        a #(ly-export (make-span-event 'TextSpanEvent START))
        b c 
-        a \spanrequest \stop "text"
+        a #(ly-export (make-span-event 'TextSpanEvent STOP))
 
 
         \property Staff.centralCPosition = #-13
 
         \property Voice.TextSpanner \override #'dash-length = #5
         \property Voice.TextSpanner \override #'thickness = #10
-        a \spanrequest \start "text"
+        a #(ly-export (make-span-event 'TextSpanEvent START))
        b c 
-        a \spanrequest \stop "text"
+        a #(ly-export (make-span-event 'TextSpanEvent STOP))
         \property Staff.centralCPosition = #-6
     }
 }
index fba7d72a1b10e9f07f953e8ee2433478e3f2904b..af64192ca6b04392d10ab16aebfa96652b858c21 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.5.68"
+\version "1.7.2"
 
 \header {
 texidoc="show trill line type"
@@ -13,13 +13,13 @@ texidoc="show trill line type"
     \property Voice.TextSpanner \set #'type = #'dotted-line
     \property Voice.TextSpanner \set #'edge-height = #'(0 . 1.5)
     \property Voice.TextSpanner \set #'edge-text = #'("8va " . "")
-    a\spanrequest \start "text" b c a \spanrequest \stop "text"
+    a#(ly-export (make-span-event 'TextSpanEvent START)) b c a #(ly-export (make-span-event 'TextSpanEvent STOP))
 
     %\property Voice.TextSpanner \set #'font-family = #'music
     \property Voice.TextSpanner \set #'type = #'trill
     \property Voice.TextSpanner \set #'edge-height = #'(0 . 0)
     \property Voice.TextSpanner \set #'edge-text = #'((line (music "scripts-trill") " ") . "")
-    a\spanrequest \start "text" b c a \spanrequest \stop "text"
+    a#(ly-export (make-span-event 'TextSpanEvent START)) b c a #(ly-export (make-span-event 'TextSpanEvent STOP))
   }
   \paper { }  
 }
index 61ba3b514152220e9e0913ee49da7e4cdcde4ead..5361a19220fd574655e5b2f5971274396313c2f1 100644 (file)
@@ -251,7 +251,6 @@ Dynamic_engraver::process_music ()
              
            }
 
-
          
          /*
            This is a convenient (and legacy) interface to TextSpanners
index 2d380454d8ef712597bcb2138b86249e5b205e47..f3881b48edba1e27e494f13f3cd0c4fda4417877 100644 (file)
@@ -31,8 +31,8 @@ print_box (SCM b, SCM port, scm_print_state *pstate)
 
 /* This defines the primitve `make-box', which returns a new smob of
    type `box', initialized to `#f'.  */
-LY_DEFINE(package_identifier, "ly-id", 1,0,0, (SCM arg),
-         "Package a Scheme object, so it is treated as an identifier.")
+LY_DEFINE(package_identifier, "ly-export", 1,0,0, (SCM arg),
+         "Export a Scheme object to the parser, so it is treated as an identifier.")
 {
   /* This macro creates the new objects, stores the value `#f' into it
      and returns it to the caller.  */
index edc49b7c5078f55587f777b00af01f8d28605ea8..c4d69313c72a73a8fe95356ddfe3c5505d60e5de 100644 (file)
 static Keyword_ent the_key_tab[]={
   {"alias", ALIAS},
   {"apply", APPLY},
-  {"arpeggio", ARPEGGIO },
   {"autochange", AUTOCHANGE},
-  {"spanrequest", SPANREQUEST},
-  {"commandspanrequest", COMMANDSPANREQUEST},  
   {"simultaneous", SIMULTANEOUS},
   {"sequential", SEQUENTIAL},
   {"accepts", ACCEPTS},
@@ -52,7 +49,6 @@ static Keyword_ent the_key_tab[]={
   {"grobdescriptions", GROBDESCRIPTIONS},
   {"figures",FIGURES},
   {"grace", GRACE},
-  {"glissando", GLISSANDO},
   {"header", HEADER},
   {"in", IN_T},
   {"lyrics", LYRICS},
@@ -74,7 +70,6 @@ static Keyword_ent the_key_tab[]={
   {"revert", REVERT},
   {"partial", PARTIAL},
   {"paper", PAPER},
-  {"penalty", PENALTY},
   {"property", PROPERTY},
   {"pt", PT_T},
   {"relative", RELATIVE},
@@ -83,7 +78,6 @@ static Keyword_ent the_key_tab[]={
   {"addlyrics", ADDLYRICS},
   {"partcombine", PARTCOMBINE},
   {"score", SCORE},
-  {"script", SCRIPT},
   {"skip", SKIP},
   {"tempo", TEMPO},
   {"translator", TRANSLATOR},
index 2492b91be2f7cca196b1d2b7ff3e89dba1d6a796..520bb9000fdcb4deb285f599eec1b9d2f9a4166c 100644 (file)
@@ -93,16 +93,6 @@ set_property_music (SCM sym, SCM value)
        return p;
 }
 
-Music*
-make_span_req (SCM name)
-{
-  static SCM proc;
-  if (!proc)
-    proc = scm_c_eval_string ("old-span-event->event");
-  SCM m = scm_call_1 (proc, name);
-  scm_gc_protect_object (m);
-  return unsmob_music (m);
-}
 
 // needed for bison.simple's malloc () and free ()
 
@@ -135,7 +125,6 @@ of the parse stack onto the heap. */
     String *string; // needed by the lexer as temporary scratch area.
     Music *music;
     Score *score;
-    Scheme_hash_table *scmhash;
     Music_output_def * outputdef;
     SCM scm;
     int i;
@@ -162,7 +151,6 @@ yylex (YYSTYPE *s,  void * v)
 %token AUTOCHANGE
 %token ALIAS
 %token APPLY
-%token ARPEGGIO
 %token ACCEPTS
 %token ALTERNATIVE
 %token BAR
@@ -179,11 +167,9 @@ yylex (YYSTYPE *s,  void * v)
 %token SIMULTANEOUS
 %token CONSISTSEND
 %token DENIES
-%token DURATION
 %token EXTENDER
 %token FIGURES FIGURE_OPEN FIGURE_CLOSE
 %token FIGURE_BRACKET_CLOSE FIGURE_BRACKET_OPEN
-%token GLISSANDO
 %token GRACE 
 %token HEADER
 %token HYPHEN
@@ -203,7 +189,6 @@ yylex (YYSTYPE *s,  void * v)
 %token ONCE
 %token PAPER
 %token PARTIAL
-%token PENALTY
 %token PROPERTY
 %token OVERRIDE SET REVERT 
 %token PT_T
@@ -214,10 +199,8 @@ yylex (YYSTYPE *s,  void * v)
 %token PARTCOMBINE
 %token SCM_T
 %token SCORE
-%token SCRIPT
 %token SKIP
 %token SPANREQUEST
-%token STYLESHEET
 %token COMMANDSPANREQUEST
 %token TEMPO
 %token OUTPUTPROPERTY
@@ -252,7 +235,6 @@ yylex (YYSTYPE *s,  void * v)
 
 %token <scm>   SCORE_IDENTIFIER
 %token <scm>   MUSIC_OUTPUT_DEF_IDENTIFIER
-
 %token <scm>   NUMBER_IDENTIFIER
 %token <scm>   EVENT_IDENTIFIER
 %token <scm>   MUSIC_IDENTIFIER TRANSLATOR_IDENTIFIER
@@ -1295,13 +1277,7 @@ shorthand_command_req:
        ;
 
 verbose_command_req:
-       COMMANDSPANREQUEST bare_int STRING {
-               Music *sp = make_span_req ($3);
-               sp->set_mus_property ("span-direction", gh_int2scm (Direction ($2)));
-               sp->set_spot (THIS->here_input ());
-               $$ = sp;
-       }
-       | MARK DEFAULT  {
+       MARK DEFAULT  {
                Music * m = MY_MAKE_MUSIC("MarkEvent");
                $$ = m;
        }
@@ -1310,16 +1286,6 @@ verbose_command_req:
                m->set_mus_property ("label", $2);
                $$ = m;
        }
-       | PENALTY SCM_T         {
-               Music * b = MY_MAKE_MUSIC("BreakEvent");
-               SCM s = $2;
-               if (!gh_number_p (s))
-                       s = gh_int2scm (0);
-
-               b->set_mus_property ("penalty", s);
-               b->set_spot (THIS->here_input ());
-               $$ = b;
-       }
        | SKIP duration_length {
                Music * skip = MY_MAKE_MUSIC("SkipEvent");
                skip->set_mus_property ("duration", $2);
@@ -1359,7 +1325,6 @@ post_event:
        | string_event
        ;
 
-
 string_event:
        E_UNSIGNED {
                Music * s = MY_MAKE_MUSIC("StringNumberEvent");
@@ -1396,38 +1361,12 @@ verbose_event:
        EVENT_IDENTIFIER        {
                $$ = unsmob_music ($1);
        }
-       | SPANREQUEST bare_int STRING {
-               Music * sp = make_span_req ($3);
-               sp->set_mus_property ("span-direction", gh_int2scm ( $2));
-               sp->set_spot (THIS->here_input ());
-               $$ = sp;
-       }
        | tremolo_type  {
                Music * a = MY_MAKE_MUSIC("TremoloEvent");
                a->set_spot (THIS->here_input ());
                a->set_mus_property ("tremolo-type", gh_int2scm ($1));
                $$ = a;
         }
-       | SCRIPT STRING         { 
-               Music * a = MY_MAKE_MUSIC("ArticulationEvent");
-               a->set_mus_property ("articulation-type", $2);
-               a->set_spot (THIS->here_input ());
-               $$ = a;
-       }
-
-       /*
-               duh, junk this syntax from the parser, if possible. 
-       */
-       | ARPEGGIO {
-               Music *a = MY_MAKE_MUSIC("ArpeggioEvent");
-               a->set_spot (THIS->here_input ());
-               $$ = a;
-       }
-       | GLISSANDO {
-               Music *g = MY_MAKE_MUSIC("GlissandoEvent");
-               g->set_spot /* No pun intended */ (THIS->here_input ());
-               $$ = g;
-       }       
        ;
 
 sup_quotes:
@@ -2165,6 +2104,7 @@ which is entirely legitimate.
 Or we can scrap it. Barchecks should detect wrong durations, and
 skipTypesetting speeds it up a lot.
 */
+
 void
 My_lily_parser::beam_check (SCM dur)
 {
index 5e3453809ec941a0fdec4a83cd26021978b099ff..175f0492beb0b26a9f0cd888a47cc84c299701b3 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.5.68"
+\version "1.7.2"
 % Symbols needed to print accordion music
 % 
 %  2' = T
@@ -7,50 +7,50 @@
 % 16' = S
 %
 
-accDiscant = \script "accDiscant"
-accDiscantF = \script "accDiscantF"
-accDiscantE = \script "accDiscantE"
-accDiscantEh = \script "accDiscantEh"
-accDiscantFE = \script "accDiscantFE"
-accDiscantFEh = \script "accDiscantFEh"
-accDiscantEE = \script "accDiscantEE"
-accDiscantFEE = \script "accDiscantFEE"
-accDiscantEEE = \script "accDiscantEEE"
-accDiscantFEEE = \script "accDiscantFEEE"
-accDiscantS = \script "accDiscantS"
-accDiscantFS = \script "accDiscantFS"
-accDiscantES = \script "accDiscantES"
-accDiscantEhS = \script "accDiscantEhS"
-accDiscantFES = \script "accDiscantFES"
-accDiscantFEhS = \script "accDiscantFEhS"
-accDiscantEES = \script "accDiscantEES"
-accDiscantFEES = \script "accDiscantFEES"
-accDiscantEEES = \script "accDiscantEEES"
-accDiscantFEEES = \script "accDiscantFEEES"
-accDiscantSS = \script "accDiscantSS"
-accDiscantESS = \script "accDiscantESS"
-accDiscantEESS = \script "accDiscantEESS"
-accDiscantEEESS = \script "accDiscantEEESS"
+accDiscant = #(make-articulation "accDiscant")
+accDiscantF = #(make-articulation "accDiscantF")
+accDiscantE = #(make-articulation "accDiscantE")
+accDiscantEh = #(make-articulation "accDiscantEh")
+accDiscantFE = #(make-articulation "accDiscantFE")
+accDiscantFEh = #(make-articulation "accDiscantFEh")
+accDiscantEE = #(make-articulation "accDiscantEE")
+accDiscantFEE = #(make-articulation "accDiscantFEE")
+accDiscantEEE = #(make-articulation "accDiscantEEE")
+accDiscantFEEE = #(make-articulation "accDiscantFEEE")
+accDiscantS = #(make-articulation "accDiscantS")
+accDiscantFS = #(make-articulation "accDiscantFS")
+accDiscantES = #(make-articulation "accDiscantES")
+accDiscantEhS = #(make-articulation "accDiscantEhS")
+accDiscantFES = #(make-articulation "accDiscantFES")
+accDiscantFEhS = #(make-articulation "accDiscantFEhS")
+accDiscantEES = #(make-articulation "accDiscantEES")
+accDiscantFEES = #(make-articulation "accDiscantFEES")
+accDiscantEEES = #(make-articulation "accDiscantEEES")
+accDiscantFEEES = #(make-articulation "accDiscantFEEES")
+accDiscantSS = #(make-articulation "accDiscantSS")
+accDiscantESS = #(make-articulation "accDiscantESS")
+accDiscantEESS = #(make-articulation "accDiscantEESS")
+accDiscantEEESS = #(make-articulation "accDiscantEEESS")
 
-accFreebase = \script "accFreebase"
-accFreebaseF = \script "accFreebaseF"
-accFreebaseE = \script "accFreebaseE"
-accFreebaseFE = \script "accFreebaseFE"
+accFreebase = #(make-articulation "accFreebase")
+accFreebaseF = #(make-articulation "accFreebaseF")
+accFreebaseE = #(make-articulation "accFreebaseE")
+accFreebaseFE = #(make-articulation "accFreebaseFE")
 
-accBayanbase = \script "accBayanbase"
-accBayanbaseT = \script "accBayanbaseT"
-accBayanbaseE = \script "accBayanbaseE"
-accBayanbaseTE = \script "accBayanbaseTE"
-accBayanbaseEE = \script "accBayanbaseEE"
-accBayanbaseTEE = \script "accBayanbaseTEE"
+accBayanbase = #(make-articulation "accBayanbase")
+accBayanbaseT = #(make-articulation "accBayanbaseT")
+accBayanbaseE = #(make-articulation "accBayanbaseE")
+accBayanbaseTE = #(make-articulation "accBayanbaseTE")
+accBayanbaseEE = #(make-articulation "accBayanbaseEE")
+accBayanbaseTEE = #(make-articulation "accBayanbaseTEE")
 
-accStdbase = \script "accStdbase"
-accStdbaseFE = \script "accStdbaseFE"
-accStdbaseTFE = \script "accStdbaseTFE"
-accStdbaseMES = \script "accStdbaseMES"
-accStdbaseTFMES = \script "accStdbaseTFMES"
+accStdbase = #(make-articulation "accStdbase")
+accStdbaseFE = #(make-articulation "accStdbaseFE")
+accStdbaseTFE = #(make-articulation "accStdbaseTFE")
+accStdbaseMES = #(make-articulation "accStdbaseMES")
+accStdbaseTFMES = #(make-articulation "accStdbaseTFMES")
 
-accSB = \script "accSB"
-accBB = \script "accBB"
-accOldEE = \script "accOldEE"
-accOldEES = \script "accOldEES"
+accSB = #(make-articulation "accSB")
+accBB = #(make-articulation "accBB")
+accOldEE = #(make-articulation "accOldEE")
+accOldEES = #(make-articulation "accOldEES")
index 516326f80c268b9c146e4b904db581ca32f88ef4..40c01f5d0b321b7d25186645625cf06143262665 100644 (file)
@@ -18,9 +18,10 @@ stop = 1
 smaller = -1
 bigger = 1
 center=0
+       
+break = #(make-event-chord (list (make-penalty-music -10001)))
+noBreak =  #(make-event-chord (list (make-penalty-music 10001)))
 
-break =  \penalty  #-10000
-noBreak =  \penalty #10001
 \include "scale-definitions-init.ly"
 
 melisma = \property Staff.melismaBusy = ##t
index 003d54f2de663a7fa44e52572cc15862542c5129..d3a8767fca4f9317587e90f2b6f1c3d03fb7e810 100644 (file)
@@ -72,7 +72,8 @@ cadenzaOff = {
   \property Timing.measurePosition = #(make-moment 0 1)
 }
 
-newpage = {
+newpage = \notes
+{
   \break
   % urg, only works for TeX output
   \context Score \outputproperty #(make-type-checker 'paper-column-interface)
@@ -237,3 +238,5 @@ turnOff = #'()
 % cross-staff brackets are desired. 
 
 arpeggioBracket = #(lambda (grob) (Arpeggio::brew_chord_bracket grob))
+arpeggio = #(make-music-by-name 'ArpeggioEvent)
+glissando = #(make-music-by-name 'GlissandoEvent)
index f4d95f51cd8b5f2ec8b29ba3c7f5bdae21729cd6..c2c0e42188631140bede5b5169d18f3851165b01 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.5.68"
+\version "1.7.2"
 
 
 dashHat= "marcato"
@@ -9,36 +9,37 @@ dashLarger= "accent"
 dashDot= "staccato"
 dashUnderscore = "portato"
 
-thumb = \script "thumb"
-accent = \script "accent"
-marcato = \script "marcato"
-staccatissimo = \script "staccatissimo"
-portato = \script "portato"
-fermata = \script "fermata"
-stopped = \script "stopped"
-staccato = \script "staccato"
-tenuto = \script "tenuto"
-upbow = \script "upbow"
-downbow = \script "downbow"
-lheel = \script "lheel"
-rheel = \script "rheel"
-ltoe = \script "ltoe"
-rtoe = \script "rtoe"
-turn = \script "turn"
-open = \script "open"
-flageolet = \script "flageolet"
-reverseturn = \script "reverseturn"
-trill = \script "trill"
-prall = \script "prall"
-mordent = \script "mordent"
-upmordent = \script "upmordent"
-downmordent = \script "downmordent"
-prallprall = \script "prallprall"
-prallup = \script "prallup"
-pralldown = \script "pralldown"
-lineprall = \script "lineprall"
-prallmordent = \script "prallmordent"
-upprall = \script "upprall"
-downprall = \script "downprall"
-segno = \script "segno"
-coda = \script "coda"
+
+thumb = #(make-articulation "thumb")
+accent = #(make-articulation "accent")
+marcato = #(make-articulation "marcato")
+staccatissimo = #(make-articulation "staccatissimo")
+portato = #(make-articulation "portato")
+fermata = #(make-articulation "fermata")
+stopped = #(make-articulation "stopped")
+staccato = #(make-articulation "staccato")
+tenuto = #(make-articulation "tenuto")
+upbow = #(make-articulation "upbow")
+downbow = #(make-articulation "downbow")
+lheel = #(make-articulation "lheel")
+rheel = #(make-articulation "rheel")
+ltoe = #(make-articulation "ltoe")
+rtoe = #(make-articulation "rtoe")
+turn = #(make-articulation "turn")
+open = #(make-articulation "open")
+flageolet = #(make-articulation "flageolet")
+reverseturn = #(make-articulation "reverseturn")
+trill = #(make-articulation "trill")
+prall = #(make-articulation "prall")
+mordent = #(make-articulation "mordent")
+upmordent = #(make-articulation "upmordent")
+downmordent = #(make-articulation "downmordent")
+prallprall = #(make-articulation "prallprall")
+prallup = #(make-articulation "prallup")
+pralldown = #(make-articulation "pralldown")
+lineprall = #(make-articulation "lineprall")
+prallmordent = #(make-articulation "prallmordent")
+upprall = #(make-articulation "upprall")
+downprall = #(make-articulation "downprall")
+segno = #(make-articulation "segno")
+coda = #(make-articulation "coda")
index bfccd05cabab3b94fa15da7e7a62dcb8e0f25adb..952e67f62001d2ea59371e4f295f590da7ce7bf1 100644 (file)
@@ -1,23 +1,26 @@
-\version "1.5.68"
+\version "1.7.2"
 
 
-#(define (make-span-request type spandir)
+#(define (make-span-event type spandir)
   (let* ((m (make-music-by-name  type)))
   (ly-set-mus-property! m 'span-direction spandir)
   m
   ))
 
-groupOpen = #(make-span-request 'NoteGroupingEvent START)
-groupClose = #(make-span-request 'NoteGroupingEvent STOP)
+groupOpen = #(make-span-event 'NoteGroupingEvent START)
+groupClose = #(make-span-event 'NoteGroupingEvent STOP)
 
 
-cr = #(make-span-request 'CrescendoEvent START)
-rc = #(make-span-request 'CrescendoEvent STOP)
-decr = #(make-span-request 'DecrescendoEvent START)
-rced = #(make-span-request 'DecrescendoEvent STOP)
+cr = #(make-span-event 'CrescendoEvent START)
+rc = #(make-span-event 'CrescendoEvent STOP)
+decr = #(make-span-event 'DecrescendoEvent START)
+rced = #(make-span-event 'DecrescendoEvent STOP)
+
+startTextSpan = #(make-span-event 'TextSpanEvent START)
+stopTextSpan = #(make-span-event 'TextSpanEvent STOP)
 
 cresc = \notes {
-  \commandspanrequest \start "crescendo" 
+  #(ly-export (make-event-chord (list cr)))
   \property Voice.crescendoText = #'((font-shape . italic) "cresc.")
   \property Voice.crescendoSpanner = #'dashed-line
 }
@@ -25,39 +28,39 @@ cresc = \notes {
 % ah, this is handy: maybe drop resetting of properties in
 % dynamic-engraver ?
 endcresc = \notes {
-  \commandspanrequest \stop "crescendo" 
+  #(ly-export (make-event-chord (list rc)))
   \property Voice.crescendoText \unset
   \property Voice.crescendoSpanner \unset
 }
 
 dim = \notes {
-  \commandspanrequest \start "decrescendo" 
+  #(ly-export (make-event-chord (list decr)))
+
   \property Voice.decrescendoText = #"dim."
   \property Voice.decrescendoSpanner = #'dashed-line
 }
 
 enddim = \notes {
-  \commandspanrequest \stop "decrescendo" 
+  #(ly-export (make-event-chord (list rced)))
    \property Voice.decrescendoText \unset
  \property Voice.decrescendoSpanner \unset
 }
 
 %{
 
-cresc = \spanrequest \start "crescendo"
-endcresc = \spanrequest \stop "crescendo"
+cresc = \spanevent \start "crescendo"
+endcresc = \spanevent \stop "crescendo"
 
 %}
 
 % better name sustainstart/stop? 
-sustainDown = \spanrequest \start "Sustain"
-sustainUp = \spanrequest \stop "Sustain"
+sustainUp = #(make-span-event 'SustainPedalEvent STOP)
 
-unaCorda = \spanrequest \start "UnaCorda"
-treCorde = \spanrequest \stop "UnaCorda"
+unaCorda = #(make-span-event 'UnaCordaEvent START)
+treCorde = #(make-span-event 'UnaCordaEvent STOP)
 
-sostenutoDown = \spanrequest \start "Sostenuto"
-sostenutoUp = \spanrequest \stop "Sostenuto"
+sostenutoDown = #(make-span-event 'SostenutoEvent START)
+sostenutoUp = #(make-span-event 'SostenutoEvent STOP)
 
 %crescpoco = \property Voice.crescendoText = "cresc. poco a poco"
 %decresc = \property Voice.crescendoText = "decr."
index eb536e3750d25e700301e1da89f910c53f879b51..8fc904aebc677bf60e157bee498858776e0e15e0 100644 (file)
@@ -234,6 +234,21 @@ this is not an override
       ))
     ))
 
+(define-public (make-penalty-music pen)
+ (let
+     ((m (make-music-by-name 'BreakEvent)))
+    (ly-set-mus-property! m 'penalty pen)
+    m))
+
+(define-public (make-articulation name)
+  (let* (
+        (m (make-music-by-name 'ArticulationEvent))
+      )
+      (ly-set-mus-property! m 'articulation-type name)
+      m
+  ))
+
+
 (define-public (set-mus-properties! m alist)
   "Set all of ALIST as properties of M." 
   (if (pair? alist)
index f2182207ee327c31a1d616fed73ac7e38e3b9de4..b56fb330697149f640b8412d9e00edd367b9ec14 100644 (file)
     ))
 
 
-(define-public (old-span-event->event name)
-  (let
-      (
-       (entry   (assoc
-                name
-                '(
-                  ("text" . TextSpanEvent)
-                  ("decrescendo" . DecrescendoEvent)
-                  ("crescendo" . CrescendoEvent)
-                  ("Sustain" . SustainPedalEvent)
-                  ("slur" . SlurEvent)
-                  ("UnaCorda" . UnaCordaEvent)
-                  ("Sostenuto" . SostenutoEvent)
-                  )))
-       )
-    (if (eq? entry #f)
-       (error (format "Could not find span type ~a" name))
-       
-       (make-music-by-name (cdr entry))
-       )
-    ))
 
 (define-public (make-repeated-music name)
   (let*
index 25bb3e215be139b7e714b446a2a6ed45cc3c4783..89552fc3bb300516ed306d854ed277c3f81490ec 100644 (file)
@@ -987,6 +987,49 @@ if 1:
        
        conversions.append (((1,7,1), conv, 'ly-make-music foo_bar_req -> make-music-by-name FooBarEvent'))
 
+
+if 1:
+       spanner_subst ={
+               "text" : 'TextSpanEvent',
+               "decrescendo" : 'DecrescendoEvent',
+               "crescendo" : 'CrescendoEvent',
+               "Sustain" : 'SustainPedalEvent',
+               "slur" : 'SlurEvent',
+               "UnaCorda" : 'UnaCordaEvent',
+               "Sostenuto" : 'SostenutoEvent',
+               }
+       def subst_ev_name (match):
+               stype = 'STOP'
+               if re.search ('start', match.group(1)):
+                       stype= 'START'
+
+               mtype = spanner_subst[match.group(2)]
+               return "(make-span-event '%s %s)" % (mtype , stype)
+
+       def subst_definition_ev_name(match):
+               return ' = #%s' % subst_ev_name (match) 
+       def subst_inline_ev_name (match):
+               s = subst_ev_name (match)
+               return '#(ly-export %s)' % s
+       def subst_csp_definition (match):
+               return ' = #(make-event-chord (list %s))' % subst_ev_name (match)
+       def subst_csp_inline (match):
+               return '#(ly-export (make-event-chord (list %s)))' % subst_ev_name (match)
+               
+       def conv (str):
+               str = re.sub (r' *= *\\spanrequest *([^ ]+) *"([^"]+)"', subst_definition_ev_name, str)
+               str = re.sub (r'\\spanrequest *([^ ]+) *"([^"]+)"', subst_inline_ev_name, str)
+               str = re.sub (r' *= *\\commandspanrequest *([^ ]+) *"([^"]+)"', subst_csp_definition, str)
+               str = re.sub (r'\\commandspanrequest *([^ ]+) *"([^"]+)"', subst_csp_inline, str)
+               str = re.sub (r'ly-id ', 'ly-import ', str)
+
+               str = re.sub (r' *= *\\script "([^"]+)"', ' = #(make-articulation "\\1")', str)
+               str = re.sub (r'\\script "([^"]+)"', '#(ly-export (make-articulation "\\1"))', str)
+               return str
+
+       conversions.append (((1,7,2), conv, '\\spanrequest -> #(make-span-event .. ), \script -> #(make-articulation .. )'))
+
+
 ################################
 #      END OF CONVERSIONS      
 ################################