Skip to main content
23 votes
Accepted

Python's $\tt resample$ vs $\tt resample\_poly$ vs $\tt decimate$

Downsampling and upsampling are operations that change the sampling rate of a signal. Each one of them is composed of two steps, changing the sampling rate and filtering. Usually, the amount of change ...
A_A's user avatar
  • 10.7k
18 votes

what is better: up- or downsampling?

In short: Upsampling: does/should not loose information (if done wisely), then safer, Downsampling: may loose information (if done unwisely), yet more computationally efficient. So if you compare ...
Laurent Duval's user avatar
8 votes

Is adding a mean point between every two points a valid way of upsampling?

That is called linear interpolation. Technically it is a valid method and just one method among several methods. It might not be a very good way as it is very simple and will not have very good ...
Justme's user avatar
  • 2,311
7 votes

what is better: up- or downsampling?

If you use a function like plot(x,y) the easiest way to display them on the same graph is to simply not resample any of them at all, but simply fill each x vector with proper values for each signal, ...
bobflux's user avatar
  • 201
7 votes

Resampling and removing high frequency noise?

Sample playback The basic idea of sample playback in musical applications is to keep track of each voice's playback position, to form an output sample by reading the source sample data at the ...
Olli Niemitalo's user avatar
6 votes

Resampling in frequency domain

Mirroring the spectrum would be trivial by multiplying with alternating +/-1. The OP mentioned in the comments under the question that it is to be done with resampling and filtering alone; a solution ...
Dan Boschen's user avatar
  • 52.3k
6 votes

How can the quality of a resampling algorithm be measured?

which resampling algorithm should I look at? Polyphase FIR is the way to go. It's actually pretty east to implement from scratch. Much easier than anything FFT related. And you get a lot of knobs to ...
Hilmar's user avatar
  • 45.6k
5 votes
Accepted

Computational Complexity of Polyphase Resampling

Rational Resampling 10 kHz -> 300 Hz is a rational resampling with relatively benign factors: $$ \frac{300\,\text{Hz}}{10\,\text{kHz}}=\frac{3\cdot10^2}{10^4}=\frac3{100}\text,$$ meaning that you'd ...
Marcus Müller's user avatar
4 votes

what is better: up- or downsampling?

Downsampling loses information. Upsampling is lossless when the factor is an integer (taken you also remember the factor), but some information is lost when the factor is not an integer. Upsampling ...
Willem's user avatar
  • 141
4 votes
Accepted

Convert 96 Khz to 48 Khz audio: is this simple downsampling method ok?

Since you have already properly low pass filtered the signal, then there is no risk in taking every other sample to complete the downsampling operation. If you were to create a low pass filter that ...
Dan Boschen's user avatar
  • 52.3k
4 votes
Accepted

How to implement sinc interpolation

"So do I only use the sinc functions for the samples that are closest to my x value?" Yes, when you are truncating. "Is this what is meant by "windowed sinc"?" Yes. The ...
Cedron Dawg's user avatar
  • 7,580
4 votes

draw sines at higher freq

For a given «visual accuracy», you need to sample the sine at a sufficient number of time-steps per period. At some point the display pixel density will be to low to render a sine accurately. For ...
Knut Inge's user avatar
  • 3,442
4 votes

Convert Sample Rate of IIR Filter Coefficients

There is no standard way of doing this. Your specific example is a "mild" bandpass filter with corner frequencies for about 32Hz and 7750 Hz. Unfortunately it's steeper than a first order ...
Hilmar's user avatar
  • 45.6k
4 votes
Accepted

How to align timeseries by decimating while preventing aliasing?

scipy.signal.decimate applies an anti-alias filter before downsampling. See the documentation. Alternatively, you can use the resample_poly function if you need ...
Jdip's user avatar
  • 6,300
4 votes
Accepted

Matlab "resample" function

First, a couple definitions I use: Interpolation is the process by which a signal is up-sampled (by inserting 0s, or "zero-stuffing"), then low-pass filtered. Decimation is the process by ...
Jdip's user avatar
  • 6,300
4 votes

Is adding a mean point between every two points a valid way of upsampling?

Consider this answer as a supplement material to the other answers provided. The upsampling method (mean point between every two points) we are talking about can be represented in the form of ...
SakSath's user avatar
  • 613
4 votes

Estimating spectrum with regularly missing samples from data

This answer to my related question on nonuniform sampling gives the formula for how the spectrum is distorted by this type of periodic non-uniform sampling. If you're more interested in simply ...
Gillespie's user avatar
  • 1,906
4 votes

Identifying incorrectly sampled recordings and finding their actual sampling rate

You could start by applying a k-means or PCA on the spectrum of the audio files. For the high frequencies, what I would expect from your description. The S recordings should have a sharp cutoff at ~...
Bob's user avatar
  • 2,383
3 votes
Accepted

Updating FFT algorithm accordingly when upsampling/resampling

Your whole problem is due to the fact that you have made a wrong assumption. Increasing the sample rate does not increase the frequency resolution. It will increase the Nyquist frequency (the highest ...
Pier-Yves Lessard's user avatar
3 votes
Accepted

What happens when I try to resample a speech recording from 8kHz to 16kHz?

The new samples are generated by interpolating between the original ones. Exactly how this is done will vary by implementation, but the most typical way would be to use a linear interpolating filter. ...
Jason R's user avatar
  • 24.7k
3 votes
Accepted

Resampling of signal with non uniform sampling frequency

Without specific constraints on the data/noise properties or sampling assumptions, smoothing splines could be helpful. Indeed, constraining the curve to pass exactly through the given points could be ...
Laurent Duval's user avatar
3 votes

Does Zero Padding Work as Advertised?

Zero-padding data for a longer FFT is equivalent to interpolation by a (periodic) Sinc kernel. Interpolation by a (periodic) Sinc kernel can reconstruct points between samples of a signal that was ...
hotpaw2's user avatar
  • 35.4k
3 votes

Resampling an audio signal

I prefer bandlimited reconstruction or Sinc interpolation (actually windowed Sinc) to create a new set of samples at an arbitrary sample rate (ratio does not need to be a rational fraction). See: ...
hotpaw2's user avatar
  • 35.4k
3 votes

What is the difference between cubic interpolation and cubic "Spline" interpolation?. How to use it for upsampling purpose?

For those seeking a more DSP/FPGA friendly solution, just substitute 'a' in first equation and rearrange to get: $$ \begin{array}{ll} C_0(x) = &-\frac{1}{6}x^3+\frac{1}{2}x^2-\frac{1}{3}x \\ C_1(x)...
nagos's user avatar
  • 31
3 votes

How do I resample an audio signal without altering its pitch?

Simple resampling would not work in your case. Resampling, while stretches/compresses the signal in the time domain, also does an inverse operation in the frequency domain. Some basic time stretching ...
Somesh Ganesh's user avatar
3 votes
Accepted

The condition in order to not lose information after upsampling and downsampling

The answer to this is to design a filter that perfectly passes the original spectrum and completely rejects the images that the decimation and interpolation process creates. Such a filter is not ...
Dan Boschen's user avatar
  • 52.3k
3 votes
Accepted

Is it possible to lose half the samples, and yet see the full spectrogram as the original signal?

To rephrase your question: Is there a process that halves the number of samples of a full-bandwidth signal without significantly affecting the appearance of the spectrogram, except for scaling of time ...
Olli Niemitalo's user avatar
3 votes

Absolute convergence of periodic sinc interpolation

I'm top-editing this since it answers the question directly. The sinc series is fundamentally a $C/x$, so you can extract as many absolutely convergent series out of it as you want, but what is left ...
Cedron Dawg's user avatar
  • 7,580
3 votes

Resampling and removing high frequency noise?

These are the formulas you want. There are different formulas whether you have an even or odd number of samples in your source wave definition. $x[n]$ is your source and $y_m$ is your output. Your $...
Cedron Dawg's user avatar
  • 7,580

Only top scored, non community-wiki answers of a minimum length are eligible