2005-07-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * lily/*: cleanups: use scm_from_int iso. scm_int2num. Idem for
+ scm_from_real / scm_make_real.
+
+ * lily/main.cc (setup_guile_env): new function. Set GC min_yields
+ higher. This increases memory footprint, but provides overall
+ speedup of 15 to 20%.
+
* lily/include/translator.hh (class Translator): remove
PRECOMPUTED_VIRTUAL everywhere.
SCM previous_alteration = SCM_BOOL_F;
- SCM from_same_octave = ly_assoc_get (scm_cons (scm_int2num (o),
- scm_int2num (n)), sig, SCM_BOOL_F);
- SCM from_key_signature = ly_assoc_get (scm_int2num (n), sig, SCM_BOOL_F);
+ SCM from_same_octave = ly_assoc_get (scm_cons (scm_from_int (o),
+ scm_from_int (n)), sig, SCM_BOOL_F);
+ SCM from_key_signature = ly_assoc_get (scm_from_int (n), sig, SCM_BOOL_F);
SCM from_other_octaves = SCM_BOOL_F;
for (SCM s = sig; scm_is_pair (s); s = scm_cdr (s))
{
SCM entry = scm_car (s);
if (scm_is_pair (scm_car (entry))
- && scm_cdar (entry) == scm_int2num (n))
+ && scm_cdar (entry) == scm_from_int (n))
from_other_octaves = scm_cdr (entry);
}
else
a = make_standard_accidental (note, support, entry->origin_engraver_);
- SCM accs = scm_cons (scm_int2num (pitch->get_alteration ()),
+ SCM accs = scm_cons (scm_from_int (pitch->get_alteration ()),
SCM_EOL);
if (restore_natural)
{
if (to_boolean (get_property ("extraNatural")))
- accs = scm_cons (scm_int2num (0), accs);
+ accs = scm_cons (scm_from_int (0), accs);
}
/* TODO: add cautionary option in accidental. */
int n = pitch->get_notename ();
int o = pitch->get_octave ();
int a = pitch->get_alteration ();
- SCM key = scm_cons (scm_int2num (o), scm_int2num (n));
+ SCM key = scm_cons (scm_from_int (o), scm_from_int (n));
SCM localsig = SCM_EOL;
while (origin
that of the tied note and of the key signature.
*/
localsig = ly_assoc_front_x
- (localsig, key, scm_cons (SCM_BOOL_T, scm_int2num (barnum)));
+ (localsig, key, scm_cons (SCM_BOOL_T, scm_from_int (barnum)));
change = true;
}
noteheads with the same notename.
*/
localsig = ly_assoc_front_x (localsig, key,
- scm_cons (scm_int2num (a),
- scm_int2num (barnum)));
+ scm_cons (scm_from_int (a),
+ scm_from_int (barnum)));
change = true;
}
position_accidentals (par);
}
- return scm_int2num (0);
+ return scm_from_int (0);
}
void
int n = p->get_notename ();
SCM accs = me->get_object ("accidental-grobs");
- SCM key = scm_int2num (n);
+ SCM key = scm_from_int (n);
SCM entry = scm_assq (key, accs);
if (entry == SCM_BOOL_F)
{
*/
ac = scm_cons (scm_list_1 (scm_cons
(ly_symbol2scm ("font-size"),
- scm_int2num (-2))),
+ scm_from_int (-2))),
ac);
fm = select_font (me->get_layout (), ac);
}
{
Align_interface::align_elements_to_extents (par, ax);
}
- return scm_make_real (0.0);
+ return scm_from_double (0.0);
}
MAKE_SCHEME_CALLBACK (Align_interface, fixed_distance_alignment_callback, 2);
{
Align_interface::align_to_fixed_distance (par, ax);
}
- return scm_make_real (0.0);
+ return scm_from_double (0.0);
}
/*
progress_indication ("]");
pf->description_ = scm_cons (SCM_BOOL_F,
- scm_make_real (1.0));
+ scm_from_double (1.0));
}
g_free (pango_fn);
return dynamic_cast<Pango_font *> (unsmob_metrics (val));
unsmob_metrics (val)->file_name_ = file_name;
unsmob_metrics (val)->description_ = scm_cons (name_string,
- scm_make_real (1.0));
+ scm_from_double (1.0));
if (be_verbose_global)
progress_indication ("]");
unsmob_metrics (val)->file_name_ = file_name;
unsmob_metrics (val)->description_ = scm_cons (name_string,
- scm_make_real (1.0));
+ scm_from_double (1.0));
otf_dict_->set (sname, val);
unsmob_metrics (val)->unprotect ();
}
unsmob_metrics (val)->file_name_ = file_name;
unsmob_metrics (val)->description_ = scm_cons (name_string,
- scm_make_real (1.0));
+ scm_from_double (1.0));
tfm_dict_->set (sname, val);
unsmob_metrics (val)->unprotect ();
}
void
Axis_group_interface::set_axes (Grob *me, Axis a1, Axis a2)
{
- SCM sa1 = scm_int2num (a1);
- SCM sa2 = scm_int2num (a2);
+ SCM sa1 = scm_from_int (a1);
+ SCM sa2 = scm_from_int (a2);
SCM axes = me->get_property ("axes");
if (scm_is_string (g) && bsd)
{
SCM proc = me->get_property ("break-glyph-function");
- g = scm_call_2 (proc, g, scm_int2num (bsd));
+ g = scm_call_2 (proc, g, scm_from_int (bsd));
}
if (!scm_is_string (g))
Real ss = Staff_symbol_referencer::staff_space (me);
SCM size = me->get_property ("bar-size");
if (scm_is_number (size))
- return scm_make_real (scm_to_double (size) * ss);
+ return scm_from_double (scm_to_double (size) * ss);
else if (Staff_symbol_referencer::get_staff_symbol (me))
{
/*
*/
Real ysize = (Staff_symbol_referencer::line_count (me) -1);
ysize = ysize * ss + Staff_symbol_referencer::line_thickness (me);
- return scm_make_real (ysize);
+ return scm_from_double (ysize);
}
- return scm_int2num (0);
+ return scm_from_int (0);
}
ADD_INTERFACE (Bar_line, "bar-line-interface",
r /= Staff_symbol_referencer::staff_space (me);
me->set_property ("positions", ly_interval2scm (Drul_array<Real> (r, r)));
- me->set_property ("least-squares-dy", scm_make_real (0));
+ me->set_property ("least-squares-dy", scm_from_double (0));
}
else
{
}
stem->set_property ("duration-log",
- scm_int2num (durlog));
+ scm_from_int (durlog));
Moment stem_location = now - beam_start_mom_ + beam_start_location_;
beam_info_->add_stem (stem_location,
max (durlog- 2, 0));
if (ly_is_procedure (func))
{
- SCM s = scm_call_2 (func, me->self_scm (), scm_int2num (get_beam_count (me)));
+ SCM s = scm_call_2 (func, me->self_scm (), scm_from_int (get_beam_count (me)));
return scm_to_double (s);
}
else
? (2 * staff_space + line - thickness) / 2.0
: (3 * staff_space + line - thickness) / 3.0;
- return scm_make_real (beam_translation);
+ return scm_from_double (beam_translation);
}
/* After pre-processing all directions should be set.
for (SCM s = scm_car (right_beaming); scm_is_pair (s); s = scm_cdr (s))
{
int k = -right_dir * scm_to_int (scm_car (s)) + i;
- if (scm_c_memq (scm_int2num (k), left_beaming) != SCM_BOOL_F)
+ if (scm_c_memq (scm_from_int (k), left_beaming) != SCM_BOOL_F)
count++;
}
= start_point - this_dir * scm_to_int (scm_car (s));
new_slice.add_point (new_beam_pos);
- scm_set_car_x (s, scm_int2num (new_beam_pos));
+ scm_set_car_x (s, scm_from_int (new_beam_pos));
}
}
while (flip (&d) != LEFT);
for (; scm_is_pair (s); s = scm_cdr (s))
{
int np = -this_dir * scm_to_int (scm_car (s));
- scm_set_car_x (s, scm_int2num (np));
+ scm_set_car_x (s, scm_from_int (np));
last_int.add_point (np);
}
}
int t = Stem::duration_log (st);
SCM proc = me->get_property ("flag-width-function");
- SCM result = scm_call_1 (proc, scm_int2num (t));
+ SCM result = scm_call_1 (proc, scm_from_int (t));
nw_f = scm_to_double (result);
}
else
SCM func = me->get_property ("dir-function");
SCM s = scm_call_2 (func,
- scm_cons (scm_int2num (count[UP]),
- scm_int2num (count[DOWN])),
- scm_cons (scm_int2num (total[UP]),
- scm_int2num (total[DOWN])));
+ scm_cons (scm_from_int (count[UP]),
+ scm_from_int (count[DOWN])),
+ scm_cons (scm_from_int (total[UP]),
+ scm_from_int (total[DOWN])));
if (scm_is_number (s) && scm_to_int (s))
return to_dir (s);
Direction d = (head_extents.center () < max_gap.center ())
? UP : DOWN;
- stem->set_property ("direction", scm_int2num (d));
+ stem->set_property ("direction", scm_from_int (d));
head_extents.intersect (max_gap);
assert (head_extents.is_empty () || head_extents.length () < 1e-6);
shorten_f *= forced_fraction;
if (shorten_f)
- me->set_property ("shorten", scm_make_real (shorten_f));
+ me->set_property ("shorten", scm_from_double (shorten_f));
}
/* Call list of y-dy-callbacks, that handle setting of
where the second part goes.
*/
me->set_property ("least-squares-dy",
- scm_make_real (pos[RIGHT] - pos[LEFT]));
+ scm_from_double (pos[RIGHT] - pos[LEFT]));
}
else
{
dy = slope * dx;
set_minimum_dy (me, &dy);
- me->set_property ("least-squares-dy", scm_make_real (dy));
+ me->set_property ("least-squares-dy", scm_from_double (dy));
pos = Interval (y, (y + dy));
}
(void) axis;
if (scm_is_number (rest->get_property ("staff-position")))
- return scm_int2num (0);
+ return scm_from_int (0);
assert (scm_to_int (axis) == Y_AXIS);
Grob *st = unsmob_grob (rest->get_object ("stem"));
Grob *stem = st;
if (!stem)
- return scm_make_real (0.0);
+ return scm_from_double (0.0);
Grob *beam = unsmob_grob (stem->get_object ("beam"));
if (!beam
|| !Beam::has_interface (beam)
|| !Beam::visible_stem_count (beam))
- return scm_make_real (0.0);
+ return scm_from_double (0.0);
Drul_array<Real> pos (0, 0);
SCM s = beam->get_property ("positions");
< rad)
shift = ceil (fabs (shift)) * sign (shift);
- return scm_make_real (staff_space * shift);
+ return scm_from_double (staff_space * shift);
}
bool
Break_align_interface::do_alignment (par);
}
- return scm_make_real (0);
+ return scm_from_double (0);
}
MAKE_SCHEME_CALLBACK (Break_align_interface, self_align_callback, 2);
Direction bsd = item->break_status_dir ();
if (bsd == LEFT)
{
- me->set_property ("self-alignment-X", scm_int2num (RIGHT));
+ me->set_property ("self-alignment-X", scm_from_int (RIGHT));
}
/*
Link_array<Grob> writable_elts (elts);
SCM order = scm_vector_ref (order_vec,
- scm_int2num (me->break_status_dir () + 1));
+ scm_from_int (me->break_status_dir () + 1));
/*
Copy in order specified in BREAK-ALIGN-ORDER.
SCM nv = scm_c_make_vector (len, SCM_UNDEFINED);
for (int i = 0; i < len; i++)
{
- SCM si = scm_int2num (i);
+ SCM si = scm_from_int (i);
scm_vector_set_x (nv, si,
do_break_substitution (scm_vector_ref (src, si)));
}
Real inter_f = Staff_symbol_referencer::staff_space (me) / 2;
int sz = Staff_symbol_referencer::line_count (me) - 1;
- return scm_make_real (inter_f * sz * d);
+ return scm_from_double (inter_f * sz * d);
}
ADD_INTERFACE (Breathing_sign, "breathing-sign-interface",
if (Stem::duration_log (s) != 1)
{
- beam_->set_property ("gap-count", scm_int2num (flags_ - total_duration_flags_));
+ beam_->set_property ("gap-count", scm_from_int (flags_ - total_duration_flags_));
}
if (info.music_cause ()->is_mus_type ("rhythmic-event"))
{
stem_tremolo_ = make_item ("StemTremolo", repeat_->self_scm ());
stem_tremolo_->set_property ("flag-count",
- scm_int2num (flags_));
+ scm_from_int (flags_));
stem_tremolo_->set_object ("stem",
info.grob ()->self_scm ());
stem_tremolo_->set_parent (info.grob (), X_AXIS);
int dir = sign (abs_oct);
abs_oct = abs (abs_oct) + 1;
- SCM txt = scm_number_to_string (scm_int2num (abs_oct),
+ SCM txt = scm_number_to_string (scm_from_int (abs_oct),
scm_from_int (10));
g->set_property ("text",
g->set_parent (clef_, Y_AXIS);
g->set_parent (clef_, X_AXIS);
- g->set_property ("direction", scm_int2num (dir));
+ g->set_property ("direction", scm_from_int (dir));
octavate_ = g;
}
}
beacon_ = make_item ("ClusterSpannerBeacon", cluster_notes_[0]->self_scm ());
beacon_->set_property ("positions",
- scm_cons (scm_int2num (pmin),
- scm_int2num (pmax)));
+ scm_cons (scm_from_int (pmin),
+ scm_from_int (pmax)));
}
if (beacon_ && !spanner_)
"setting `spacing-increment="
"0.01': ptr=%ul", parent));
sibling_parent->set_property ("forced-spacing",
- scm_make_real (0.01));
+ scm_from_double (0.01));
#endif
sibling->set_parent (column, X_AXIS);
}
{
delta_pitch = pitch - prev_pitch;
prev_primitive->set_property ("delta-pitch",
- scm_int2num (delta_pitch));
+ scm_from_int (delta_pitch));
}
prev_pitch = pitch;
prev_primitive = primitive;
}
- primitive->set_property ("delta-pitch", scm_int2num (0));
+ primitive->set_property ("delta-pitch", scm_from_int (0));
}
void
Item *note = make_item ("NoteHead", event->self_scm ());
note->set_property ("duration-log",
- scm_int2num (note_dur.duration_log ()));
+ scm_from_int (note_dur.duration_log ()));
int dots = note_dur.dot_count ();
if (dots)
measly attempt to save an eeny-weenie bit of memory.
*/
if (dots != scm_to_int (d->get_property ("dot-count")))
- d->set_property ("dot-count", scm_int2num (dots));
+ d->set_property ("dot-count", scm_from_int (dots));
d->set_parent (note, Y_AXIS);
dots_.push (d);
if (scm_is_number (c0))
pos += scm_to_int (c0);
- note->set_property ("staff-position", scm_int2num (pos));
+ note->set_property ("staff-position", scm_from_int (pos));
notes_.push (note);
}
p += scm_to_int (c0);
c->set_property ("staff-position",
- scm_int2num (p));
+ scm_from_int (p));
}
pitches_.clear ();
/* Need to know whether we're advancing in grace notes, or not. */
Moment last_moment_;
- PRECOMPUTED_VIRTUAL void start_translation_timestep ();
- PRECOMPUTED_VIRTUAL void stop_translation_timestep ();
+ void start_translation_timestep ();
+ void stop_translation_timestep ();
public:
TRANSLATOR_DECLARATIONS (Default_bar_line_engraver);
void
set_grob_direction (Grob *me, Direction d)
{
- SCM sd = scm_int2num (d);
+ SCM sd = scm_from_int (d);
me->set_property ("direction", sd);
}
do_shifts (me);
}
- return scm_make_real (0.0);
+ return scm_from_double (0.0);
}
MAKE_SCHEME_CALLBACK (Dot_column, side_position, 2);
Duration dur = *unsmob_duration (ev->get_property ("duration"));
- note->set_property ("duration-log", scm_int2num (dur.duration_log ()));
+ note->set_property ("duration-log", scm_from_int (dur.duration_log ()));
if (dur.dot_count ())
{
if (dur.dot_count ()
!= robust_scm2int (d->get_property ("dot-count"), 0))
- d->set_property ("dot-count", scm_int2num (dur.dot_count ()));
+ d->set_property ("dot-count", scm_from_int (dur.dot_count ()));
d->set_parent (note, Y_AXIS);
compress = true;
}
else
- num = scm_int2num (1);
+ num = scm_from_int (1);
if (den != SCM_UNDEFINED)
{
compress = true;
}
else
- den = scm_int2num (1);
+ den = scm_from_int (1);
Duration p (scm_to_int (length), dots);
if (compress)
"Extract the duration log from @var{dur}")
{
SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration");
- return scm_int2num (unsmob_duration (dur)->duration_log ());
+ return scm_from_int (unsmob_duration (dur)->duration_log ());
}
LY_DEFINE (ly_duration_dot_count, "ly:duration-dot-count",
"Extract the dot count from @var{dur}")
{
SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration");
- return scm_int2num (unsmob_duration (dur)->dot_count ());
+ return scm_from_int (unsmob_duration (dur)->dot_count ());
}
LY_DEFINE (ly_intlog2, "ly:intlog2",
{
SCM_ASSERT_TYPE (scm_is_number (d), d, SCM_ARG1, __FUNCTION__, "integer");
int log = intlog2 (scm_to_int (d));
- return scm_int2num (log);
+ return scm_from_int (log);
}
LY_DEFINE (ly_duration_factor, "ly:duration-factor",
{
SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration");
Rational r = unsmob_duration (dur)->factor ();
- return scm_cons (scm_int2num (r.num ()), scm_int2num (r.den ()));
+ return scm_cons (scm_from_int (r.num ()), scm_from_int (r.den ()));
}
finished_cresc_);
}
cresc_->set_property ("grow-direction",
- scm_int2num ((start_type == "crescendo")
+ scm_from_int ((start_type == "crescendo")
? BIGGER : SMALLER));
}
SCM spitch = unsmob_music (cause)->get_property ("pitch");
Pitch *pit = unsmob_pitch (spitch);
- SCM idx = scm_int2num (pit->get_notename ());
+ SCM idx = scm_from_int (pit->get_notename ());
SCM names = me->get_property ("note-names");
SCM charstr = SCM_EOL;
if (scm_is_vector (names))
/* See script-engraver.cc */
priority += i;
- fingering->set_property ("script-priority", scm_int2num (priority));
+ fingering->set_property ("script-priority", scm_from_int (priority));
if (!is_direction (fingering->get_property ("direction")))
{
if (d)
- fingering->set_property ("direction", scm_int2num (d));
+ fingering->set_property ("direction", scm_from_int (d));
else
- fingering->set_property ("direction", scm_int2num (RIGHT));
+ fingering->set_property ("direction", scm_from_int (RIGHT));
}
SCM dig = r->get_property ("digit");
- fingering->set_property ("text", scm_number_to_string (dig, scm_int2num (10)));
+ fingering->set_property ("text", scm_number_to_string (dig, scm_from_int (10)));
fingerings_.push (fingering);
}
{
Font_metric *fm = unsmob_metrics (font);
SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
- return scm_make_real (fm->design_size ());
+ return scm_from_double (fm->design_size ());
}
Font_metric::get_ascii_char_stencil (int code) const
{
SCM at = scm_list_3 (ly_symbol2scm ("char"), self_scm (),
- scm_int2num (code));
+ scm_from_int (code));
Box b = get_ascii_char (code);
return Stencil (b, at);
}
Font_metric::get_indexed_char_stencil (int code) const
{
int idx = index_to_ascii (code);
- SCM at = scm_list_3 (ly_symbol2scm ("char"), self_scm (), scm_int2num (idx));
+ SCM at = scm_list_3 (ly_symbol2scm ("char"), self_scm (), scm_from_int (idx));
Box b = get_indexed_char (code);
return Stencil (b, at);
}
Real font_size = size
+ robust_scm2double (gi.grob ()->get_property ("font-size"), 0);
- gi.grob ()->set_property ("font-size", scm_make_real (font_size));
+ gi.grob ()->set_property ("font-size", scm_from_double (font_size));
}
#include "translator.icc"
/* all other combinations should be valid (unless I made a
mistake) */
- primitive->set_property ("prefix-set", scm_int2num (prefix_set));
+ primitive->set_property ("prefix-set", scm_from_int (prefix_set));
}
}
if (prev_primitive)
prev_primitive->set_property ("context-info",
- scm_int2num (prev_context_info));
+ scm_from_int (prev_context_info));
prev_primitive = primitive;
prev_prefix_set = prefix_set;
prev_context_info = context_info;
}
if (prev_primitive)
prev_primitive->set_property ("context-info",
- scm_int2num (prev_context_info));
+ scm_from_int (prev_context_info));
}
void
SCM_ASSERT_TYPE (scm_is_string (b), b, SCM_ARG2, __FUNCTION__, "string");
SCM_ASSERT_TYPE (ly_is_list (c), c, SCM_ARG3, __FUNCTION__, "list of syms");
if (!scm_is_vector (all_ifaces))
- all_ifaces = scm_make_vector (scm_int2num (40), SCM_EOL);
+ all_ifaces = scm_make_vector (scm_from_int (40), SCM_EOL);
SCM entry = scm_list_n (a, b, c, SCM_UNDEFINED);
{
Item *me = dynamic_cast<Item *> (unsmob_grob (it));
SCM_ASSERT_TYPE (me, it, SCM_ARG1, __FUNCTION__, "Item");
- return scm_int2num (me->break_status_dir ());
+ return scm_from_int (me->break_status_dir ());
}
LY_DEFINE (ly_grob_key, "ly:grob-key",
if (original_)
{
Item *it = dynamic_cast<Item *> (this);
- substitute_object_links (scm_int2num (it->break_status_dir ()),
+ substitute_object_links (scm_from_int (it->break_status_dir ()),
original_->object_alist_);
}
}
while (dim_cache_[a].offsets_left_)
{
int l = --me->dim_cache_[a].offsets_left_;
- SCM cb = scm_list_ref (dim_cache_[a].offset_callbacks_, scm_int2num (l));
- SCM retval = scm_call_2 (cb, self_scm (), scm_int2num (a));
+ SCM cb = scm_list_ref (dim_cache_[a].offset_callbacks_, scm_from_int (l));
+ SCM retval = scm_call_2 (cb, self_scm (), scm_from_int (a));
Real r = scm_to_double (retval);
if (isinf (r) || isnan (r))
;
else if (ly_is_procedure (d->dimension_callback_)
&& d->dimension_ == SCM_EOL)
- d->dimension_ = scm_call_2 (d->dimension_callback_, self_scm (), scm_int2num (a));
+ d->dimension_ = scm_call_2 (d->dimension_callback_, self_scm (), scm_from_int (a));
else
return ext;
assert (scm_to_int (axis) == Y_AXIS);
consider_suicide (me);
- return scm_make_real (0.0);
+ return scm_from_double (0.0);
}
MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner, force_hara_kiri_in_parent_callback, 2);
Axis a = (Axis) scm_to_int (axis);
assert (a == Y_AXIS);
force_hara_kiri_callback (daughter->get_parent (a)->self_scm (), axis);
- return scm_make_real (0.0);
+ return scm_from_double (0.0);
}
void
TRANSLATOR_DECLARATIONS(Paper_column_engraver);
protected:
- PRECOMPUTED_VIRTUAL void stop_translation_timestep ();
- PRECOMPUTED_VIRTUAL void start_translation_timestep ();
- PRECOMPUTED_VIRTUAL void process_music ();
+ void stop_translation_timestep ();
+ void start_translation_timestep ();
+ void process_music ();
virtual void initialize ();
virtual void finalize ();
virtual bool try_music (Music*);
int l, ch, col;
ip->get_counts (&l, &ch, &col);
return scm_list_4 (scm_makfrom0str (ip->file_string ().to_str0 ()),
- scm_int2num (l),
- scm_int2num (ch),
- scm_int2num (col));
+ scm_from_int (l),
+ scm_from_int (ch),
+ scm_from_int (col));
}
LY_DEFINE (ly_input_both_locations, "ly:input-both-locations", 1, 0, 0, (SCM sip),
Input *ip = unsmob_input (sip);
SCM_ASSERT_TYPE (ip, sip, SCM_ARG1, __FUNCTION__, "input location");
return scm_list_5 (scm_makfrom0str (ip->file_string ().to_str0 ()),
- scm_int2num (ip->line_number ()),
- scm_int2num (ip->column_number ()),
- scm_int2num (ip->end_line_number ()),
- scm_int2num (ip->end_column_number ()));
+ scm_from_int (ip->line_number ()),
+ scm_from_int (ip->column_number ()),
+ scm_from_int (ip->end_line_number ()),
+ scm_from_int (ip->end_column_number ()));
}
int cnv = sscanf (YYText (), "%lf", &r);
assert (cnv == 1);
- yylval.scm = scm_make_real (r);
+ yylval.scm = scm_from_double (r);
return REAL;
}
int n = String_convert::dec2int (left);
int d = String_convert::dec2int (right);
- return scm_cons (scm_int2num (n), scm_int2num (d));
+ return scm_cons (scm_from_int (n), scm_from_int (d));
}
// Breaks for flex 2.5.31
SCM
ly_interval2scm (Drul_array<Real> i)
{
- return scm_cons (scm_make_real (i[LEFT]), scm_make_real (i[RIGHT]));
+ return scm_cons (scm_from_double (i[LEFT]), scm_from_double (i[RIGHT]));
}
bool
SCM
ly_offset2scm (Offset o)
{
- return scm_cons (scm_make_real (o[X_AXIS]), scm_make_real (o[Y_AXIS]));
+ return scm_cons (scm_from_double (o[X_AXIS]), scm_from_double (o[Y_AXIS]));
}
Offset
SCM nv = scm_c_make_vector (len, SCM_UNDEFINED);
for (int i = 0;i < len; i++)
{
- SCM si = scm_int2num (i);
+ SCM si = scm_from_int (i);
scm_vector_set_x (nv, si, ly_deep_copy (scm_vector_ref (src, si)));
}
}
add_scope (ly_make_anonymous_module (false));
push_note_state (scm_c_make_hash_table (0));
- chordmodifier_tab_ = scm_make_vector (scm_int2num (1), SCM_EOL);
+ chordmodifier_tab_ = scm_make_vector (scm_from_int (1), SCM_EOL);
}
Lily_lexer::Lily_lexer (Lily_lexer const &src)
Real off = dash_period - on;
SCM at = scm_list_n (ly_symbol2scm ("dashed-line"),
- scm_make_real (thick),
- scm_make_real (on),
- scm_make_real (off),
- scm_make_real (to[X_AXIS] - from[X_AXIS]),
- scm_make_real (to[Y_AXIS] - from[Y_AXIS]),
+ scm_from_double (thick),
+ scm_from_double (on),
+ scm_from_double (off),
+ scm_from_double (to[X_AXIS] - from[X_AXIS]),
+ scm_from_double (to[Y_AXIS] - from[Y_AXIS]),
SCM_UNDEFINED);
Box box;
Line_interface::make_line (Real th, Offset from, Offset to)
{
SCM at = scm_list_n (ly_symbol2scm ("draw-line"),
- scm_make_real (th),
- scm_make_real (from[X_AXIS]),
- scm_make_real (from[Y_AXIS]),
- scm_make_real (to[X_AXIS]),
- scm_make_real (to[Y_AXIS]),
+ scm_from_double (th),
+ scm_from_double (from[X_AXIS]),
+ scm_from_double (from[Y_AXIS]),
+ scm_from_double (to[X_AXIS]),
+ scm_from_double (to[Y_AXIS]),
SCM_UNDEFINED);
Box box;
Lookup::dot (Offset p, Real radius)
{
SCM at = (scm_list_n (ly_symbol2scm ("dot"),
- scm_make_real (p[X_AXIS]),
- scm_make_real (p[Y_AXIS]),
- scm_make_real (radius),
+ scm_from_double (p[X_AXIS]),
+ scm_from_double (p[Y_AXIS]),
+ scm_from_double (radius),
SCM_UNDEFINED));
Box box;
box.add_point (p - Offset (radius, radius));
SCM expr = scm_list_n (ly_symbol2scm ("polygon"),
ly_quote_scm (points),
- scm_make_real (blot),
+ scm_from_double (blot),
SCM_BOOL_T,
SCM_UNDEFINED);
}
SCM at = (scm_list_n (ly_symbol2scm ("dashed-slur"),
- scm_make_real (thick),
- scm_make_real (on),
- scm_make_real (off),
+ scm_from_double (thick),
+ scm_from_double (on),
+ scm_from_double (off),
ly_quote_scm (l),
SCM_UNDEFINED));
Lookup::horizontal_line (Interval w, Real th)
{
SCM at = scm_list_n (ly_symbol2scm ("draw-line"),
- scm_make_real (th),
- scm_make_real (w[LEFT]),
- scm_make_real (0),
- scm_make_real (w[RIGHT]),
- scm_make_real (0),
+ scm_from_double (th),
+ scm_from_double (w[LEFT]),
+ scm_from_double (0),
+ scm_from_double (w[RIGHT]),
+ scm_from_double (0),
SCM_UNDEFINED);
Box box;
}
SCM at = (scm_list_n (ly_symbol2scm ("round-filled-box"),
- scm_make_real (-b[X_AXIS][LEFT]),
- scm_make_real (b[X_AXIS][RIGHT]),
- scm_make_real (-b[Y_AXIS][DOWN]),
- scm_make_real (b[Y_AXIS][UP]),
- scm_make_real (blotdiameter),
+ scm_from_double (-b[X_AXIS][LEFT]),
+ scm_from_double (b[X_AXIS][RIGHT]),
+ scm_from_double (-b[Y_AXIS][DOWN]),
+ scm_from_double (b[Y_AXIS][UP]),
+ scm_from_double (blotdiameter),
SCM_UNDEFINED));
return Stencil (b, at);
Box box;
for (int i = 0; i < shrunk_points.size (); i++)
{
- SCM x = scm_make_real (shrunk_points[i][X_AXIS]);
- SCM y = scm_make_real (shrunk_points[i][Y_AXIS]);
+ SCM x = scm_from_double (shrunk_points[i][X_AXIS]);
+ SCM y = scm_from_double (shrunk_points[i][Y_AXIS]);
shrunk_points_scm = scm_cons (x, scm_cons (y, shrunk_points_scm));
box.add_point (points[i]);
}
SCM polygon_scm = scm_list_n (ly_symbol2scm ("polygon"),
ly_quote_scm (shrunk_points_scm),
- scm_make_real (blotdiameter),
+ scm_from_double (blotdiameter),
SCM_BOOL_T,
SCM_UNDEFINED);
SCM at = (scm_list_n (ly_symbol2scm ("bezier-sandwich"),
ly_quote_scm (list),
- scm_make_real (linethick),
+ scm_from_double (linethick),
SCM_UNDEFINED));
Box b (curve.extent (X_AXIS),
curve.extent (Y_AXIS));
SCM horizontal_bend = scm_list_n (ly_symbol2scm ("bezier-sandwich"),
ly_quote_scm (list),
- scm_make_real (0.0),
+ scm_from_double (0.0),
SCM_UNDEFINED);
Interval x_extent = top_curve.extent (X_AXIS);
return Lookup::round_filled_polygon (points, blotdiameter);
#endif
- SCM wid = scm_make_real (w);
- SCM sl = scm_make_real (s);
- SCM thick = scm_make_real (t);
+ SCM wid = scm_from_double (w);
+ SCM sl = scm_from_double (s);
+ SCM thick = scm_from_double (t);
SCM slashnodot = scm_list_n (ly_symbol2scm ("repeat-slash"),
wid, sl, thick, SCM_UNDEFINED);
if (ly_is_equal (text, scm_makfrom0str (" ")))
{
if (last_text_)
- last_text_->set_property ("self-alignment-X", scm_int2num (LEFT));
+ last_text_->set_property ("self-alignment-X", scm_from_int (LEFT));
}
else
{
{
text_->set_parent (head, X_AXIS);
if (melisma_busy (voice))
- text_->set_property ("self-alignment-X", scm_int2num (LEFT));
+ text_->set_property ("self-alignment-X", scm_from_int (LEFT));
}
}
}
}
+void
+setup_guile_env ()
+{
+ char * yield = getenv ("LILYPOND_GC_YIELD");
+ bool overwrite = true;
+ if (!yield)
+ {
+ yield = "70";
+ overwrite = false;
+ }
+
+ setenv ("GUILE_MIN_YIELD_1", yield, overwrite);
+ setenv ("GUILE_MIN_YIELD_2", yield, overwrite);
+ setenv ("GUILE_MIN_YIELD_MALLOC", yield, overwrite);
+}
+
+
int
main (int argc, char **argv)
{
setup_localisation ();
setup_paths (argv[0]);
+ setup_guile_env ();
parse_argv (argc, argv);
if (isatty (STDIN_FILENO))
identify (stderr);
int mark_count = scm_to_int (m);
mark_count++;
context ()->set_property ("rehearsalMark",
- scm_int2num (mark_count));
+ scm_from_int (mark_count));
}
if (scm_is_number (m))
(_f ("prime interval within ligature -> skipping"));
at_beginning = true;
primitive->set_property ("primitive",
- scm_int2num (MLP_NONE));
+ scm_from_int (MLP_NONE));
continue;
}
}
nr->origin ()->warning
(_f ("mensural ligature: duration none of Mx, L, B, S -> skipping"));
primitive->set_property ("primitive",
- scm_int2num (MLP_NONE));
+ scm_from_int (MLP_NONE));
at_beginning = true;
continue;
}
if (duration_log == 0)
{
primitive->set_property ("primitive",
- scm_int2num (MLP_UP | MLP_BREVIS));
+ scm_from_int (MLP_UP | MLP_BREVIS));
prev_semibrevis = prev_brevis_shape = true;
general_case = false;
}
int left_stem = duration_log == -1 ? MLP_DOWN : 0;
primitive->set_property ("primitive",
- scm_int2num (left_stem | MLP_BREVIS));
+ scm_from_int (left_stem | MLP_BREVIS));
prev_brevis_shape = true;
prev_semibrevis = general_case = false;
}
prev_semibrevis = false;
if (duration_log == 0)
{
- primitive->set_property ("primitive", scm_int2num (MLP_BREVIS));
+ primitive->set_property ("primitive", scm_from_int (MLP_BREVIS));
general_case = false;
}
else
nr->origin ()->warning
(_f ("semibrevis must be followed by another one -> skipping"));
primitive->set_property ("primitive",
- scm_int2num (MLP_NONE));
+ scm_from_int (MLP_NONE));
at_beginning = true;
continue;
}
(_f ("semibreves can only appear at the beginning of a ligature,\n"
"and there may be only zero or two of them"));
primitive->set_property ("primitive",
- scm_int2num (MLP_NONE));
+ scm_from_int (MLP_NONE));
at_beginning = true;
continue;
}
{
prev_primitive->set_property
("primitive",
- scm_int2num
+ scm_from_int
(MLP_FLEXA
| (scm_to_int (prev_primitive->get_property ("primitive"))
& MLP_DOWN)));
- primitive->set_property ("primitive", scm_int2num (MLP_NONE));
+ primitive->set_property ("primitive", scm_from_int (MLP_NONE));
break; // no more notes, no join
}
else
"when the last note is a descending brevis,\n"
"the penultimate note must be another one,\n"
"or the ligatura must be LB or SSB"));
- primitive->set_property ("primitive", scm_int2num (MLP_NONE));
+ primitive->set_property ("primitive", scm_from_int (MLP_NONE));
break;
}
}
// longa
else if (duration_log == -2)
{
- primitive->set_property ("primitive", scm_int2num (MLP_BREVIS));
+ primitive->set_property ("primitive", scm_from_int (MLP_BREVIS));
general_case = false;
}
// else maxima; fall through regular case below
static int const shape[3] = {MLP_MAXIMA, MLP_LONGA, MLP_BREVIS};
primitive->set_property ("primitive",
- scm_int2num (shape[duration_log + 3]));
+ scm_from_int (shape[duration_log + 3]));
prev_brevis_shape = duration_log == -1;
}
// ("noteheads.s-2mensural").extent (Y_AXIS).length ()
}
prev_primitive->set_property ("join-right-amount",
- scm_int2num (delta_pitch));
+ scm_from_int (delta_pitch));
// perhaps set add-join as well
}
at_beginning = false;
Item *primitive = dynamic_cast<Item *> (primitives[i].grob ());
int output = scm_to_int (primitive->get_property ("primitive"));
primitive->set_property ("thickness",
- scm_make_real (thickness));
+ scm_from_double (thickness));
switch (output & MLP_ANY)
{
case MLP_NONE:
primitive->set_property ("head-width",
- scm_make_real (half_flexa_width));
+ scm_from_double (half_flexa_width));
break;
case MLP_BREVIS:
case MLP_LONGA:
primitive->set_property ("head-width",
- scm_make_real (head_width));
+ scm_from_double (head_width));
break;
case MLP_MAXIMA:
primitive->set_property ("head-width",
- scm_make_real (maxima_head_width));
+ scm_from_double (maxima_head_width));
break;
case MLP_FLEXA:
primitive->set_property ("head-width",
- scm_make_real (half_flexa_width));
+ scm_from_double (half_flexa_width));
primitive->set_property ("flexa-width",
- scm_make_real (flexa_width));
+ scm_from_double (flexa_width));
break;
default:
programming_error (_f ("unexpected case fall-through"));
Real total_mag = magnification * scm_to_double (scm_cdr (desc));
assert (total_mag);
- description_ = scm_cons (scm_car (desc), scm_make_real (total_mag));
+ description_ = scm_cons (scm_car (desc), scm_from_double (total_mag));
orig_ = fm;
}
Grob *last = 0;
for (int i = 0; i < numbers_.size (); i++)
{
- if (scm_int2num (d) == numbers_[i]->get_property ("direction"))
+ if (scm_from_int (d) == numbers_[i]->get_property ("direction"))
{
if (last)
Side_position_interface::add_support (numbers_[i], last);
We can't plug a markup directly into the grob, since the
measure-count determines the formatting of the mmrest.
*/
- last_rest_->set_property ("measure-count", scm_int2num (num));
+ last_rest_->set_property ("measure-count", scm_from_int (num));
SCM sml = get_property ("measureLength");
Rational ml = (unsmob_moment (sml)) ? unsmob_moment (sml)->main_part_ : Rational (1);
else
{
SCM text
- = scm_number_to_string (scm_int2num (num), scm_from_int (10));
+ = scm_number_to_string (scm_from_int (num), scm_from_int (10));
last->set_property ("text", text);
}
}
orig = orig.transposed (*p);
- SCM key = scm_cons (scm_int2num (orig.get_octave ()),
- scm_int2num (orig.get_notename ()));
+ SCM key = scm_cons (scm_from_int (orig.get_octave ()),
+ scm_from_int (orig.get_notename ()));
- newlist = scm_cons (scm_cons (key, scm_int2num (orig.get_alteration ())),
+ newlist = scm_cons (scm_cons (key, scm_from_int (orig.get_alteration ())),
newlist);
}
else if (scm_is_number (key))
Pitch orig (0, scm_to_int (key), scm_to_int (alter));
orig = orig.transposed (*p);
- key = scm_int2num (orig.get_notename ());
- alter = scm_int2num (orig.get_alteration ());
+ key = scm_from_int (orig.get_notename ());
+ alter = scm_from_int (orig.get_alteration ());
newlist = scm_cons (scm_cons (key, alter), newlist);
}
}
*/
event->origin ()->warning (_ ("music for the martians."));
}
- SCM sstr = scm_number_to_string (scm_int2num (d), scm_int2num (10));
+ SCM sstr = scm_number_to_string (scm_from_int (d), scm_from_int (10));
ft.script_->set_property ("text", sstr);
ft.finger_event_ = event;
int d = scm_to_int (event->get_property ("string-number"));
- SCM sstr = scm_number_to_string (scm_int2num (d), scm_int2num (10));
+ SCM sstr = scm_number_to_string (scm_from_int (d), scm_from_int (10));
ft.script_->set_property ("text", sstr);
ft.finger_event_ = event;
f->add_offset_callback (Self_alignment_interface::aligned_on_self_proc, Y_AXIS);
f->add_offset_callback (Side_position_interface::aligned_side_proc, X_AXIS);
- f->set_property ("direction", scm_int2num (hordir));
+ f->set_property ("direction", scm_from_int (hordir));
}
int finger_prio = 200;
Grob *f = ft.script_;
f->set_parent (ft.head_, X_AXIS);
f->set_property ("script-priority",
- scm_int2num (finger_prio + ft.position_));
+ scm_from_int (finger_prio + ft.position_));
f->add_offset_callback (Side_position_interface::aligned_side_proc, Y_AXIS);
f->add_offset_callback (Self_alignment_interface::centered_on_parent_proc, X_AXIS);
f->add_offset_callback (Self_alignment_interface::aligned_on_self_proc, X_AXIS);
- f->set_property ("direction", scm_int2num (UP));
+ f->set_property ("direction", scm_from_int (UP));
}
for (int i = 0; i < down.size (); i++)
Grob *f = ft.script_;
f->set_parent (ft.head_, X_AXIS);
f->set_property ("script-priority",
- scm_int2num (finger_prio + down.size () - ft.position_));
+ scm_from_int (finger_prio + down.size () - ft.position_));
f->add_offset_callback (Self_alignment_interface::centered_on_parent_proc, X_AXIS);
f->add_offset_callback (Self_alignment_interface::aligned_on_self_proc, X_AXIS);
f->add_offset_callback (Side_position_interface::aligned_side_proc, Y_AXIS);
- f->set_property ("direction", scm_int2num (DOWN));
+ f->set_property ("direction", scm_from_int (DOWN));
}
}
do_shifts (me);
}
- return scm_make_real (0.0);
+ return scm_from_double (0.0);
}
void
{
for (int i = 0; i < clash_groups[d].size (); i++)
tups = scm_cons (scm_cons (clash_groups[d][i]->self_scm (),
- scm_make_real (offsets[d][i])),
+ scm_from_double (offsets[d][i])),
tups);
}
while (flip (&d) != UP);
style = ly_symbol2scm ("default");
}
- SCM log = scm_int2num (Note_head::get_balltype (me));
+ SCM log = scm_from_int (Note_head::get_balltype (me));
String suffix = to_string (min (robust_scm2int (me->get_property ("duration-log"), 2), 2));
if (style != ly_symbol2scm ("default"))
{
if (!ly_is_procedure (v))
return 0.0;
- SCM result = scm_call_2 (v, me->self_scm (), scm_int2num (a));
+ SCM result = scm_call_2 (v, me->self_scm (), scm_from_int (a));
if (!scm_is_pair (result))
return 0.0;
Duration dur = *unsmob_duration (ev->get_property ("duration"));
- note->set_property ("duration-log", scm_int2num (dur.duration_log ()));
+ note->set_property ("duration-log", scm_from_int (dur.duration_log ()));
if (dur.dot_count ())
{
Item *d = make_item ("Dots", note->self_scm ());
if (dur.dot_count ()
!= robust_scm2int (d->get_property ("dot-count"), 0))
- d->set_property ("dot-count", scm_int2num (dur.dot_count ()));
+ d->set_property ("dot-count", scm_from_int (dur.dot_count ()));
d->set_parent (note, Y_AXIS);
if (scm_is_number (c0))
pos += scm_to_int (c0);
- note->set_property ("staff-position", scm_int2num (pos));
+ note->set_property ("staff-position", scm_from_int (pos));
/*
Shaped note heads change on step of the scale.
SCM c0 (get_property ("middleCPosition"));
SCM oc0 (get_property ("originalCentralCPosition"));
if (scm_less_p (oc0, c0) == SCM_BOOL_T)
- span_->set_property ("direction", scm_int2num (DOWN));
+ span_->set_property ("direction", scm_from_int (DOWN));
}
}
last_ottavation_ = ott;
{
Output_def *b = unsmob_output_def (bp);
SCM_ASSERT_TYPE (b, bp, SCM_ARG1, __FUNCTION__, "paper");
- return scm_make_real (output_scale (b));
+ return scm_from_double (output_scale (b));
}
LY_DEFINE (ly_make_output_def, "ly:make-output-def",
Output_def *layout = unsmob_output_def (layout_smob);
SCM_ASSERT_TYPE (layout, layout_smob, SCM_ARG1,
__FUNCTION__, "layout definition");
- return scm_make_real (layout->get_dimension (name));
+ return scm_from_double (layout->get_dimension (name));
}
LY_DEFINE (ly_paper_fonts, "ly:paper-fonts",
if (scm_is_number (mpen))
total_penalty += scm_to_double (mpen);
- command_column_->set_property ("penalty", scm_make_real (total_penalty));
+ command_column_->set_property ("penalty", scm_from_double (total_penalty));
/* ugh. arbitrary, hardcoded */
if (total_penalty > 10000.0)
if (scm_is_number (mpage_pen))
total_pp += scm_to_double (mpage_pen);
- command_column_->set_property ("page-penalty", scm_make_real (total_pp));
+ command_column_->set_property ("page-penalty", scm_from_double (total_pp));
}
SCM font_table = get_font_table (mod);
SCM sizes = scm_hashq_ref (font_table, f->self_scm (), SCM_EOL);
- SCM handle = scm_assoc (scm_make_real (lookup_mag), sizes);
+ SCM handle = scm_assoc (scm_from_double (lookup_mag), sizes);
if (scm_is_pair (handle))
return unsmob_metrics (scm_cdr (handle));
SCM val = Modified_font_metric::make_scaled_font_metric (f, lookup_mag);
- sizes = scm_acons (scm_make_real (lookup_mag), val, sizes);
+ sizes = scm_acons (scm_from_double (lookup_mag), val, sizes);
unsmob_metrics (val)->unprotect ();
scm_hashq_set_x (font_table, f->self_scm (), sizes);
return unsmob_metrics (val);
{
Paper_system *ps = unsmob_paper_system (system);
SCM_ASSERT_TYPE (ps, system, SCM_ARG1, __FUNCTION__, "paper-system");
- return scm_int2num (ps->number_);
+ return scm_from_int (ps->number_);
}
LY_DEFINE (ly_paper_system_break_before_penalty, "ly:paper-system-break-before-penalty",
{
Paper_system *ps = unsmob_paper_system (system);
SCM_ASSERT_TYPE (ps, system, SCM_ARG1, __FUNCTION__, "paper-system");
- return scm_int2num (int (ps->break_before_penalty ()));
+ return scm_from_int (int (ps->break_before_penalty ()));
}
LY_DEFINE (ly_paper_system_stencil, "ly:paper-system-stencil",
$$ = $1;
}
| DIGIT {
- $$ = scm_int2num ($1);
+ $$ = scm_from_int ($1);
}
;
TEMPO steno_duration '=' bare_unsigned {
$$ = MY_MAKE_MUSIC ("MetronomeChangeEvent");
$$->set_property ("tempo-unit", $2);
- $$->set_property ("metronome-count", scm_int2num ( $4));
+ $$->set_property ("metronome-count", scm_from_int ( $4));
}
;
r-> set_property ("element", beg->self_scm ());
beg->unprotect ();
}
- r->set_property ("repeat-count", scm_int2num (max (times, 1)));
+ r->set_property ("repeat-count", scm_from_int (max (times, 1)));
r-> set_property ("elements",alts);
if (ly_is_equal ($2, scm_makfrom0str ("tremolo"))) {
shift -= 1;
r->compress (Moment (Rational (1, list_len)));
}
- scm_call_3 (func, r->self_scm (), scm_int2num (shift), scm_int2num (dots));
+ scm_call_3 (func, r->self_scm (), scm_from_int (shift), scm_from_int (dots));
}
r->set_spot (*$4->origin ());
$$->set_property ("element", mp->self_scm ());
mp->unprotect();
- $$->set_property ("numerator", scm_int2num (n));
- $$->set_property ("denominator", scm_int2num (d));
+ $$->set_property ("numerator", scm_from_int (n));
+ $$->set_property ("denominator", scm_from_int (d));
$$->compress (Moment (Rational (n,d)));
}
$$ = $1;
}
| DIGIT {
- $$ = scm_int2num ($1);
+ $$ = scm_from_int ($1);
}
;
if (scm_is_number (check))
{
int q = scm_to_int (check);
- n->set_property ("absolute-octave", scm_int2num (q-1));
+ n->set_property ("absolute-octave", scm_from_int (q-1));
}
}
| E_BRACKET_OPEN {
Music *m = MY_MAKE_MUSIC ("LigatureEvent");
- m->set_property ("span-direction", scm_int2num (START));
+ m->set_property ("span-direction", scm_from_int (START));
m->set_spot (@$);
$$ = MY_MAKE_MUSIC ("EventChord");
}
| E_BRACKET_CLOSE {
Music *m = MY_MAKE_MUSIC ("LigatureEvent");
- m->set_property ("span-direction", scm_int2num (STOP));
+ m->set_property ("span-direction", scm_from_int (STOP));
m->set_spot (@$);
$$ = MY_MAKE_MUSIC ("EventChord");
}
| script_dir direction_reqd_event {
if ($1)
- $2->set_property ("direction", scm_int2num ($1));
+ $2->set_property ("direction", scm_from_int ($1));
$$ = $2;
}
| script_dir direction_less_event {
if ($1)
- $2->set_property ("direction", scm_int2num ($1));
+ $2->set_property ("direction", scm_from_int ($1));
$$ = $2;
}
| string_number_event
string_number_event:
E_UNSIGNED {
Music *s = MY_MAKE_MUSIC ("StringNumberEvent");
- s->set_property ("string-number", scm_int2num ($1));
+ s->set_property ("string-number", scm_from_int ($1));
s->set_spot (@$);
$$ = s;
}
| tremolo_type {
Music *a = MY_MAKE_MUSIC ("TremoloEvent");
a->set_spot (@$);
- a->set_property ("tremolo-type", scm_int2num ($1));
+ a->set_property ("tremolo-type", scm_from_int ($1));
$$ = a;
}
;
octave_check:
/**/ { $$ = SCM_EOL; }
- | '=' { $$ = scm_int2num (0); }
- | '=' sub_quotes { $$ = scm_int2num ($2); }
- | '=' sup_quotes { $$ = scm_int2num ($2); }
+ | '=' { $$ = scm_from_int (0); }
+ | '=' sub_quotes { $$ = scm_from_int ($2); }
+ | '=' sup_quotes { $$ = scm_from_int ($2); }
;
sup_quotes:
}
| DIGIT {
Music *t = MY_MAKE_MUSIC ("FingerEvent");
- t->set_property ("digit", scm_int2num ($1));
+ t->set_property ("digit", scm_from_int ($1));
t->set_spot (@$);
$$ = t;
}
fraction:
FRACTION { $$ = $1; }
| UNSIGNED '/' UNSIGNED {
- $$ = scm_cons (scm_int2num ($1), scm_int2num ($3));
+ $$ = scm_cons (scm_from_int ($1), scm_from_int ($3));
}
;
bass_number:
DIGIT {
- $$ = scm_number_to_string (scm_int2num ($1), scm_int2num (10));
+ $$ = scm_number_to_string (scm_from_int ($1), scm_from_int (10));
$$ = scm_list_2 (ly_lily_module_constant ("number-markup"),
$$);
}
| UNSIGNED {
- $$ = scm_number_to_string (scm_int2num ($1), scm_int2num (10));
+ $$ = scm_number_to_string (scm_from_int ($1), scm_from_int (10));
$$ = scm_list_2 (ly_lily_module_constant ("number-markup"),
$$);
}
SCM salter = m->get_property ("alteration");
int alter = scm_is_number (salter) ? scm_to_int (salter) : 0;
m->set_property ("alteration",
- scm_int2num (alter + $2));
+ scm_from_int (alter + $2));
} else {
- m->set_property ("alteration", scm_int2num (0));
+ m->set_property ("alteration", scm_from_int (0));
}
}
;
if (scm_is_number ($4))
{
int q = scm_to_int ($4);
- n->set_property ("absolute-octave", scm_int2num (q-1));
+ n->set_property ("absolute-octave", scm_from_int (q-1));
}
if ($3 % 2)
bare_number:
UNSIGNED {
- $$ = scm_int2num ($1);
+ $$ = scm_from_int ($1);
}
| REAL {
$$ = $1;
$$ = $1;
}
| REAL NUMBER_IDENTIFIER {
- $$ = scm_make_real (scm_to_double ($1) *scm_to_double ($2));
+ $$ = scm_from_double (scm_to_double ($1) *scm_to_double ($2));
}
| UNSIGNED NUMBER_IDENTIFIER {
- $$ = scm_make_real ($1 *scm_to_double ($2));
+ $$ = scm_from_double ($1 *scm_to_double ($2));
}
;
{
SCM sym = ly_symbol2scm (*p);
execute_pushpop_property (one, sym,
- ly_symbol2scm ("direction"), scm_int2num (1));
+ ly_symbol2scm ("direction"), scm_from_int (1));
execute_pushpop_property (two, sym,
- ly_symbol2scm ("direction"), scm_int2num (-1));
+ ly_symbol2scm ("direction"), scm_from_int (-1));
}
}
{
SCM flare = p->bracket_->get_property ("bracket-flare");
p->bracket_->set_property ("bracket-flare", scm_cons (scm_car (flare),
- scm_make_real (0)));
+ scm_from_double (0)));
}
p->finished_bracket_ = p->bracket_;
if (!p->finished_bracket_)
{
SCM flare = p->bracket_->get_property ("bracket-flare");
- p->bracket_->set_property ("bracket-flare", scm_cons (scm_make_real (0), scm_cdr (flare)));
+ p->bracket_->set_property ("bracket-flare", scm_cons (scm_from_double (0), scm_cdr (flare)));
}
/* Set this property for 'mixed style' pedals, Ped._______/\ ,
{
Pitch *pp = unsmob_pitch (p);
SCM_ASSERT_TYPE (pp, p, SCM_ARG1, __FUNCTION__, "Pitch");
- return scm_int2num (pp->steps ());
+ return scm_from_int (pp->steps ());
}
LY_DEFINE (ly_pitch_octave, "ly:pitch-octave",
Pitch *p = unsmob_pitch (pp);
SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
int q = p->get_octave ();
- return scm_int2num (q);
+ return scm_from_int (q);
}
LY_DEFINE (ly_pitch_alteration, "ly:pitch-alteration",
SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
int q = p->get_alteration ();
- return scm_int2num (q);
+ return scm_from_int (q);
}
LY_DEFINE (pitch_notename, "ly:pitch-notename",
Pitch *p = unsmob_pitch (pp);
SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
int q = p->get_notename ();
- return scm_int2num (q);
+ return scm_from_int (q);
}
LY_DEFINE (ly_pitch_quartertones, "ly:pitch-quartertones",
Pitch *p = unsmob_pitch (pp);
SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
int q = p->quartertone_pitch ();
- return scm_int2num (q);
+ return scm_from_int (q);
}
LY_DEFINE (ly_pitch_semitones, "ly:pitch-semitones",
Pitch *p = unsmob_pitch (pp);
SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
int q = p->semitone_pitch ();
- return scm_int2num (q);
+ return scm_from_int (q);
}
LY_DEFINE (ly_pitch_less_p, "ly:pitch<?",
SCM keysig = get_property ("localKeySignature");
- SCM key = scm_cons (scm_int2num (p->get_octave ()),
- scm_int2num (p->get_notename ()));
+ SCM key = scm_cons (scm_from_int (p->get_octave ()),
+ scm_from_int (p->get_notename ()));
SCM handle = scm_assoc (key, keysig);
bool print_acc =
do_shift (rc);
}
}
- return scm_make_real (0.0);
+ return scm_from_double (0.0);
}
MAKE_SCHEME_CALLBACK (Rest_collision, force_shift_callback_rest, 2);
if (Note_column::has_interface (parent))
return force_shift_callback (parent->self_scm (), axis);
else
- return scm_make_real (0.0);
+ return scm_from_double (0.0);
}
void
int durlog = unsmob_duration (rest_event_->get_property ("duration"))->duration_log ();
rest_->set_property ("duration-log",
- scm_int2num (durlog));
+ scm_from_int (durlog));
int dots = unsmob_duration (rest_event_->get_property ("duration"))->dot_count ();
Rhythmic_head::set_dots (rest_, dot_);
dot_->set_parent (rest_, Y_AXIS);
- dot_->set_property ("dot-count", scm_int2num (dots));
+ dot_->set_property ("dot-count", scm_from_int (dots));
}
Pitch *p = unsmob_pitch (rest_event_->get_property ("pitch"));
if (scm_is_number (c0))
pos += scm_to_int (c0);
- rest_->set_property ("staff-position", scm_int2num (pos));
+ rest_->set_property ("staff-position", scm_from_int (pos));
}
}
}
if (d && bt > 4) // UGH.
{
d->set_property ("staff-position",
- scm_int2num ((bt == 7) ? 4 : 3));
+ scm_from_int ((bt == 7) ? 4 : 3));
}
if (d && bt >= -1 && bt <= 1) // UGH again.
{
d->set_property ("staff-position",
- scm_int2num ((bt == 0) ? -1 : 1));
+ scm_from_int ((bt == 0) ? -1 : 1));
}
return SCM_UNSPECIFIED;
}
{
Grob *me = unsmob_grob (smob);
if (scm_is_number (me->get_property ("staff-position")))
- return scm_make_real (0);
+ return scm_from_double (0);
Direction d = get_grob_direction (me);
Real off = 2 * d;
if (off)
off *= Staff_symbol_referencer::staff_space (me);
- return scm_make_real (off);
+ return scm_from_double (off);
}
ADD_INTERFACE (Rest, "rest-interface",
{
hash_tab_ = SCM_EOL;
smobify_self ();
- hash_tab_ = scm_make_vector (scm_int2num (119), SCM_EOL);
+ hash_tab_ = scm_make_vector (scm_from_int (119), SCM_EOL);
elt_count_ = 0;
}
elt_count_ = 0;
smobify_self ();
- hash_tab_ = scm_make_vector (scm_int2num (max ((int) src.elt_count_, 11)), SCM_EOL);
+ hash_tab_ = scm_make_vector (scm_from_int (max ((int) src.elt_count_, 11)), SCM_EOL);
elt_count_ = copy_scm_hashes (hash_tab_, src.hash_tab_);
}
if (&src == this)
return;
- hash_tab_ = scm_make_vector (scm_int2num (max ((int) src.elt_count_, 11)), SCM_EOL);
+ hash_tab_ = scm_make_vector (scm_from_int (max ((int) src.elt_count_, 11)), SCM_EOL);
elt_count_ = copy_scm_hashes (hash_tab_, src.hash_tab_);
}
*/
if (elt_count_ > 2 * scm_c_vector_length (hash_tab_))
{
- SCM nh = scm_make_vector (scm_int2num (3 * elt_count_ + 1), SCM_EOL);
+ SCM nh = scm_make_vector (scm_from_int (3 * elt_count_ + 1), SCM_EOL);
elt_count_ = copy_scm_hashes (nh, hash_tab_);
hash_tab_ = nh;
}
{
SCM lst = SCM_EOL;
for (int i = scm_c_vector_length (hash_tab_); i--;)
- for (SCM s = scm_vector_ref (hash_tab_, scm_int2num (i)); scm_is_pair (s);
+ for (SCM s = scm_vector_ref (hash_tab_, scm_from_int (i)); scm_is_pair (s);
s = scm_cdr (s))
lst = scm_acons (scm_caar (s), scm_cdar (s), lst);
return lst;
{
programming_error ("no direction for script");
d = DOWN;
- g->set_property ("direction", scm_int2num (d));
+ g->set_property ("direction", scm_from_int (d));
}
scripts_drul[d] = scm_cons (g->self_scm (), scripts_drul[d]);
to the head. */
int prio = scm_to_int (val) + index;
- val = scm_int2num (prio);
+ val = scm_from_int (prio);
}
if (p->internal_get_property (sym) == SCM_EOL)
p->internal_set_property (sym, val);
if (!priority_found)
{
p->set_property ("script-priority",
- scm_int2num (index));
+ scm_from_int (index));
}
Side_position_interface::set_axis (p, Y_AXIS);
Grob *him = me->get_parent (a);
Interval he = him->extent (him, a);
- return scm_make_real (he.is_empty () ? 0.0 : he.center ());
+ return scm_from_double (he.is_empty () ? 0.0 : he.center ());
}
MAKE_SCHEME_CALLBACK (Self_alignment_interface, aligned_on_parent, 2);
SCM align_prop (me->internal_get_property (sym));
if (!scm_is_number (align_prop))
- return scm_int2num (0);
+ return scm_from_int (0);
Real x = 0.0;
Real align = scm_to_double (align_prop);
if (!he.is_empty ())
x += he.linear_combination (align);
- return scm_make_real (x);
+ return scm_from_double (x);
}
/* Position centered on parent. */
Grob *him = me->get_parent (other_axis (a));
Interval he = him->extent (him, a);
- return scm_make_real (he.is_empty () ? 0.0 : he.center ());
+ return scm_from_double (he.is_empty () ? 0.0 : he.center ());
}
/** callback that centers the element on itself
if (ext.is_empty ())
programming_error ("can't align on self: empty element");
else
- return scm_make_real (- ext.linear_combination (scm_to_double (align)));
+ return scm_from_double (- ext.linear_combination (scm_to_double (align)));
}
- return scm_make_real (0.0);
+ return scm_from_double (0.0);
}
ADD_INTERFACE (Self_alignment_interface, "self-alignment-interface",
programming_error (msg);
}
- return scm_make_real (total_off);
+ return scm_from_double (total_off);
}
/*
rp += d;
}
- return scm_make_real ((rp - p) * Staff_symbol_referencer::staff_space (me) / 2.0);
+ return scm_from_double ((rp - p) * Staff_symbol_referencer::staff_space (me) / 2.0);
}
- return scm_make_real (0.0);
+ return scm_from_double (0.0);
}
/*
o += d * max (diff, 0.0);
}
- return scm_make_real (o);
+ return scm_from_double (o);
}
void
}
}
- return scm_make_real (offset);
+ return scm_from_double (offset);
}
static Direction
programming_error ("infinite rod");
SCM mins = get_minimum_distances (me);
- SCM newdist = scm_make_real (d);
+ SCM newdist = scm_from_double (d);
for (SCM s = mins; scm_is_pair (s); s = scm_cdr (s))
{
SCM dist = scm_car (s);
if (i.is_empty ())
{
me->suicide ();
- return scm_make_real (0.0);
+ return scm_from_double (0.0);
}
- return scm_make_real (i.center ());
+ return scm_from_double (i.center ());
}
void
Span_bar::get_spanned_interval (Grob *me)
{
return ly_scm2interval (Axis_group_interface::group_extent_callback
- (me->self_scm (), scm_int2num (Y_AXIS)));
+ (me->self_scm (), scm_from_int (Y_AXIS)));
}
MAKE_SCHEME_CALLBACK (Span_bar, get_bar_size, 1);
{
/* This happens if the bars are hara-kiried from under us. */
me->suicide ();
- return scm_make_real (-1);
+ return scm_from_double (-1);
}
- return scm_make_real (iv.length ());
+ return scm_from_double (iv.length ());
}
ADD_INTERFACE (Span_bar, "span-bar-interface",
Real pos = Staff_symbol_referencer::get_position (g);
if (fabs (rint (pos) -pos) < 1e-6) // ugh.
- return scm_int2num ((int) my_round (pos));
+ return scm_from_int ((int) my_round (pos));
else
- return scm_make_real (pos);
+ return scm_from_double (pos);
}
/* should use offset callback! */
{
Real space = Staff_symbol_referencer::staff_space (me);
off = scm_to_double (pos) * space / 2.0;
- me->set_property ("staff-position", scm_int2num (0));
+ me->set_property ("staff-position", scm_from_int (0));
}
- return scm_make_real (off);
+ return scm_from_double (off);
}
/* This sets the position relative to the center of the staff symbol.
if (st && me->common_refpoint (st, Y_AXIS))
{
Real oldpos = get_position (me);
- me->set_property ("staff-position", scm_make_real (p - oldpos));
+ me->set_property ("staff-position", scm_from_double (p - oldpos));
}
else
- me->set_property ("staff-position", scm_make_real (p));
+ me->set_property ("staff-position", scm_from_double (p));
me->add_offset_callback (Staff_symbol_referencer::callback_proc, Y_AXIS);
}
Music *music = gi.music_cause ();
Duration *dur = unsmob_duration (music->get_property ("duration"));
- stem_->set_property ("duration-log", dur ? scm_int2num (dur->duration_log ()) : 0);
+ stem_->set_property ("duration-log", dur ? scm_from_int (dur->duration_log ()) : 0);
if (tremolo_ev_)
{
requested_type = 8;
}
else
- context ()->set_property ("tremoloFlags", scm_int2num (requested_type));
+ context ()->set_property ("tremoloFlags", scm_from_int (requested_type));
int tremolo_flags = intlog2 (requested_type) - 2
- (dur->duration_log () > 2 ? dur->duration_log () - 2 : 0);
/* The number of tremolo flags is the number of flags of the
tremolo-type minus the number of flags of the note itself. */
- tremolo_->set_property ("flag-count", scm_int2num (tremolo_flags));
+ tremolo_->set_property ("flag-count", scm_from_int (tremolo_flags));
tremolo_->set_parent (stem_, X_AXIS);
stem_->set_object ("tremolo-flag", tremolo_->self_scm ());
tremolo_->set_object ("stem", stem_->self_scm ());
SCM lst = index_get_cell (pair, d);
for (int i = 0; i < beam_count; i++)
- lst = scm_cons (scm_int2num (i), lst);
+ lst = scm_cons (scm_from_int (i), lst);
index_set_cell (pair, d, lst);
}
if (!scm_is_number (p))
{
pos = get_default_stem_end_position (me);
- me->set_property ("stem-end-position", scm_make_real (pos));
+ me->set_property ("stem-end-position", scm_from_double (pos));
}
else
pos = scm_to_double (p);
if (d && d * head_positions (me)[get_direction (me)] >= se * d)
me->warning (_ ("weird stem size, check for narrow beams"));
- me->set_property ("stem-end-position", scm_make_real (se));
+ me->set_property ("stem-end-position", scm_from_double (se));
}
/* Note head that determines hshift for upstems
r = rest->extent (rest, X_AXIS).center ();
}
}
- return scm_make_real (r);
+ return scm_from_double (r);
}
Spanner *
Real shortest_y = minimum_y * my_dir;
me->set_property ("stem-info",
- scm_list_2 (scm_make_real (ideal_y),
- scm_make_real (shortest_y)));
+ scm_list_2 (scm_from_double (ideal_y),
+ scm_from_double (shortest_y)));
}
Slice
{
(*func) (func_arg,
scm_list_4 (ly_symbol2scm ("placebox"),
- scm_make_real (o[X_AXIS]),
- scm_make_real (o[Y_AXIS]),
+ scm_from_double (o[X_AXIS]),
+ scm_from_double (o[Y_AXIS]),
expr));
return;
}
System *system = dynamic_cast<System *> (broken_intos_[i]);
system->post_processing ();
- scm_vector_set_x (lines, scm_int2num (i), system->get_paper_system ());
+ scm_vector_set_x (lines, scm_from_int (i), system->get_paper_system ());
if (be_verbose_global)
progress_indication (to_string (i) + "]");
Duration dur = *unsmob_duration (event->get_property ("duration"));
note->set_property ("duration-log",
- scm_int2num (dur.duration_log ()));
+ scm_from_int (dur.duration_log ()));
if (dur.dot_count ())
{
if (dur.dot_count ()
!= scm_to_int (d->get_property ("dot-count")))
- d->set_property ("dot-count", scm_int2num (dur.dot_count ()));
+ d->set_property ("dot-count", scm_from_int (dur.dot_count ()));
d->set_parent (note, Y_AXIS);
while (!string_found)
{
int fret = unsmob_pitch (scm_pitch)->semitone_pitch ()
- - scm_to_int (scm_list_ref (stringTunings, scm_int2num (tab_string - 1)));
+ - scm_to_int (scm_list_ref (stringTunings, scm_from_int (tab_string - 1)));
if (fret < min_fret)
tab_string += high_string_one ? 1 : -1;
else
string_found = true;
}
- SCM text = scm_call_3 (proc, scm_int2num (tab_string), stringTunings, scm_pitch);
+ SCM text = scm_call_3 (proc, scm_from_int (tab_string), stringTunings, scm_pitch);
int pos = 2 * tab_string - number_of_strings - 1; // No tab-note between the string !!!
if (to_boolean (get_property ("stringOneTopmost")))
note->set_property ("text", text);
- note->set_property ("staff-position", scm_int2num (pos));
+ note->set_property ("staff-position", scm_from_int (pos));
notes_.push (note);
}
}
{
int k = scm_ilength (get_property ("stringTunings"));
if (k >= 0)
- span_->set_property ("line-count", scm_int2num (k));
+ span_->set_property ("line-count", scm_from_int (k));
}
}
/* see script-engraver.cc */
priority += i;
- text->set_property ("script-priority", scm_int2num (priority));
+ text->set_property ("script-priority", scm_from_int (priority));
Direction dir = to_dir (r->get_property ("direction"));
if (dir)
*/
context ()->add_alias (ly_symbol2scm ("Timing"));
context ()->set_property ("timing", SCM_BOOL_T);
- context ()->set_property ("currentBarNumber", scm_int2num (1));
+ context ()->set_property ("currentBarNumber", scm_from_int (1));
context ()->set_property ("timeSignatureFraction",
- scm_cons (scm_int2num (4), scm_int2num (4)));
+ scm_cons (scm_from_int (4), scm_from_int (4)));
/*
Do not init measurePosition; this should be done from global
context.
b++;
}
- context ()->set_property ("currentBarNumber", scm_int2num (b));
+ context ()->set_property ("currentBarNumber", scm_from_int (b));
context ()->set_property ("measurePosition", measposp.smobbed_copy ());
}
virtual void finalize ();
DECLARE_ACKNOWLEDGER(note_column);
virtual bool try_music (Music *);
- PRECOMPUTED_VIRTUAL void stop_translation_timestep ();
- PRECOMPUTED_VIRTUAL void process_music ();
+ void stop_translation_timestep ();
+ void process_music ();
private:
Spanner *span_;
if (scm_is_number (lp) && !scm_is_number (rp))
{
- rp = scm_make_real (scm_to_double (lp) + dy);
+ rp = scm_from_double (scm_to_double (lp) + dy);
}
else if (scm_is_number (rp) && !scm_is_number (lp))
{
- lp = scm_make_real (scm_to_double (rp) - dy);
+ lp = scm_from_double (scm_to_double (rp) - dy);
}
else if (!scm_is_number (rp) && !scm_is_number (lp))
{
- lp = scm_make_real (offset);
- rp = scm_make_real (offset + dy);
+ lp = scm_from_double (offset);
+ rp = scm_from_double (offset + dy);
}
me->set_property ("left-position", lp);
DECLARE_ACKNOWLEDGER(note_column);
virtual bool try_music (Music *r);
- PRECOMPUTED_VIRTUAL void start_translation_timestep ();
- PRECOMPUTED_VIRTUAL void process_music ();
+ void start_translation_timestep ();
+ void process_music ();
};
bool
* Save the head's final x-offset.
*/
primitive->set_property ("x-offset",
- scm_make_real (x_offset));
+ scm_from_double (x_offset));
/*
* If the head is the 2nd head of a pes or flexa (but not a
{
context_info |= STACKED_HEAD;
primitive->set_property ("context-info",
- scm_int2num (context_info));
+ scm_from_int (context_info));
}
/*
check_for_prefix_loss (prev_primitive);
prev_glyph_name = "flexa";
prev_primitive->set_property ("flexa-height",
- scm_int2num (prev_delta_pitch));
+ scm_from_int (prev_delta_pitch));
prev_primitive->set_property ("flexa-width",
- scm_make_real (flexa_width));
+ scm_from_double (flexa_width));
bool add_cauda = !(prev_prefix_set && PES_OR_FLEXA);
prev_primitive->set_property ("add-cauda",
ly_bool2scm (add_cauda));
check_for_prefix_loss (primitive);
glyph_name = "";
primitive->set_property ("flexa-width",
- scm_make_real (flexa_width));
+ scm_from_double (flexa_width));
}
/*
* ligature grob's value for thickness to each ligature head (even
* if not all of them need to know).
*/
- primitive->set_property ("thickness", scm_make_real (thickness));
+ primitive->set_property ("thickness", scm_from_double (thickness));
prev_primitive = primitive;
prev_prefix_set = prefix_set;
"setting `spacing-increment = %f': ptr =%ul",
ligature_width, paper_column));
paper_column->
- set_property ("forced-spacing", scm_make_real (ligature_width));
+ set_property ("forced-spacing", scm_from_double (ligature_width));
#endif
}
protected:
virtual void derived_mark () const;
- PRECOMPUTED_VIRTUAL void process_music ();
+ void process_music ();
virtual void finalize ();
virtual void initialize ();
};
virtual void finalize ();
- PRECOMPUTED_VIRTUAL void stop_translation_timestep ();
- PRECOMPUTED_VIRTUAL void process_music ();
+ void stop_translation_timestep ();
+ void process_music ();
Moment started_mom_;
Spanner *volta_span_;