- {
- Spacing_options grace_opts;
- grace_opts.init_from_grob (grace_spacing);
- dist = grace_opts.get_duration_space (delta_t.grace_part_);
- }
-
+ {
+ Spacing_options grace_opts;
+ grace_opts.init_from_grob (grace_spacing);
+ Real len = grace_opts.get_duration_space (delta_t.grace_part_);
+ Real min = grace_opts.increment_;
+ ret = Spring (len, min);
+ // Grace notes should not stretch very much
+ ret.set_inverse_stretch_strength (grace_opts.increment_ / 2.0);
+ }
+ else // Fallback to the old grace spacing: half that of the shortest note
+ ret = Spring (options->
+ get_duration_space (options->global_shortest_) / 2.0,
+ options->increment_ / 2.0);