Step 7: Make Your Own Records

1000px-Processing_Logo_Clipped.svg.png
You can convert your own audio files into 3D STL models in ten easy steps:

1.  Download Processing.

2.  Download the ModelBuilder library for Processing.  I used version 0007a03.

3. 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.

4.  Download Python 2.5.4.

5.  Download Audacity.

6.  Download the zip file below called "RecordGenerator".  Unzip this and open the folder.

7.  Open an audio file of your choice with Audacity.  Use Effect>Amplify to amplify the signal as much as you can without noticeable effects of clipping (you will be able to get away with some clipping, and remember this is not crystal clear audio anyway).  Make sure there is 2 sec of blank audio at the end of the track so that nothing gets clipped.  Keep the audio under 6 min.  File>Export this file and save it in the "RecordGenerator" folder as a wav file. 

8.  Open the Python file called "wavtotxt".  Copy the file name of the file you just saved in the line:

             fileName = "your_file_name_here.wav"

Hit Run>RunModule, after a minute or two you will have a .txt file saved in the RecordGenerator folder.

9.  Open the Processing Sketch.  In File>Preferences check the box that says "increase the maximum available memory to" and write in the amount of available ram on your computer.  I've found that my laptop with 4GB RAM can handle audio files up to 1.5 min long.  For longer files you will need to use a computer with 12-16GB of RAM.  If Processing starts and then gets stuck or crashes, it is a RAM issue and you will need to move to a machine with more RAM.

10.  Change the name of the import file in the Processing sketch to your txt file name:

             String filename = "your_file_name_here.txt";

Close all other programs running on your computer and run the Processing sketch Sketch>Run.  After a few seconds you will see "record drawn, starting grooves" appear at the bottom of the Processing window.  After some more time you will get updates on the status of the sketch: "3 of 85 grooves drawn".  Eventually Processing will tell you that it is writing your STL file and when it is done it will say "Closing 'name_of_your_file.stl' and tell you haw many faces are in the file.  You can find the finished file in the RecordGenerator folder.

Once you've made them, post them!  I've been posting mine on the 123D gallery and the Pirate Bay.  Enjoy, and let me know if you have questions or need help getting this to work.  I've tested this process in both Windows (64 bit) and Mac OS, though I'd imagine it will work for Linux as well.
 
Remove these adsRemove these ads by Signing Up
eon997 says: May 17, 2013. 6:24 AM
This is incredible. I have made a 3D model, but I don't know where I can get it printed...can some one get me a link to place where you can get a model shipped to you? Thanks!
fabacademy says: May 9, 2013. 2:25 PM
Hi amandaghassaei,

I assume a lot of people are contacting you, so, I will be quick.

When I try to convert the stereo file into a mono file via Python, the .txt file never shows up in my folder. I have a TypeError message from Python saying :

'map' object is not subscriptable

Do you know how I can fix that ?
Bests from France.
Romain
amandaghassaei (author) says: May 9, 2013. 4:13 PM
what version of python are you running?
T0BY says: Mar 5, 2013. 9:25 AM
Hello!

This is amazing, you're a genius!

I'm having trouble, I keep getting the following response;

Traceback (most recent call last):
File "C:\Users\Computer\Downloads\F0Y8Y6VHAUNM3D4\wavtotext.py", line 34, in
frameOneChannel[i] = frameInt[4*i+1]*2**8+frameInt[4*i]#separate channels and store one channel in new list
IndexError: list index out of range
>>>

What do you think I'm doing wrong?

T
amandaghassaei (author) says: Mar 5, 2013. 3:59 PM
thanks! did you load a stereo wav file into python? did you change anything in the code? I'm curious, what are you going to use it for?
T0BY says: Mar 5, 2013. 11:59 PM
I did, it's just a few seconds of sound which I converted exactly as you mentioned in Audacity. I didn't change the code other than that. I tried exiting and reloading it to make sure I hadn't changed anything by accident.

I'm gripped by the idea of making my own record and making a record player to play it on.

Thanks for your input!

Toby
amandaghassaei (author) says: Mar 6, 2013. 10:18 AM
cool! I just tried it and it worked fine for me, are you using the code included in the "RecordGenerator" zip file? what version of Python are you running? operating system?
T0BY says: Mar 7, 2013. 1:01 AM
I am using the included code. I've been through everything many times and I can't see anything wrong with it. I'm using Python 2.5.4 as you suggested, on Vista. I'm wondering if Vista might be the problem, I'll start again on another computer. Has anyone used this on a Mac?
T0BY says: Mar 7, 2013. 2:07 AM
Just tried on my VPS running Windows Server, with a different .wav file, getting the same response. I'll try on my Mac. I must have missed something!
T0BY says: Mar 7, 2013. 3:17 AM
Sorry about the multiple posts, I'm very keen to get this working! Same results on my Mac as well. The results I listed earlier are from opening the file within the Python GUI; if I right click 'Open' using the standard Python a window opens and just closes again straight away.
amandaghassaei (author) says: Mar 7, 2013. 3:55 AM
Hmmm, so on the Mac you can't even open the python file? Can you upload the wav you're working with? Click on rich editor when you reply, it will give you an option to upload a file.
T0BY says: Mar 8, 2013. 3:09 AM
Sorted it! I made a schoolboy error; I thought the .wav I was using was stereo but it was mono! I've got the text file but now I'm stuck with Processing! I've followed you instructions to the letter, except I can't find a way to import files as you have described so used 'Add file' which seems to add it but when I hit run nothing happens. I've tried versions 2.0b7 and 2.0b8 and I'm using vista. Thank you for your patience!
amandaghassaei (author) says: Mar 8, 2013. 7:50 AM
you need to find this line in the procesing sketch:
String filename = "your_file_name_here.txt";
and change your_file_name_here.txt to whatever the name of your txt from python is. this is the same way you should have imported the wav into python.
Watch the video at the very beginning of the instructable, you'll see what I mean.
T0BY says: Mar 12, 2013. 2:53 AM
Thank you, I've got it now!
T0BY says: Mar 12, 2013. 3:24 AM
What would be the best way to create a mono record?
amandaghassaei (author) says: Mar 13, 2013. 10:55 AM
this script only does mono, it takes the stereo file and converts it to mono, then incorporates it into the record geometry.
amandaghassaei (author) says: Mar 17, 2013. 9:54 AM
hey, just a heads up, I realized I make a mistake in the code "final code" I posted, the rateDivisor variable should be set to 4, not 40.
amandaghassaei (author) says: Mar 17, 2013. 9:57 AM
in case that's confusing, I've uploaded a new version of RecordGenerator.zip
T0BY says: Mar 19, 2013. 6:02 AM
Thank you for all your help.
T0BY says: Mar 19, 2013. 6:02 AM
Thank you for all your help.
Jan.H says: Dec 22, 2012. 3:32 AM
And for proper RIAA equalization, before amplifying the recording in Audacity in step 7, go to Effects>Equalization. Then, from the "Select Curve" list box, select the RIAA preset, and afterwards, hit the "Invert" button, because you want to create a new record (with bass attenuated, and high frequencies boosted), while Audacity's preset is intended for playback.
amandaghassaei (author) says: Feb 10, 2013. 9:49 PM
thanks for the tip! I hope to post some eq'ed tracks soon!
agouiller says: Jan 3, 2013. 10:23 AM
Hi Amanda ! This is a really amazing work you made here ! Congratulation !
I tried to make my own 3D model with processing but I have some trouble with step 10. "Change the name of the import file in the Processing sketch to your txt file name: String filename = "your_file_name_here.txt";"

Should we write "String filename = "your_file_name_here.txt";" in the text editor of Processing or make file>open and open the .txt file ?

Thanks in advance for your advices !
amandaghassaei (author) says: Jan 3, 2013. 11:16 AM
cool, glad to hear you're messing with the code! I just changed that line to whatever the name of my file was. so if I had a file called daftpunk.txt, I changed the line to read:

String filename = "daftpunk.txt";

does that make sense?
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!