Skip to content

mysyzygy/PySciCalProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PySciCalProject

Create a script that filters .wav files into 31 bands and measures the crest factor (dynamic range) of each band, analyzes the results with machine learning, and accurately predicts the genre based on the dynamic range measurements.

Tasks -

  1. Create a class (spectral_loudness.audio.bandpass) that divides a stereo wav file into n frequency bands with an FIR filterbank. Create a second class (spectral_loudness.audio.loudness) that measures each band's crest factor, i.e (peak values / rms), and returns an array of crest factor measurements for each fft window.

  2. Create a Spectrum Analyzer, along with another animated graph overlay showing the dynamic range of each frequency band in real time.

  3. Using the dynamic range tools from step 1, use machine learning to analyze different genres of music and create a musical genre predictor.

DEPENDENCIES:

  • python 3.4.2
  • numpy, scipy, matplotlib, pylab, sounddevice, pandas, mpl_toolkits, sklearn

TO RUN ANALYZER:

$ python spectral_loudness.py -i '/path/to/file.wav'

MACHINE LEARNING:

$ python PySciCal_Project_machine_learning.py

NOTES:

spectral loudness currently only support 48kHz, 16-bit stereo wav files.

FUNCTIONAL HIERARCHY:

  • spectral_loudness.audio.engine.Engine() - class that runs audio playback, animation and filter/loudness processing
  • spectral_loudness.audio.bandpass.BandpassFilterBank() - filters audio with n FIR bandpass filters
  • spectral_loudness.audio.loudness.Loudness() - measures loudness (lufs) and true peak for each frequency buffer
  • spectral_loudness.audio.loudness.Fifo() - fifo for loudness measurement
  • spectral_loudness.plotting.animate.Animation() - runs animation during playback
  • spectral_loudness.plotting.animate.Histogram() - generates peak and loudness histograms for animation
  • spectral_loudness.plotting.animate.PlotBarGraph() - generates average peak and loudness bar graph displayed and the end of playback.

note: all other files were used for testing or reference and should be ignored.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published