return scm_is_true (scm_c_memq (k, ifs));
}
-Music::Music (SCM init)
- : Prob (ly_symbol2scm ("Music"), init)
+Preinit_Music::Preinit_Music ()
{
length_callback_ = SCM_EOL;
start_callback_ = SCM_EOL;
+}
+Music::Music (SCM init)
+ : Prob (ly_symbol2scm ("Music"), init)
+{
length_callback_ = get_property ("length-callback");
if (!ly_is_procedure (length_callback_))
length_callback_ = duration_length_callback_proc;
/*
This mutates alist. Hence, make sure that it is not shared
*/
+
void
-transpose_mutable (SCM alist, Pitch delta)
+Prob::transpose (Pitch delta)
{
- for (SCM s = alist; scm_is_pair (s); s = scm_cdr (s))
+ if (to_boolean (get_property ("untransposable")))
+ return;
+
+ for (SCM s = mutable_property_alist_; scm_is_pair (s); s = scm_cdr (s))
{
SCM entry = scm_car (s);
SCM prop = scm_car (entry);
&& scm_is_pair (val))
new_val = ly_transpose_key_alist (val, delta.smobbed_copy ());
- if (val != new_val)
+ if (!scm_is_eq (val, new_val))
scm_set_cdr_x (entry, new_val);
}
}
-void
-Prob::transpose (Pitch delta)
-{
- if (to_boolean (get_property ("untransposable")))
- return;
-
- transpose_mutable (mutable_property_alist_, delta);
-}
-
void
Music::set_spot (Input ip)
{