def testSections(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.setSectionEnd(NotePosition(0, 1), True)
     score.setSectionTitle(0, "Section 1")
     score.formatScore(40)
     score.setSectionEnd(NotePosition(1, 0), True)
     score.setSectionTitle(1, "Section 2")
     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',
         '', 'Section 1', '~~~~~~~~~', '',
         'Cr|----------------|----------------|',
         'Hh|x---------------|y---------------|',
         '   1e+a2e+a3e+a4e+a 1e+a2e+a3e+a4e+a ', '', 'Section 2',
         '~~~~~~~~~', '', 'Cr|----------------|', 'Hh|z---------------|',
         '   1e+a2e+a3e+a4e+a ', '',
         'Tabbed with DrumBurp, a drum tab editor from www.whatang.org'
     ])
Exemple #2
0
 def testSections(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.setSectionEnd(NotePosition(0, 1), True)
     score.setSectionTitle(0, "Section 1")
     score.formatScore(40)
     score.setSectionEnd(NotePosition(1, 0), True)
     score.setSectionTitle(1, "Section 2")
     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',
                       '',
                       'Section 1',
                       '~~~~~~~~~',
                       '',
                       'Cr|----------------|----------------|',
                       'Hh|x---------------|y---------------|',
                       '   1e+a2e+a3e+a4e+a 1e+a2e+a3e+a4e+a ',
                       '',
                       'Section 2',
                       '~~~~~~~~~',
                       '',
                       'Cr|----------------|',
                       'Hh|z---------------|',
                       '   1e+a2e+a3e+a4e+a ',
                       '',
                       'Tabbed with DrumBurp, a drum tab editor from www.whatang.org'])