Smearing an audio recording using Fourier transform

AI Thread Summary
The discussion focuses on using Fourier transform techniques to smear an audio recording, specifically a piano melody, to create a version where the frequency content appears more uniform. The original poster shares examples of both the unsmeared and smeared recordings and explores methods such as Short-Time Fourier Transform (STFT) to achieve the desired effect. They express confusion about the relationship between the Discrete Fourier Transform (DFT) and the time-varying frequency content of audio signals, noting that the DFT does not represent average frequency content when the signal changes over time. They also mention attempts to use the inverse Fourier transform on the absolute values of the FFT, resulting in a partially smeared sound that still retains some pulsation. The overall goal is to understand and manipulate audio frequency content for creative purposes without the need to perfectly reconstruct the original signal.
dwarp
Messages
3
Reaction score
0
Hi!

I'd like to smear an audio recording, where the frequency content audibly changes, into an audio recording where it does not. Here's a recording of a sampled piano playing a melody, which will serve as an example:

https://dl.dropboxusercontent.com/u/9355745/oldmcdonald.wav

The frequency content changes, both during each note played and because different notes are being played. I'd like to use the Fourier transform to somehow produce something like this:

https://dl.dropboxusercontent.com/u/9355745/oldmcdonaldsmear.wav

This was created by repeatedly playing the original recording into a reverb with a very high decay. There's still some "shimmering" in the recording, so the result isn't completely smeared out.

One way I can think of doing this is by computing an STFT and then combining the resulting windows into an average, which is then used as input to the reverse Fourier transform to produce a new audio recording (and I'm guessing this is what the reverb is actually doing). Is there a simpler, perhaps more elegant way of doing this?

The reason I'm asking is that for the longest time, I thought the result of the DFT *was* the average frequency content of the input. It seems this is only true if the frequency content in the input signal does not change over time - if I had been able to smear the signal completely, the DFT of that smeared signal *would* have been the average frequency content of the smeared signal. Imagine, for instance, if I'd run 4 seconds of a square wave at 80 Hz - the DFT would give me the same thing an EQ analyzer would.

But then, since the un-smeared signal can be accurately represented by a sum of sine and cosine waves (that is, the result of the DFT), its frequency content does not, in fact, change over time. Obviously, though, if you listen to the unsmeared signal, its frequency content DOES change over time, or there wouldn't be a melody! I find all this incredibly confusing.
 
Last edited by a moderator:
Engineering news on Phys.org
What is the purpose for such a process? Could you for instance, under perfect conditions, go backwards and end up with the same notes in the right sequence?
 
The purpose is getting an idea of the frequency content in an audio recording - whether there's a lot of bass, a lot of treble, etc. I also like the idea of getting the "average sound" of a longer recording just to hear what it sounds like. I don't expect to be able, and am not interested in being able, to reproduce the original signal from the result, as I would be able to with a straight up DFT, no.
 
Also, since I believed the DFT contained the average frequency content, I did try ifft(abs(fft(signal), and I actually got kind of close to what I was trying to achieve - the result is kind of smeared - but it's also still "pulsating" (the volume is modulating) at the same frequency that the notes were played in the original recording (4 Hz):

https://dl.dropboxusercontent.com/u/9355745/newmcdonald.wav
 
Last edited by a moderator:
I used to be an HVAC technician. One time I had a service call in which there was no power to the thermostat. The thermostat did not have power because the fuse in the air handler was blown. The fuse in the air handler was blown because there was a low voltage short. The rubber coating on one of the thermostat wires was chewed off by a rodent. The exposed metal in the thermostat wire was touching the metal cabinet of the air handler. This was a low voltage short. This low voltage...
Hey guys. I have a question related to electricity and alternating current. Say an alien fictional society developed electricity, and settled on a standard like 73V AC current at 46 Hz. How would appliances be designed, and what impact would the lower frequency and voltage have on transformers, wiring, TVs, computers, LEDs, motors, and heating, assuming the laws of physics and technology are the same as on Earth?
Thread 'Electromagnet magnetic field issue'
Hi Guys We are a bunch a mechanical engineers trying to build a simple electromagnet. Our design is based on a very similar magnet. However, our version is about 10 times less magnetic and we are wondering why. Our coil has exactly same length, same number of layers and turns. What is possibly wrong? PIN and bracket are made of iron and are in electrical contact, exactly like the reference design. Any help will be appreciated. Thanks. edit: even same wire diameter and coil was wounded by a...
Back
Top