def testStaffs(self): score = Score() settings = ASCIISettings() settings.omitEmpty = False score.drumKit = DrumKit.DrumKit() score.drumKit.addDrum(Drum.Drum("HiHat", "Hh", "x")) score.drumKit.addDrum(Drum.Drum("Crash", "Cr", "x")) counter = MeasureCount.counterMaker(4, 16) score.insertMeasureByIndex(16, counter=counter) score.insertMeasureByIndex(16, counter=counter) score.insertMeasureByIndex(16, counter=counter) score.addNote(NotePosition(0, 0, 0, 0), "x") score.addNote(NotePosition(0, 1, 0, 0), "y") score.addNote(NotePosition(0, 2, 0, 0), "z") score.formatScore(40) output = self.getOutput(score, settings) self.assertEqual(output, [ 'Tabbed with DrumBurp, a drum tab editor from www.whatang.org', '', 'Title : ', 'Artist : ', 'BPM : 120', 'Tabbed by : ', 'Date : ' + self.exportDate, '', 'Cr - Crash', 'Hh - HiHat', '', 'Cr|----------------|----------------|', 'Hh|x---------------|y---------------|', ' 1e+a2e+a3e+a4e+a 1e+a2e+a3e+a4e+a ', '', 'Cr|----------------|', 'Hh|z---------------|', ' 1e+a2e+a3e+a4e+a ', '', 'Tabbed with DrumBurp, a drum tab editor from www.whatang.org' ])
def testMultiMeasures(self): score = Score() settings = ASCIISettings() settings.omitEmpty = False score.drumKit = DrumKit.DrumKit() score.drumKit.addDrum(Drum.Drum("HiHat", "Hh", "x")) score.drumKit.addDrum(Drum.Drum("Crash", "Cr", "x")) counter = MeasureCount.counterMaker(4, 16) score.insertMeasureByIndex(16, counter = counter) score.insertMeasureByIndex(16, counter = counter) score.insertMeasureByIndex(16, counter = counter) score.addNote(NotePosition(0, 0, 0, 0), "x") score.addNote(NotePosition(0, 1, 0, 0), "y") score.addNote(NotePosition(0, 2, 0, 0), "z") output = self.getOutput(score, settings) self.assertEqual(output, ['Tabbed with DrumBurp, a drum tab editor from www.whatang.org', '', 'Title : ', 'Artist : ', 'BPM : 120', 'Tabbed by : ', 'Date : ' + self.exportDate, '', 'Cr - Crash', 'Hh - HiHat', '', 'Cr|----------------|----------------|----------------|', 'Hh|x---------------|y---------------|z---------------|', ' 1e+a2e+a3e+a4e+a 1e+a2e+a3e+a4e+a 1e+a2e+a3e+a4e+a ', '', 'Tabbed with DrumBurp, a drum tab editor from www.whatang.org'])
def _makeOldMeasure(self, lineData): self.counter = MeasureCount.counterMaker(int(lineData), len(self))
def testMake(self): count = MeasureCount.counterMaker(4, 16) self.assert_(isinstance(count, MeasureCount.MeasureCount)) self.assert_(count.isSimpleCount()) self.assertEqual(len(count), 16)