Exemple #1
0
    def __init__(self,client):
        self.BPMfilt=[]
        self.client=client
        self.median=Median(N_MEDIAN_BPM,DEFAULT_BPM)
        for i in range(N_MEDIAN_BPM):
            bpm=MIN_BPM+ i*((MAX_BPM-MIN_BPM)/float(N_MEDIAN_BPM))
            self.median.process(bpm)
            
        self.bpm_last=DEFAULT_BPM
        self.average=DEFAULT_BPM
        self.average_fast=DEFAULT_BPM
        
        self.fact1,self.fact2=util.halfLifeFactors(20)
        self.fact1f,self.fact2f=util.halfLifeFactors(6)

        print "HLF",self.fact1,self.fact2
Exemple #2
0
 def __init__(self,samps_per_half_life,init_value):
     self.sum = init_value
     self.ptr = 0
     self.fact1,self.fact2=util.halfLifeFactors(samps_per_half_life)