signal-processing

How do I do convolution in F#?

I would like convolve a discrete signal with a discrete filter. The signal and filter is sequences of float in F#. The only way I can figure out how to do it is with two nested for loops and a mutable array to store the result, but it does not feel very functional. Here is how I would do it non-functional: conv = double[len(signal) +...

How does retiming work in systolic arrays?

How does retiming work in systolic arrays (used in signal processors)? I read that there is some notion of negative delay which is used, but how can a delay be negative and if that is just an abstraction then how does it help? ...

Faster abs-max of float array

I need to draw peak meters for audio in realtime. Minimum 44100 samples per second times a minimum 40 streams. Each buffer is between 64 and 1024 samples. I need to grab the abs max from each buffer. (These are then fed through a kind of lowpass filter and drawn at about 20ms intervals.) for(int i = 0; i < numSamples; i++) { absM...

How to convert a low-pass filter to a band-pass filter

I have a a low pass filter described by the following transfer function: h[n] = (w_c/Pi) * sinc( n * w_c / Pi ), where is w_c is the cutoff frequency I have to convert this low-pass filter to a band-pass filter. ...

Normalizing FFT Data for Human Hearing

The typical FFT for audio looks pretty similar to this, with most of the action happening on the far left side http://www.flight404.com/blog/images/fft.jpg He multiplied it by a partial sine wave to get it to the bottom, but the article isn't too specific on this part of it. It also seems like a "good enough" modification of the datase...

BlackBerry Technical Specification

I'm having trouble locating BlackBerry techical specifications and their website is a mess. They also don't have a number that I can use to easily contact them. This isn't exactly a coding question, but what does the BlackBerry audio API look like, and where can I get technical specifications on audio? Specifically, I'm trying to find...

Algorithm for base-10 numeric display - minimum changes per refresh

Quick Summary: I'm looking for an algorithm to display a four-digit speed signal in such a way that the minimum number of (decimal) digits are changed each time the display is updated. For example: Filtered Signal Display -------------------- 0000 0000 2345 2000 2345 2300 2345 2340 0190 ...

Can I obtain higher resolution in the frequency domain with a stereo signal?

Background I admit, this question stems from an ultimate lack of deep understanding of the underlying mathematics involved with digital signal processing; I'm still learning. I want to take a set of amplitude samples, say 1024 (single channel), and bring them into the frequency domain. Obviously this requires a FFT; no problem there. ...

"Voice trigger" detection

I have a voice application that would be much-improved if there was the ability to use a "trigger word" to start recording audio. I don't need a full speech-text engine, just the ability to reliably/efficiently detect the trigger word. I am wondering if there are any specialized speech engines that support this specific use case, or any...

in-place bit-reversed shuffle on an array

For a FFT function I need to permutate or shuffle the elements within an array in a bit-reversed way. That's a common task with FFTs because most power of two sized FFT functions either expect or return their data in a bit-reversed way. E.g. assume that the array has 256 elements I'd like to swap each element with it's bit-reversed patt...

Clipping FFT Matrix

Hello, Audio processing is pretty new for me. And currently using Python Numpy for processing wave files. After calculating FFT matrix I am getting noisy power values for non-existent frequencies. I am interested in visualizing the data and accuracy is not a high priority. Is there a safe way to calculate the clipping value to remove th...

Looking for C# audio analysis libraries

Hi. Im working on a Software Project where our team needs to record a train horn sound. We have purchased the recorder; its saved as a .wav file. We now need to extract data from the file like frequency and amplitude to create spectrum analysis and decibel level graphs. Any C# libraries out there for this type of thing? ...

How to implement a guitar amp or FX emulation on windows platform?

which tech should I pick up? Should I write a driver or something? Thank you very much ...

How to convert a .WAV audio data sample into an double type?

Hi, I'm working on an application that processes audio data. I'm using java (I've added MP3SPI, Jlayer, and Tritonus). I'm extracting the audio data from a .wav file to a byte array. The audio data samples I'm working with are 16 bits stereo. According to what I've read the format for one sample is: AABBCCDD where AABB represents l...

Fast Average Square Difference Function

I'm wondering if anyone knows of a fast (i.e. O(N log(N)) ) method of calculating the average square difference function (ASDF) or average magnitude difference function (AMDF) for a periodic signal, or it is even possible. I know that one can use the FFT to calculate the periodic cross correlation. For example, in Matlab code, for i=1:...

Exponential Moving Average Sampled at Varying Times

I have a continuous value for which I'd like to calculate an exponential moving average. Normally I'd just use the standard formula for this: Sn = Y + (1-)Sn-1 where Sn is the new average, is the alpha, Y is the sample, and Sn-1 is the previous average. Unfortunately, due to various issues I don't have a consistent sample time. I m...

How to use DSP to speed-up a code on OMAP?

I'm working on a video codec for OMAP3430. I already have code written in C++, and I try to modify/port certain parts of it to take advantage of the DSP (the SDK (OMAP ZOOM3430 SDK) I have has an additional DSP). I tried to port a small for loop which is running over a very small amount of data (~250 bytes), but about 2M times on diffe...

Digital Filter, Math in Java,

Hi, I need your help, and thank you for reading my question! I am currently writing a java Programm that will use an Direket Form 2 Transposed Filter. I know that the function filter in Matlab will do that just fine, but i have to use Java. So does anyone know you to implement this Direkt Form 2 Transposed , this Math Function: y(n) ...

AWGN generator for .NET

I'm looking for an Additive White Gaussian Noise generator for .NET. I know that somewhere there is some degree of interoperability between .NET and MATLAB, which has a AWGN generator, but I don't know if its free EDIT and I just found it. Probably other applications as GNU Octave, which have similar functionalities to MATLAB, have .NE...

FFT-based 2D convolution and correlation in Python

Is there a FFT-based 2D cross-correlation or convolution function built into scipy (or another popular library)? There are functions like these: scipy.signal.correlate2d - "the direct method implemented by convolveND will be slow for large data" scipy.ndimage.correlate - "The array is correlated with the given kernel using exact calcu...