Giter VIP home page Giter VIP logo

absentistempus / binaural-beats Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 5 KB

This project consists of two Python scripts designed for audio manipulation, particularly focusing on binaural beats. The first script generates a binaural beat, and the second script adds this beat to a background music track extracted from an MP4 file, mixing them together into a final output that's saved as an MP4 file.

Python 100.00%
binaural-beats binaural-beats-generator binauralaudio binauralbeats

binaural-beats's Introduction

Binaural Beats Generator and Mixer

This project consists of two Python scripts designed for audio manipulation, particularly focusing on binaural beats. The first script generates a binaural beat, and the second script adds this beat to a background music track extracted from an MP4 file, mixing them together into a final output that's saved as an MP4 file.

Scripts

Binaural Beat Generator

binaural_beat_generator.py is a script that generates a binaural beat audio file. Binaural beats are auditory illusions perceived when two different pure-tone sine waves, both with frequencies lower than 1500 Hz and with less than a 40 Hz difference between them, are presented to a listener dichotically (one through each ear).

Features

  • Generates a stereo WAV file with a binaural beat.
  • Customizable frequency for each ear to create different types of binaural beats (e.g., for relaxation, focus, etc.).

Binaural Beat Mixer

binaural_beat_mixer.py takes the generated binaural beat and mixes it with the audio extracted from a provided MP4 file. This allows for the overlay of binaural beats onto existing music tracks or ambient sounds, creating a combined audio experience.

Features

  • Extracts audio from an MP4 file.
  • Mixes the extracted audio with a binaural beat.
  • Saves the mixed audio with the original video content into a new MP4 file.

Setup

To run these scripts, you need Python installed on your machine along with some additional libraries. Use the following command to install the required libraries:

pip install numpy scipy moviepy

Usage

Generating a Binaural Beat

Run binaural_beat_generator.py and specify the desired frequencies for the left and right ear tones. The script will generate a WAV file named binaural_beat.wav.

python binaural_beat_generator.py

Mixing the Binaural Beat with Background Music

After generating the binaural beat, run binaural_beat_mixer.py with the path to your MP4 file containing the background music or ambient sound.

python binaural_beat_mixer.py --input background_music.mp4

The script will produce a final MP4 file named final_output.mp4 that combines the video from background_music.mp4 with the mixed audio track.

Customization

You can customize the frequencies used in the binaural beat, the duration of the beat, and the balance between the beat and the background music in the mixing script. These can be adjusted in the script's parameters.

binaural-beats's People

Contributors

absentistempus avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

naivar68

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.