Need private packages and team management tools?Check out npm Teams »

@thi.ng/dsp-io-wav

0.1.7 • Public • Published

dsp-io-wav

npm version npm downloads Twitter Follow

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

About

WAV file format generation. This is a support package for @thi.ng/dsp.

Status

ALPHA - bleeding edge / work-in-progress

Installation

yarn add @thi.ng/dsp-io-wav

Package sizes (gzipped, pre-treeshake): ESM: 502 bytes / CJS: 562 bytes / UMD: 630 bytes

Dependencies

API

Generated API docs

TODO

import { osc, sin } from "@thi.ng/dsp";
import { wavByteArray } from "@thi.ng/dsp-io-wav";
 
const FS = 48000;
 
// write 1 second 24bit mono WAV file of 440Hz sine
fs.writeFileSync(
  "sine-440.wav",
  wavByteArray(
    { sampleRate: FS, channels: 1, length: FS, bits: 24 },
    osc(sin, 440 / FS)
  )
);

Authors

Karsten Schmidt

License

© 2020 Karsten Schmidt // Apache Software License 2.0

Install

npm i @thi.ng/dsp-io-wav

DownloadsWeekly Downloads

74

Version

0.1.7

License

Apache-2.0

Unpacked Size

26.1 kB

Total Files

14

Last publish

Collaborators

  • avatar