# audiotoview

> npm install audiotoview

Latest version **1.1.21** (published 2023-02-23) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.21 |
| Published | 2023-02-23 |
| First published | 2023-02-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | tskz |
| Keywords | 前端, typescript, 音频可视化, canvas |

## Links

- npm: https://www.npmjs.com/package/audiotoview
- npm.io page: https://npm.io/package/audiotoview

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.1.21 (latest) — 2023-02-23
- 1.1.2 — 2023-02-23
- 1.1.1 — 2023-02-21
- 1.0.0 — 2023-02-21

## README

# Audiotoview is a JavaScript package to visualizes audio

## use

npm install audiotoview

### You need a target node, which will be used for visual presentation

```html
<div id="container"></div>
```

### options object

```javascript

options = {
    /**
     * 插入乐谱根元素
     */
    el: HTMLDivElement,
    /**
     * 音乐url链接
     */
    url: string
    /**
     * color 乐谱颜色,默认红色
     */
    color?: string
    /**
     * size 乐谱每格宽度,默认为1
     */
    size?: number
}
initToShow(options)
```

### Pass the configuration to audioToShow

```javascript
const el = document.getElementById('container')
const url =
    'https://dl.stream.qqmusic.qq.com/C4000004d30U0tsdrH.m4a?guid=5306109274&vkey=396BC7D7A2B9B22E14854BEC5D7FA7637553FA74D934FD77F9513EC0C42D9C34EC3A955680AFAC5780842B5A442C48BE693650E20F3B4AEA&uin=&fromtag=120032'
initToShow({ el, url, color: 'red', size: 2 })
```

### you will get it

![1676954972866](image/readme/1676954972866.png)

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