return pos;
}
- pos = 4 * dir;
+ Real vpos = dir * robust_scm2int (me->get_property ("voiced-position"), 0);
+ pos = vpos;
if (duration_log > 1)
/* Only half notes or longer want alignment with staff lines */
return pos;
-
+
/*
We need a staff symbol for actually aligning anything
*/
if (linepos.empty ())
return pos;
-
+
std::sort (linepos.begin (), linepos.end ());
-
+
if (duration_log == 0)
{
/*
make a semibreve rest hang from the next available line,
except when there is none.
*/
-
+
std::vector<Real>::const_iterator it
= std::upper_bound (linepos.begin (), linepos.end (), pos);
if (it != linepos.end ())
return pos;
/* If we have a voiced position, make sure that it's on the
- proper side of neutral before using it. If it isn't, we fall
- back to a constant offset from neutral position.
+ proper side of neutral before using it.
*/
Real neutral = staff_position_internal (me, duration_log, 0);
if (dir * (pos - neutral) > 0)
return pos;
-
- return neutral + 4 * dir;
+ else
+ return neutral + vpos;
}
/* A rest might lie under a beam, in which case it should be cross-staff if
"direction "
"minimum-distance "
"style "
+ "voiced-position "
);