You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
This is a very minor thing, but some of our advanced examples now include sonification of pitch contours. For this, we rely on mir_eval to build the documentation site, as it has a tool that's nearly perfect for this job. https://craffel.github.io/mir_eval/#mir_eval.sonify.pitch_contour
There's a reasonable case to be made that a function like this belongs in librosa as well, and implementing it here would let us drop one dependency from the doc build environment.
Describe the solution you'd like
The pitch contour sonification in mir_eval is basically fine, though there are a couple of enhancements that would make it integrate better with librosa:
Graceful support of nan frequencies for unvoiced regions. This would make sonifying pyin outputs a bit easier in practice. Right now I hack around it by nan_to_num(f0), but this results in scoops at the onset/offset of voiced intervals. We could probably do better by replacing the cumsum for continuous f0 interpolation by a nancumsum.
Allowing the sampling grid to be specified by frame parameters (sr, hop_length) instead of explicit time measurements. This would align the API a bit better with the rest of the package.
Describe alternatives you've considered
We could also put these enhancements into mir_eval, but especially (2) doesn't seem relevant over there.
The text was updated successfully, but these errors were encountered:
Where would the function belong? librosa.core.audio ? Or is it time for a sonification/synthesis module that would also welcome clicks, tone, and chirp ?
Yeah, I was thinking core.audio with re-export at the top level. I know the top-level is feeling a bit bloated, but I'm not sure there's enough isolated functionality here to warrant a submodule.
I have a PR out on mir_eval to add nan support to pitch sonification, and that should roll out in the next release. As such, I'll remove this feature from the upcoming milestone, but we can reconsider in the future.
Is your feature request related to a problem? Please describe.
This is a very minor thing, but some of our advanced examples now include sonification of pitch contours. For this, we rely on mir_eval to build the documentation site, as it has a tool that's nearly perfect for this job. https://craffel.github.io/mir_eval/#mir_eval.sonify.pitch_contour
There's a reasonable case to be made that a function like this belongs in librosa as well, and implementing it here would let us drop one dependency from the doc build environment.
Describe the solution you'd like
The pitch contour sonification in mir_eval is basically fine, though there are a couple of enhancements that would make it integrate better with librosa:
nan
frequencies for unvoiced regions. This would make sonifying pyin outputs a bit easier in practice. Right now I hack around it bynan_to_num(f0)
, but this results in scoops at the onset/offset of voiced intervals. We could probably do better by replacing thecumsum
for continuous f0 interpolation by anancumsum
.Describe alternatives you've considered
We could also put these enhancements into mir_eval, but especially (2) doesn't seem relevant over there.
The text was updated successfully, but these errors were encountered: