Mercurial > hg > syncopation-dataset
changeset 30:d9ac6e0d1daf
mabe the bar able to take a time signature or string representation of a
time signature
author | christopherh <christopher.harte@eecs.qmul.ac.uk> |
---|---|
date | Sun, 12 Apr 2015 22:43:55 +0100 |
parents | 7a1730bbf15a |
children | e19c519e7e3f 273450d5980a |
files | Syncopation models/music_objects.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Syncopation models/music_objects.py Sun Apr 12 22:37:56 2015 +0100 +++ b/Syncopation models/music_objects.py Sun Apr 12 22:43:55 2015 +0100 @@ -145,7 +145,10 @@ self.tpq = ticksPerQuarter self.qpm = qpmTempo - self.timeSignature = timeSignature + if isinstance(timeSignature, basestring): + self.timeSignature = TimeSignature(timeSignature) + else: + self.timeSignature = timeSignature self.nextBar = nextBar self.prevBar = prevBar