signal-processing

Fourier space filtering

让人想犯罪 __ 提交于 2019-12-18 13:34:28
问题 I have a real vector time series x of length T and a filter h of length t << T. h is a filter in fourier space, real and symmetric. It is approximately 1/f. I would like to filter x with h to get y. Suppose t == T and FFT's of length T could fit into memory (neither of which are true). To get my filtered x in python, I would do: import numpy as np from scipy.signal import fft, ifft y = np.real( np.ifft( np.fft(x) * h ) ) ) Since the conditions don't hold, I tried the following hack: Select a

Android AudioRecord which settings to record call

℡╲_俬逩灬. 提交于 2019-12-18 13:15:36
问题 I use AudioRecord class to record the voice during a call. I am intererested to record only the voice of the person who owns the phone ( from the microphone). During the recording I would like to do some audio processing but this is offtopic for now. Android has the following AudioSources options: MediaRecorder.AudioSource.VOICE_CALL MediaRecorder.AudioSource.MIC MediaRecorder.AudioSource.VOICE_UPLINK MediaRecorder.AudioSource.VOICE_DOWNLINK Can you explain what is the differences among them.

How many FFTs per second can I do on my smartphone? (for performing voice recognition)

时光总嘲笑我的痴心妄想 提交于 2019-12-18 12:29:22
问题 I'm exploring voice recognition and DSP, and so I would like to implement a simple sound frequency analyzer on my smartphone (I have both an iPhone and a Samsung Nexus S running Android). I have done basic DSP in Matlab previously. From my understanding, I need to perform an FFT to get the fundamental frequencies of a signal. So now, I would like to sample the microphone at 44100 Hz. If I use a sliding window of sample size 512 with 50% overlap, that means I need to do an FFT every 256

MATLAB - Missing fundamental from an FFT [closed]

走远了吗. 提交于 2019-12-18 12:26:43
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I am currently working on my fourth year project (computer science) which involves the automatic transcription of music -> sheet music. I am doing it in Matlab at the moment but will have to be converted to java at some stage. My problem: I have my program returning the correct

peak detection for growing time series using Swift

萝らか妹 提交于 2019-12-18 12:07:03
问题 Would anyone have a good algorithm to measure peaks in growing time series data using Swift (v3)? So, detect peaks as the data is streaming in. E.g. a Swift version of the smooth z-wave algorithm. That algorithm seems to be suitable. I would need to detect the peaks as shown below. The data contains positive and negative numbers. Output should be a counter of the peaks, and/or true/false for that specific sample. Sample dataset (summary of the last series): let samples = [0.01, -0.02, -0.02,

FFT real/imaginary/abs parts interpretation

匆匆过客 提交于 2019-12-18 11:17:15
问题 I'm currently learning about discret Fourier transform and I'm playing with numpy to understand it better. I tried to plot a "sin x sin x sin" signal and obtained a clean FFT with 4 non-zero points. I naively told myself : "well, if I plot a "sin + sin + sin + sin" signal with these amplitudes and frequencies, I should obtain the same "sin x sin x sin" signal, right? Well... not exactly (First is "x" signal, second is "+" signal) Both share the same amplitudes/frequencies, but are not the

Detecting periodic data from the phone's accelerometer

我怕爱的太早我们不能终老 提交于 2019-12-18 10:57:20
问题 I am developing an Android app and I am need to detect user context (if walking or driving at minimal) I am using accelerometer and sum of all axes to detect the accleration vector. It is working pretty well in the way I can see some periodics values while walking. But I need to detect these poeriods programmatically. Please is there any kind of math function to detect period in set of values? I heard Fourier transformation is usable for that, but I really dont know how to implement it. It

Implement Hann Window

旧街凉风 提交于 2019-12-18 10:46:45
问题 I take blocks of incoming data and pass them through fftw to get some spectral information. Everything seems to be working, however I think I'm getting some aliasing issues. I've been trying to work out how to implement a hann window on my blocks of data. Google has failed me for examples. Any ideas or links I should be looking at? double dataIn[2048] > /* windowing here? */ > FFT > double freqBins[2048] Update Thanks to Oli for pointing out the issue I'm actually trying to fix is spectral

Pitch recognition of musical notes on a smart phone

风格不统一 提交于 2019-12-18 09:56:27
问题 With limited resources such as slower CPUs, code size and RAM, how best to detect the pitch of a musical note, similar to what an electronic or software tuner would do? Should I use: Kiss FFT FFTW Discrete Wavelet Transform autocorrelation zero crossing analysis octave-spaced filters other? In a nutshell, what I am trying to do is to recognize a single musical note, two octaves below middle-C to two octaves above, played on any (reasonable) instrument. I'd like to be within 20% of the

Matlab: Generate noisy signal for particular SNR and particular variance

本秂侑毒 提交于 2019-12-18 09:48:03
问题 In general when we add noise to a signal x=rand(1,100) , this is one way sigma_2_v = 0.5; noisy_signal = rand(1,100) + sqrt(sigma_2_v)*randn(1,100); There is another method found here: Proper way to add noise For my case, I need to have the information about the variance of the noise, sigma_2_v , and generate noisy signal by varying sigma_2_v . How can I do that? 回答1: There are a number of possible conventions used to define a s/n ratio, a common one being based on the notion of signal and