Agent skill

flutter_soloud Audio Visualization

by alnitak in alnitak/flutter_soloud

Shows how to build audio visualizers in Flutter with flutter_soloud, using live FFT and wave data or offline waveform extraction, plus volume readings for level meters.

MITAuto-check passedMobile

Install flutter_soloud Audio Visualization

skills CLI
$ npx skills add alnitak/flutter_soloud --skill flutter-soloud-visualization -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install alnitak/flutter_soloud flutter-soloud-visualization --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/alnitak/flutter_soloud.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/flutter-soloud-visualization .claude/skills/flutter-soloud-visualization && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
flutter-soloud-visualization
GitHub stars
424
Token cost
~2.5k tokens
SKILL.md length
857 words
Files
3 (incl. references)
Skills in repo
14
Repo updated
First seen
Licence
MIT

At a glance

Shows how to build audio visualizers in Flutter with flutter_soloud, using live FFT and wave data or offline waveform extraction, plus volume readings for level meters.

  • Works in 2 steps: Live visualization — the engine emits… → Offline waveform reading —…
  • Building a real-time spectrum or waveform visualizer in a Flutter app
  • SKILL.md covers Minimal example (live FFT +…, Minimal example (offline…, The API shape and Traps, plus 2 more sections
  • Calls dart

What it does

flutter_soloud offers two unrelated ways to get drawable data, and the skill's main job is helping you choose. Live visualization turns on the analyzer with setVisualizationEnabled after init, then listens to the audioVisualizationEvents stream, which emits packets with wave and FFT arrays for the mixed output at mixer rate. Offline reading uses readSamplesFromFile or readSamplesFromMem to decode a file in a background isolate and return a fixed number of evenly spaced samples, suited to static previews in the style of SoundCloud.

The live stream cannot show the waveform of a file that has not played, and the offline readers cannot follow playback. The skill also mentions getApproximateVolume for VU meters, details the AudioVisualizationData fields and the VisualizationKind options, and includes minimal Dart examples for both paths. Reference files give a live painter recipe and an offline waveform guide. The excerpt is cut off in the live API section.

When your agent uses it

  • Building a real-time spectrum or waveform visualizer in a Flutter app
  • Showing a static waveform preview of an audio file
  • Adding a VU or level meter to a player
  • Making UI elements react to the audio being played

Example prompts

  • “Add a live FFT spectrum bar widget to my Flutter audio player using flutter_soloud.”
  • “Show a SoundCloud-style waveform preview for the mp3 the user picks.”
  • “Build a VU meter that reads the approximate volume while a sound plays.”
  • “Explain whether I need live visualization or offline waveform reading for my timeline view.”

Requirements

  • A Flutter project with the `flutter_soloud` package

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Live visualization — the engine emits AudioVisualizationData packets (waveform and/or FFT magnitudes of the mixed output) on a broadcast…
  2. Offline waveform reading — readSamplesFromFile / readSamplesFromMem decode an audio file in a background isolate and return a fixed number…

What it can do on your machine

Read from SKILL.md and the folder at commit 289697e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • dart

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

flutter_soloud Audio Visualization loads about 2.5k tokens when it runs, and up to ~4.6k if it reads all its reference files. Until then it costs about 106 tokens; SKILL.md has 857 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~106
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from alnitak/flutter_soloud at commit 289697e, republished under its MIT licence (© alnitak). 857 words, ~2,484 tokens.

Download SKILL.mdSave it as .claude/skills/flutter-soloud-visualization/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
flutter-soloud-visualization
description
Teaches flutter_soloud's two visualization paths — live FFT/wave data via setVisualizationEnabled + the audioVisualizationEvents stream, and offline waveform extraction via readSamplesFromFile/readSamplesFromMem (plus getApproximateVolume for VU meters). Use when the user asks for a spectrum/waveform visualizer, audio-reactive UI, VU/level meter, or a static waveform preview of an audio file.
version
1

Visualization in flutter_soloud

flutter_soloud has two unrelated ways to get drawable sample data out of the SoLoud engine:

  1. Live visualization — the engine emits AudioVisualizationData packets (waveform and/or FFT magnitudes of the mixed output) on a broadcast stream, at mixer rate. For real-time spectrum/waveform widgets.
  2. Offline waveform reading — readSamplesFromFile / readSamplesFromMem decode an audio file in a background isolate and return a fixed number of equally-spaced samples. For static waveform previews (SoundCloud-style).

Pick the right one. The live stream cannot give you the waveform of a not-yet-played file; the offline readers cannot follow playback.

Minimal example (live FFT + wave)

dart
import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter_soloud/flutter_soloud.dart';

class Visualizer extends StatefulWidget {
  const Visualizer({super.key});
  @override
  State<Visualizer> createState() => _VisualizerState();
}

class _VisualizerState extends State<Visualizer> {
  StreamSubscription<AudioVisualizationData>? _sub;
  AudioVisualizationData? _data;

  @override
  void initState() {
    super.initState();
    _init();
  }

  Future<void> _init() async {
    await SoLoud.instance.init(); // must complete first
    SoLoud.instance.setVisualizationEnabled(
      true,
      windowSize: 256,
      kind: VisualizationKind.waveAndFft,
      channel: VisualizationChannel.merged,
    );
    SoLoud.instance.setFftSmoothing(0.8);
    _sub = SoLoud.instance.audioVisualizationEvents.listen((data) {
      if (mounted) setState(() => _data = data);
    });
  }

  @override
  void dispose() {
    _sub?.cancel();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    final fft = _data?.fftData; // Float32List? of windowSize/2 magnitudes
    if (fft == null) return const SizedBox(height: 100);
    return CustomPaint(
      size: const Size(double.infinity, 100),
      painter: BarsPainter(fft),
    );
  }
}

class BarsPainter extends CustomPainter {
  BarsPainter(this.fft);
  final Float32List fft;

  @override
  void paint(Canvas canvas, Size size) {
    final barWidth = size.width / fft.length;
    final paint = Paint()..strokeWidth = barWidth * 0.8;
    for (var i = 0; i < fft.length; i++) {
      final h = size.height * fft[i].clamp(0.0, 1.0);
      canvas.drawLine(
        Offset(i * barWidth + barWidth / 2, size.height),
        Offset(i * barWidth + barWidth / 2, size.height - h),
        paint,
      );
    }
  }

  @override
  bool shouldRepaint(BarsPainter oldDelegate) => true; // data changes every event
}

Minimal example (offline waveform)

dart
import 'package:flutter/foundation.dart';
import 'package:flutter_soloud/flutter_soloud.dart';

// No SoLoud.instance.init() needed — the readers run their own decoder
// inside a `compute` isolate.
Future<Float32List> waveformBars(String path, Uint8List bytes, int bars) {
  if (kIsWeb) {
    // readSamplesFromFile does not exist on Web; feed it the bytes.
    return SoLoud.instance.readSamplesFromMem(bytes, bars, average: true);
  }
  return SoLoud.instance.readSamplesFromFile(path, bars, average: true);
}

A common choice for bars is the widget's pixel width (MediaQuery.sizeOf(context).width.toInt() * 4 in the plugin's example). Draw each value as a vertical line centered on the middle (see example/lib/wave_data/wave_data.dart).

The API shape

All on SoLoud.instance (singleton), imported from package:flutter_soloud/flutter_soloud.dart.

Live
  • void setVisualizationEnabled(bool enabled, {int windowSize = 256, VisualizationKind kind = VisualizationKind.waveAndFft, int channel = VisualizationChannel.merged}) — turns the analyzer on/off. Must be called after init(); throws SoLoudNotInitializedException otherwise, SoLoudCppException on bad params.
  • Stream<AudioVisualizationData> get audioVisualizationEvents — broadcast stream; emits one packet per mixer buffer while enabled.
  • AudioVisualizationData — channelCount, wave (List<Float32List>, one per channel, length windowSize, values [-1.0, 1.0]), fft (List<Float32List>, one per channel, length windowSize / 2, magnitudes [0.0, 1.0]). Either list is empty if its kind is disabled. waveData / fftData are nullable convenience getters for wave.first / fft.first.
  • VisualizationKind — real enum: wave, fft, waveAndFft.
  • VisualizationChannel — not an enum, an abstract final class of int constants: merged = -1 (downmix to mono), all = -2 (per-channel lists), or pass any 0-based channel index (0 = left). There is no VisualizationChannel.values; don't switch over it.
  • void setFftSmoothing(double smooth) — exponential decay on falling FFT bins, 0.0–1.0. Rise is never smoothed.
  • double getApproximateVolume(int channel) — instantaneous overall output volume per output channel (speaker). Poll it on a Timer for a VU meter. Returns 0 for invalid channels.
Offline
  • Future<Float32List> readSamplesFromFile(String completeFileName, int numSamplesNeeded, {double startTime = 0, double endTime = -1, bool average = false}) — native platforms only.
  • Future<Float32List> readSamplesFromMem(Uint8List buffer, int numSamplesNeeded, {double startTime = 0, double endTime = -1, bool average = false}) — everywhere; buffer is the encoded file bytes (mp3/wav/flac/ogg, from assets, File.readAsBytes(), or a network fetch).
  • Times are in seconds; endTime: -1 means "to end of file". average: true makes each returned value the mean of its time bucket instead of a single point sample — smoother waveforms, negligible cost.
Divergences from audioplayers / just_audio / web Audio API assumptions
  • No AudioPlayer-style per-sound analyser. Live visualization taps the whole mixed engine output (all voices, post-filter), not an individual track.
  • There is no onPositionChanged-style callback to hook FFT onto; you enable the analyzer once and consume a stream.
  • getApproximateVolume is per output channel, not per voice — there is no built-in per-sound level meter.
  • The offline readers don't require init() and don't need the sound loaded via loadMem/loadAsset first — they decode independently (asset bytes via rootBundle.load are fine).
Show full SKILL.md (387 more words)Show less

Traps

  • Silent stream. audioVisualizationEvents emits nothing until setVisualizationEnabled(true) is called, and calling it before init() completes throws. If your painter stays black, check enablement and init order first.
  • windowSize must be a power of two in 128–8192. Anything else fails with SoLoudCppException, not an assertion. FFT bin count is windowSize / 2, wave length is windowSize — don't assume they're equal.
  • Empty lists by kind. With kind: VisualizationKind.fft, data.wave is empty and data.waveData is null — null-check the convenience getters.
  • Every event is a fresh copy. The binding copies native memory into new Float32Lists per packet (Float32List.fromList), so retaining an event is safe and cheap to reason about — but don't hold a queue of them unbounded. Note: older docs mention wavePointer/fftPointer getters on AudioVisualizationData; they do not exist in this version of the package.
  • Event rate is tied to bufferSize, not frames. With the default bufferSize: 2048 at 44.1 kHz you get ~21 packets/s; the example uses init(bufferSize: 1024) (~43/s) for smoother visuals. Don't do heavy layout per event; a CustomPainter repaint is fine.
  • deinit() disables visualization (and deinit() is called when init() re-initializes). Re-enable after re-init.
  • readSamplesFromFile throws/is unavailable on Web — gate on kIsWeb and use readSamplesFromMem with the file bytes. On Web, readSamplesFromMem runs synchronously (no real isolate) and can jank the UI for large files.
  • Returned length ≠ numSamplesNeeded. The list is shorter if endTime overshoots the file duration. Size your painter from data.length, never from the requested count.
  • Asserts on time range: startTime >= 0 and endTime > startTime (unless -1). Passing a Duration won't compile — convert with duration.inMilliseconds / 1000.
  • Per-channel indexing is by mixer output channels. With channel: VisualizationChannel.all, data.wave[0] is left, [1] is right — the number of entries equals the engine's Channels setting at init(), not the file's channel count.

More depth

  • references/live_painter_recipe.md — full per-channel wave + FFT CustomPainter widget, adapted from the plugin example.
  • references/offline_waveform.md — full readSamplesFromMem flow with file picking, averaging, and the waveform painter.
  • Live demo: example/lib/audio_data/audio_data.dart (+ data_widget.dart). Offline demo: example/lib/wave_data/wave_data.dart.

Keeping this skill current

This skill ships inside the flutter_soloud package, so upgrading flutter_soloud can carry a newer revision of it than the copy installed in the project. To check, run:

sh
dart run flutter_soloud:skills --check

It reports the installed and bundled skill versions and exits non-zero when an update is available. Offer to update with dart run flutter_soloud:skills (which touches only the skills, never pubspec or build files).

© alnitak, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/flutter-soloud-visualization of alnitak/flutter_soloud.

  • SKILL.md
  • references/live_painter_recipe.md
  • references/offline_waveform.md

Open the folder on GitHubat commit 289697e

Compare with similar skills

flutter_soloud Audio Visualization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

flutter_soloud Audio Visualization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
flutter_soloud Audio Visualization this skillalnitak/flutter_soloud424—~2.5kAutomated safety check: PassMIT
Flutter Pub ReleaseMixinNetwork/flutter-plugins512—~1.3kAutomated safety check: PassMIT
Liquid Glass Widgetssdegenaar/liquid_glass_widgets711—~3.8kAutomated safety check: PassMIT
Flutter Bloc and Cubitandrewyng/context-hub14k—~998Automated safety check: PassMIT
Solidnank1ro/solid165—~3.1kAutomated safety check: PassMIT
Sync Cbl Docscbl-dart/cbl-dart152—~2kAutomated safety check: PassApache-2.0

Similar skills

  • Flutter Pub Release

    MixinNetwork/flutter-plugins

    Prepare and draft a pub.dev release for a package in the flutter-plugins monorepo.

    512 GitHub stars~1.3k tokensUpdated 1 mo ago
    MobileAuto-check passed
  • Liquid Glass Widgets

    sdegenaar/liquid_glass_widgets

    Mastery guide and architectural rules for liquidglasswidgets.

    711 GitHub stars~3.8k tokensUpdated yesterday
    MobileAuto-check passed
  • Flutter Bloc and Cubit

    andrewyng/context-hub

    Helps choose between Bloc and Cubit in Flutter and sets defaults for packages, lifecycle, widget binding and tests.

    14k GitHub stars~998 tokensUpdated 4 mo ago
    MobileAuto-check passed
  • Solid

    nank1ro/solid

    PRIORITY — read this skill FIRST before writing Dart code when pubspec.yaml declares solidannotations or solidgenerator.

    165 GitHub stars~3.1k tokensUpdated 1 mo ago
    MobileAuto-check passed
  • Sync Cbl Docs

    cbl-dart/cbl-dart

    Sync a Couchbase Lite for Dart documentation page with the official Couchbase Lite docs.

    152 GitHub stars~2k tokensUpdated 11 days ago
    MobileAuto-check passed
  • Flutter Expert

    FNOSP/FlyNarwhal

    A skill your agent uses when building cross-platform applications with Flutter 3+ and Dart.

    495 GitHub starsUsed in 2 repos~758 tokens
    MobileAuto-check passed

More from alnitak/flutter_soloud

All 14 skills in this repo
  • Flutter SoLoud Audio Filters

    alnitak/flutter_soloud

    Explains how to add and tune flutter_soloud's 13 audio filters at global, per-sound and mixing-bus level, including activation order and parameter fades.

    424 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • flutter_soloud Mixing Buses

    alnitak/flutter_soloud

    Teaches flutter_soloud mixing buses for routing groups of sounds through shared sub-mixes with collective volume and filters, such as separate music, SFX and UI sliders.

    424 GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • flutter_soloud Setup

    alnitak/flutter_soloud

    Walks through adding the flutter_soloud audio engine to a Flutter app, with per-platform setup, initialization, binary-size and logging options, and output device switching.

    424 GitHub stars~3.6k tokensUpdated yesterday
    Auto-check: notes
  • Teaches the push buffer-stream API of flutter_soloud for playing audio that arrives in chunks, such as icecast radio, WebSocket PCM feeds or streaming TTS, instead of a complete file.

    424 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Flutter Soloud 3D Audio

    alnitak/flutter_soloud

    Teaches positional (3D) audio in fluttersoloud — play3d/play3dClocked/play3dScheduled, listener position/orientation/velocity, per-source attenuation and Doppler, and the per-frame update pattern.

    424 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • flutter_soloud Idioms

    alnitak/flutter_soloud

    Explains the mental model for the flutter_soloud audio plugin: the SoLoud.instance singleton, AudioSource versus SoundHandle, synchronous play and platform limits.

    424 GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about flutter_soloud Audio Visualization

What does flutter_soloud Audio Visualization do?

Shows how to build audio visualizers in Flutter with flutter_soloud, using live FFT and wave data or offline waveform extraction, plus volume readings for level meters. flutter_soloud offers two unrelated ways to get drawable data, and the skill's main job is helping you choose. Live visualization turns on the analyzer with setVisualizationEnabled after init, then listens to the audioVisualizationEvents stream, which emits packets with wave and FFT arrays for the mixed output at mixer rate.

When should I use flutter_soloud Audio Visualization?

flutter_soloud Audio Visualization fits situations like: building a real-time spectrum or waveform visualizer in a Flutter app; showing a static waveform preview of an audio file; adding a VU or level meter to a player; making UI elements react to the audio being played.

How do I install flutter_soloud Audio Visualization in Claude Code?

Run `npx skills add alnitak/flutter_soloud --skill flutter-soloud-visualization -a claude-code`. Or copy the skill folder (skills/flutter-soloud-visualization in alnitak/flutter_soloud) into .claude/skills/flutter-soloud-visualization in your project. Claude Code loads it when a task matches its description.

How do I install flutter_soloud Audio Visualization in Codex?

Run `npx skills add alnitak/flutter_soloud --skill flutter-soloud-visualization -a codex`. Or copy the skill folder (skills/flutter-soloud-visualization in alnitak/flutter_soloud) into .agents/skills/flutter-soloud-visualization in your project. Codex loads it when a task matches its description.

Can I use flutter_soloud Audio Visualization in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alnitak/flutter_soloud --skill flutter-soloud-visualization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/flutter-soloud-visualization, .gemini/skills/flutter-soloud-visualization, .github/skills/flutter-soloud-visualization and .opencode/skills/flutter-soloud-visualization in your project.

What does flutter_soloud Audio Visualization need to run?

Going by SKILL.md and its folder, flutter_soloud Audio Visualization needs the command-line tools its instructions call (dart). Our summary lists: A Flutter project with the `flutter_soloud` package.

Does flutter_soloud Audio Visualization access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is flutter_soloud Audio Visualization safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does flutter_soloud Audio Visualization use?

flutter_soloud Audio Visualization is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does flutter_soloud Audio Visualization use?

About 2.5k tokens (SKILL.md is roughly 9.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.1k tokens, read only when the agent opens those files.

What are the alternatives to flutter_soloud Audio Visualization?

Skills that share tags, products or a category with flutter_soloud Audio Visualization: Flutter Pub Release (MixinNetwork/flutter-plugins, 512 stars), Liquid Glass Widgets (sdegenaar/liquid_glass_widgets, 711 stars), Flutter Bloc and Cubit (andrewyng/context-hub, 14k stars) and Solid (nank1ro/solid, 165 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains flutter_soloud Audio Visualization?

alnitak (a GitHub user) maintains it in alnitak/flutter_soloud, which has 424 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 6, 2026.

Source: alnitak/flutter_soloud on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.