Page 1 of 1

Any Whittaker–Shannon Interpolation module?

Posted: Sat May 05, 2018 9:50 am
by Nowhk
Hi there,

I've a collection of 100 samples that describe a discrete signal (from 1hz to 40hz), and I'd like to plot a graph that show the analog/continuos-bandlimited signal after an ideal DAC.

Is there any Whittaker–Shannon Interpolation module out of the box that will already draw it?
Or somethings made by community in these years that emulate this?

Thanks

Re: Any Whittaker–Shannon Interpolation module?

Posted: Sat May 05, 2018 7:37 pm
by martinvicanek
Here is one for sample size power of two.

Re: Any Whittaker–Shannon Interpolation module?

Posted: Mon May 07, 2018 9:13 am
by Nowhk
martinvicanek wrote:Here is one for sample size power of two.

Thanks for the help and the fancy module :) Tried to edit the input signal with a sin. But it messes the graph, not sure why:

sine.png
sine.png (41.57 KiB) Viewed 9637 times

Here's the DSP code:

Code: Select all

streamin sr;
streamin freq;
streamout x;
float i=0;
x = sin1(i/sr);
i = i + sr/freq;


Schematic:
SincInterpolation_Sine.fsm
(10.04 KiB) Downloaded 864 times

Sometimes, it draw correctly :) Where's the bug? Thanks

Re: Any Whittaker–Shannon Interpolation module?

Posted: Mon May 07, 2018 9:28 am
by Nowhk
I think I've got it! I just need to retrigger the [F] SyncInterpolation module, so it propagates the changes ;)

Thanks boss!!!!