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

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)

src/k/a/kamaelia-HEAD/Sketches/JT/Jam/library/trunk/Kamaelia/Apps/Jam/Util/MusicTiming.py   kamaelia(Download)
        """
        self.beatLength = float(60)/self.bpm
        self.scheduleAbs("Beat", self.lastBeatTime + self.beatLength, 1)
 
    def updateBeat(self):
        self.lastBeatTime += self.beatLength
        # Call this function again when the next beat has passed
        self.scheduleAbs("Beat", self.lastBeatTime + self.beatLength, 1)
 
class SyncMaster(MusicTimingComponent):

src/k/a/kamaelia-HEAD/Sketches/JT/Jam/library/trunk/Kamaelia/Apps/Jam/Audio/SineSynth.py   kamaelia(Download)
        self.phase = 0
        self.lastSendTime = time.time()
        self.scheduleAbs("Send", self.lastSendTime + self.period)
 
    def generateSample(self, frequency, amplitude, phase):
 
                self.lastSendTime += self.period
                self.scheduleAbs("Send", self.lastSendTime + self.period)
 
            if not self.anyReady():

src/k/a/kamaelia-HEAD/Sketches/JT/Jam/library/trunk/Kamaelia/Apps/Jam/Audio/RTOutput.py   kamaelia(Download)
        self.period = float(self.internalBufferSize)/self.sampleRate
        self.lastSendTime = time.time()
        self.scheduleAbs("Send", self.lastSendTime + self.period)
        self.io.startStream()
 
                    # TODO: Maybe correct for the sleeping above here - test me
                    self.lastSendTime += self.period
                    self.scheduleAbs("Send", self.lastSendTime + self.period)
            else:
                self.pause()