Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wavefile

Package Overview
Dependencies
Maintainers
1
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wavefile - npm Package Versions

1
1314

0.3.0

Diff

Changelog

Source

version 10.3.0 - 2020-01-20

Features

  • New resample methods: linear for linear interpolation and point for nearest point interpolation. Both methods use no LPF by default; others methods use LPF by default.

  • Resample with or without LPF using any interpolation method:

// Resample using cubic without LPF
wav.toSampleRate(44100, {method: 'cubic', LPF: false});
// Resample using cubic with LPF:
wav.toSampleRate(44100, {method: 'cubic', LPF: true});
// cubic and sinc use LPF by default
wav.toSampleRate(44100, {method: 'cubic'}); // will use LPF
  • You can now use any Typed Array as the output for getSamples():
// Will return the samples de-interleaved,
// packed in a array of Int32Array objects, one for each channel
samples = wav.getSamples(false, Int32Array);
// will return the samples de-interleaved,
// packed in a array of Int16Array objects, one for each channel
let samples = getSamples(false, Int16Array);
// will return the samples interleaved, packed in a Int16Array
let samples = getSamples(true, Int16Array);
rochars
published 0.2.0 •

Changelog

Source

version 10.2.0 - 2020-01-16

Change the sample rate.

New Features:

Change the sample rate with wav.toSampleRate();

Fixes:

  • Bug that prevented creating multi channel files using a array of typed arrays for samples
  • Type declaration for sample arrays now use more generic types to ease integration
rochars
published 0.1.0 •

Changelog

Source

version 10.1.0 - 2020-01-08

Add getSamples() to the API. It returns the samples packed in a Float64Array. If the file have more than one channel, samples will be returned de-interleaved in a Array of Float64Array objects, one for each channel. The method takes a optional boolean param interleaved, set to false by default. If set to true, samples will be returned interleaved. Default is de-interleaved.

// Both will return de-interleaved samples
samples = wav.getSamples();
samples = wav.getSamples(false);

// To get interleaved samples
samples = wav.getSamples(true);
rochars
published 0.0.8 •

rochars
published 0.0.7 •

rochars
published 0.0.6 •

rochars
published 0.0.5 •

rochars
published 0.0.3 •

rochars
published 0.0.2 •

rochars
published 0.0.1 •

1
1314
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc