# poweraudio

> An innovative audio visualization library

Latest version **0.1.8** (published 2022-05-10) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support; large bundle; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.8 |
| Published | 2022-05-10 |
| First published | 2022-04-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 10.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 37 |
| Author | Benjamin Raymond |
| Maintainers | 7ph |

## Links

- npm: https://www.npmjs.com/package/poweraudio
- Repository: https://github.com/7PH/poweraudio
- Homepage: https://github.com/7PH/poweraudio#readme
- Issues: https://github.com/7PH/poweraudio/issues
- npm.io page: https://npm.io/package/poweraudio

## Dependencies (1)

- [pixi.js](https://npm.io/package/pixi.js.md) ^5.2.0

## Recent versions

- 0.1.8 (latest) — 2022-05-10
- 0.1.7 — 2022-04-11
- 0.1.6 — 2022-04-07
- 0.1.5 — 2022-04-02
- 0.1.4 — 2022-04-02
- 0.1.3 — 2022-04-02
- 0.1.2 — 2022-04-02
- 0.1.1 — 2022-04-02
- 0.1.0 — 2022-04-02

## README

# Power Audio

<img src="https://travis-ci.com/7PH/poweraudio.svg?branch=master">

An innovative audio visualization library

<img src="src/assets/banner.gif" style="width: 100%">

## Add PowerAudio to your project

#### Using npm

1. Add this library into your project
```bash
npm i --save poweraudio
```

2. Import the PowerAudio object from the lib
```javascript
// JS ES5
const PowerAudio = require('poweraudio');
// JS ES6/TypeScript
import { PowerAudio } from 'poweraudio';
```

#### Using direct web import

1. Import poweraudio.js in your html

```html
<script src="https://raw.githubusercontent.com/7PH/poweraudio/master/dist/poweraudio.js"></script>
```

2. That's it, you now have a global `PowerAudio` object registered to `window`

## Start a viz

To start a viz, it is as simple as instantiating a new PowerAudio.Viz object. You have to specify the following options:
- container: Query selector for where to put the visualization
- source: Audio source element (HTMLAudioElement)

```javascript
// Create audio element
const audio = new Audio('music.mp3');
// Alternatively: Get audio element from the DOM
//const audio = document.querySelector('audio');

// Start viz in container with id `viz`
const viz = new PowerAudio.Viz({
    container: '#viz',
    source: audio,
});

// Play audio
audio.play();

// Make the PowerCircle (the big circle at the center of the screen) do a backflip
viz.flip();
```

## Examples

Find examples below:
- [TypeScript, Full screen](https://github.com/7PH/poweraudio/tree/master/src/docs)

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