Add support for scipy polyphase resampling
See original GitHub issueDescription
Scipy 0.18 added a polyphase resampler. We could add support for this to core.resample
, eg:
y_res = librosa.resample(y, sr_old, sr_new, res_type='polyphase')
Potential complications
- This would up the version requirement for scipy from 0.13 to 0.18. We could potentially make this soft.
- We’d probably need to expose some new parameters for specifying the window.
- We’d need a good way to determine the
up
anddown
parameters. If the sampling rates are integer-valued, we can figure this out from the gcd. However, the current API does not require integer sampling rates, and I’d like to keep that as flexible as possible. Perhaps we could only require int-valued rates for this particular mode, and throw a warning / exception if fractional rates are provided.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
scipy.signal.resample_poly — SciPy v1.9.3 Manual
Resample x along the given axis using polyphase filtering. The signal x is upsampled by the factor up, a zero-phase low-pass FIR filter...
Read more >Computational Complexity of Polyphase Resampling
I am trying to find a good argument to prefer a polyphase resampling of Scipy over the FFT resampling method. In its documentation...
Read more >Polyphase Filters and Filterbanks - Kyle - DSPRelated.com
This post will walk through a reference implementation of both the downsampling polyphase filter and a downsampling polyphase filterbank using ...
Read more >Polyphase Resampling Functions - Intel
suffix are intended for fixed rational resampling factor and can provide faster speed. Functions without the suffix build universal resampling filter with ...
Read more >Resample uniform or nonuniform data to new fixed rate
y = resample( x , tx , fs ) uses a polyphase antialiasing filter to resample the signal at the uniform sample rate...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FWIW, Matlab’s resample also requires integer ratios. I wrote code to find ratios to get arbitrarily close to a resample ratio expressed as a float (I was resampling audio by factors very close to 1 to get time alignment between simultaneous recordings with unsynchronized sample clocks). See the first block (calculating the up/down factors P and Q) in:
https://labrosa.ee.columbia.edu/projects/skewview/rewrite_aligned_audio.m.html
DAn.
On Wed, May 17, 2017 at 10:47 AM, Brian McFee notifications@github.com wrote:
note: i wound up adding this in #859 primarily to give folks the option of having fast resampling in (i)cqt if they want it.n I opted to only implement integer rates, which are automatically reduced by GCD to minimize overhead.