Skip to content

Visualize and play .wav audio files in python as low poly landscapes

Notifications You must be signed in to change notification settings

morrev/audio-landscapes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Audio landscapes

3D visualization of audio files (currently .wav only).

Computes FFT on windows of .wav chunks to define vertex heights on 3D triangle mesh, with customizable color map and other options. X axis is time; y axis is frequency.

Hobby project for:

  • familiarization w/ audio formats (buffering, channels, underruns)
  • exploration of 3D visualization options

Examples:

python terrain.py -f data/audio_file.wav Example Example

Visualizer options:

  • audio_filename: filepath of .wav file to play (and plot)
  • cmap: matplotlib colormap to use for plotting (options)
  • cmap_agger: method to use to reduce a set of three vertices (defining a face) into a single value (by default, np.mean)
  • refresh_ms: time between each plot refresh, in milliseconds
  • ignore_threshold: rounds down to zero for any values below threshold (crude 'denoising')
  • other parameters defined in terrain.py

Useful links:

Attribution/credits:

  • Baseline 3D mesh code from Audio-Spectrum-Analyzer-in-Python: heavily refactored for efficiency and modified to accept .wav files and allow customization/parameters

About

Visualize and play .wav audio files in python as low poly landscapes

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages