This repository contains Python scripts for generating 3D models that represent audio information. These models can then be fabricated into objects.
Many people before me have worked on code that generates 3D models from audio. Below are some things I've found, in no particular order:
- Reify
- Andy Huntington's Cylinder
- The Vibe by SoundCloud & ShapeWays (see also this page, this one)
- This "model of a laser disc"
- Realität's Microsonic Landscapes
- Gene Kogan's Spectrogram Sculptures
While each of the above projects is awesome in its own way, I wanted to have:
- A completely open source script...
- ...in Python...
- ...that takes an audio file and generate a more or less 3D printer-ready STL file in only one step...
- ...while preserving an accurate representation of the sonic information, so the object can be "played back" to produce (a hopelessly downsampled and bit-reduced version of) the same audio.
I decided to produce this script iteratively. You can find an account of my attempts below.
Contributions are welcome.
Rectangular Bar Graph using tangible
The spectrobars
script reads a WAV file, computes a spectrogram, and generates a model of the bar graph that represents the spectrogram.
The output file is a SCAD file that can be compiled into an STL using OpenSCAD.
- Read MP3 etc. along with WAV
- Generate STL in one step, rather than SCAD
- Make concentric rings like Microsonic Landscapes
Concentric Pie Graphs using tangible
spectropie
reads an audio file, computes its spectrogram, and generates a model of the spectrogram in the shape of concentric ring pie graphs.
The output file is still a SCAD file that can be compiled into an STL using OpenSCAD.
- Read MP3 etc. along with WAV
- Generate STL in one step, rather than SCAD
Smooth Concentric Pie Graphs using numpystl
Coming soon...