#1372 Rests of new segments don't adapt to time signature changes

None
closed
nobody
None
1
2013-10-01
2012-11-13
Daniel Glöckner
No

To reproduce:
1. create a segment starting in 4/4 and switching later to 2/4
2. add a parallel segment

The second segment will consist only of whole rests.

Discussion

    1. Start off with default 4/4 time
    2. Draw segment
    3. Throw some notes in for good measure
    4. Edit the 4/4 tempo to convert to 2/4
    5. Draw second segment

    My second segment comes out full of half rests, as one would expect.

     
  • The bug still exists in r13353.
    Try with a second segment that starts at the same time as the first.
    Or delete the first segment and redraw it.
    There is no need to add notes.

     
  • You're doing something that I'm not doing. I tried a few variations, and always got half rests. I believe you can reproduce it, but this recipe is not sufficient.

    In any event, even if we figure out how to reproduce this bug, fixing it is unlikely. The usual workaround whenever Roesgarden does strange things with the rests is to try using Ctrl+N to normalize them. That usually works so well that if strange rests persist after a normalize it's almost always a sign that something is actually wrong with the raw data (eg. a measure of 4/4 that has 4.5 beats in it and the like).

     
  • Here is a patch.

    Replacing the call to fillWithRests with the call to normalizeRests doesn't work as normalizeRests can't cope with the partially filled segments we get during recursion.

     
    Attachments
  • Thanks for the patch. I'll look it over as soon as I possibly can. I thought that would be now, but not quite yet.

     
  • OK, reviewed and committed. It seems like this has the potential to cause problems in some edge cases, but I decided to just go with it anyway, and not care.

     
    • status: open --> closed