PianoRoll: fix odd time signature issues (bugs #274 and #172 at Sourceforge)