Skip to main content

Zenix: A Lightweight Tool for Procedural Noise Generation


built with Python3 GitHub repo size PyPI version

Overview

Zenix is a lightweight tool for generating procedural noise such as white, pink, and brown noise. It can be used both as a command-line application and as a Python library, making it suitable for quick terminal usage as well as integration into Python projects. Zenix generates noise programmatically using NumPy and plays it through an audio backend, allowing developers to create continuous background sound for focus, concentration, relaxation, or acoustic masking. With support for multiple noise types, configurable parameters, fade-in effects, and looping playback, Zenix provides a simple yet flexible way to work with procedural noise in both interactive and programmatic environments.

PyPI Counter
Github Stars
Branch main dev
CI
Code Quality CodeFactor

Installation

Source Code

PyPI

Usage

CLI

zenix --type=white --duration=120 --volume=0.25 --fade-in=2 --fade-out=3 --fade-type=linear --sample-rate=44000 --loop --seed=5 --output=noise.wav

Arguments

Argument Description Default
--type Noise type white
--duration Duration of generated noise in seconds 30
--volume Output volume multiplier 0.3
--fade-in Fade-in duration in seconds 2
--fade-out Fade-out duration in seconds 2
--fade-type Fade curve type linear
--sample-rate Audio sample rate in Hz 44100
--loop Enable continuous looping playback False
--output Save generated noise to WAV file None
--seed Random seed for reproducible noise None

Library

Generate Noise

Generate procedural noise as a PCM int16 NumPy array.

from zenix import generate_noise, play_noise, save_noise, NoiseType, FadeType
audio = generate_noise(
        noise_type=NoiseType.WHITE,
        duration=120,
        sample_rate=44000,
        volume=0.25,
        fade_in=2,
		fade_out=2,
        fade_type=FadeType.LINEAR,
        seed=4
    )
Parameter Type Description Default
noise_type NoiseType Noise type NoiseType.WHITE
duration float Duration of generated noise in seconds 30
sample_rate int Audio sample rate in Hz 44100
volume float Output volume multiplier 0.3
fade_in float Fade-in duration in seconds 2
fade_out float Fade-out duration in seconds 2
fade_type FadeType Fade curve type FadeType.LINEAR
seed int Random seed for reproducible noise None

Play Noise

Play generated noise directly from memory.

from zenix import generate_noise, play_noise

audio = generate_noise(duration=30)

play_noise(
    audio=audio,
    sample_rate=44100,
    loop=False
)
Parameter Type Description Default
audio numpy.ndarray PCM mono audio buffer (int16) Required
sample_rate int Audio sample rate in Hz 44100
loop bool Enable continuous looping playback False

Save Noise

Save generated noise to a WAV file.

from zenix import generate_noise, save_noise

audio = generate_noise(duration=60)

save_noise(
    filepath="noise.wav",
    audio=audio,
    sample_rate=44100
)
Parameter Type Description Default
filepath str Output WAV file path Required
audio numpy.ndarray PCM mono audio buffer (int16) Required
sample_rate int Audio sample rate in Hz 44100

Noise Object

The Noise class provides an object-oriented interface for generating, playing, and saving procedural noise.

from zenix import Noise, NoiseType, FadeType

noise = Noise(
    noise_type=NoiseType.PINK,
    duration=120,
    sample_rate=44100,
    volume=0.25,
    fade_in=2,
    fade_out=2,
    fade_type=FadeType.LINEAR
)

noise.play()
noise.save("noise.wav")
Parameter Type Description Default
noise_type NoiseType Noise type NoiseType.WHITE
duration float Duration of generated noise in seconds 30
sample_rate int Audio sample rate in Hz 44100
volume float Output volume multiplier 0.3
fade_in float Fade-in duration in seconds 2
fade_out float Fade-out duration in seconds 2
fade_type FadeType Fade curve type FadeType.LINEAR
seed int Random seed for reproducible noise None

The generated audio can be accessed through the audio property, which automatically generates the noise on first access and returns a PCM int16 NumPy array.

Issues & Bug Reports

Just fill an issue and describe it. We'll check it ASAP!

  • Please complete the issue template

Show Your Support

Star This Repo

Give a ⭐️ if this project helped you!

Donate to Our Project

Bitcoin

1KtNLEEeUbTEK9PdN6Ya3ZAKXaqoKUuxCy

Ethereum

0xcD4Db18B6664A9662123D4307B074aE968535388

Litecoin

Ldnz5gMcEeV8BAdsyf8FstWDC6uyYR6pgZ

Doge

DDUnKpFQbBqLpFVZ9DfuVysBdr249HxVDh

Tron

TCZxzPZLcJHr2qR3uPUB1tXB6L3FDSSAx7

Ripple

rN7ZuRG7HDGHR5nof8nu5LrsbmSB61V1qq

Binance Coin

bnb1zglwcf0ac3d0s2f6ck5kgwvcru4tlctt4p5qef

Tether

0xcD4Db18B6664A9662123D4307B074aE968535388

Dash

Xd3Yn2qZJ7VE8nbKw2fS98aLxR5M6WUU3s

Stellar

GALPOLPISRHIYHLQER2TLJRGUSZH52RYDK6C3HIU4PSMNAV65Q36EGNL

Zilliqa

zil1knmz8zj88cf0exr2ry7nav9elehxfcgqu3c5e5

Coffeete

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Unreleased

0.9 - 2026-09-23

Added

  • Violet noise
  • fade_type parameter
  • --fade-type argument
  • FadeType enum

Changed

  • Exit message updated
  • Validation system modified
  • Test system modified
  • README.md updated

0.8 - 2026-07-17

Added

  • seed parameter
  • --seed argument

Changed

  • Validation system modified
  • generate_noise function modified
  • Noise class __repr__ method updated
  • README.md updated

0.7 - 2026-06-13

Added

  • Noise class

Changed

  • Test system modified
  • Dependencies structure modified
  • README.md updated

0.6 - 2026-05-25

Added

  • Blue noise
  • ZenixError class
  • ZenixValidationError class

Changed

  • Error messages updated
  • Test system modified
  • README.md updated

0.5 - 2026-05-05

Added

  • save_noise function
  • --output argument

Changed

  • Validation system modified
  • Test system modified
  • README.md updated

0.4 - 2026-04-26

Added

  • fade_out parameter
  • --fade-out argument

Changed

  • README.md updated
  • Test system modified

0.3 - 2026-04-21

Added

  • Input validation
  • Logo

Changed

  • Test system modified

0.2 - 2026-04-13

Added

  • --sample-rate argument

Changed

  • README.md updated
  • Test system modified

0.1 - 2026-04-03

Added

  • generate_noise function
  • play_noise function
  • White noise
  • Pink noise
  • Brown noise

Metadata

Release files for zenix 0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zenix 0.9
File Size Uploaded
zenix-0.9.tar.gz 19.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zenix 0.9
File Interpreter ABI Platform
zenix-0.9-py3-none-any.whl Python 3 none any Details

Total release size: 32.5 kB

Release files / zenix-0.9.tar.gz

Download URL zenix-0.9.tar.gz
Size 19.4 kB
Tags Source
SHA-256 checksum
How to use checksums
04e3cea4649e35d8d196592b117daed2920a99dde883d49d90350dde4a2b57b8
BLAKE2b-256 checksum
How to use checksums
e2fe04e5cbf2c40b7fcc0434597f2965bddb7e64ebff8039a8c172e4fb2dc774
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / zenix-0.9-py3-none-any.whl

Download URL zenix-0.9-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
916d0d72ee3981da22c6df8982b6659e94fdce14ad45ec3b6659aa0dae2e0107
BLAKE2b-256 checksum
How to use checksums
ffb56c617b35847b63010968aecb51bcb835cdfa2e5d5ce90bbc9618a580f90d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

0.9 This release

2 release files

0.8

2 release files

0.7

2 release files

0.6

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page