Reply by Clay S. Turner February 9, 20042004-02-09
Hello Roger,

I'm still not quite sure of what you are trying to do overall, but if I had
a block of just 256 samples sampled at 48000 samples per second and I wanted
to up the sampling rate by four for just this block, then I'd FFT the data
and then prepend and postpend 384 zeroes to the FFT's output, and then
inverse FFT the whole 1024 values. This works by uping the sample rate by 4
times (hence 256*4=1024) and forcing all of the new frequencies to have zero
content. Since there are 1024-256= 768 new bins, we divide them
symmetrically on both sides of the data - this maintains the realness of the
data.

Now if you are trying to upsample very long strings of data by processing in
data blocks, we need to do more. Because if we take the blocks of data and
string them end to end, we will have discontinuities at each of the
junctions. (187.5 Hz in this case) But fortunately this problem has been
solved and you can look at "overlap and add" and "overlap and save" methods.
Basically the FFT approach does circular convolution and you want linear
convolution. And these methods allow you to make linear convolution from an
inherently circular process.

Another approach to the interpolation is to simply insert three zeroes in
between each of the original data samples and then lowpass filter with a
filter whose cutoff is just below 1/4 of Nyquist which otherwise means set
the cutoff to be just below 1/8 of the sampling rate. Most practical systems
need some degree of oversampling to allow the filter to have a transition
from the pass band to the stop band. Even CDs sampled at 44.1kHz technically
can have frequencies up to 22.05kHz, but many designers will start the
cutoff around 20kHz, allowing for a 2.05kHz transition. As you make the
transition narrower, the impulse response of the filter lengthens.

Since the interpolation involves the filling in of zeroes followed by
lowpass filtering, we can look ahead and see a way around working with all
of the zeroed data. If we use recursive filters there is not much of a short
cut available, but if we use nonrecursive FIR filters, we can subdivide the
filter's impulse response into four subfilters (for your amount of
interpolation), and then for each original data value, we calculate 4 vector
dot products to generate the 4 values that come from the original 1 value.
These dot products are effectively FIR filters except we can use just one
data array along with 4 coef arrays, and the data array pointer only gets
bumped once at the end of the evaluation of the four filters. Here we never
directly worked with all of the zeroes except in concept where looking how
the zero padded data effects a giant transversal filter. So we see that only
1/4 of the coefs matter at any one time, so we divide the one big long
response into four different phased responses. This is a polyphase method.

I hope this clears up the interpolation problem. Earlier you stated
something about autocorrelation and stuff - what are you trying to do?

-- 
Clay S. Turner, V.P.
Wireless Systems Engineering, Inc.
Satellite Beach, Florida 32937
(321) 777-7889
www.wse.biz
csturner@wse.biz



"Roger Waters" <rogerwaters@fastmail.fm> wrote in message
news:6975d4b5.0402091129.6e1a3016@posting.google.com...
> Hello All! > > I'm sorry for the delay in replying. I was away recording some bass > parts for the new album coming out around August and was thus unable > to check the replies on comp.dsp. > > > Thanks you all very much for your replies. I've been doing some > reading, and your inputs have been very valuable. I've just started > on DSP and, as I'm sure you all would have been at some time, am > rather confused about some of the concepts. > > ANYWAY, I've been able to reach the following stage in tackling my > probem: > > I have the coefficients for a 4th order, 256 tap Butterworth filter > with a cutoff frequency of 24KHz. > > My input array is 256 samples long, and I want to perform a 4:1 > interpolation, resulting in a 1024 sample interpolated array. > > How do I calculate the interpolated values, i.e in C code how do I > perform the convolution? > > Thank you, > Roger > > P.S:by the way, my father's name wasn't Fletcher :)
Reply by Jerry Avins February 9, 20042004-02-09
Roger Waters wrote:

> Hello All! > > I'm sorry for the delay in replying. I was away recording some bass > parts for the new album coming out around August and was thus unable > to check the replies on comp.dsp. > > > Thanks you all very much for your replies. I've been doing some > reading, and your inputs have been very valuable. I've just started > on DSP and, as I'm sure you all would have been at some time, am > rather confused about some of the concepts. > > ANYWAY, I've been able to reach the following stage in tackling my > probem: > > I have the coefficients for a 4th order, 256 tap Butterworth filter > with a cutoff frequency of 24KHz. > > My input array is 256 samples long, and I want to perform a 4:1 > interpolation, resulting in a 1024 sample interpolated array. > > How do I calculate the interpolated values, i.e in C code how do I > perform the convolution? > > Thank you, > Roger > > P.S:by the way, my father's name wasn't Fletcher :)
I'm sure that in the end, you want to accomplish something in particular. If you start with that, rather than halfway through a method that may or may not be appropriate, you will probably have a more satisfactory conclusion. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by Roger Waters February 9, 20042004-02-09
Hello All!

I'm sorry for the delay in replying.  I was away recording some bass
parts for the new album coming out around August and was thus unable
to check the replies on comp.dsp.


Thanks you all very much for your replies.  I've been doing some
reading, and your inputs have been very valuable.  I've just started
on DSP and, as I'm sure you all would have been at some time, am
rather confused about some of the concepts.

ANYWAY, I've been able to reach the following stage in tackling my
probem:

I have the coefficients for a 4th order, 256 tap Butterworth filter
with a cutoff frequency of 24KHz.

My input array is 256 samples long, and I want to perform a 4:1
interpolation, resulting in a 1024 sample interpolated array.

How do I calculate the interpolated values, i.e in C code how do I
perform the convolution?

Thank you,
Roger

P.S:by the way, my father's name wasn't Fletcher :)
Reply by Jim Thomas February 9, 20042004-02-09
Jim Gort wrote:
> Clay: > > Yes and, sadly, though he was at very least a founding member and co-leader > of the band, and at best (this becomes a matter of opinion) *the* creative > force of the band, the balance of the band has gone on to use the name "Pink > Floyd" through 2 (I think) albums, and many many lucrative concerts.
I agree with your assessment regarding Waters' role in Floyd. My understanding is that he "wore out his welcome - with random precision." I don't think the other members appreciated what his obsessed-with-perfection mentality actually contributed, but it is obviously lacking in the post-Waters releases. -- Jim Thomas Principal Applications Engineer Bittware, Inc jthomas@bittware.com http://www.bittware.com (703) 779-7770 The secret to enjoying your job is to have a hobby that's even worse - Calvin's Dad
Reply by Jim Gort February 7, 20042004-02-07
Clay:

Yes and, sadly, though he was at very least a founding member and co-leader
of the band, and at best (this becomes a matter of opinion) *the* creative
force of the band, the balance of the band has gone on to use the name "Pink
Floyd" through 2 (I think) albums, and many many lucrative concerts. Roger,
on the other hand, has had an immensely less luctrative solo career. The
critical merits of Roger Water's solo work verse the work of the remainder
of "Pink Floyd" are arguable--most would agree, however, that neither part
was as good as the whole. However, the source of the bitterness is that,
according to Roger Waters, the immense difference in monetary success was
because he forsook the name "Pink Floyd", and the rest of the band did not.
I believe he has made several unsuccesful attempts (lawsuits, etc.) to
achieve monetary equality with the rest of the band since breakup, which
have occupied his time (apparently, this has recently taken away from his
time allocated to follow up on his comp.dsp post, putting me in a position
where I am arguing about his intent/wording).

I used to follow this fairly closely in the 90's, and I'm not sure how the
situation has changed in the last few years.

Jim

"Clay S. Turner" <CSTurner@WSE.Biz> wrote in message
news:s9bVb.14152$Rl4.5084@bignews5.bellsouth.net...
> > Hello Jerry, > > I figured Jim was making a reference to the artist "Roger Waters" of Pink > Floyd fame who dissolved the band a while back. More on him below: > > http://pinkfloydhyperbase.dk/who/w.htm > > > -- > Clay S. Turner, V.P. > Wireless Systems Engineering, Inc. > Satellite Beach, Florida 32937 > (321) 777-7889 > www.wse.biz > csturner@wse.biz > > > > "Jerry Avins" <jya@ieee.org> wrote in message > news:4024fa75$0$20054$61fed72c@news.rcn.com... > > POPP = point of personal privilege, from Roberts Rules of Order > > > > Clay S. Turner wrote: > > > > > "Jim Gort" <jgort@comcast.net> wrote in message > > > news:KcVUb.108474$U%5.556842@attbi_s03... > > > > > >>Fred: > > >> > > >>I wish Roger Waters could stop being bitter about the Floyd problem > > > > > > > > > cute! very cute! I was wondering if Jerry would make this connection. > > > > > > Clay > > > > > > > > > > > >>and jump > > >>in, but again my understanding is different. I will try to resolve my > take > > >>on it with yours (and others) below: > > > > Being a nerd (that's really knurd*, and I'm proud of it) and a social > > misfit (which is too bad), it went right by me. Roger Walters started > > this thread and is probably hiding from all the barrages it engendered, > > but who is Floyd? And what's the problem? > > > > Jerry > > _________________________ > > *"Drunk", spelled backwards. Those who, by studying instead of partying, > > upset the "curve" and reduced the party-goer's grades. Harvard, 1950s > > -- > > Engineering is the art of making what you want from things you can get. > > &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295; > > > > >
Reply by Clay S. Turner February 7, 20042004-02-07
Hello Jerry,

I figured Jim was making a reference to the artist "Roger Waters" of Pink
Floyd fame who dissolved the band a while back. More on him below:

http://pinkfloydhyperbase.dk/who/w.htm


-- 
Clay S. Turner, V.P.
Wireless Systems Engineering, Inc.
Satellite Beach, Florida 32937
(321) 777-7889
www.wse.biz
csturner@wse.biz



"Jerry Avins" <jya@ieee.org> wrote in message
news:4024fa75$0$20054$61fed72c@news.rcn.com...
> POPP = point of personal privilege, from Roberts Rules of Order > > Clay S. Turner wrote: > > > "Jim Gort" <jgort@comcast.net> wrote in message > > news:KcVUb.108474$U%5.556842@attbi_s03... > > > >>Fred: > >> > >>I wish Roger Waters could stop being bitter about the Floyd problem > > > > > > cute! very cute! I was wondering if Jerry would make this connection. > > > > Clay > > > > > > > >>and jump > >>in, but again my understanding is different. I will try to resolve my
take
> >>on it with yours (and others) below: > > Being a nerd (that's really knurd*, and I'm proud of it) and a social > misfit (which is too bad), it went right by me. Roger Walters started > this thread and is probably hiding from all the barrages it engendered, > but who is Floyd? And what's the problem? > > Jerry > _________________________ > *"Drunk", spelled backwards. Those who, by studying instead of partying, > upset the "curve" and reduced the party-goer's grades. Harvard, 1950s > -- > Engineering is the art of making what you want from things you can get. > &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295; >
Reply by Jerry Avins February 7, 20042004-02-07
POPP = point of personal privilege, from Roberts Rules of Order

Clay S. Turner wrote:

> "Jim Gort" <jgort@comcast.net> wrote in message > news:KcVUb.108474$U%5.556842@attbi_s03... > >>Fred: >> >>I wish Roger Waters could stop being bitter about the Floyd problem > > > cute! very cute! I was wondering if Jerry would make this connection. > > Clay > > > >>and jump >>in, but again my understanding is different. I will try to resolve my take >>on it with yours (and others) below:
Being a nerd (that's really knurd*, and I'm proud of it) and a social misfit (which is too bad), it went right by me. Roger Walters started this thread and is probably hiding from all the barrages it engendered, but who is Floyd? And what's the problem? Jerry _________________________ *"Drunk", spelled backwards. Those who, by studying instead of partying, upset the "curve" and reduced the party-goer's grades. Harvard, 1950s -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by Clay S. Turner February 7, 20042004-02-07



"Jim Gort" <jgort@comcast.net> wrote in message
news:KcVUb.108474$U%5.556842@attbi_s03...
> Fred: > > I wish Roger Waters could stop being bitter about the Floyd problem
cute! very cute! I was wondering if Jerry would make this connection. Clay
> and jump > in, but again my understanding is different. I will try to resolve my take > on it with yours (and others) below: > >
Reply by Jerry Avins February 6, 20042004-02-06
Jim Gort wrote:

> Fred: > > I wish Roger Waters could stop being bitter about the Floyd problem and jump > in, but again my understanding is different. I will try to resolve my take > on it with yours (and others) below: > > "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message > news:NI6dnTmEIq1Qh7ndRVn-hw@centurytel.net... > >>"Jim Gort" <jgort@comcast.net> wrote in message >>news:d9TUb.241192$na.396510@attbi_s04... >> >>>I think that, probably because of the attitude of my post, it was >> >>completely >> >>>misunderstood. >>> >>>My point was that the original poster's concern was not about how the > > .WAV > >>>file was created, it was about how to take what he had and convert to a >>>higher sample rate. Replies regarding how the original data was >>>sampled/filtered would only serve to confuse the question, and > > especially > >>>replies that mistook his concern about interpoltion filtration for a >> >>concern >> >>>about sampling filtration. >>> >> >>Jim, >> >>I had the same reaction that Jerry did re: >> >>"The reason I'm not doing a pure mathematical interpolation is that >>I've read that this leads to signal distortion by adding undesired >>spectral images to the signal at multiples of the original sampling >>rate." >> >>This appears to be an OP misunderstanding so Jerry and I both addressed > > it. > > My take on OP is that he does not have a misunderstanding, but he is > concerned about the effects of blind upsampling or linear interpolation to > create a higher sample rate but keep the content of his original data. At > this point, it may be your take also.... > > >>I said: >> >>Well ... sampling does that anyway so you'd have to tell me more about > > this > >>"distortion". Could it be that the interpolation filters aren't good > > enough > >>for the application? >>Jerry said: >> >>"Spectral images at multiples of the sample rate can be filtered out; >>they are irrelevant." > > > OK, here is my big problem with Jerry's reply vs. the OP's intent--"they can > be filtered out" was exactly what the OP knew, and was seeking a better > understanding of how this should be done--the interpolation filter. To say > it is "irrelevant" implies that there was a big misunderstanding of either > my take on this thread, or Jerry in his reply. My take was that Jerry was > considering the original data (which, as I have said, is what it is), and > not the upsampled data, which the OP wants to know the best way to create. > > Jim > > >>Fred
Jim, The OP was doing handstands to avoid creating what every sampling process does anyway: create images at multiples of the sampling frequency. If that were a problem, sampling wouldn't work. By "irrelevant", I meant "not a special concern in this application." Whatever reconstruction filter would be used at the higher sample rate, however the samples might have been obtained, will take care of images at multiples of the new sample rate. Those images are not artifacts of concern. Images at multiples of the old sample rate can still be filtered out because we know that if the original sampling were valid, there would be no signal in that part of the passband. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by Jerry Avins February 6, 20042004-02-06
Jim,

I think we're nit picking. By "The samples are valid only if ...", I
meant, and expected you and others to understand, that the samples
validly represent the original signal only if ..., and whatever the OP
wants, the array containing his interpolated values will not represent
all of the array handed to him unless he invents some values not 
directly given to extend the original array.

Take any series of integers, then write their first differences beneath
it. If you would you have us believe that the number of elements in the
lower line equals that of the line above, try it.

Jerry

Jim Gort wrote:

> Jerry: > > Whoa! Stop right there! OP wants to interpolate to a sample frequency > greater than the sampled data (my reading of this thread). Thus, he needs to > create data points that did not originally exist. Whoever did the original > sampling is way out of the picture. He just does not want to create > artifacts in the extended (upsampled) frequency domain by doing something > silly like only lineraly interpolating the data...., and thus is searching > for a proper interpolation filter (to filter out spectral images created at > higher frequencies than his original data in the higher sample-rate data) or > frequency domain way of accomplishing this, which has been the dedication of > the thread so far. What are you thinking, Jerry? Did I completely misread > this thread? > > And also, by definition, when the samples are what they are (obtained from > god-knows-where), they can't possibly contain any frequencies higher than > half the sample rate. All samples are "valid" (the data you have is what it > is)--they just may not have the spectral content and/or sample rate you > want. This is what the OP is trying to do something about. > > Jim > > "Jerry Avins" <jya@ieee.org> wrote in message > news:4022be43$0$8367$61fed72c@news.rcn.com... > >>Roger Waters wrote: >> >> >> > The reason I'm not doing a pure mathematical interpolation is that >> > I've read that this leads to signal distortion by adding undesired >> > spectral images to the signal at multiples of the original sampling >> > rate. >> >> >>Whoa! Stop right there! The samples are valid only if the sampled signal >>contains no frequencies as high as half the sample rate. (It's up to >>whoever does the sampling to ensure that that condition is met.) >>Spectral images at multiples of the sample rate can be filtered out; >>they are irrelevant. >> >>Jerry >>-- >>Engineering is the art of making what you want from things you can get. >>&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;