Mercurial > hg > syncopation-dataset
diff Syncopation models/parameter_setter.py @ 33:f5abd2e8cafe
update models
author | csong |
---|---|
date | Sun, 12 Apr 2015 23:51:05 +0100 |
parents | 273450d5980a |
children |
line wrap: on
line diff
--- a/Syncopation models/parameter_setter.py Sun Apr 12 23:23:32 2015 +0100 +++ b/Syncopation models/parameter_setter.py Sun Apr 12 23:51:05 2015 +0100 @@ -81,15 +81,13 @@ def is_Lmax_valid(): isValid = False if isinstance(Lmax,int) and Lmax > 0: - if Lmax <= len(subdivisionSequence): - if Lmax <= len(weightSequence): + if Lmax <= len(subdivisionSequence)-1: + if Lmax <= len(weightSequence)-1: isValid = True else: - print """Error: Lmax exceeds the length of subdivision-sequence. - Either reduce Lmax, or extend subdivision-sequence through updating time-signature (refer to update_time_signature function). """ + print 'Error: Lmax exceeds the length of weight-sequence. Either reduce Lmax, or provide a new weight-sequence whose length is greater or equal to Lmax.' else: - print """Error: Lmax exceeds the length of weight-sequence. Either reduce Lmax, or provide a new weight-sequence - whose length is greater or equal to Lmax.""" + print 'Error: Lmax exceeds the length of subdivision-sequence. Either reduce Lmax, or extend subdivision-sequence through updating time-signature (refer to update_time_signature function).' else: print 'Error: Lmax needs to be a positive integer.' return isValid