Mercurial > hg > syncopation-dataset
comparison Syncopation models/music_objects.py @ 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 | 3a878de00d19 |
comparison
equal
deleted
inserted
replaced
29:7a1730bbf15a | 30:d9ac6e0d1daf |
---|---|
143 self.velocitySequence = rhythmSequence | 143 self.velocitySequence = rhythmSequence |
144 self.noteSequence = None | 144 self.noteSequence = None |
145 | 145 |
146 self.tpq = ticksPerQuarter | 146 self.tpq = ticksPerQuarter |
147 self.qpm = qpmTempo | 147 self.qpm = qpmTempo |
148 self.timeSignature = timeSignature | 148 if isinstance(timeSignature, basestring): |
149 self.timeSignature = TimeSignature(timeSignature) | |
150 else: | |
151 self.timeSignature = timeSignature | |
149 self.nextBar = nextBar | 152 self.nextBar = nextBar |
150 self.prevBar = prevBar | 153 self.prevBar = prevBar |
151 | 154 |
152 def get_note_sequence(self): | 155 def get_note_sequence(self): |
153 if self.noteSequence == None: | 156 if self.noteSequence == None: |