wavearea

1.0.1 • Public • Published

wavearea experimental

Edit waveform/audio/other data in textarea.

wavearea

Usage

npm install wavearea

const Wavearea = require('wavearea');
const autosize = require('autosize');
 
let inputEl = document.body.appendChild(document.createElement('textarea'));
 
autosize(inputEl);
let wavearea = Wavearea(inputEl, options);
 
wavearea.push(newData);
wavearea.set(data);

API

**`const Wavearea = require('wavearea');`**

Get wave area constructor.

**`let wavearea = new Wavearea(textarea, options?);`**

Create waveform editor instance based off options:

//sample values
samples: data,
 
//number of samples per bar
group: 64,
 
//mode of forming bar from bar samples - might be used to show log mapping etc
reduce: (prev, curr) => Math.max(prev, curr),
 
//bars or dots
style: 'bars',
 
//show reflection of data
reflected: false

Related

wavefont — typeface for rendering data.
gl-waveform — wavearea used to paint waveform color based of spectral contents.

Package Sidebar

Install

npm i wavearea

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • dfcreative