"fft" computes a DFT via a FFT algorithm, which just gives you an array of numbers, one complex number per DFT bin. "fftfreq" tells you what frequencies the bins correspond to.
-
This Tweet is unavailable.
-
This Tweet is unavailable.
-
-
The #1 thing you need to know is that Fourier transforms are inherently complex->complex (that's very much the space they live in) and if you want to generate real-valued signals (you do for audio) that means there's a lot of constraints on what values you can use.
1 reply 0 retweets 1 like -
In particular, if you want to get a real signal out, you can't ever just poke around in a single bin. Any change you make in bin k, you have to also make in bin -k mod N (the corresponding "negative frequency"), or the result is going to be complex.
2 replies 0 retweets 0 likes -
Replying to @rygorous
hm, ok, I think my understanding of how this works is wrong :| what I want to do is take a set of samples, and change the pitch of the sound without changing the length, as well as change the length of the sound without changing the pitch
1 reply 0 retweets 0 likes -
Replying to @ladyaeva
Ok, neither of these are at all convenient to do in frequency space actually. :)
2 replies 0 retweets 1 like -
-
Regarding changing the length of a sound: A lot of what we subjectively perceive as character of a sound is actually just "encoded" in the transient at the beginning of the sound. Our brain then just remembers that for the duration of the sound and thus it sounds different to us.
1 reply 0 retweets 2 likes
So it's important to preserve that transient or it will sound wrong. If it's just beeps then that doesn't matter so much. But for musical instruments and other "real world" sounds it makes a big difference if you cut of the transient. Thanks for coming to my TED talk. ;)
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
