Closed alexarje closed 1 year ago
I have added the possibility to make harmonic/percussive source separation on waveforms. For this, you just need to specify a number of dimensions parameter corresponding to dim=1
(waveform) and dim=2
(spectrogram).
So if you want to render hpss with a waveform visualization you can write the following:
import musicalgestures
source_video = musicalgestures.MgVideo('path_to_your_video')
source_video.audio.hpss(dim=1)
It would be nice to make [https://librosa.org/doc/latest/generated/librosa.display.waveshow.html](harmonic/percussive waveforms) (in addition to the spectrograms currently implemented).
y_harm, y_perc = librosa.effects.hpss(y)
librosa.display.waveshow(y_harm, sr=sr, alpha=0.5, label='Harmonic')
librosa.display.waveshow(y_perc, sr=sr, color='r', alpha=0.5, label='Percussive')