# Resampling necessary?

I have a file that is composed of n data records with a sample rate s. Each of these records has a duration d. Now due to postprocessing I have to change the duration to d=d/3, thus afterwards I'll have 3*n data records stored in the file. I'm now wondering if there is some signal processing rule that says that I also have to change the sampling rate as well (e.g. if the duration changes by 1/3 then the new sampling rate is s=s/3?). I don't want to up/down sample the signal, just change the duration of each record.

Resampling won't change the signal duration. It will change the sample rate and the number of samples. And, if you're lowering the sample rate, it will change the frequency components of the signal (if done right, with a proper filter, it will reduce the maximum possible frequency to half the new sample rate).

In order to make your signal "faster" or "slower" you need to use a different technique, time compression/expansion or simply time stretching. The basic idea there is to split the signal into blocks, estimate the frequency components in every block and then replace each block with a block of shorter or longer duration containing synthesized sinewaves of the same frequencies and phase shifts. It appears that currently there's no high quality method for time stretching signals by more than 30%. All cheap methods distort audio signals noticeably to the ear.

What is the problem that you are trying to solve? What's the nature of the sampled signal? Can you expand your question?

• Actually it was just a file format problem but your hint with the sample rate solved it. I was misled. – Durin Jul 4 '12 at 8:32

there is a misconception in your question: sampling consists in taking a snapshot of a signal at regular interval in time. each sample represents an instant in time, thus it has no concept of duration.

so if you have a signal sampled at a given rate s, if after processing you have generated n*3 samples, then you effectively resampled the signal at rate s*3.

EDIT: (reading the comment, i do better understand the problem)

the sample rate is defined by the number of samples per amount of time. so the duration and the number of samples are linked: if you decrease the duration by a factor x and decrease the number of sample by the same factor, the sample rate is the same.

so, in your specific case, the sample rate does not change if and only if you have m/3 samples in each data record of duration d/3.

• Sorry, I think I mixed something up! I have a signal sampled with a rate r, stored in n data records with a duration d and an amount of m signals per data record (EDF file format). – Durin Jul 4 '12 at 6:45
• that's quite different. you should edit the question to explain this. anyway, i edited my answer according to your comment. – Adrien Plisson Jul 4 '12 at 7:49