Mercurial > hg > syncopation-dataset
comparison Syncopation models/TMC.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 get_H, ceiling, get_min_timeSpan | 7 from BasicFuncs import get_H, ceiling, get_min_timeSpan |
8 | 8 |
9 # The get_metricity function calculates the metricity for a binary sequence with given sequence of metrical weights in a certain metrical level. | 9 # The get_metricity function calculates the metricity for a binary sequence with given sequence of metrical weights in a certain metrical level. |
10 def get_metricity(seq, H): | 10 def get_metricity(seq, H): |
11 metricity = 0 | 11 metricity = 0 |
12 for m in range(len(seq)): | 12 for m in range(len(seq)): |