You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to librosa
Hi , I am now doing some works on key detection and I noted that logarithm on pitch then get the chromagram can make the performance better.
The pitch_to_chroma function in Matlab can implement this, so i wonder if there's method i can implement log compression before getting the chromagram by
librosa.feature.chroma_stft
the math function is Γ𝛾𝑥≔log(1+𝛾|𝑥|)
Thanks!!
Dan Ellis
unread,
Apr 15, 2016, 9:29:35 AM4/15/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jason T., librosa
You can pass in a precomputed spectrogram to chroma_stft. So I think you want:
y, sr = librosa.load(wavfilename)
S = np.abs(librosa.stft(y))
chroma = librosa.feature.chroma_stft(S=np.log(1.0 + gain * S), sr=sr)