pyampact.alignmentUtils.orio_simmx

pyampact.alignmentUtils.orio_simmx(M, D)[source]

Calculate an Orio&Schwartz-style (Peak Structure Distance) similarity matrix.

Parameters:
  • M (np.ndarray) – A binary mask where each column corresponds to a row in the output similarity matrix S. The mask indicates the presence or absence of MIDI notes or relevant features.

  • D (np.ndarray) – The regular spectrogram where the columns of the similarity matrix S correspond to the columns of D. This spectrogram represents the audio signal over time and frequency.

Returns:

The similarity matrix S, calculated based on the Peak Structure Distance between the binary mask M and the spectrogram D.

Return type:

np.ndarray