Skip to content

7ucid7ibra/binaural-generator

Repository files navigation

Binaural Generator

A beautiful, modern binaural beat generator built with Python and Qt/QML. Create custom binaural beats for meditation, focus, sleep, and more with an intuitive glass-morphism interface.

Features

  • 🎵 High-Quality Audio Generation: Generate professional binaural beats with customizable frequencies
  • 🎨 Beautiful UI: Modern glass-morphism design with smooth animations
  • 💾 Custom Presets: Save and manage your own preset configurations
  • ⚡ Real-time Preview: Instantly preview your settings before generating
  • 🔧 Full Control: Adjust duration, frequencies, fade in/out times
  • 📱 Cross-Platform: Works on macOS, Linux, and Windows

Built-in Presets

  • Delta (2 Hz): Deep sleep and meditation
  • Theta (6 Hz): Deep relaxation and meditation
  • Alpha (10 Hz): Relaxed focus and creativity
  • Beta (18 Hz): Alertness and concentration
  • Gamma (40 Hz): High-level cognitive processing
  • Astral (6.3 Hz): Astral projection and deep meditation

Installation

Prerequisites

  • Python 3.8 or higher
  • pip package manager

Setup

  1. Clone or download the application

    git clone <repository-url>
    cd v6_qml-main
  2. Create a virtual environment (recommended)

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Run the application

    python python/main.py

    Or use the provided script:

    ./run_app.sh

Usage

Basic Usage

  1. Select a preset from the built-in options or create your own
  2. Adjust parameters:
    • Duration: Length of the audio (1-3600 seconds)
    • Beat Frequency: Difference between left/right ear frequencies (0.5-50 Hz)
    • Carrier Frequency: Base frequency for both ears (100-1000 Hz)
    • Padding Frequency: Background frequency layer
    • Fade In/Out: Smooth transition times
  3. Preview your settings with the play button
  4. Generate the full audio file when satisfied

Custom Presets

  1. Configure your desired settings
  2. Click "Save as Custom Preset"
  3. Enter a name (max 48 characters, letters/numbers/spaces/hyphens)
  4. Your preset will be saved and available in future sessions

Generated Files

  • Audio files are saved in the generated_audio/ directory
  • Files are named with your chosen filename and timestamp
  • Custom presets are stored in custom_presets.json

Technical Details

Audio Specifications

  • Sample Rate: 44100 Hz
  • Bit Depth: 32-bit float
  • Format: WAV
  • Channels: Stereo (binaural)

Architecture

  • Backend: Python with PyQt6
  • Frontend: QML with Qt Quick Controls
  • Audio Processing: NumPy, SciPy, SoundDevice
  • Storage: JSON for custom presets

Development

Running Tests

python run_tests.py

Project Structure

v6_qml-main/
├── main.qml              # Main UI file
├── python/
│   ├── main.py          # Application entry point and backend
│   └── generator.py     # Audio generation logic
├── components/          # QML UI components
├── assets/             # Application assets
├── generated_audio/    # Output directory (created automatically)
└── requirements.txt    # Python dependencies

Troubleshooting

Common Issues

  1. "Qt plugin not found" on macOS

    • The application automatically sets Qt plugin paths
    • Ensure PyQt6 is properly installed
  2. Audio device errors

    • Check that your audio device is working
    • Try restarting the application
  3. Preset not saving

    • Ensure write permissions in the application directory
    • Check that custom_presets.json is not read-only

Console Errors

If you see console warnings about shaders or style customization, these are cosmetic and don't affect functionality. The application uses the Basic Qt style to ensure cross-platform compatibility.

License

[License to be added]

Version

v0.1.0 - Initial release with core functionality

Contributing

[Contributing guidelines to be added]

Support

For issues and questions, please check the troubleshooting section or create an issue in the repository.

About

A beautiful, modern binaural beat generator built with Python and Qt/QML

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors