Mercurial > hg > syncopation-dataset
diff Syncopation models/synpy/PRS.py @ 50:e71028851131
updating latex and bug fixes to main py files
author | christopherh <christopher.harte@eecs.qmul.ac.uk> |
---|---|
date | Mon, 27 Apr 2015 09:51:15 +0100 |
parents | 6e9154fc58df |
children |
line wrap: on
line diff
--- a/Syncopation models/synpy/PRS.py Mon Apr 27 09:46:18 2015 +0100 +++ b/Syncopation models/synpy/PRS.py Mon Apr 27 09:51:15 2015 +0100 @@ -38,12 +38,14 @@ def get_syncopation(bar, parameters = None): syncopation = None - binarySequence = bar.get_binary_sequence() + binarySequence = velocity_sequence_to_min_timespan(bar.get_binary_sequence()) subdivisionSequence = bar.get_subdivision_sequence() # PRS does not handle polyrhythms if get_rhythm_category(binarySequence, subdivisionSequence) == 'poly': print 'Warning: PRS model detects polyrhythms so returning None.' + elif bar.is_empty(): + print 'Warning: PRS model detects empty bar so returning None.' else: syncopation = 0