musicaiz.algorithms.key_detection¶
- musicaiz.algorithms.key_detection(notes: List[musicaiz.structure.notes.Note], method: str = 'k-k')[source]¶
Algorithm description:
Count the number of eights of each pitch class.
Store the duration values in the durations dict (input arg. of this function).
3. Calculate the correlation between pitch weights and the durations (this in done with
_keys_correlations()
.) 4. The higher correlation is corresponds to the key.- Parameters
- durations (Dict[str, int]): _description_
method (str, optional): _description_. Defaults to “k-k”.
- Returns
- _type_: _description_