Solo
This commit is contained in:
@@ -81,7 +81,7 @@ class Evaluation:
|
||||
deviation = max(0, abs(attacks - expected) - max(tolerance, generator.solo.policy.DEFAULT.activity_deadband * length / self.duration))
|
||||
activity += length * min(1, deviation / max(1, expected))
|
||||
occupancy += length * max(0, abs(occupied / length - occupied_goal) - generator.solo.policy.DEFAULT.occupancy_deadband)
|
||||
if self.plan.treatment == 'lead':
|
||||
if self.plan.treatment in ('lead', 'source_variation', 'thematic_recomposition'):
|
||||
# One broad range over the complete thought; quiet bars are not failed
|
||||
# local quotas. Missing harmony and explicit release are excluded here.
|
||||
active = tuple(window for window in self.windows if window[4] > 0)
|
||||
@@ -92,6 +92,8 @@ class Evaluation:
|
||||
activity = length * corridor(attacks / max(length, .001), low, high) / high
|
||||
low, high = generator.solo.policy.DEFAULT.lead_occupancy_range
|
||||
occupancy = length * corridor(occupied / max(length, .001), low, high)
|
||||
if self.plan.treatment in ('source_variation', 'thematic_recomposition'):
|
||||
occupancy = 0.0 # Space belongs to the source and its explicit edits.
|
||||
start, end = float(self.plan.start), float(self.until)
|
||||
durations = [max(0, min(b, end) - max(a, start)) for a, b, _ in sounded]
|
||||
register = sum(length * min(1, corridor(pitch, *self.plan.register) / 12) for (_, _, pitch), length in zip(sounded, durations)) / max(sum(durations), 0.001)
|
||||
|
||||
Reference in New Issue
Block a user