Exemplo n.º 1
0
 def __init__(self, input, params=None):
     task.__init__(self, input, params=params)
     self.shortlist = [0. for i in range(self.params.pitchsmooth)]
     if self.params.pitchmode == 'yin':
         tolerance = self.params.yinthresh
     elif self.params.pitchmode == 'yinfft':
         tolerance = self.params.yinfftthresh
     else:
         tolerance = 0.
     self.pitchdet = pitch(mode=self.params.pitchmode,
                           bufsize=self.params.bufsize,
                           hopsize=self.params.hopsize,
                           samplerate=self.srate,
                           omode=self.params.omode,
                           tolerance=tolerance)
Exemplo n.º 2
0
	def __init__(self,input,params=None):
		task.__init__(self,input,params=params)
		self.shortlist = [0. for i in range(self.params.pitchsmooth)]
		if self.params.pitchmode == 'yin':
			tolerance = self.params.yinthresh
		elif self.params.pitchmode == 'yinfft':
			tolerance = self.params.yinfftthresh
		else:
			tolerance = 0.
		self.pitchdet	= pitch(mode=self.params.pitchmode,
			bufsize=self.params.bufsize,
			hopsize=self.params.hopsize,
			samplerate=self.srate,
			omode=self.params.omode,
			tolerance = tolerance)
Exemplo n.º 3
0
	def __init__(self,input,params=None):
		task.__init__(self,input,params=params)
		self.shortlist = [0. for i in range(self.params.pitchsmooth)]
		if self.params.pitchmode == 'yinfft':
			yinthresh = self.params.yinfftthresh
		elif self.params.pitchmode == 'yin':
			yinthresh = self.params.yinthresh
		else:
			yinthresh = 0.
		self.pitchdet  = pitchdetection(mode=get_pitch_mode(self.params.pitchmode),
			bufsize=self.params.bufsize,
			hopsize=self.params.hopsize,
			channels=self.channels,
			samplerate=self.srate,
			omode=self.params.omode,
			yinthresh=yinthresh)
Exemplo n.º 4
0
    def __init__(self, input, output=None, params=None):
        """ open the input file and initialize arguments 
		parameters should be set *before* calling this method.
		"""
        task.__init__(self, input, params=params)
        self.opick = onsetpick(self.params.bufsize,
                               self.params.hopsize,
                               self.myvec,
                               self.params.threshold,
                               mode=self.params.onsetmode,
                               dcthreshold=self.params.dcthreshold,
                               derivate=self.params.derivate)
        self.olist = []
        self.ofunc = []
        self.maxofunc = 0
        self.last = 0
        if self.params.localmin:
            self.ovalist = [0., 0., 0., 0., 0.]
Exemplo n.º 5
0
	def __init__(self,input,output=None,params=None):
		""" open the input file and initialize arguments 
		parameters should be set *before* calling this method.
		"""
		task.__init__(self,input,params=params)
		self.opick = onsetpick(self.params.bufsize,
			self.params.hopsize,
			self.channels,
			self.myvec,
			self.params.threshold,
			mode=get_onset_mode(self.params.onsetmode),
			dcthreshold=self.params.dcthreshold,
			derivate=self.params.derivate)
		self.olist = [] 
		self.ofunc = []
		self.maxofunc = 0
		self.last = 0
		if self.params.localmin:
			self.ovalist   = [0., 0., 0., 0., 0.]