private int ApplyStaticDuration(int duration, int maximum) { var value = (_currentTempo * duration) / 60; return Math.Min(value, maximum); }