diff Syncopation models/basic_functions.py @ 21:b6daddeefda9

working on KTH
author csong <csong@eecs.qmul.ac.uk>
date Tue, 07 Apr 2015 23:16:13 +0100
parents b959c2acb927
children 2dbc09ca8013
line wrap: on
line diff
--- a/Syncopation models/basic_functions.py	Tue Apr 07 19:05:07 2015 +0100
+++ b/Syncopation models/basic_functions.py	Tue Apr 07 23:16:13 2015 +0100
@@ -118,6 +118,9 @@
 		print 'Error: a subdivision factor or metrical weight is not defined for the request metrical level.'
 	return H
 
+def calculate_time_span_ticks(numerator, denominator, ticksPerQuarter):
+	return (numerator * ticksPerQuarter *4) / denominator
+
 # # The get_subdivision_seq function returns the subdivision sequence of several common time-signatures defined by GTTM, 
 # # or ask for the top three level of subdivision_seq manually set by the user.
 # def get_subdivision_seq(timesig, L_max):