Skip to content

alsotang/abutils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

abutils

Installation

$ npm install abutils

Description

Utils for manipulate AudioBuffer.

There is already a package named audio-buffer-utils. In my opinion it has two flaws:

  • Too many compability considerations due to its age.
  • Dependent on Node.js modules(e.g. os module)

So I decide to write a brand new module.

  • This package only works in modern browser. I mean the lastest version of Google Chrome.
  • Don't depend on Node.js modules so you can use a variety of JS bundle tool.

usage

import { abutils } from 'abutils';

/** The repeat() method constructs and returns a new AudioBuffer which contains the specified number of copies of the AudioBuffer on which it was called, concatenated together. */
repeat(ab: AudioBuffer, times: number): AudioBuffer;

/** The slice() method extracts a section of a AudioBuffer and returns it as a new AudioBuffer, without modifying the original AudioBuffer. */
slice(ab: AudioBuffer, startSecond?: number, endSecond?: number): AudioBuffer;

/** clone a AudioBuffer */
clone(ab: AudioBuffer): AudioBuffer;

How to develop

  1. $ npm run dev
  2. Modify the sources and tests. Use Chrome to open test/index.html

About

utils for AudioBuffer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published