Pyfxr
Sound effects generation for Python, in fast Cython code, compatible with Pygame and Pyglet.
Install / Use
/learn @lordmauve/PyfxrREADME
pyfxr
Sound effects generation for Python, compatible with Pygame and Pyglet.
Installation
pyfxr is on PyPI and pre-compiled for Mac, Windows and Linux. You can install
the library with
pip install pyfxr
Documentation
Pygame Usage
# Set mixer to 44kHz mono
pygame.mixer.pre_init(44100, channels=1)
# Generate a sound
tone = pygame.mixer.Sound(
buffer=pyfxr.pluck(duration=1.0, pitch='A4')
)
# Play it
tone.play()
Usage with Pyglet
# Generate a random explosion sound
explosion = pyglet.media.StaticSource(pyfxr.explosion())
# Play it
explosion.play()
Usage with sounddevice
import sounddevice
import pyfxr
sounddevice.play(pyfxr.jump(), pyfxr.SAMPLE_RATE)
GUI
A Pygame GUI is in development, to explore the feature set and create music!
To install the Pygame-based GUI along with the library, use:
pip install pyfxr[gui]
Then you can run the GUI by running pyfxr.


Building & Testing
Create a virtual environment and install the project alongside the development dependencies:
python -m venv .venv
source .venv/bin/activate
pip install . -r requirements-dev.txt
pytest
Related Skills
node-connect
340.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
84.2kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
84.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
340.5kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
