#The following is only executed if the pattern was not cached yet
#If uncertain if the cache works print cacheHash to see what is really different. This function is called more than once per pattern sometimes, which is correct.
#print (cacheHash)
oneMeasureInTicks=howManyUnits*whatTypeOfUnit
oneMeasureInTicks/=subdivisions#subdivisions is 1 by default. bigger values mean shorter durations, which is compensated by the user setting bigger howManyUnits manually.