@thi.ng/dsp
Version:
Composable signal generators, oscillators, filters, FFT, spectrum, windowing & related DSP utils
24 lines • 675 B
TypeScript
import type { IGen } from "./api.js";
/**
* Creates a new {@link IGen} using given `step` gen and `start` (default: 0)
* value, producing: `y(t) = step(t) + y(t-1)`.
*
* @remarks
* Note this is different to {@link sum}, which merely sums given argument gens
* for each step, but doesn't for a reduction like this gen.
*
* @example
* ```ts tangle:../export/addg.ts
* import { addG, constant } from "@thi.ng/dsp";
*
* console.log(
* addG(constant(1), 10).take(5)
* );
* // [ 10, 11, 12, 13, 14 ]
* ```
*
* @param step -
* @param start -
*/
export declare const addG: (step: IGen<number>, start?: number) => IGen<number>;
//# sourceMappingURL=addg.d.ts.map