Whole-rest symbols that occupy an entire measure should have duration derived from the time signature valid for that measure.
The algorithm:
[ ] Check that the rest is the only duration-bearing symbol in the measure.
[x] Find the valid time signature (closest leftwards time sig. connected to the given staff).
[x] Interpret the time signature.
[ ] If there is no time signature, (a) stick to 4.0 beats (default, easy way out), (b) derive this from other durations, which however requires a second pass after all durations have been inferred.
Interpreting the time signature is non-trivial for situations where we don't have the normal 3/4 fraction-like structure: e.g., just "3", and also alla breve can be interpreted in more than one way. We stick to the defaults for now: a single number is interpreted as the number of beats per measure, even though this does not work pre-1700, and alla breve is equivalent to 4/4.
Whole-rest symbols that occupy an entire measure should have duration derived from the time signature valid for that measure.
The algorithm:
Interpreting the time signature is non-trivial for situations where we don't have the normal 3/4 fraction-like structure: e.g., just "3", and also alla breve can be interpreted in more than one way. We stick to the defaults for now: a single number is interpreted as the number of beats per measure, even though this does not work pre-1700, and alla breve is equivalent to 4/4.