npm.io
1.0.1 • Published 9 years ago

wavearea

Licence
MIT
Version
1.0.1
Deps
10
Vulns
1
Weekly
0

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

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

Keywords