synthesizer-core-0.4.0.4: Audio signal processing coded in Haskell: Low level part

Synthesizer.Plain.Interpolation

Synopsis

Documentation

data T t y Source

interpolation as needed for resampling

func :: T t y -> t -> T y -> ySource

offset :: T t y -> IntSource

number :: T t y -> IntSource

zeroPad :: C t => (T t y -> t -> T y -> a) -> y -> T t y -> t -> T y -> aSource

constantPad :: C t => (T t y -> t -> T y -> a) -> T t y -> t -> T y -> aSource

cyclicPad :: C t => (T t y -> t -> T y -> a) -> T t y -> t -> T y -> aSource

Only for finite input signals.

extrapolationPad :: C t => (T t y -> t -> T y -> a) -> T t y -> t -> T y -> aSource

The extrapolation may miss some of the first and some of the last points

single :: C t => T t y -> t -> T y -> ySource

multiRelative :: C t => T t y -> t -> T y -> T t -> T ySource

All values of frequency control must be non-negative.

multiRelativeZeroPad :: C t => y -> T t y -> t -> T t -> T y -> T ySource

multiRelativeConstantPad :: C t => T t y -> t -> T t -> T y -> T ySource

multiRelativeCyclicPad :: C t => T t y -> t -> T t -> T y -> T ySource

multiRelativeExtrapolationPad :: C t => T t y -> t -> T t -> T y -> T ySource

The extrapolation may miss some of the first and some of the last points

multiRelativeZeroPadConstant :: (C t, C y) => t -> T t -> T y -> T ySource

multiRelativeZeroPadLinear :: (C t, C t y) => t -> T t -> T y -> T ySource

multiRelativeZeroPadCubic :: (C t, C t y) => t -> T t -> T y -> T ySource

constant :: T t ySource

Consider the signal to be piecewise constant, where the leading value is used for filling the interval [0,1).

linear :: C t y => T t ySource

Consider the signal to be piecewise linear.

cubic :: (C t, C t y) => T t ySource

Consider the signal to be piecewise cubic, with smooth connections at the nodes. It uses a cubic curve which has node values x0 at 0 and x1 at 1 and derivatives (x1-xm1)2 and (x2-x0)2, respectively. You can see how it works if you evaluate the expression for t=0 and t=1 as well as the derivative at these points.

piecewise :: C t y => Int -> [t -> t] -> T t ySource

functionSource

Arguments

:: C t y 
=> (Int, Int)

(left extent, right extent), e.g. (1,1) for linear hat

-> (t -> t) 
-> T t y 

with this wrapper you can use the collection of interpolating functions from Donadio's DSP library

data Margin Source

Instances

singleRec :: (Ord t, C t) => T t y -> t -> T y -> ySource

alternative implementation of single