🎼 Ambient Generator TUI
Create lush, generative ambient music with spacey textures in your terminal.
📸 View Screenshots | 🎵 Listen to Examples | 📖 Full Documentation
Features
- 🎼 Multiple scales - Currently featuring Japanese pentatonic scales (Hirajoshi, In Sen, Kumoi, Yo)
- 🎹 Five layered instruments (Pad, Flute, Vibraphone, Strings, Music Box)
- 🎚️ Adjustable tempo and length
- 🎨 Multiple soundfonts (3 high-quality GM soundfonts included)
- 🎛️ Audio effects (Reverb and Paulstretch time-stretching)
- 📦 Export to MIDI and MP3
- 💻 Beautiful terminal user interface (TUI)
- ⚡ Simple setup - one dependency (PortAudio), then
pip install!
Installation
macOS
# Install PortAudio first
brew install portaudio
# Install ambient-gen
pip install ambient-gen
Linux (Ubuntu/Debian)
# Install PortAudio development files
sudo apt-get update
sudo apt-get install portaudio19-dev
# Install ambient-gen
pip install ambient-gen
Windows
# No additional dependencies needed on Windows
pip install ambient-gen
Note: If you skip the PortAudio installation, the app will still work for MIDI generation, but MP3 export will be disabled.
Quick Start
Launch the interactive TUI:
ambient-gen
The TUI is fully interactive - use keyboard controls to customize generation!
Keyboard Controls
Generation & Files:
g- Generate new track (creates MIDI and MP3)o- Open output folderq- Quit
Scale Selection:
s- Cycle through scales (Hirajoshi → In Sen → Kumoi → Yo)
Parameters:
↑/kor↓/j- Adjust tempo (30-120 BPM)→/lor←/h- Adjust length (4-32 bars)
Instruments:
1- Toggle Pad layer2- Toggle Flute layer3- Toggle Vibraphone layer4- Toggle Strings layer5- Toggle Music Box layer
Audio Options:
a- Toggle audio effects (Reverb + Paulstretch)e- Toggle effects only mode (just reverb/paulstretch, no dry signal)f- Cycle soundfonts (FluidR3 GM, GeneralUser GS, SGM V2.01)p- Toggle Paulstretch time-stretching effect
Visual:
Ctrl+P- Change color palette
Output Files
Generated files are saved to ~/Desktop/ambient_gen_output/:
ambient_YYYYMMDD_HHMMSS.mid- MIDI fileambient_YYYYMMDD_HHMMSS.mp3- MP3 audio (192kbps)
How It Works
- Generates MIDI: Creates generative compositions using Japanese pentatonic scales with intelligent note placement and dynamics
- Renders Audio: Uses tinysoundfont to synthesize audio with high-quality GM soundfonts (automatically extracted on first run)
- Applies Effects: Optional reverb and Paulstretch time-stretching for ambient textures
- Converts to MP3: Automatically uses FFmpeg (via static-ffmpeg) to create compressed audio
All of this happens automatically with zero configuration!
Japanese Scales
- Hirajoshi (平調子): Traditional pentatonic scale (0, 2, 3, 7, 8) - Contemplative and meditative
- In Sen (陰旋): Mystical and contemplative (0, 1, 5, 7, 10) - Dark and mysterious
- Kumoi (雲井): Bright and ethereal (0, 2, 3, 7, 9) - Light and floating
- Yo (陽): Simple and peaceful (0, 2, 5, 7, 9) - Major pentatonic, uplifting
Included Soundfonts
The package includes 3 high-quality, freely-licensed General MIDI soundfonts (compressed to 41MB):
- FluidR3 GM (23MB) - Clean, balanced GM soundfont (MIT License)
- GeneralUser GS (7MB) - Excellent pads and flutes, perfect for ambient (Custom Permissive License)
- SGM V2.01 (27MB) - Rich, warm ambient tones (GPLv3)
Soundfonts are automatically extracted from a compressed archive on first import.
Technical Details
- Audio Quality: 44.1kHz, 16-bit stereo, 192kbps MP3
- MIDI Resolution: 960 ticks per quarter note
- Effects: Freeverb reverb, Paulstretch time-stretching (4x stretch)
- Package Size: ~41MB (soundfonts compressed with xz)
- Python Version: 3.8+
Credits
- Soundfonts:
- FluidR3 GM - Frank Wen (MIT License)
- GeneralUser GS - S. Christian Collins (Permissive License)
- SGM V2.01 - David Shan (GPLv3)
- Audio Synthesis: tinysoundfont
- FFmpeg Integration: static-ffmpeg
- TUI Framework: Textual
Links
- GitHub Repository: https://github.com/beowulf-audio/ambient-gen-tui
- Screenshots & Examples: https://github.com/beowulf-audio/ambient-gen-tui#screenshots
- Issue Tracker: https://github.com/beowulf-audio/ambient-gen-tui/issues
License
MIT License - see LICENSE file for details.
Metadata
Release files for ambient-gen 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ambient_gen-1.2.0.tar.gz | 43.3 MB | With provenance | Details for ambient_gen-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ambient_gen-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for ambient_gen-1.2.0-py3-none-any.whl |
Total release size: 86.5 MB
Release files / ambient_gen-1.2.0.tar.gz
| Download URL | ambient_gen-1.2.0.tar.gz |
|---|---|
| Size | 43.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49a63f2ad40fc45a0a5571e80a0520d840817427d6c09fb4c577e4290402f649
|
|
BLAKE2b-256 checksum How to use checksums |
6dfb0cf89d19e685f303b6d1cf1c66868c0226fa0015988c71716474fbe0ea81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 17, 2026.
Transparency logRelease files / ambient_gen-1.2.0-py3-none-any.whl
| Download URL | ambient_gen-1.2.0-py3-none-any.whl |
|---|---|
| Size | 43.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e165d92de4100897ce13aca5d5485ebd3f703c679be76ce55e19e6e190bc9ac3
|
|
BLAKE2b-256 checksum How to use checksums |
8a3c082d171d457411813351b57e2fcd769fc3007ff2ec25ca566ca837e4e2ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 17, 2026.
Transparency logSecurity for ambient-gen 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for ambient_gen-1.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 17, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.