New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pyfxr

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pyfxr

SFXR clone using Pygame and Cython

  • 0.3.0
  • PyPI
  • Socket score

Maintainers
1

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

Full API 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.

Screenshot

Screenshot

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc