Mercurial > hg > syncopation-dataset
comparison Syncopation models/TMC.py @ 33:f5abd2e8cafe
update models
author | csong |
---|---|
date | Sun, 12 Apr 2015 23:51:05 +0100 |
parents | 5de1cb45c145 |
children |
comparison
equal
deleted
inserted
replaced
32:273450d5980a | 33:f5abd2e8cafe |
---|---|
74 L = find_L(binarySequence, Lmax, weightSequence, subdivisionSequence) | 74 L = find_L(binarySequence, Lmax, weightSequence, subdivisionSequence) |
75 if L != None: | 75 if L != None: |
76 #? generate the metrical weights of the lowest level, | 76 #? generate the metrical weights of the lowest level, |
77 #? using the last matching_level number of elements in the weightSequence, to make sure the last element is 1 | 77 #? using the last matching_level number of elements in the weightSequence, to make sure the last element is 1 |
78 H = get_H (weightSequence[-(L+1):], subdivisionSequence, L) | 78 H = get_H (weightSequence[-(L+1):], subdivisionSequence, L) |
79 | |
80 metricity = get_metricity(binarySequence, H) # converting to binary sequence then calculate metricity | 79 metricity = get_metricity(binarySequence, H) # converting to binary sequence then calculate metricity |
81 maxMetricity = get_max_metricity(binarySequence, H) | 80 maxMetricity = get_max_metricity(binarySequence, H) |
82 | 81 |
83 syncopation = maxMetricity - metricity | 82 syncopation = maxMetricity - metricity |
84 | 83 |
85 return syncopation | 84 return syncopation |
86 | 85 |