This project brings sound waves to life through visualizations and decibel analysis using Python! Perfect for exploring the physics of sound and understanding amplitude, frequency, and dB levels. Dive into the world of audio signals with interactive graphs and insightful data. π
- π§ Waveform Visualization: See the amplitude of your audio over time.
- π Frequency Spectrum: Explore the spectrogram and uncover hidden frequencies.
- π Decibel Analysis:
- Calculate peak and minimum dB values.
- Compare relative levels with dBFS (Decibels Full Scale).
- Understand sound intensity using RMS dB.
- Install Python and required libraries:
pip install numpy matplotlib
- Replace the sample
.wav
file with your own in thesounds/
folder.
- Terminal:
python sound_analysis.py
- Jupyter Notebook:
- Install Jupyter if not already:
pip install notebook
- Open the notebook:
jupyter notebook sound-wave-analysis.ipynb
- Run the cells for step-by-step visualization.
- Install Jupyter if not already:
π΅ Want to analyze new sounds? Replace "sounds/decibel-10s.wav"
in the code with your .wav
file. Make sure itβs in the same folder!
- Waveform: Shows amplitude vs. time.
- Amplitude: The height of the wave, representing loudness.
- Frequency: Measured in Hz, determines the pitch.
- dBFS: Relative sound levels in decibels.
- Spectrogram: Visualizes frequency over time.
/project-folder
β
βββ sounds/ # π΅ Audio files
βββ sound_analysis.py # π Main script
βββ sound_tools.py # π οΈ Helper functions
βββ sound_visualization.py # π¨ Plotting tools
βββ sound-wave-analysis.ipynb # π» Jupyter Notebook
βββ README.md # π Documentation
- The program reads a
.wav
file to extract amplitude and frequency data. - Decibel calculations provide insights into sound intensity.
- Visualizations are created:
- Waveform: Shows how amplitude changes over time.
- Spectrogram: Displays the frequency spectrum with intensity.
- π‘ Adjust the spectrogram settings (
vmin
,vmax
, etc.) for clearer visuals. - π¨ Use different
.wav
files to explore varying sound characteristics!
- Python Libraries:
Wave
,NumPy
,Matplotlib
- Sound Physics Resources: Wikipedia - Sound
Happy Coding & Visualizing! β¨