- Dimension_cache *dim = dim_cache_[a]->common_refpoint (s->dim_cache_[a]);
- return dim ? dim->element_l () : 0;
+ Score_element *me = (Score_element*) this;
+ while (dim_cache_[a].offsets_left_)
+ {
+ int l = --me->dim_cache_[a].offsets_left_;
+ SCM cb = scm_list_ref (dim_cache_[a].offset_callbacks_, gh_int2scm (l));
+ SCM retval = gh_call2 (cb, self_scm (), gh_int2scm (a));
+
+ Real r = gh_scm2double (retval);
+ if (isinf (r) || isnan (r))
+ {
+ programming_error (INFINITY_MSG);
+ r = 0.0;
+ }
+ me->dim_cache_[a].offset_ +=r;
+ }
+ return dim_cache_[a].offset_;
+}
+
+
+MAKE_SCHEME_CALLBACK(Score_element,point_dimension_callback,2);
+SCM
+Score_element::point_dimension_callback (SCM , SCM )
+{
+ return ly_interval2scm ( Interval (0,0));