# @dongido/wave

> Audio visualizer library for javascript (20+ designs).

Latest version **1.2.8** (published 2021-05-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @dongido/wave
pnpm add @dongido/wave
yarn add @dongido/wave
bun add @dongido/wave
```

## 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.2.8 |
| Published | 2021-05-19 |
| First published | 2021-05-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 72 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 734 |
| Author | Austin Michaud |
| Maintainers | dongido |
| Keywords | audio, visualizer, wave, sound, music, canvas |

## Links

- npm: https://www.npmjs.com/package/@dongido/wave
- Repository: https://github.com/foobar404/Wave.js
- Homepage: https://foobar404.github.io/Wave.js/#/
- Issues: https://github.com/foobar404/Wave.js/issues
- npm.io page: https://npm.io/package/@dongido/wave

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 1.2.8 (latest) — 2021-05-19

## README

# This is a fork for [Wave.js](https://foobar404.github.io/Wave.js/#/).

> in this fork, I will try to add the fixes suggested by contributors to the original code which has been ignored for a while now

Audio visualizer library for javascript
(20+ designs).

[DOCUMENTATION](https://foobar404.github.io/Wave.js/#/docs)

[LIVE EXAMPLES](https://foobar404.github.io/Wave.js/#/)


# Installation 
 
<h3>Install With CDN</h3>

```html
<script src="https://cdn.jsdelivr.net/gh/foobar404/wave.js/dist/bundle.iife.js"></script>
```

<h3>Or NPM</h3>

```html
npm i @foobar404/wave
```

# Setup

<p>If your using npm use a default import to include wave.</p>

```javascript
import Wave from "@foobar404/wave"
```

<p>Create a new wave object.</p>

```javascript
var wave = new Wave();
```

<p>If your working with React, put the wave instance in state.</p>  

```javascript
let [wave] = useState(new Wave());
```


# Usage

<p>Call one of the three main function on the wave object, fromFile, fromStream, fromElement.</p>

```javascript
wave.fromElement("audio_element_id","canvas_id",{type:"wave"});
```

# Documentation

<p>View the current documentation for Wave.js <a href="https://foobar404.github.io/Wave.js/#/docs" target="_blank">here</a>.</p>

<h1>Example</h1>

```html
<html>

<head></head>

<body>

   <canvas id="output" height="500" width="500"></canvas>

   <script src="https://cdn.jsdelivr.net/gh/foobar404/wave.js/dist/bundle.iife.js"></script>
   <script>
      let wave = new Wave();

      navigator.mediaDevices.getUserMedia({
            audio: true
         })
         .then(function (stream) {
            wave.fromStream(stream, "output", {
               type: "shine",
               colors: ["red", "white", "blue"]
            });
         })
         .catch(function (err) {
            console.log(err.message)
         });
   </script>
</body>

</html>
```

# Contributor Workflow

<ol>
   <li>Fork Wave.js repo.</li>
   <li>Clone to your local computer.</li>
   <li>Run "npm i" in the root folder to install dependencies.</li>
   <li>Run "npm run test" to start the dev server and code watcher.</li>
   <li>Open the src folder and make a change to one of the src files.</li>
   <li>Save changes and refresh browser window to see changes.</li>
   <li>Push to remote branch and create a pull request to the Wave.js master branch.</li>
</ol>

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