Filterbank Generation (synctoolbox.feature.filterbank)

synctoolbox.feature.filterbank.generate_filterbank(semitone_offset_cents: int = 0, Q: float = 25.0, stop: float = 2.0, Rp: float = 1.0, Rs: float = 50.0) dict[source]

Generate a multi-rate filterbank corresponding to different MIDI pitches. Used to create the pitch features in audio_to_pitch_features and the pitch onset features in audio_to_pitch_onset_features.

synctoolbox.feature.filterbank.generate_list_of_downsampled_audio(f_audio: ndarray) list[source]

Generates a multi resolution list of raw audio using downsampling

Parameters

f_audio (np.ndarray) – Input audio array (mono)

Returns

wav_ds (list) –

  • wav_ds[0]: Same as f_audio

  • wav_ds[1]: f_audio downsampled by the factor of 5, using a Kaiser window

  • wav_ds[2]: f_audio downsampled by the factor of 25, using a Kaiser window

synctoolbox.feature.filterbank.get_fs_index(midi_pitch: int) int[source]

Get the index of the filterbank used for midi_pitch