Signal Modifiers: Sample Level Operators

## ntrpol

ir **ntrpol** isig1, isig2, ipoint[, imin, imax]
kr **ntrpol** ksig1, ksig2, kpoint[, imin, imax]
ar **ntrpol** asig1, asig2, kpoint[, imin, imax]

### Description

Calculates the weighted mean value (i.e. linear interpolation) of two input signals

### Initialization

*imin* – minimum xpoint value (optional, default 0)

*imax* – maximum xpoint value (optional, default 1)

### Performance

*xsig1*, *xsig2* – input signals

*xpoint* – interpolation point between the two values

**ntrpol** opcode outputs the linear interpolation between two input values. *xpoint* is the distance of evaluation point from the first value. With the default values of *imin* and *imax*, (0 and 1) a zero value indicates no distance from the first value and the maximum distance from the second one. With a 0.5 value, **ntrpol** will output the mean value of the two inputs, indicating the exact half point between *xsig1* and *xsig2*. A 1 value indicates the maximum distance from the first value and no distance from the second one. The range of *xpoint* can be also defined with *imin* and *imax* to make its management easier.

These opcodes are useful for crossfading two signals.

### Author

Gabriel Maldonado

Italy

October, 1998 (New in Csound version 3.49)

Signal Modifiers: Sample Level Operators