DSPRelated.com
Forums

Need help for down sample and up sample of audio file

Started by moonnightingale March 15, 2011
I am having a wave file. I have to implement this operation on it. Since picture cannot be attached i am writing the steps

input speech signal-----> [ Low pass filter of 4 KHz----> Decimate the Signal by M] ----->[ interpolate the signal by L -----> Low pass filter of 4 KHz]----> output
I have read the wave file in matlab. Now i want to implement the above steps in matlab , i am stuck with it. Can any body help me in this regard.

Secondly i also want to adjust LPF in such a way that no aliasing occur at decimation stage and no images come at interpolation stage

Plz help me in this regard.thanks a lot
I am having a wave file. I have to implement this operation on it. Since picture cannot be attached i am writing the steps
>
>input speech signal-----> [ Low pass filter of 4 KHz----> Decimate the Signal by M] -----> [ interpolate the signal by L -----> Low pass filter of 4 KHz]----> output
>I have read the wave file in matlab. Now i want to implement the above steps in matlab , i am stuck with it. Can any body help me in this regard.
>
>Secondly i also want to adjust LPF in such a way that no aliasing occur at decimation stage and no images come at interpolation stage
>
>Plz help me in this regard.thanks a lot
Actually i was unable to upload question here.
Now i have uploaded complete question with picture here.
http://i285.photobucket.com/albums/ll60/moonnightingale/bookquestion4.jpg

I have solved part 1. But i am stuck with part 2.
If any body help me to solve part 2 in matlab, i will then able to solve others. So kindly spare some time and write code in matlab for second part
Thanks
Please tell us what code you have written till now in Matlab. Then we
can tell further.

- Pranav

On 3/13/11, moonnightingale wrote:
> I am having a wave file. I have to implement this operation on it. Since
> picture cannot be attached i am writing the steps
>
> input speech signal-----> [ Low pass filter of 4 KHz----> Decimate the
> Signal by M] ----->[ interpolate the signal by L -----> Low pass filter
> of 4 KHz]----> output
> I have read the wave file in matlab. Now i want to implement the above steps
> in matlab , i am stuck with it. Can any body help me in this regard.
>
> Secondly i also want to adjust LPF in such a way that no aliasing occur at
> decimation stage and no images come at interpolation stage
>
> Plz help me in this regard.thanks a lot
--
*
*

However beautiful the strategy, you should occasionally look at the results.

-- Winston Churchill
Excuse me. A correction:

outSig = resample(inSig, outSampleFreq, inSampleFreq);

On Fri, Mar 18, 2011 at 12:26 PM, Brant Jameson wrote:

> We need more information to help you. What is the original sampling
> frequency? What output sampling rate are you interested in achieving? Your
> answer might be as simple as:
>
> outSig = resample(inSig, inSampleFrequency, outSampleFrequency);
>
> -Brant
> On Wed, Mar 16, 2011 at 2:24 AM, pranav jawale wrote:
>
>> Please tell us what code you have written till now in Matlab. Then we
>> can tell further.
>>
>> - Pranav
>> On 3/13/11, moonnightingale wrote:
>> > I am having a wave file. I have to implement this operation on it. Since
>> > picture cannot be attached i am writing the steps
>> >
>> > input speech signal-----> [ Low pass filter of 4 KHz----> Decimate the
>> > Signal by M] ----->[ interpolate the signal by L -----> Low pass filter
>> > of 4 KHz]----> output
>> >
>> >
>> > I have read the wave file in matlab. Now i want to implement the above
>> steps
>> > in matlab , i am stuck with it. Can any body help me in this regard.
>> >
>> > Secondly i also want to adjust LPF in such a way that no aliasing occur
>> at
>> > decimation stage and no images come at interpolation stage
>> >
>> > Plz help me in this regard.thanks a lot
>> >
>> >
>>
>> --
>> *
>> *
>>
>> However beautiful the strategy, you should occasionally look at the
>> results.
>>
>> -- Winston Churchill
>>
>>
>> --
> Brant Jameson
> PhD Candidate
> UC Santa Cruz Computer Engineering
> http://people.ucsc.edu/~pheese
--
Brant Jameson
PhD Candidate
UC Santa Cruz Computer Engineering
http://people.ucsc.edu/~pheese
We need more information to help you. What is the original sampling
frequency? What output sampling rate are you interested in achieving? Your
answer might be as simple as:

outSig = resample(inSig, inSampleFrequency, outSampleFrequency);

-Brant

On Wed, Mar 16, 2011 at 2:24 AM, pranav jawale wrote:

> Please tell us what code you have written till now in Matlab. Then we
> can tell further.
>
> - Pranav
> On 3/13/11, moonnightingale wrote:
> > I am having a wave file. I have to implement this operation on it. Since
> > picture cannot be attached i am writing the steps
> >
> > input speech signal-----> [ Low pass filter of 4 KHz----> Decimate the
> > Signal by M] ----->[ interpolate the signal by L -----> Low pass filter
> > of 4 KHz]----> output
> >
> >
> > I have read the wave file in matlab. Now i want to implement the above
> steps
> > in matlab , i am stuck with it. Can any body help me in this regard.
> >
> > Secondly i also want to adjust LPF in such a way that no aliasing occur
> at
> > decimation stage and no images come at interpolation stage
> >
> > Plz help me in this regard.thanks a lot
> >
> > --
> *
> *
>
> However beautiful the strategy, you should occasionally look at the
> results.
>
> -- Winston Churchill
>
>
>

--
Brant Jameson
PhD Candidate
UC Santa Cruz Computer Engineering
http://people.ucsc.edu/~pheese
I am having a wave file. I have to implement this operation on it. Since picture cannot be attached i am writing the steps
>
>input speech signal-----> [ Low pass filter of 4 KHz----> Decimate the Signal by M] -----> [ interpolate the signal by L -----> Low pass filter of 4 KHz]----> output
>I have read the wave file in matlab. Now i want to implement the above steps in matlab , i am stuck with it. Can any body help me in this regard.
>
>Secondly i also want to adjust LPF in such a way that no aliasing occur at decimation stage and no images come at interpolation stage
>
>Plz help me in this regard.thanks a lot
>
>Hi,

Julius O. Smith, has written volumes on audio DSP, including oversampling, from an academic perspective. Oversampling is critical in producing accurate sounding digital models. Here's his resampling homepage at Stanford U.:

https://ccrma.stanford.edu/~jos/resample/

Here's some other papers on the topic that I found useful:

http://thesai.org/Downloads/Volume1No6/Paper_6-Efficient_Implementation_of_Sample_Rate_Converter.pdf

http://www.student.oulu.fi/~oniemita/dsp/deip.pdf

https://ccrma.stanford.edu/~jos/Interpolation/Interpolation.pdf

http://www.dspguru.com/dsp/faqs/multirate/decimation

Good Luck!
Michael B.