This project is part of the @thi.ng/umbrella monorepo.
Assorted DSP utils collected & ported from other thi.ng projects (e.g. thi.ng/synstack). Currently only features various stateless & stateful wave generators / oscillators, which have been ported from thi.ng/vexed-generation.
ALPHA / WIP
yarn add @thi.ng/dsp
import * as dsp from "@thi.ng/dsp";
import { take } from "@thi.ng/transducers";
[...take(20, new dsp.Oscillator(dsp.mix(dsp.sin, dsp.rect), 1/20)]
// [ 0.5,
// 0.6545084971874737,
// 0.7938926261462366,
// 0.9045084971874737,
// 0.9755282581475768,
// 1,
// 0.9755282581475768,
// 0.9045084971874737,
// 0.7938926261462367,
// 0.654508497187474,
// 0.5000000000000003,
// -0.6545084971874735,
// -0.7938926261462365,
// -0.9045084971874737,
// -0.9755282581475768,
// -1,
// -0.9755282581475766,
// -0.9045084971874735,
// -0.793892626146236,
// -0.6545084971874731 ]
- Karsten Schmidt
© 2018 Karsten Schmidt // Apache Software License 2.0