signal-processing

How does a complex number capture phase, amplitude AND frequency in the result of an FFT?

元气小坏坏 提交于 2019-12-06 05:54:43
问题 I understand that the magnitude and phase are captured in the real and imaginary parts in the result of an fft. But how does each sample capture phase? Is the phase related to the N discrete samples provided in time domain? That is, if the input sample included 44100 samples for a second, then is each resulting value of the FFT represent 1/44100 of the phase? For example, the first FFT value is at frequency 1/44100 and the second value is 2/44100 and so on? 回答1: i think you are saying "phase"

how to convert normalized frequency to actual frequency

不想你离开。 提交于 2019-12-06 05:54:07
问题 suppose that we have following code function [ x ] = generate1(N,m,A3) f1 = 100; f2 = 200; T = 1./f1; t = (0:(N*T/m):(N*T))'; %' wn = randn(length(t),1); %zero mean variance 1 x = 20.*sin(2.*pi.*f1.*t) + 30.*cos(2.*pi.*f2.*t) + A3.*wn; %[pks,locs] = findpeaks(x); plot(x) end i have generated signal using following command y=generate1(3,500,1); and i have got 501 length sample,now i want to use music method to detect frequencies,namely 100 and 200,assume that number of parameter is 2,so i have

How to begin building a VSTi Plugin?

那年仲夏 提交于 2019-12-06 05:18:55
Im wondering the exact method through which I would go to build a VSTi Plugin is. I don't expect to code the next Massive in a few shorts week, as I have no knowledge of DSP and very basic programming skills. Im sure this is probably above my current level but I figure I'll grow as a programmer if I give myself a high goal that Im deeply interested in. All that being said, Im at a loss as to where to begin. I know that I would need to download the Steinberg VST SDK, but many of the other resources I've searched have given conflicting info as to what framework I need to download, etc etc. So

Compiling FFTW3 for IOS 5.1 on OSX 10.7

扶醉桌前 提交于 2019-12-06 04:21:03
问题 A similar version of this question has been asked before (how to compile fftw3 on iOS) about previous versions of IOS and/or OSX, but I am unable to get fftw3 working on a actual IOS device. (Though it works fine in the simulator using the MacPorts "universal" distribution). If anyone has had any success using fftw3 please let me know how you were able to get it working! I am using OSX 10.7 and am trying specifically to run fftw on an iPad3 with IOS 5.1 installed. Thanks. 来源: https:/

Programming a Spectrogram using C [closed]

房东的猫 提交于 2019-12-06 03:40:33
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 8 years ago . I am trying to make an audio spectrogram in C and am thinking about using the BASS library: http://www.un4seen.com. I searched over Google and here, but majority of examples are in C++. If any of you have any

R equivalent of MATLAB's filter function

时光毁灭记忆、已成空白 提交于 2019-12-06 03:02:18
问题 I'm adapting MATLAB code to R and trying to generate a waveform using ARMA formula. Is there a simple R equivalent function for MATLAB's filter to take AR/MA coefficients to build a waveform? npts = 100; a = [1 0.6]; % AR coeffs b = [1 0.25 3]; % MA coeffs e = randn(npts,1); % generate gaussian white noise waveform = filter(b,a,e); % generate waveform 回答1: Hmm can't you achieve that with filter function in the package signal ? require(signal) a = c(1,0.6) b = c(1,0.25,3) e = rnorm(100)

Compute EWMA over sparse/irregular TimeSeries in Pandas

删除回忆录丶 提交于 2019-12-06 02:59:57
Given the following high-frequency but sparse time series: #Sparse Timeseries dti1 = pd.date_range(start=datetime(2015,8,1,9,0,0),periods=10,freq='ms') dti2 = pd.date_range(start=datetime(2015,8,1,9,0,10),periods=10,freq='ms') dti = dti1 + dti2 ts = pd.Series(index=dti, data=range(20)) I can compute an exponentially weighted moving average with a halflife of 5ms using a pandas function as follows: ema = pd.ewma(ts, halflife=5, freq='ms') However, under the hood, the function is resampling my timeseries with an interval of 1 ms (which is the 'freq' that I supplied). This causes thousands of

how to use Band Pass filter(18Khz to 22Khz) in Android

☆樱花仙子☆ 提交于 2019-12-06 02:07:53
问题 I need to use Band Pass Filter to filter my real time recording audio. The Range is about 18Khz to 22Khz. I've seen many examples,unfortunatly they are used to detect frequency of audio....Since i'm new to DSP,please ellobrate your answer.... 来源: https://stackoverflow.com/questions/21456630/how-to-use-band-pass-filter18khz-to-22khz-in-android

Audio Manipulation In C++

百般思念 提交于 2019-12-06 02:06:55
I hope this is the right place to post this and somebody can help. I am a music technology student and I've recently picked up learning C++ as it would greatly help my career knowing a programming language, especially this one since it is used in the video games industry. Anyways onto the main topic. What I want to create is a program (in C++) that lets the user load a 16bit linear PCM WAVE file. Then I want to manipulate the audio sample data within that wave file. I want to either remove every nth sample or randomise them within a certain parameter (±10%). Then write it as a new WAVE file. I

Fourier transform of simple sin wave in matlab

戏子无情 提交于 2019-12-06 00:15:29
I try to show spectrum of simple sin wave as we know a single sin wave with fixed frequency must have on peak in its spectrum I write this code but I can't get this one peak what is wrong in my code: clc nsteps=200;%number of signal elements in time domain i=sqrt(-1); NFREQS=100;%number of elements in frequency domain ddx=1e-9; dt=ddx/(6e8);%separation between each time domain elements lambdai=150e-9; lambdaf=500e-9; freqi=3e8/lambdai; freqf=3e8/lambdaf; freq=zeros(1,NFREQS); for j=1:NFREQS freq(j)=freqi-j*(freqi-freqf)/NFREQS;%desired frequency domain end arg=2*pi*freq*dt; et=zeros(nsteps,1);