Re: Which Scilab curve fitting approach is most applicable.
- From: Richard Owlett <rowlett@xxxxxxxxxxxxx>
- Date: Mon, 12 Nov 2007 20:05:54 -0600
Tim Wescott wrote:
pnachtwey wrote:
On Nov 12, 1:48 pm, Richard Owlett <rowl...@xxxxxxxxxxxxx> wrote:
Tim Wescott wrote:
Richard Owlett wrote:
Ultimate Goal:
Get a feel for pitfalls associated with changing sample rate.
Immediate Goal:
Create an artificial test signal which I intuitively understand.
Starting point:
Audio CD of text being read. It was originally recorded for cassette
tape distribution circa 1974. Identical Material later distributed on
CD. Assume from looking at FFT that original was likely low pass
limited at 8-10 kHz.
I've had glancing contact with using splines to do curve fitting. I
would like to use an algorithm which forces the fit to pass thru the
"known" points. I would then "sample" at 4 - 16 times the current 44.1
kHz.
Suggestions?
Splines are probably the right choice if you must pass through known
points, and Scilab provides spline functions.
Thanks for attempting to reply. My question evidently not phrased well.
Doing "help spline" in Scilab gives 10 hits - 5 apparently not relevant
as being 3 dimensional. I find the descriptive information on the others
to be excessively terse. And the examples don't give hints as which
functions are suitable for which problems.
Part of my problem is that I'm weak in math theory, so I'm looking for
something approaching a cookbook solution.
If I'm not mistaken a spline on data that's evenly spaced ends up being
a linear transformation
Not sure what "linear transformation" means in context. I would take it
as the math that describes a 2-port LTI network to which linear
superposition applies.
-- if the spline function in Scilab takes a
prohibitively long time you may be able to speed things up by
calculating & running the correct polyphase filter.
I've got LOTS of time and insignificant understanding of digital filters
- polyphase or not ;/ In fact upsampling by stuffing in 0's is so
counterintuitive to lead me to funny farm.- Hide quoted text -
- Show quoted text -
Do you just need to do cubic interpolation do you need to have smooth
derivatives at the knots? A cubic interpolation between 4 points is
easy. A cubic spline that makes sure the the first derivative is
smooth at knots and the second derivative is continuous. Splines may
be a liitle more that what you really need. They require solving a
system of equations. One for every point. I don't think that is
practical for music.
Ahhh. But I had stated I was working with someone reading text. None of the problems associated wide wide variation of pitch and/or source(s).
Cubic interpolation using 4 points is MUCHA spline is certainly overkill. But Pentiums and math packages make overkill easy:
easier.
Peter Nachtwey
and *FAST* ;}
ptd = 0:10; ptd = [ptd; sin(ptd)]; // make a 'signal' to smooth
pt = smooth(ptd, 0.05); // smooth it with splines
clf; // clear the current figure
plot2d(ptd(1,:), ptd(2,:)); // plot the 'jaggy' signal
plot2d(pt(1,:), pt(2,:), style = 2); // plot the smoothed signal
I had tried smooth() before. *APPARENTLY* unsuccessfully. I was wrong. It not only had worked, but had done exactly what I was trying to accomplish. It was an educationally worthwhile "failure" :>
The key was that the CD sampling rate was high enough compared to the signal's highest frequencies that I had had to use very high magnification to observe the difference between the raw data and the smoothed data. Tim's sample code was a better match for my problem than the sample in Scilab's Help system. Thank you.
.
- Follow-Ups:
- Re: Which Scilab curve fitting approach is most applicable.
- From: mnentwig
- Re: Which Scilab curve fitting approach is most applicable.
- References:
- Which Scilab curve fitting approach is most applicable.
- From: Richard Owlett
- Re: Which Scilab curve fitting approach is most applicable.
- From: Tim Wescott
- Re: Which Scilab curve fitting approach is most applicable.
- From: Richard Owlett
- Re: Which Scilab curve fitting approach is most applicable.
- From: pnachtwey
- Re: Which Scilab curve fitting approach is most applicable.
- From: Tim Wescott
- Which Scilab curve fitting approach is most applicable.
- Prev by Date: Re: Time scaling property of Fourier transform
- Next by Date: Re: OLA vs OLS w. r. t. overlap ratio
- Previous by thread: Re: Which Scilab curve fitting approach is most applicable.
- Next by thread: Re: Which Scilab curve fitting approach is most applicable.
- Index(es):
Relevant Pages
|
Loading