1.0.6 • Published 3 years ago

audio-flow v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

audio-flow

Interactive navigable audio visualization with two predefined visualizers.

This project is a remake of studiomikan's project, rewritten on js as a downloadable npm package, with optimizations and added features.

npm install audio-flow

BlockVisualizer

BlockVisualizer

Visualizer with dynamic adjust based on sceen and css with no performance downscaling caused by resize scaling effects

// <canvas ref="canvasWrapper" style="width: 100%; height: 90px" />

import { Howl, Howler } from 'howler'
import { BlockVisualizer, AudioSpectrum } from 'audio-flow'

const options = {
  blockWidth: 2,
  blockHeight: 2,
  marginh: 1,
  marginv: 1,
  colors: ['#b6b6b6'],
  canvas: this.$refs.canvasWrapper,
  playbackColors: ['#e66465', '#c75db5', '#9198e5'],
  playbackGradientStops: [0.3, 0.7]
}
const as = new AudioSpectrum(new BlockVisualizer(options))
const soundHowl = new Howl({
  src: 'audio source',
  autoplay: false
})

as.setAudio(this.soundHowl, Howler.ctx)

soundHowl?.play()
1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago