Skip to content

Latest commit

 

History

History

dsp

@thi.ng/dsp

npm version npm downloads Twitter Follow

This project is part of the @thi.ng/umbrella monorepo.

About

Assorted oscillators / waveform generators & DSP utils.

Partially 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.

Status

STABLE - used in production

Installation

yarn add @thi.ng/dsp

Dependencies

Usage examples

Several demos in this repo's /examples directory are using this package.

A selection:

poly-spline

Live demo | Source

webgl-ssao

screenshot

Live demo | Source

API

Generated API docs

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 ]

Authors

Karsten Schmidt

License

© 2015 - 2019 Karsten Schmidt // Apache Software License 2.0