Mercurial > hg > syncopation-dataset
comparison Syncopation models/LHL.py @ 33:f5abd2e8cafe
update models
author | csong |
---|---|
date | Sun, 12 Apr 2015 23:51:05 +0100 |
parents | 5de1cb45c145 |
children | cc38b3047ed9 |
comparison
equal
deleted
inserted
replaced
32:273450d5980a | 33:f5abd2e8cafe |
---|---|
43 if get_rhythm_category(binarySequence, subdivisionSequence) == 'poly': | 43 if get_rhythm_category(binarySequence, subdivisionSequence) == 'poly': |
44 print 'Warning: LHL model detects polyrhythms so returning None.' | 44 print 'Warning: LHL model detects polyrhythms so returning None.' |
45 else: | 45 else: |
46 # set defaults | 46 # set defaults |
47 Lmax = 5 | 47 Lmax = 5 |
48 weightSequence = range(0,-Lmax,-1) | 48 weightSequence = range(0,-Lmax-1,-1) |
49 # if parameters are specified by users, check their validities and update parameters if valid | 49 # if parameters are specified by users, check their validities and update parameters if valid |
50 if parameters!= None: | 50 if parameters!= None: |
51 if 'Lmax' in parameters: | 51 if 'Lmax' in parameters: |
52 Lmax = parameters['Lmax'] | 52 Lmax = parameters['Lmax'] |
53 if 'W' in parameters: | 53 if 'W' in parameters: |