# wavearea

> Edit audio in textarea

Latest version **1.0.1** (published 2017-02-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install wavearea
pnpm add wavearea
yarn add wavearea
bun add wavearea
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-02-06 |
| First published | 2016-09-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | ΔY |
| Maintainers | dfcreative |
| Keywords | audio, web-audio, waveform, dsp |

## Links

- npm: https://www.npmjs.com/package/wavearea
- Repository: https://github.com/audio-lab/wavearea
- Homepage: https://github.com/audio-lab/wavearea#readme
- Issues: https://github.com/audio-lab/wavearea/issues
- npm.io page: https://npm.io/package/wavearea

## Dependencies (10)

- [raf](https://npm.io/package/raf.md) ^3.3.0
- [urify](https://npm.io/package/urify.md) ^2.1.0
- [sliced](https://npm.io/package/sliced.md) ^1.0.1
- [autosize](https://npm.io/package/autosize.md) ^3.0.17
- [decibels](https://npm.io/package/decibels.md) ^1.0.1
- [wavefont](https://npm.io/package/wavefont.md) ^1.1.4
- [just-extend](https://npm.io/package/just-extend.md) ^1.1.21
- [is-plain-obj](https://npm.io/package/is-plain-obj.md) ^1.1.0
- [insert-styles](https://npm.io/package/insert-styles.md) ^1.2.1
- [caret-position2](https://npm.io/package/caret-position2.md) ^1.0.2

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2017-02-06
- 1.0.0 — 2016-09-05

## README

# wavearea [![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)

Edit waveform/audio/other data in textarea.

[![wavearea](https://raw.githubusercontent.com/audio-lab/wavearea/gh-pages/preview.png "wavearea")](http://audio-lab.github.io/wavearea/)


## Usage

[![npm install wavearea](https://nodei.co/npm/wavearea.png?mini=true)](https://npmjs.org/package/wavearea/)

```js
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

<details><summary>**`const Wavearea = require('wavearea');`**</summary>

Get wave area constructor.

</details>
<details><summary>**`let wavearea = new Wavearea(textarea, options?);`**</summary>

Create waveform editor instance based off options:

```js
//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
```

</details>


## Related

> [wavefont](https://github.com/audio-lab/wavefont) — typeface for rendering data.<br/>
> [gl-waveform](https://github.com/audio-lab/gl-waveform) — wavearea used to paint waveform color based of spectral contents.<br/>

---
_Source: https://npm.io/package/wavearea · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
