diff options
| author | Houyhnhnm <hykusb@bitmai.la> | 2018-06-05 15:38:15 +0200 |
|---|---|---|
| committer | Houyhnhnm <hykusb@bitmai.la> | 2018-06-05 15:38:15 +0200 |
| commit | fb85212cbc8e7a2866c6dda916e810df2a4ea4e0 (patch) | |
| tree | 1d0c2f116052aad26ace6d8b32340a23112d29ac /grammar.py | |
| parent | 6f14ded166e35879e0522f2e62347a3a709518e4 (diff) | |
compute barlines preferentially for most prominent downs
Diffstat (limited to 'grammar.py')
| -rw-r--r-- | grammar.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -47,7 +47,7 @@ class Phonology(object): def makeFootprint(self): # select footprint rule - weights = array([rule[1] for rule in self.functions]) + weights = array([rule[1] for rule in self.footprints]) normalized_weights = weights.astype(float) / weights.sum() footprintChoices = array(self.footprints) index = choice(len(footprintChoices), p=normalized_weights) @@ -65,9 +65,9 @@ class Phonology(object): foot['span'] = choice(footRule['span']) foot['gait'] = choice(footRule['gait']) # timing options are per note: - foot['step'] = [] - for steps in footRule['step']: - foot['step'].append( choice(steps) ) + foot['sync'] = [] + for steps in footRule['sync']: + foot['sync'].append( choice(steps) ) footprint.append(foot) return footprint |