Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resampling 250kHz signal to 192kHz #2

Closed
tomb18 opened this issue Oct 29, 2018 · 1 comment
Closed

Resampling 250kHz signal to 192kHz #2

tomb18 opened this issue Oct 29, 2018 · 1 comment

Comments

@tomb18
Copy link

tomb18 commented Oct 29, 2018

Hi,
I am not an expert in DSP. I use libraries like this one. Unfortunately the library I use does not have a resample capability.
This is the first one I can understand. It looks like it would work perfect for my usage.
So my first question is that can the FIR filter handle 1025 taps?
Second, what would be the performance like with 16384 samples in on a continuous basis?
Thanks. Tom

@ar1st0crat
Copy link
Owner

ar1st0crat commented Jan 18, 2019

Hi!
Sorry for the VERY late reply. Unfortunately I had absolutely no time for open source activity.

Anyway this lib couldn't really help solving your task, since its support of resampling is very basic so far. Resampling is quite difficult topic (at least for me) and deserves the separate library. There are some c++ examples AFAIK. 250/192 ratio requires more sophisticated algorithms than just simple interpolation/decimation provided by this lib.

UPD: as of Feb.2019 the bandlimited resampling became available:

var resampled = Operation.Resample(signal, (double)192 / 250)

As for filtering - recently I added the BlockConvolver class capable of OLA/OLS real-time processing. I think it will work well with 1025-size kernels and 16384-point chunks. It can be used like this:

FirFilter filter = new FirFilter(kernel);    // 1025-size kernel

var blockConvolver = OlsBlockConvolver.FromFilter(filter, 16384);

// processing loop:
// while new input sample is available
{
	var output = blockConvolver.Process(inputSample);
}

See also OnlineDemoForm code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants