Forge Audio Pool logo

Forge Audio Pool

Community
Nebulavenus
forge-audio-pool

Add fire-and-forget audio playback with a source pool and volume fading for click-free start/stop transitions.

Overview

PublisherNebulavenus
Repositoryforge-gpu
Skill nameforge-audio-pool
Stars
46
Forks
7
Bundled files
Instructions only
LicenseZlib
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by Nebulavenus on GitHub. Read the source before you install it.

Installation

Install the Forge Audio Pool AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Nebulavenus/forge-gpu/tree/main/.claude/skills/forge-audio-pool
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Nebulavenus/forge-gpu.git /tmp/forge-gpu
mkdir -p .claude/skills
cp -r /tmp/forge-gpu/.claude/skills/forge-audio-pool .claude/skills/forge-audio-pool
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Forge Audio Pool in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Forge Audio Pool on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Forge Audio Pool is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

forge-audio-pool

Add fire-and-forget sound effect playback using ForgeAudioPool and smooth volume transitions using the fade envelope on ForgeAudioSource. Based on Audio Lesson 02.

When to use

  • Playing the same sound multiple times with overlap (polyphony)
  • One-shot sound effects that should auto-clean-up when finished
  • Starting or stopping sounds without audible clicks (fade-in / fade-out)
  • Ambient loops that toggle smoothly with a volume ramp

Source pool pattern

c
#include "audio/forge_audio.h"

/* In app_state */
ForgeAudioPool pool;
ForgeAudioBuffer sfx_buffer;

/* In SDL_AppInit */
forge_audio_pool_init(&pool);
forge_audio_load_wav("assets/audio/impact.wav", &sfx_buffer);

/* Fire-and-forget: each call allocates a new slot (up to 32) */
int slot = forge_audio_pool_play(&pool, &sfx_buffer, 1.0f, false);
if (slot < 0) {
    SDL_Log("Pool full — sound dropped");
}

/* In SDL_AppIterate — mix all active sources, reclaim finished slots */
SDL_memset(scratch, 0, samples * sizeof(float));
forge_audio_pool_mix(&pool, scratch, frames_needed);

/* Stop everything */
forge_audio_pool_stop_all(&pool);

The pool scans for the first slot with playing == false. Non-looping sources auto-stop at buffer end; the slot is then reusable by the next pool_play().

Fade envelope pattern

c
/* Fade fields on ForgeAudioSource (initialized by forge_audio_source_create):
 *   fade_volume = 1.0  (current multiplier)
 *   fade_target = 1.0  (destination)
 *   fade_rate   = 0.0  (change per second, 0 = no fade) */

/* Start a fade to any target */
forge_audio_source_fade(src, 0.5f, 2.0f);  /* fade to 50% over 2 seconds */

/* Convenience: fade in from silence (sets fade_volume=0, starts playback) */
forge_audio_source_fade_in(src, 0.5f);

/* Convenience: fade out to zero (auto-stops when complete) */
forge_audio_source_fade_out(src, 1.0f);

/* MUST call once per frame to advance the ramp */
forge_audio_source_fade_update(src, dt);

The fade multiplier is applied on top of volume * pan during forge_audio_source_mix(). Default fade_volume=1.0 means existing code from Lesson 01 behaves identically.

Combining pool + fade

For pool sources that need fade control, get the source pointer after play:

c
int slot = forge_audio_pool_play(&pool, &buffer, 1.0f, true);
if (slot >= 0) {
    ForgeAudioSource *src = forge_audio_pool_get(&pool, slot);
    forge_audio_source_fade_in(src, 0.3f);
}

/* Update fades on all pool sources each frame */
for (int i = 0; i < FORGE_AUDIO_POOL_MAX_SOURCES; i++) {
    if (pool.sources[i].playing) {
        forge_audio_source_fade_update(&pool.sources[i], dt);
    }
}

Ambient loop with fade toggle

For a single looping source managed outside the pool (direct fade control):

c
/* In app_state */
ForgeAudioSource ambient;
bool ambient_active;

/* Toggle on key press */
if (ambient_active) {
    forge_audio_source_fade_out(&ambient, fade_duration);
    ambient_active = false;
} else {
    if (!ambient.playing) forge_audio_source_reset(&ambient);
    forge_audio_source_fade_in(&ambient, fade_duration);
    ambient_active = true;
}

Common mistakes

  • Forgetting fade_update — The fade does not advance automatically. Call forge_audio_source_fade_update(src, dt) once per frame for every source that might be fading.
  • Calling fade_update per mix call — Call it per frame, not per mix invocation. The rate is in units per second, scaled by dt.
  • Not zeroing the mix buffer — forge_audio_pool_mix() is additive. Always memset(out, 0, ...) before the first mix call each frame.
  • Ignoring pool_play return value — Returns -1 when full. Decide whether to drop the sound or steal an existing slot.

API reference

FunctionPurpose
forge_audio_pool_initZero all 32 slots
forge_audio_pool_playPlay buffer in first idle slot → index or -1
forge_audio_pool_getGet source pointer at index → ForgeAudioSource* or NULL
forge_audio_pool_mixMix active sources, reclaim finished
forge_audio_pool_stop_allStop everything
forge_audio_pool_active_countCount of playing sources
forge_audio_source_fadeStart fade toward target over duration
forge_audio_source_fade_in0→1 fade, starts playback
forge_audio_source_fade_outCurrent→0 fade, auto-stops
forge_audio_source_fade_updateAdvance fade by dt seconds

Frequently asked questions

What does the Forge Audio Pool AI skill do?

Add fire-and-forget audio playback with a source pool and volume fading for click-free start/stop transitions.

Why use Forge Audio Pool on TypingMind?

Because you install it once and use it with any model. Forge Audio Pool is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Forge Audio Pool in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Nebulavenus/forge-gpu/tree/main/.claude/skills/forge-audio-pool. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Forge Audio Pool?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Forge Audio Pool?

As many as you like. As long as a model supports skills, you can use Forge Audio Pool with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Forge Audio Pool AI skill free?

Yes. It is published on GitHub by Nebulavenus under the Zlib license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇