tempo: calculate output length