Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!d30g2000prg.googlegroups.com!not-for-mail
From:  "Ron N." <rhnlogic@yahoo.com>
Newsgroups: comp.dsp,comp.soft-sys.matlab
Subject: Re: Upsample/FIR/downsample
Date: Wed, 08 Aug 2007 23:14:37 -0700
Organization: http://groups.google.com
Lines: 58
Message-ID: <1186640077.739078.80910@d30g2000prg.googlegroups.com>
References: <1186195098.522019.204600@l70g2000hse.googlegroups.com>
NNTP-Posting-Host: 71.6.13.81
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Trace: posting.google.com 1186640078 10894 127.0.0.1 (9 Aug 2007 06:14:38 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 9 Aug 2007 06:14:38 +0000 (UTC)
In-Reply-To: <1186608487.883386.222870@o61g2000hsh.googlegroups.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: d30g2000prg.googlegroups.com; posting-host=71.6.13.81;
Xref: news.mathworks.com comp.dsp:226841 comp.soft-sys.matlab:423106



On Aug 8, 2:28 pm, robert bristow-johnson <r...@audioimagination.com>
wrote:
> On Aug 8, 4:21 pm, R.Lyons@_BOGUS_ieee.org (Rick Lyons) wrote:
>
>
>
> > On Wed, 08 Aug 2007 17:31:32 -0000, robert bristow-johnson
>
> > <r...@audioimagination.com> wrote:
>
> > >it depends on if you are ultimately upsampling (M<L) or downsampling
> > >(M>L).  that's why i said
>
> > >    h = fir1(N-1, min(1/M,1/L), kaiser(N,7.8562));
>
> ...
> >     Regarding the fir1's freq argument, when
> > I looked at mpowell's original decimation
> > code, and the interpolation code example in MATLAB's
> > hardcopy User's Manual, I originally thought
> > mpowell made an error in his
>
> >   h = fir1(N,1/M,kaiser(N+1,7.8562))
>
> > where M = 160.
>
> > It took me a while to figure it out (and it
> > surprised me a little), with MATLAB's formating
> > the fir1's freq argument should always be 1/160
> > REGARDLESS of whether your interpolating or
> > decimating!!
>
> i don't think i agree, Rick.  if you're UPsampling (switch the values
> for M and L around, M=147 and L=160) then you want the cutoff
> frequency to be Nyquist/L, no?
>
> e.g. converting a sound file from CD sampling rate (44.1 kHz) to DAT
> or DAW or "studio" sampling rate (48 kHz).

Wouldn't all the reconstruction filters on the
way between two sample rates have the same cutoff;
e.g. min(f1/2, f2/2) ?
In the upsampling case one wants to make sure that
any new samples don't introduce any new image
spectral content.  And in the downsampling case,
one wants to low pass filter first so that there
will be no content at or above Fs/2 of the
destination sample rate.

I prefer to think of resampling as reconstruction,
with all the polyphase and up/down intermediate rate
stuff as just (major) implementation optimizations.


IMHO. YMMV.
--
rhn A.T nicholson d.0.t C-o-M