Mercurial > hg > syncopation-dataset
comparison Syncopation models/basic_functions.py @ 10:a3ed7d2b57d8
updating main py files to point at new
file names
author | christopherh <christopher.harte@eecs.qmul.ac.uk> |
---|---|
date | Fri, 03 Apr 2015 16:02:10 +0100 |
parents | c2843ef4de2c |
children | 7d94ba423c04 |
comparison
equal
deleted
inserted
replaced
9:c2843ef4de2c | 10:a3ed7d2b57d8 |
---|---|
148 if not (f in subdivision_seq): | 148 if not (f in subdivision_seq): |
149 rhythm_category = 'poly' | 149 rhythm_category = 'poly' |
150 break | 150 break |
151 return rhythm_category | 151 return rhythm_category |
152 | 152 |
153 def string_to_sequence(inputString): | |
154 return map(int,inputString.split(',')) | |
153 | 155 |
154 # The split_by_bar function seperates the score representation of rhythm by bar lines, | 156 # The split_by_bar function seperates the score representation of rhythm by bar lines, |
155 # resulting in a list representingbar-by-bar rhythm sequence, | 157 # resulting in a list representingbar-by-bar rhythm sequence, |
156 # e.g. rhythm = ['|',[ts1,td1,v1], [ts2,td2,v2], '|',[ts3,td3,v3],'|'...] | 158 # e.g. rhythm = ['|',[ts1,td1,v1], [ts2,td2,v2], '|',[ts3,td3,v3],'|'...] |
157 # rhythm_bybar = [ [ [ts1,td1,v1], [ts2,td2,v2] ], [ [ts3,td3,v3] ], [...]] | 159 # rhythm_bybar = [ [ [ts1,td1,v1], [ts2,td2,v2] ], [ [ts3,td3,v3] ], [...]] |