Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(16)  |  Call(14)  |  Derive(0)  |  Import(2)

src/d/r/DrumBurp-HEAD/src/Data/Measure.py   DrumBurp(Download)
    def _readCounter(self, scoreIterator):
        counter = MeasureCount.MeasureCount()
        counter.read(scoreIterator)
        self.setBeatCount(counter)
 
    def read(self, scoreIterator):
        tracker = self._BarlineTracker(self, scoreIterator)
        self.counter = MeasureCount.MeasureCount()

src/d/r/DrumBurp-HEAD/src/GUI/QComplexCountDialog.py   DrumBurp(Download)
 
from Data.Beat import Beat
from Data.MeasureCount import MeasureCount
from ui_DBComplextCountDialog import Ui_complexCountDialog
 
    def getCount(self):
        mc = MeasureCount()
        for row in range(0, self.beatList.count()):
            item = self.beatList.item(row)
            index = item.data(Qt.UserRole).toInt()[0]

src/d/r/DrumBurp-HEAD/src/test/testMeasureCount.py   DrumBurp(Download)
    counter3 = Counter.Counter(Counter.BEAT_COUNT + "+")
    counter4 = Counter.Counter(Counter.BEAT_COUNT + "e+a")
    count = MeasureCount.MeasureCount()
    count.addBeats(Beat.Beat(counter1), 1)
    count.addBeats(Beat.Beat(counter2), 1)
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        count = MeasureCount.MeasureCount()
        count.read(iterator)
        self.assert_(count.isSimpleCount())
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        count = MeasureCount.MeasureCount()
        count.read(iterator, True)
        self.assert_(count.isSimpleCount())
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        count = MeasureCount.MeasureCount()
        count.read(iterator)
        self.assertFalse(count.isSimpleCount())
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        count = MeasureCount.MeasureCount()
        self.assertRaises(DBErrors.UnrecognisedLine, count.read, iterator)
 

src/d/r/DrumBurp-HEAD/src/test/testMeasure.py   DrumBurp(Download)
from Data.Measure import Measure
from Data.Counter import CounterRegistry
from Data.MeasureCount import MeasureCount
from Data.DBErrors import BadTimeError
from Data.DBConstants  import EMPTY_NOTE
    def setUp(self):
        self.measure = Measure(16)
        counter = self.reg.getCounterByName("16ths")
        mc = MeasureCount()
        mc.addSimpleBeats(counter, 4)
        self.measure.addNote(NotePosition(noteTime = 15, drumIndex = 1), "p")
        counter = self.reg.getCounterByName("8ths")
        mc = MeasureCount()
        mc.addSimpleBeats(counter, 3)
        self.measure.setBeatCount(mc)
        self.measure.addNote(NotePosition(noteTime = 15, drumIndex = 1), "p")
        counter = self.reg.getCounterByName("32nds")
        mc = MeasureCount()
        mc.addSimpleBeats(counter, 5)
        self.measure.setBeatCount(mc)
    def setUp(self):
        self.measure = Measure(16)
        counter = self.reg.getCounterByName("16ths")
        mc = MeasureCount()
        mc.addSimpleBeats(counter, 4)