Mercurial > hg > syncopation-dataset
comparison Syncopation models/TOB.py @ 2:031e2ccb1fb6
Added rhythm parser and parameter setter
author | Chunyang Song <csong@eecs.qmul.ac.uk> |
---|---|
date | Fri, 20 Mar 2015 18:28:08 +0000 |
parents | b2da092dc2e0 |
children | b959c2acb927 |
comparison
equal
deleted
inserted
replaced
1:b2da092dc2e0 | 2:031e2ccb1fb6 |
---|---|
2 Author: Chunyang Song | 2 Author: Chunyang Song |
3 Institution: Centre for Digital Music, Queen Mary University of London | 3 Institution: Centre for Digital Music, Queen Mary University of London |
4 | 4 |
5 ''' | 5 ''' |
6 | 6 |
7 from basic_functions import ceiling, find_divisor, get_min_timeSpan | 7 from BasicFuncs import ceiling, find_divisor, get_min_timeSpan |
8 | 8 |
9 # This function calculates the syncopation value for TOB model. | 9 # This function calculates the syncopation value for TOB model. |
10 def get_syncopation(seq): | 10 def get_syncopation(seq): |
11 syncopation = 0 | 11 syncopation = 0 |
12 bseq_ts = get_min_timeSpan(ceiling(seq)) # converting to binary and mininum time-span sequence | 12 bseq_ts = get_min_timeSpan(ceiling(seq)) # converting to binary and mininum time-span sequence |