@thi.ng/dsp
Version:
Composable signal generators, oscillators, filters, FFT, spectrum, windowing & related DSP utils
26 lines • 1.16 kB
TypeScript
import type { IProc } from "./api.js";
import { AProc } from "./aproc.js";
/**
* Higher order {@link IProc}. Constructs a new processor from given procs,
* which accepts a single input and passes it to each of the given processors,
* resulting in a tuple output (i.e. the input is processed in parallel (e.g.
* for multi-band processing), unlike w/ {@link serial}).
*
* @remarks
* In functional programming terms, the equivavelent is `juxt` (see
* thi.ng/compose)
*
* See {@link bounce} for combining results back into a single channel output.
*
* @param a -
* @param b -
*/
export declare function multiplex<T, A, B>(a: IProc<T, A>, b: IProc<T, B>): Multiplex<T, [A, B]>;
export declare function multiplex<T, A, B, C>(a: IProc<T, A>, b: IProc<T, B>, c: IProc<T, C>): Multiplex<T, [A, B, C]>;
export declare function multiplex<T, A, B, C, D>(a: IProc<T, A>, b: IProc<T, B>, c: IProc<T, C>, d: IProc<T, D>): Multiplex<T, [A, B, C, D]>;
export declare class Multiplex<A, B extends any[]> extends AProc<A, B> {
protected _procs: IProc<A, any>[];
constructor(procs: IProc<A, any>[]);
next(x: A): B;
}
//# sourceMappingURL=multiplex.d.ts.map