canAddDuration method
Returns true if there is room to add the given duration.
Implementation
bool canAddDuration(Duration duration) {
final ts = timeSignature;
if (ts == null) return true; // No time signature = always can add
return currentMusicalValue + duration.realValue <= ts.measureValue;
}