Introduction: 3D Printed Sound Bites
talking strip birthday card:
It's even possible to tune rumble strips on a road so that your car turns into a musical instrument as it drives over. Here is a musical road near MT Fuji, Japan:
another musical road - Lancaster, CA:
Step 1: The Code
1. Download Audacity.
2. Open an audio file of your choice with Audacity. Use Effect>Normalize to amplify the signal as much as you can without clipping. Trim any excess blank space off the beginning an end of the clip, you will want to keep the audio as short as possible. File>Export this file and save it as a WAV in a folder called "soundBites".
3. Download Python 2.5.4.
4. Copy the Python code below and save it in the soundBites folder, this code converts the information stored in a wav file (audio) into a series of numbers inside a text file (txt).
Copy the file name of the audio file you just saved and paste it into the following line in Python:
fileName = "your_file_name_here.wav"
Hit Run>RunModule, after a minute or two you will have a .txt file saved in the soundBites folder.
5. Download Processing.
6. To export STL from Processing, I used the ModelBuilder Library by Marius Watz. Download the ModelBuilder library here, I used version 0007a03.
7. Unzip the Modelbuilder library .zip and copy the folder inside called "modelbuilder". Unzip the processing .zip and go to Processing>modes>java>libraries and paste the "modelbuilder" folder in the "libraries" folder.
8. Copy the processing sketch below and save it as "soundBites.pde" in the soundBites folder. You can adjust many parameters in this code: the x/y/z resolution of the printer, the speed that you want to playback, the amplitude of the waves, the thickness of the strip, and more... you can even invert the wave to make it recessed within the strip.
9. Change the name of the import file in the Processing sketch to match your txt file name:
String filename = "your_file_name_here.txt";
10. Hit "Run" in Processing, you should see a file appear in the soundBites folder called "your_file_name.stl", you are now ready for 3d printing.
Echo420 made it!
We have a be nice policy.
Please be positive and constructive.
Thank you very much for sharing this Amanda!
I just have a problem when running the module in Python, it tells me there is invalid syntax and does´t save the .txt file, so I don´t know how to continue...
Any tip on how to fix this? thank you :)