Agent skill

Flutter Soloud Scheduling

by alnitak in alnitak/flutter_soloud

Teaches sample-accurate audio scheduling in fluttersoloud with playClocked (sounds anchored to a running "physics time" clock) and playScheduled (absolute engine-time scheduling with sample-accurate…

MITAuto-check passedMobile

Install Flutter Soloud Scheduling

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

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

GitHub CLI
$ gh skill install alnitak/flutter_soloud flutter-soloud-scheduling --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-scheduling .claude/skills/flutter-soloud-scheduling && 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-scheduling
GitHub stars
424
Token cost
~2.9k tokens
SKILL.md length
1,099 words
Files
1
Skills in repo
14
Repo updated
First seen
Licence
MIT

At a glance

Teaches sample-accurate audio scheduling in fluttersoloud with playClocked (sounds anchored to a running "physics time" clock) and playScheduled (absolute engine-time scheduling with sample-accurate…

  • Works in 5 steps: Load the tick sounds once in initState… → Keep an accumulated ideal time:… → Mode clocked: playClocked(sound,… → …
  • The user asks for a metronome
  • SKILL.md covers Minimal example, The API shape, The metronome walkthrough and Render-Ahead Ring (ultra-low…, plus 3 more sections
  • Calls dart

What it does

Flutter Soloud Scheduling is an agent skill from alnitak/flutter_soloud. Teaches sample-accurate audio scheduling in fluttersoloud with playClocked (sounds anchored to a running "physics time" clock) and playScheduled (absolute engine-time scheduling with sample-accurate auto-stop), plus the clock helpers getEngineTime/getPlayheadTime/getOutputLatency/resetStreamTime and stopScheduled/fadeScheduled. Use when the user asks for a metronome, step sequencer, rhythm game, pre-computed music timeline/score, evenly spaced repeated SFX, or complains that periodic play() calls clump or drift.

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile, covering Cross-platform mobile apps. It works with Flutter. The repository describes itself as: Flutter low-level audio plugin using SoLoud C++ library and FFI. The licence is MIT.

When your agent uses it

  • The user asks for a metronome
  • Pre-computed music timeline/score
  • Evenly spaced repeated SFX
  • Complains that periodic play() calls clump

Example prompts

  • “physics time”
  • “Use the flutter-soloud-scheduling skill to teach sample-accurate audio scheduling in fluttersoloud with playClocked (sounds anchored to a running…”
  • “/flutter-soloud-scheduling”

Workflow steps

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

  1. Load the tick sounds once in initState (loadAsset), reuse the AudioSources.
  2. Keep an accumulated ideal time: physicsTime += interval per timer tick — never the timer's own firing time, which jitters.
  3. Mode clocked: playClocked(sound, physicsTime).
  4. Mode scheduled: anchor once on start — engineAnchor = getEngineTime() + 200ms — then playScheduled(sound, engineAnchor + physicsTime…
  5. On every (re)start or parameter change: zero physicsTime and call resetStreamTime(); re-anchor for scheduled mode. Without this, the first…

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 Scheduling loads about 2.9k tokens when it runs. Until then it costs about 136 tokens; SKILL.md has 1,099 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~136
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k

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). 1,099 words, ~2,898 tokens.

Download SKILL.mdSave it as .claude/skills/flutter-soloud-scheduling/SKILL.md (or your agent's skills folder).
name
flutter-soloud-scheduling
description
Teaches sample-accurate audio scheduling in flutter_soloud with playClocked (sounds anchored to a running "physics time" clock) and playScheduled (absolute engine-time scheduling with sample-accurate auto-stop), plus the clock helpers getEngineTime/getPlayheadTime/getOutputLatency/resetStreamTime and stopScheduled/fadeScheduled. Use when the user asks for a metronome, step sequencer, rhythm game, pre-computed music timeline/score, evenly spaced repeated SFX, or complains that periodic play() calls clump or drift.
version
1

Sample-accurate scheduling

Plain SoLoud.instance.play() starts a sound at the next output buffer boundary: everything launched within the same buffer starts at the exact same sample ("clumps"), and periodic sounds get an irregular rhythm that is a multiple of the buffer size (~46 ms at the default 2048-sample buffer / 44100 Hz). flutter_soloud fixes this with two scheduling APIs. Unlike audioplayers/just_audio, the unit of timing here is the audio clock in samples, not wall-clock timers — you do not compensate with Timer precision tricks; you pass a Duration and the engine places the start sample-accurately.

  • playClocked(sound, soundTime, ...) — you feed your own monotonically increasing "physics time"; the first call anchors it to the audio clock with a built-in ~2-output-buffer lead, subsequent calls are placed relative to that anchor. Best for evenly spaced, open-ended beats driven by your own loop (metronome, machine-gun fire, footsteps).
  • playScheduled(sound, atTime, {duration, ...}) — absolute time on the engine's own clock (getEngineTime()), schedulable arbitrarily far ahead; optional duration gives a sample-accurate auto-stop. Best for pre-computed timelines: scores, manifests, cutscenes.

Minimal example

Metronome with playClocked (the canonical pattern, from example/lib/metronome/metronome.dart):

dart
import 'dart:async';

import 'package:flutter_soloud/flutter_soloud.dart';

Future<void> main() async {
  await SoLoud.instance.init(); // default bufferSize 2048 is fine now
  final tick = await SoLoud.instance.loadAsset('assets/tick.wav');

  var physicsTime = Duration.zero;
  Timer.periodic(const Duration(milliseconds: 100), (_) {
    physicsTime += const Duration(milliseconds: 100);
    SoLoud.instance.playClocked(tick, physicsTime);
  });
}

Pre-computed timeline with playScheduled:

dart
final anchor = SoLoud.instance.getEngineTime() +
    const Duration(milliseconds: 200); // small lead
for (final note in score) {
  final atTime = anchor + note.offset;
  SoLoud.instance.playScheduled(note.source, atTime, duration: note.length);
}

The API shape

All methods are on the SoLoud singleton (SoLoud.instance), synchronous, and return immediately; scheduled/clocked variants return a SoundHandle like play().

dart
SoundHandle playClocked(
  AudioSource sound,
  Duration soundTime, {
  int busId = 0,
  double volume = 1,
  double pan = 0,
  double scale = 1,
  bool looping = false,
  Duration loopingStartAt = Duration.zero,
  Duration? loopingEndAt,
  int? loopingStartOffsetAt,
  int? loopingEndOffsetAt,
});
  • soundTime is your clock — any monotonically increasing Duration (accumulated ideal tick times, a game physics clock, ...). It is not engine time and not wall time.
  • First call after init/resetStreamTime() anchors your clock to the audio clock, leading by ~2 output buffers — that is the constant latency, by design.
  • If the clock goes backwards or jumps > ~2 s, the engine silently re-anchors. A time already in the past plays as soon as possible.
  • All clocked calls share one anchor — they must all use the same time base.
  • Divergence from other packages: no paused parameter (unlike play()), and you schedule by passing a time, not by pre-creating a paused player and calling resume later.
dart
SoundHandle playScheduled(
  AudioSource sound,
  Duration atTime, {
  Duration? duration,
  int busId = 0,
  double volume = 1,
  double pan = 0,
  double scale = 1,
  bool looping = false,
  Duration loopingStartAt = Duration.zero,
  Duration? loopingEndAt,
  int? loopingStartOffsetAt,
  int? loopingEndOffsetAt,
});
  • atTime is an absolute engine time (the getEngineTime() clock), not a delay and not your physics clock. No anchor, no ~2 s window — schedule as far ahead as you like. Past times play as soon as possible.
  • duration: if provided, the sound auto-stops at atTime + duration, atomically and sample-accurately (even durations shorter than one buffer). Keep the returned handle to cancel a still-pending sound with stop(handle).

Clock helpers:

dart
Duration getEngineTime();    // engine's global mix clock; time base for playScheduled/stopScheduled/fadeScheduled. Advances only while the device is mixing.
Duration getPlayheadTime();  // engine time of the sample currently reaching the device ("true output" clock). Equals getEngineTime() when the render-ahead ring is disabled (default) and on web.
Duration getOutputLatency(); // estimated output latency; Duration.zero when render-ahead is disabled and on web.
void resetStreamTime();      // reset the playClocked/play3dClocked anchor; the next clocked call re-anchors. Call when (re)starting a session.

Scheduled stop/fade (sample-accurate, pinned to the engine clock — unlike scheduleStop, which measures from call time and is buffer-quantized):

dart
void stopScheduled(SoundHandle handle, Duration atTime);
void fadeScheduled(
  SoundHandle handle,
  Duration atTime,
  double to,
  Duration time, {
  bool thenStop = false, // stop when the fade ends at atTime + time
});

Positional variant — same scheduling semantics as playClocked, 3D position/velocity instead of pan:

dart
SoundHandle play3dClocked(
  AudioSource sound,
  Duration soundTime,
  double posX, double posY, double posZ, {
  double velX = 0, double velY = 0, double velZ = 0,
  int busId = 0,
  double volume = 1,
  double scale = 1,
  bool looping = false,
  ... // same looping params as playClocked
});

(There is also a play3dScheduled, the 3D version of playScheduled, and Bus.playClocked / Bus.play3dClocked / Bus.playScheduled on mixing buses.)

Which one to use: play() for reactive one-shots (UI feedback, gunshots, music) where lowest latency wins; playClocked for evenly spaced beats from your own loop — fire-and-forget, no clock queries, the 2-buffer lead absorbs Timer jitter; playScheduled for pre-planned timelines — arbitrary lookahead and exact stops/fades, at the price of reading getEngineTime() and anchoring yourself.

The metronome walkthrough

example/lib/metronome/metronome.dart runs all three modes side by side (play, playClocked, playScheduled) with bufferSize: 4096 to make buffer-boundary clumping audible. The pattern to copy:

  1. Load the tick sounds once in initState (loadAsset), reuse the AudioSources.
  2. Keep an accumulated ideal time: physicsTime += interval per timer tick — never the timer's own firing time, which jitters.
  3. Mode clocked: playClocked(sound, physicsTime).
  4. Mode scheduled: anchor once on start — engineAnchor = getEngineTime() + 200ms — then playScheduled(sound, engineAnchor + physicsTime, duration: 20ms).
  5. On every (re)start or parameter change: zero physicsTime and call resetStreamTime(); re-anchor for scheduled mode. Without this, the first calls land against a stale anchor and play as soon as possible.

Render-Ahead Ring (ultra-low reactive latency)

When init(renderAheadFrames: >0) is passed on native platforms, the engine pre-mixes audio into a ring buffer:

  • Reactive play() and playScheduled() calls are retroactively remixed into the unconsumed section of the ring, achieving hardware-level latency (~11 ms with devicePeriodFrames: 512) even when bufferSize is set to 2048 or 4096.
  • SoLoud.instance.isRenderAheadEnabled: checks if the ring buffer is active.
  • SoLoud.instance.getPlayheadTime(): engine time of the sample currently reaching the device (use this to sync UI/animations to what the listener hears right now).
  • SoLoud.instance.getOutputLatency(): estimated hardware + ring latency.
Show full SKILL.md (418 more words)Show less

Traps

  • Times must be monotonically increasing for playClocked. Reusing a stale accumulator or starting a new session without resetStreamTime() makes ticks fire immediately (past times play ASAP) or triggers a silent re-anchor after a >2 s jump. Always zero your accumulator and call resetStreamTime() together.
  • Dart timers fire late. Never pass "now" or the timer's fire time as the scheduled time — accumulate ideal times and keep a lead. For playScheduled, anchor with ~100–200 ms of lead (getEngineTime() + 200ms); a voice can only be delayed, never advanced.
  • playClocked has a ~2 s lookahead limit. Gaps longer than ~2 s look like a clock jump and cause re-anchoring. For long-range scheduling use playScheduled.
  • Constant ~2-buffer latency with playClocked. Do not use it for sounds that must react to input (keypress → sound); that is what play() is for.
  • The engine clock only advances while the device is mixing. getEngineTime() freezes when output is stopped; a pending playScheduled voice keeps the device running. Scheduling against a stopped device is safe — the voice keeps its exact offset and starts counting down once the device runs.
  • No paused on clocked/scheduled variants. Models reaching for the audioplayers/just_audio "prepare then resume" pattern should instead pass the time; to cancel a pending scheduled sound, keep the handle and call stop(handle).
  • No Future, no completion callback per call. These are synchronous fire-and-forget; device-start failures cannot throw — listen to SoLoud.instance.audioDeviceStartFailures if that matters.
  • Voice limit still applies. Default max active voices is 16 (setMaxActiveVoiceCount); a dense sequencer scheduling many simultaneous notes must raise it.
  • playClocked does not support buffer streams with BufferingType.released (throws SoLoudBufferStreamCanBePlayedOnlyOnceCppException on second play), same as play.
  • Web: getPlayheadTime() equals getEngineTime() and getOutputLatency() returns zero (render-ahead ring is native-only); scheduling itself works on web.
  • getPlayheadTime vs getEngineTime: use getPlayheadTime() for "what is the listener hearing right now" (e.g. syncing visuals to a rhythm game); use getEngineTime() as the time base for scheduling.

More depth

  • Demo: example/lib/metronome/metronome.dart — all three modes, slider-driven BPM changes with correct reset/re-anchor.
  • Tests worth skimming for edge behavior: example/tests/tests/play_clocked.dart, example/tests/tests/play_scheduled.dart, example/tests/tests/latency_test.dart.
  • Render-ahead ring (init(renderAheadFrames: ...), native only) for combining large mix buffers with low reactive latency — see isRenderAheadEnabled in lib/src/soloud.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

Just SKILL.md in skills/flutter-soloud-scheduling of alnitak/flutter_soloud.

Open the folder on GitHubat commit 289697e

Compare with similar skills

Flutter Soloud Scheduling 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 Scheduling compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Flutter Soloud Scheduling this skillalnitak/flutter_soloud424—~2.9kAutomated safety check: PassMIT
Add Flutter Docusaurus Localematthiasn/lotti1.2k—~1.2kAutomated safety check: PassGPL-3.0
Tm Launcher DesignFar-Se/tabame371—~3.1kAutomated safety check: PassMIT
Mobile App UI Designceorkm/mobile-app-ui-design400—~2kAutomated safety check: PassNone
Marionette Flutter Drive Appleancodepl/marionette_mcp473—~11kAutomated safety check: PassApache-2.0
Flutter ScreenshotJustLookAtNow/pt_mate503—~511Automated safety check: PassMIT

Similar skills

  • Add, complete, or audit a locale across a Flutter application's ARB catalogs and a localized Docusaurus manual, including generated localization code, locale selectors, native platform declarations…

    1.2k GitHub stars~1.2k tokensUpdated today
    MobileAuto-check passed
  • Tm Launcher Design

    Far-Se/tabame

    Create or revise Tabame's Flutter launcher designs: frames, search bars, result rows, palettes, typography, and action dialogs.

    371 GitHub stars~3.1k tokensUpdated yesterday
    MobileAuto-check passed
  • Mobile App UI Design

    ceorkm/mobile-app-ui-design

    Design high-quality mobile app UI/UX screens, flows, and components.

    400 GitHub stars~2k tokensUpdated 3 mo ago
    MobileAuto-check passed
  • Marionette Flutter Drive App

    leancodepl/marionette_mcp

    Set up and drive a running Flutter app (debug or profile) with Marionette — an AI agent's hands and eyes for the app.

    473 GitHub stars~11k tokensUpdated yesterday
    MobileAuto-check passed
  • Flutter Screenshot

    JustLookAtNow/pt_mate

    Capture and show two Flutter UI screenshots for this project: one landscape/large-screen preview and one portrait/mobile preview, without using Flutter Web.

    503 GitHub stars~511 tokensUpdated 2 days ago
    MobileAuto-check passed
  • Flutter Init

    bear2u/my-skills

    A skill your agent uses when user wants to create a new Flutter project (Todo/Habit/Note/Expense/Custom domain) with Clean Architecture, Riverpod 3.0, Drift, and modern Flutter stack

    933 GitHub stars~2.5k tokensUpdated 3 mo ago
    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 today
    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 today
    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 today
    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 today
    Auto-check passed
  • 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.

    424 GitHub stars~2.5k tokensUpdated today
    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 today
    Auto-check passed

Works with

Categories

Questions about Flutter Soloud Scheduling

What does Flutter Soloud Scheduling do?

Teaches sample-accurate audio scheduling in fluttersoloud with playClocked (sounds anchored to a running "physics time" clock) and playScheduled (absolute engine-time scheduling with sample-accurate…. Flutter Soloud Scheduling is an agent skill from alnitak/flutter_soloud. Teaches sample-accurate audio scheduling in fluttersoloud with playClocked (sounds anchored to a running "physics time" clock) and playScheduled (absolute engine-time scheduling with sample-accurate auto-stop), plus the clock helpers getEngineTime/getPlayheadTime/getOutputLatency/resetStreamTime and stopScheduled/fadeScheduled.

When should I use Flutter Soloud Scheduling?

Flutter Soloud Scheduling fits situations like: the user asks for a metronome; pre-computed music timeline/score; evenly spaced repeated SFX; complains that periodic play() calls clump.

How do I install Flutter Soloud Scheduling in Claude Code?

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

How do I install Flutter Soloud Scheduling in Codex?

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

Can I use Flutter Soloud Scheduling 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-scheduling -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-scheduling, .gemini/skills/flutter-soloud-scheduling, .github/skills/flutter-soloud-scheduling and .opencode/skills/flutter-soloud-scheduling in your project.

What does Flutter Soloud Scheduling need to run?

Going by SKILL.md and its folder, Flutter Soloud Scheduling needs the command-line tools its instructions call (dart).

Does Flutter Soloud Scheduling 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 Scheduling 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 Scheduling use?

Flutter Soloud Scheduling 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 Scheduling use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Flutter Soloud Scheduling?

Skills that share tags, products or a category with Flutter Soloud Scheduling: Add Flutter Docusaurus Locale (matthiasn/lotti, 1.2k stars), Tm Launcher Design (Far-Se/tabame, 371 stars), Mobile App UI Design (ceorkm/mobile-app-ui-design, 400 stars) and Marionette Flutter Drive App (leancodepl/marionette_mcp, 473 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Flutter Soloud Scheduling?

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.