Soundom is a Python-based utility designed to process .wav
audio files. It segments the audio into specified durations, converts frequencies to MIDI notes, and calculates average decibels. Additionally, the tool generates random numbers based on the frequency analysis of the audio segments.
- 🎶 Select Random Audio File: Choose a random
.wav
file from a specified directory. - 📊 Audio Analysis: Analyze the audio file by segmenting it into specified durations, converting frequencies to MIDI notes, and calculating decibel levels.
- 🎲 Random Number Generation: Generate a random number based on the frequency analysis of the audio segments.
-
Clone the Repository:
git clone https://github.com/FlenderrAX/Soundom.git cd Soundom
-
Create a Virtual Environment:
python3 -m venv env source env/bin/activate # On Windows, use `env\Scripts\activate`
-
Install Dependencies:
pip install -r requirements.txt
-
Place Your Audio Files: Place your
.wav
files in therecords
directory. -
Run the Script:
python main.py
-
Example Output:
Selected File: ../records\sound.wav [+] Loading file... [+] Successfully loaded the audio file [+] Converted segment duration [+] Arrays initialized [+] Successfully calculated the number of segments [+] Converting frequencies to MIDI notes and storing it : 33.33%... 66.67%... 100.00%... [+] Done! Final Random Number : 1910
This function scans the specified directory for .wav
files and selects one at random. It returns the full path to the selected file.
This function loads the selected audio file, segments it based on the specified duration, and performs a Short-Time Fourier Transform (STFT) on each segment. It converts frequencies to MIDI notes and calculates the mean decibels for each segment.
This function generates a random number based on the frequency analysis. It selects random MIDI notes from the analyzed frequencies and computes a unique number from them.
Contributions are welcome! Please fork this repository, make your changes, and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
If you have any questions or suggestions, feel free to open an issue.