fft

NumPy Fast Fourier transform (FFT) does not work on sine wave generated in Audacity

北城以北 提交于 2020-01-04 01:31:09
问题 I am trying to use the NumPy library for Python to do some frequency analysis. I have two .wav files that both contain a 440 Hz sine wave. One of them I generated with the NumPy sine function, and the other I generated in Audacity. The FFT works on the Python-generated one, but does nothing on the Audacity one. Here are links to the two files: The non-working file: 440_audacity.wav The working file: 440_gen.wav This is the code I am using to do the Fourier transform: import numpy as np import

FFT rust代码实现

爱⌒轻易说出口 提交于 2020-01-03 09:46:42
目前的实现主要有: 1)Halo中( https://github.com/ebfull/halo/blob/master/src/util.rs )在utils.rs中对两条新的曲线做了实现; 2)Zexe中,设计了单独的ff-fft模块,对pairing曲线(如Jubjub/mnt6等)做了实现; 3)Openzkp中( https://github.com/0xProject/OpenZKP/blob/master/algebra/primefield/src/fft.rs )在fft.rs 中对251-bit prime field 做了fft实现。 注意,其实在做polynomial commitment时, factor(p-1) = 2^s*t ,其中的 s 值代表允许的多项式的最高阶数。 generator=primitive_root(p) ,(p-1)-th root of unity的计算方式为 power_mod(generator, t, p) 。 对于curve25519来说,其Fr域内的s值仅为2且generator无返回(无论是基于magma还是sagemath)。所以在polynomial commitment时,其并不适用。 另外,考虑到vector commitment(如系数的commitment,需要用到scalar值乘以point)的结合

F#/“Accelerator v2” DFT algorithm implementation probably incorrect

十年热恋 提交于 2020-01-02 12:46:09
问题 I'm trying to experiment with software defined radio concepts. From this article I've tried to implement a GPU-parallelism Discrete Fourier Transform. I'm pretty sure I could pre-calculate 90 degrees of the sin(i) cos(i) and then just flip and repeat rather than what I'm doing in this code and that that would speed it up. But so far, I don't even think I'm getting correct answers. An all-zeros input gives a 0 result as I'd expect, but all 0.5 as inputs gives 78.9985886f (I'd expect a 0 result

Hamming Filter in Frequency and Spatial Domain

亡梦爱人 提交于 2020-01-02 08:36:35
问题 I want to remove the Gibbs artifact in a 1D signal by applying the Hamming filter on that in MATLAB. What I have is the k1 which is the signal in frequency domain. I can get the signal in time domain by applying DFT on k1 : s1 = ifft(ifftshift(k1)); This signal has Gibbs artifact. Now, I want to remove it by (A) multiplying Hamming filter to k1 in teh frequency domain and (B) convolving IFFT of Hamming filter with s1 in the spatial domain. I am expecting same output from both of these: % (A)

Hamming Filter in Frequency and Spatial Domain

匆匆过客 提交于 2020-01-02 08:36:32
问题 I want to remove the Gibbs artifact in a 1D signal by applying the Hamming filter on that in MATLAB. What I have is the k1 which is the signal in frequency domain. I can get the signal in time domain by applying DFT on k1 : s1 = ifft(ifftshift(k1)); This signal has Gibbs artifact. Now, I want to remove it by (A) multiplying Hamming filter to k1 in teh frequency domain and (B) convolving IFFT of Hamming filter with s1 in the spatial domain. I am expecting same output from both of these: % (A)

calculating frequency with apple's auriotouch example

大憨熊 提交于 2020-01-02 05:40:17
问题 I am working on a program that needs to capture the frequency of sound from a guitar. I have modified the aurioTouch example to output the frequency by using the frequency with the highest magnitude. It works ok for high notes but is very inaccurate on the lower strings. I believe it is due to overtones. I researched ways on how to solve this problem such as Cepstrum Analysis but I am lost on how to implement this within the example code as it is unclear and hard to follow without comments.

FFT - Calculating exact frequency between frequency bins

本秂侑毒 提交于 2020-01-02 03:25:38
问题 I am using a nice FFT library I found online to see if I can write a pitch-detection program. So far, I have been able to successfully let the library do FFT calculation on a test audio signal containing a few sine waves including one at 440Hz (I'm using 16384 samples as the size and the sample rate at 44100Hz). The FFT output looks like: 433.356Hz - Real: 590.644 - Imag: -27.9856 - MAG: 16529.5 436.047Hz - Real: 683.921 - Imag: 51.2798 - MAG: 35071.4 438.739Hz - Real: 4615.24 - Imag: 1170.8

Fast Fourier transforms on GPU on iOS

本秂侑毒 提交于 2020-01-02 02:53:11
问题 I am implementing compute intensive applications for iOS (i.e., iPhone or iPad) that heavily use fast Fourier transforms (and some signal processing operations such as interpolations and resampling). What are the best libraries and API that allows for running FFTs on iOS? I have briefly looked into Apple Metal as well as Apple vDSP. I wasn't sure that vDSP utilizes GPUs although it seems to be highly parallelized and utilizes SIMD. Metal seems to allow to access GPU for compute intensive apps

Interpret numpy.fft.fft2 output

老子叫甜甜 提交于 2020-01-02 01:55:06
问题 My goal is to obtain a plot with the spatial frequencies of an image - kind of like doing a fourier transformation on it. I don't care about the position on the image of features with the frequency f (for instance); I'd just like to have a graphic which tells me how much of every frequency I have (the amplitude for a frequency band could be represented by the sum of contrasts with that frequency). I am trying to do this via the numpy.fft.fft2 function. Here is a link to a minimal example

Fast Fourier Transform for non log 2

亡梦爱人 提交于 2020-01-01 20:00:08
问题 I want to implement Fast Fourier Transform in Java for chord recognition, but I don't really get it. It says that the number of samples should be a power of 2, so what should we do for a song that doesn't have number of samples equal to a power of 2? Also I would like to know about the STFT. 回答1: You normally generate an STFT over a sliding window throughout your file. The size of the window is chosen to give a reasonable time period over which the characteristics of the sound do not change