audio_visualizer 0.1.1
audio_visualizer: ^0.1.1 copied to clipboard

Pure dart audio visualizer for android and ios

audio_visualizer #

This package transforms any integer stream into target frequency bands. Because this package just do a computation. So it should work on any platforms!

Credits #

For ui https://github.com/iamSahdeep/FlutterVisualizers

For frequency bands https://github.com/keijiro/unity-audio-spectrum

Getting Started #

You should look at example. It demostrates bar visualizer from microphone and music (pcm)

The example app running in Android

// Import package
import 'package:audio_visualizer/audio_visualizer.dart';

// Init visualizer
final visualizer = AudioVisualizer(
      windowSize: bufferSize,
      bandType: bandType,
      sampleRate: sampleRate,
      zeroHzScale: 0.05,
      fallSpeed: 0.08,
      sensibility: 8.0,
    );

// Do transform
StreamController<List<double>> audioFFT = ...
final result = visualizer.transform(samples, minRange: 0, maxRange: 255)
audioFFT.add(result)

// Use Stream to build widget
StreamBuilder(
    stream: audioFFT.stream,
    builder: (context, snapshot) {     
        final buffer = snapshot.data as List<double>;
        // render buffer somehow
8
likes
60
pub points
68%
popularity

Publisher

Unknown

Pure dart audio visualizer for android and ios

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache 2.0 (LICENSE)

Dependencies

complex, flutter

More

Packages that depend on audio_visualizer