1 #ifndef __InterpolatingSignalGenerator_h__
2 #define __InterpolatingSignalGenerator_h__
14 template<InterpolationMethod im = LINEAR_INTERPOLATION>
66 output.
setAll(points->read());
71 return points->read();
113 points->read(pts, 2);
123 points->read(pts, 2);
142 points->read(pts, 3);
152 points->read(pts, 3);
171 points->read(pts, 4);
181 points->read(pts, 4);
200 points->read(pts, 4);
210 points->read(pts, 4);
229 points->read(pts, 4);
239 points->read(pts, 4);
void setAll(const DataType value)
static void destroy(CircularBuffer< float > *obj)
static CircularBuffer< float > * create(size_t len)
This class contains useful methods for manipulating arrays of floats.
void setAll(float value)
Set all the values in the array.
Signal Generator that generates an arbitrary number of in-between points, interpolated between two (l...
CircularFloatBuffer * points
static void destroy(InterpolatingSignalGenerator< im > *obj)
float getPeriod()
Get period in samples.
void generate(FloatArray output)
void setPeriod(float period)
Set period in samples.
InterpolatingSignalGenerator(CircularFloatBuffer *points)
void set(float x)
Reset interpolator to a fixed value.
static InterpolatingSignalGenerator< im > * allocate(size_t len)
void update(float x)
Update the interpolator with a new reference point.
static InterpolatingSignalGenerator< im > * create()
static InterpolatingSignalGenerator< im > * create(size_t period)
static float cubic(float y0, float y1, float y2, float mu)
Three-point cubic interpolation of point between y1 and y2 ref: http://www.ebyte.it/library/codesnipp...
static float hermite(float y0, float y1, float y2, float y3, float mu, float tension=0, float bias=0)
static float linear(float y1, float y2, float mu)
static float cosine(float y1, float y2, float mu)
static float cubicSmooth(float y0, float y1, float y2, float y3, float mu)
T * getData()
Get the data stored in the Array.