#include "file-path.hh"
#include "warn.hh"
#include "dimensions.hh"
-#include "command-request.hh"
-#include "musical-request.hh"
+
+#include "request.hh"
#include "my-lily-parser.hh"
-#include "context-specced-music.hh"
#include "score.hh"
#include "music-list.hh"
#include "output-property-music-iterator.hh"
#include "untransposable-music.hh"
#include "lilypond-input-version.hh"
#include "grace-music.hh"
-#include "part-combine-music.hh"
#include "scm-hash.hh"
#include "auto-change-iterator.hh"
#include "un-relativable-music.hh"
return p;
}
+Music*
+make_span_req (SCM name)
+{
+ static SCM proc;
+ if (!proc)
+ proc = scm_c_eval_string ("old-span-request->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 ()
_("More alternatives than repeats. Junking excess alternatives."));
alts = ly_truncate_list (times, alts);
}
-
- Music *r = MY_MAKE_MUSIC("RepeatedMusic");
+
+
+ static SCM proc;
+ if (!proc)
+ proc = scm_c_eval_string ("make-repeated-music");
+
+ SCM mus = scm_call_1 (proc, $2);
+ scm_gc_protect_object (mus); // UGH.
+ Music *r =unsmob_music (mus);
if (beg)
{
r-> set_mus_property ("element", beg->self_scm ());
r->set_mus_property ("repeat-count", gh_int2scm (times >? 1));
r-> set_mus_property ("elements",alts);
- SCM func = scm_primitive_eval (ly_symbol2scm ("repeat-name-to-ctor"));
- SCM result = gh_call1 (func, $2);
-
if (gh_equal_p ($2, scm_makfrom0str ("tremolo")))
{
/*
else
gh_call3 (func, r->self_scm (), gh_int2scm(-intlog2 ($3)), gh_int2scm(0));
}
-
- set_music_properties (r, result);
-
r->set_spot (*$4->origin ());
$$ = r;
$$ = MY_MAKE_MUSIC("TieEvent");
}
| '[' {
- Music *b= MY_MAKE_MUSIC("SpanEvent");
+ Music *b= MY_MAKE_MUSIC("BeamEvent");
b->set_mus_property ("span-direction", gh_int2scm (START))
;
- b->set_mus_property ("span-type", scm_makfrom0str ("beam"));
$$ =b;
THIS->last_beam_start_ = b->self_scm ();
}
| ']' {
- Music *b= MY_MAKE_MUSIC("SpanEvent");
- b->set_mus_property ("span-direction", gh_int2scm (STOP))
-;
- b->set_mus_property ("span-type", scm_makfrom0str ("beam"));
+ Music *b= MY_MAKE_MUSIC("BeamEvent");
+ b->set_mus_property ("span-direction", gh_int2scm (STOP));
$$ = b;
}
| BREATHE {
;
verbose_command_req:
- COMMANDSPANREQUEST bare_int STRING { /*TODO: junkme */
- Music * sp = MY_MAKE_MUSIC("SpanEvent");
+ COMMANDSPANREQUEST bare_int STRING {
+ Music *sp = make_span_req ($3);
sp->set_mus_property ("span-direction", gh_int2scm (Direction ($2)));
- sp->set_mus_property ("span-type",$3);
sp->set_spot (THIS->here_input ());
$$ = sp;
}
Music * b = MY_MAKE_MUSIC("BreakEvent");
SCM s = $2;
if (!gh_number_p (s))
- s =gh_int2scm (0);
+ s = gh_int2scm (0);
b->set_mus_property ("penalty", s);
b->set_spot (THIS->here_input ());
$$ = d;
}
| SPANREQUEST bare_int STRING {
- Music * sp = MY_MAKE_MUSIC("SpanEvent");
+
+ Music * sp = make_span_req ($3);
sp->set_mus_property ("span-direction", gh_int2scm ( $2));
- sp->set_mus_property ("span-type", $3);
sp->set_spot (THIS->here_input ());
$$ = sp;
}
close_request_parens:
'(' {
- Music * s= MY_MAKE_MUSIC("SpanEvent");
+ Music * s= MY_MAKE_MUSIC("SlurEvent");
$$ = s;
- s->set_mus_property ("span-type", scm_makfrom0str ( "slur"));
s->set_spot (THIS->here_input());
}
| E_OPEN {
- Music * s= MY_MAKE_MUSIC("SpanEvent");
+ Music * s= MY_MAKE_MUSIC("PhrasingSlurEvent");
$$ = s;
- s->set_mus_property ("span-type", scm_makfrom0str ( "phrasing-slur"));
s->set_spot (THIS->here_input());
}
| E_SMALLER {
- Music *s =MY_MAKE_MUSIC("SpanEvent");
+ Music *s =MY_MAKE_MUSIC("CrescendoEvent");
$$ = s;
- s->set_mus_property ("span-type", scm_makfrom0str ( "crescendo"));
s->set_spot (THIS->here_input());
}
| E_BIGGER {
- Music *s =MY_MAKE_MUSIC("SpanEvent");
+ Music *s =MY_MAKE_MUSIC("DecrescendoEvent");
$$ = s;
- s->set_mus_property ("span-type", scm_makfrom0str ("decrescendo"));
s->set_spot (THIS->here_input());
}
;
open_request_parens:
E_EXCLAMATION {
- Music *s = MY_MAKE_MUSIC("SpanEvent");
- s->set_mus_property ("span-type", scm_makfrom0str ( "crescendo"));
+ Music *s = MY_MAKE_MUSIC("CrescendoEvent");
s->set_spot (THIS->here_input());
$$ = s;
}
| ')' {
- Music * s= MY_MAKE_MUSIC("SpanEvent");
+ Music * s= MY_MAKE_MUSIC("SlurEvent");
$$ = s;
- s->set_mus_property ("span-type", scm_makfrom0str ( "slur"));
s->set_spot (THIS->here_input());
}
| E_CLOSE {
- Music * s= MY_MAKE_MUSIC("SpanEvent");
+ Music * s= MY_MAKE_MUSIC("PhrasingSlurEvent");
$$ = s;
s->set_mus_property ("span-type", scm_makfrom0str ( "phrasing-slur"));
s->set_spot (THIS->here_input());
Music * sk = MY_MAKE_MUSIC("SkipEvent");
sk->set_mus_property ("duration", $2);
- Music *sp1 = MY_MAKE_MUSIC("SpanEvent");
- Music *sp2 = MY_MAKE_MUSIC("SpanEvent");
+ Music *sp1 = MY_MAKE_MUSIC("MultiMeasureRestEvent");
+ Music *sp2 = MY_MAKE_MUSIC("MultiMeasureRestEvent");
sp1-> set_mus_property ("span-direction", gh_int2scm (START))
;
sp2-> set_mus_property ("span-direction", gh_int2scm (STOP))
;
- SCM r = scm_makfrom0str ("rest");
- sp1->set_mus_property ("span-type", r);
- sp2->set_mus_property ("span-type", r);
-
Music *rqc1 = MY_MAKE_MUSIC("RequestChord");
rqc1->set_mus_property ("elements", scm_list_n (sp1->self_scm (), SCM_UNDEFINED));
Music *rqc2 = MY_MAKE_MUSIC("RequestChord");