def compute_note_models(self, pitch, aligned_notes, tonic_symbol):
tic = timeit.default_timer()
self.vprint(u"- Computing the note models for {0:s}".
format(pitch['source']))
aligned_notes_ = [IO.dict_keys_to_camel_case(n)
for n in deepcopy(aligned_notes)]
note_models, pitch_distribution, tonic = self._aligned_note_model.\
get_models(pitch['pitch'], aligned_notes_, tonic_symbol)
for note in note_models.keys():
note_models[note] = IO.dict_keys_to_snake_case(
note_models[note])
tonic = IO.dict_keys_to_snake_case(tonic['alignment'])
tonic['source'] = pitch['source']
# print elapsed time, if verbose
self.vprint_time(tic, timeit.default_timer())
return note_models, pitch_distribution, tonic
评论列表
文章目录