samplerate = self.samplerate()
blocksize = self.win_s
stepsize = self.hop_s
- # parameters : None # TODO check with Piem "default" and "freq" in setup
# Set metadata
pitch.metadata = AnalyzerMetadata(id="aubio_pitch",
onsetrate.metadata = dict(onsetrateAttr.items() + commonAttr.items())
# Set Data
if len(self.onsets) > 1:
- #periods = [60./(b - a) for a,b in zip(self.onsets[:-1],self.onsets[1:])]
periods = 60. / numpy.diff(self.onsets)
onsetrate.data = periods
else:
bpm.metadata = dict(bpmAttr.items() + commonAttr.items())
# Set Data
if len(self.beats) > 1:
- #periods = [60./(b - a) for a,b in zip(self.beats[:-1],self.beats[1:])]
periods = 60. / numpy.diff(self.beats)
bpm.data = periods
else:
bpm.data = []
- return AnalyzerResultContainer([onsets, onsetrate, beats, bpm])
\ No newline at end of file
+ return AnalyzerResultContainer([onsets, onsetrate, beats, bpm])