First relaxing constraints on range. Should lead to more successful generations, but still need to relax jump constraints as well.
First variant of rule which checks jump range that tells us only to check unspecified measures. Second variant is needed for completeness.
Disabling failure in case of jump constraint violation altogether does lead to successful generation, but results go too far out of range. Need to make sure the rule is applied exactly when it is needed.
Re-introduced the rules for failure and added some explanatory notes.
Seems to take care of failures due to jump constraint violations (may even be disabling too many checks) but repeat constraints still pose a problem.
Looks like this version does always finish for scheme a, but can take a long time. Current impression is that this is due to very deep backtracking.
Bottleneck in backtracking gevonden.
Defines octaves, but reintroduces extremely long generation times.
Should give some insight into why octave generation is not occurring as it should.
Octaves can only be computed given an octave range check, and this was only being performed for unspecified measures. So rolling back the additional constraints introduced earlier to check the result.
Removing some redundant comments.
Getting closer to pinpointing source of heavy backtracking.
Script to annotate rules for easy debugging should make it possible to locate rule that causes havey backtracking.
Approach notes occur curiously often in debug output. Extra prints may shed some light.
Going to try to derive same octave jump in copied measures. Need to finish the new rule, which will hopefully generate the octave_d constraints that keep originals and duplicates in sync.
Just did what was required in a split second. But not sure if this behaviour will be consistent.
Makes more sense to only choose for the first transposition, but still doesn't resolve bottleneck.
Most of the problem is resolved, but there is still a snag: if octave is derived from previous info after transposition, it is easy to get a new, undefined measure that is out of range (e.g. because transposition was up).
Current version is very fast when it works, but it can get lost in its search tree if it goes out of range with transposition and then moves back to unspecified measure generation.
Added some comments for clarification. Haven't resolved problem with transpositions going out of range, but interaction with iterating code is unclear, so will merge back into master and work on iteration first: that is more important because any hack that fixes the out-of-range issue should be compatible with iteration.