Time for being really blunt (and nerdy)!
I'm working on my diploma, at the moment. It's related to sound and 3D-printing - the whole thing will, when finished, read an audio file, generate a ready-to-print 3D-model (consisting of multiple amplitude/frequency graphs layered next to each other) and be printed. After that, RFID-Tags can be inserted into the 3D-representation of the song/sound. Those Tags can be read, of course, which will select the appropriate audio file and play it.
So far, so nerdy. Now for some examples. Time for python!
from pylab import*
from scipy.io import wavfile
For the moment, I'm using the scipy.io wave methods - that will change soon, but for testing purposes, those perform like they should and give me workable data. Looking at you, python-wave.
processing_data=fft(audio_input)
So, how do you get frequency and amplitude from a file that only gives you amplitude and time?
The answer is: Fast Fourier Transform, or FFT for short. I'm not quite sure I understand how it works, but I know that it does. Also, FFT is a sped-up version of the classic Fourier, called DFT. Works much faster, no loss of detail (at least, no loss I would concern myself with. It's for 3D-Printing, not quantum physics).
plot()
show()
Python is weird. Just from writing "show()" in the last line of my script, I get a picture thrown at me. Out of a script I ran from the terminal (otherwise known as console).
Look!
Those are the first 5 frames of "Misty Mountains Cold" from the first hobbit movie. Pretty, innit? I will probably put the script here as soon as I'm done with it. And on Thingiverse, of course. With proper comments! Be excited for it if you're into that kind of stuff.
May Russel's Teapot watch over you!

No comments:
Post a Comment