signal-processing

How Do I do Real Time Sound/Signal Processing On The iPhone?

那年仲夏 提交于 2019-12-03 08:37:36
I may be doing an iPhone-based application doing near-real-time sound-processing (filtering, etc). I was wondering the best way to get started. Would I want to create an audio cue for recording and processing sound, as described here ? Edit: I should be clear. I am not asking how to do signal processing, in general. I know some of that and my team's expert will handle the rest. I asking what the "low level" interfaces to sound data on the iphone are. Edit2: My iphone development has been pushed back a week or two so I don't have access to the deve kit right now. Once I have access to the kit,

Using Goertzel algorithm to detect frequency

心不动则不痛 提交于 2019-12-03 08:28:23
I am trying to write a program for android to detect frequency using Goertzel algorithm. However when I apply the algorithm on the data that I get from the AudioRecord read() method, the magnitude does not peak on the target frequency (.i.e: it usually peak on low frequency). Am I misunderstanding anything? protected void detect() { double[] dbSample = new double[bufferSize]; short[] sample = new short[bufferSize]; max_magnitude = 0; while(isRecording){ int bufferReadResult = recorder.read(sample,0,bufferSize); for (int j=0;j<bufferSize&&j<bufferReadResult;j++) { dbSample[j] = (double)sample[j

Fast 2D convolution for DSP

限于喜欢 提交于 2019-12-03 07:50:24
问题 I want to implement some image-processing algorithms which are intended to run on a beagleboard. These algorithms use convolutions extensively. I'm trying to find a good C implementation for 2D convolution (probably using the Fast Fourier Transform). I also want the algorithm to be able to run on the beagleboard's DSP, because I've heard that the DSP is optimized for these kinds of operations (with its multiply-accumulate instruction). I have no background in the field so I think it won't be

How to implement a LowPass Filter?

允我心安 提交于 2019-12-03 07:49:05
I'm doing some math on both gyroscope and accelerometer data combined and I'd like to low pass filter the resulting data. So could someone post some generic code for a Low Pass filter? A 1st order IIR low-pass filter can be of the form: output_value = rate * input_value + (1.0 - rate) * previous_output_value; which is pretty much what's inside Apple's AccelerometerGraph example. You select the rate parameter depending on what frequency (very very roughly shakes per second) you want to roll-off or start to attenuate to get a smoother resulting output, and the sample rate of the input data. A

How to capture raw signal from wireless router?

99封情书 提交于 2019-12-03 07:31:31
I have seen several projects now which derive novel spatial information from radio data collected from a typical wireless router: http://wisee.cs.washington.edu/ http://www.extremetech.com/extreme/133936-using-wifi-to-see-through-walls The idea of using a wireless router as a sort of passive radar is fantastic. I am very interested in experimenting with data collected from a wireless router myself, but there is little information on how to go about actually interfacing with a wireless router and getting a raw stream of information collected by the device. Similar questions have been asked on

Identifying common periodic waveforms (square, sine, sawtooth, …)

[亡魂溺海] 提交于 2019-12-03 07:29:15
Without any user interaction, how would a program identify what type of waveform is present in a recording from an ADC? For the sake of this question: triangle, square, sine, half-sine, or sawtooth waves of constant frequency. Level and frequency are arbitrary, and they will have noise, small amounts of distortion, and other imperfections. I'll propose a few (naive) ideas, too, and you can vote them up or down. You definitely want to start by taking an autocorrelation to find the fundamental. With that, take one period (approximately) of the waveform. Now take a DFT of that signal, and

How to correlate two time series with gaps and different time bases?

痞子三分冷 提交于 2019-12-03 07:20:32
问题 I have two time series of 3D accelerometer data that have different time bases (clocks started at different times, with some very slight creep during the sampling time), as well as containing many gaps of different size (due to delays associated with writing to separate flash devices). The accelerometers I'm using are the inexpensive GCDC X250-2. I'm running the accelerometers at their highest gain, so the data has a significant noise floor. The time series each have about 2 million data

How to look up sine of different frequencies from a fixed sized lookup table?

爷,独闯天下 提交于 2019-12-03 07:08:11
I am sampling a sine wave at 48 kHz, the frequency range of my sine wave can vary from 0 to 20000 Hz with a step of about 100 Hz. I am using a lookup table approach. So I generate 4096 samples for a sine wave for 4096 different phases. I think the general idea behind this to increment the step size and use different step sizes for different frequncy. So I do the following (pseudo code). But I am not sure how the step size is going to be related to the frequency I want to generate the samples of the sine wave of? For example if my frequency is 15000 Hz what would be the step size that I have to

Software Phase Locked Loop example code needed

别说谁变了你拦得住时间么 提交于 2019-12-03 07:06:01
Does anyone know of anywhere I can find actual code examples of Software Phase Locked Loops (SPLLs) ? I need an SPLL that can track a PSK modulated signal that is somewhere between 1.1 KHz and 1.3 KHz. A Google search brings up plenty of academic papers and patents but nothing usable. Even a trip to the University library that contains a shelf full of books on hardware PLL's there was only a single chapter in one book on SPLLs and that was more theoretical than practical. Thanks for your time. Ian This is an interactive design package for designing digital (i.e. software) phase locked loops

python - How to get high and low envelope of a signal?

末鹿安然 提交于 2019-12-03 06:08:04
问题 I have quite a noisy data, and I am trying to work out a high and low envelope to the signal. It is kinda of like this example in MATLAB: http://uk.mathworks.com/help/signal/examples/signal-smoothing.html in "Extracting Peak Envelope". Is there a similar function in Python that can do that? My entire project has been written in Python, worst case scenario I can extract my numpy array and throw it into MATLAB and use that example. But I prefer the look of matplotlib... and really cba doing all