Questions tagged [algorithms]
Algorithm is a method expressed in a finite list of steps of well-defined instructions to process a signal.
45
questions
68
votes
10
answers
48k
views
Algorithm(s) to mix audio signals without clipping
I'd like to mix two or more PCM audio channels (eg recorded samples) digitally in an acoustically-faithful manner, preferably in near-real-time (meaning little or no peek-ahead).
The physically "...
13
votes
9
answers
3k
views
Estimate Sine Frequency under White Noise — simple and effective method
Given a sinusoidal signal in white noise, how can one efficiently determine its frequency?
19
votes
9
answers
7k
views
Is there an algorithm to compute the phase for a single frequecy?
If you have a function $f(t)=A \cdot \sin(\omega t+\phi)$, and reference sin wave $\sin(\omega x)$ what would be a fast algorithm to compute $\phi$?
I was looking at Goertzel algorithm, but it doesn'...
10
votes
4
answers
3k
views
Books/resources for implementing various mathematical functions in fixed point arithmetic for DSP purposes
I'm looking for books or resources that cover the following in detail:
implementing mathematical functions (e.g., logarithm, exponential, sine, cosine, inverse) in fixed point arithmetic for DSP ...
9
votes
5
answers
779
views
Identify abrupt changes in an audio waveform
I have an audio file which was created by substituting multiple speech segments into an original utterance.
I want to find the timestamps where such substitutions happened, so I guess that one thing I ...
27
votes
6
answers
3k
views
Calculating the PDF of a waveform from its samples
A while ago I was trying different ways to draw digital waveforms, and one of the things I tried was, instead of the standard silhouette of the amplitude envelope, to display it more like an ...
13
votes
2
answers
2k
views
Detecting drum bpm in a noisy .wav file
I am looking for algorithm(s) to solve the following problem:
Given a noisy .wav sound capture (some wind + friction noise on the microphone), how to detect the BPM of a soft drum beat?
I have ...
9
votes
2
answers
1k
views
Duration of unknown rectangular pulse with additive white Gaussian noise
Problem.
There is a discrete signal $f[i]$ (example below).
It is known, that $f[i]$ have a form of rectangular pulse with additive white Gaussian noise.
$f[i] = s[i] + n[i]$,
$s[i] = \alpha(\...
7
votes
2
answers
2k
views
Kernel Convolution in Frequency Domain - Cyclic Padding
I don't know whether this is the right place to post this, but I suppose it is.
I know that frequency multiplication = circular convolution in time space for discrete signals (vectors).
I also know ...
34
votes
5
answers
5k
views
What factors should I consider in choosing an edge detection algorithm?
I've learned about a number of edge detection algorithms, including algorithms like Sobel, Laplacian, and Canny methods. It seems to me the most popular edge detector is a Canny edge detector, but is ...
14
votes
2
answers
5k
views
methods of computing fixed point atan2 on FPGA
I am in need of computing atan2(x,y) on an FPGA with a continuous input/output stream of data. I managed to implement it using unrolled, pipelined CORDIC kernels, ...
2
votes
3
answers
3k
views
Get a N-FFT with two N/2-FFT already computed
After somme researchs on the web, I don't find the answer of my problem (or I don't understand it) and I hope this post will succeed.
I'm working on a real-time FFT convolution algorithm (C++) which ...
2
votes
2
answers
1k
views
Chromatography Baseline Placement
I have been looking around on Google, and I have not been able to find an explanation of how to do baseline placement in chromatography. what are some algorithms for placing a baseline on a ...
37
votes
4
answers
14k
views
What are good ways to detect signal clipping in a recording?
Given a recording I need to detect whether any clipping has occurred.
Can I safely conclude there was clipping if any (one) sample reaches the maximum sample value, or should I look for a series of ...
19
votes
9
answers
3k
views
Efficient Magnitude Comparison for Complex Numbers
Is there a more efficient algorithm (or what is the most efficient known algorithm) to select the larger of two complex numbers given as $I + jQ$ without having to compute the squared magnitude as
$$...
18
votes
7
answers
6k
views
What are some of the differences between DFT and FFT that make FFT so fast?
I'm trying to understand FFTs, here's what I have so far:
In order to find the magnitude of frequencies in a waveform, one must probe for them by multiplying the wave by the frequency they are ...
11
votes
1
answer
7k
views
Applying A-weighting
I want to calculate the loudness of a given signal and I've come across this thread. I'm slightly confused about the A-Weighting aspect of it. I can't post images, but I think this site has the ...
10
votes
3
answers
18k
views
Digital Distortion effect algorithm
I read the DAFX book by Udo Zölzer about the distortion effect at pages 124-125
and it says that suitable simulation of the distortion is given by the function:
$$f(x)=\frac{x}{|x|}\left(1-e^{x^2/|x|}...
9
votes
4
answers
9k
views
Optimized ANSI C libraries for DSP
I am new to DSP. Are there good open source ANSI C implementations of DSP algorithms?
MATLAB is great at prototyping but once we move to coding in C, it takes time and we end up making too many ...
8
votes
1
answer
1k
views
Detecting a fixed template image out of a semi-constant frame of video
There are a number of videos that I'm looking to process of different video games to detect various "states" in them.
The first game that I am tackling is any edition of Super Street Fighter 4.
In ...
5
votes
4
answers
3k
views
Algorithm for 1d spline interpolation suitable for 8 bit microcontroler
What is a concise, fast, down to earth algorithm for doing (or closely approximating) spline interpolation on a 1d continuous stream of data?
(Edit1: The paragraph below equates to saying "the ...
3
votes
1
answer
2k
views
Efficient FFT computation of a zero-padded vector
I don't think this question has a good answer but will ask nevertheless since it has been bothering me for a few days.
I am interested in computing as efficiently as possible the N-point FFT of a N/2 ...
2
votes
1
answer
311
views
How CDMA receiver extract it's corresponding data from the receiving modulated & superposition-ed signal?
I have difficulty understanding CDMA.
I have read all those PN/walsh code things, and understand orthogonality very well.
But none of the resources I found demonstrate how a receiver end extract ...
22
votes
2
answers
11k
views
Inverse Short Time Fourier Transform algorithm described in words
I'm trying to conceptually understand what is happening when the forward and inverse Short Time Fourier Transforms (STFT) are applied to a discrete time-domain signal. I've found the classic paper by ...
14
votes
6
answers
6k
views
What Approximation Techniques Exist for Computing the Square Root?
I have very limited resources as I'm working with a microcontroller. Is there a taylor-series expansion, common lookup table, or recursive approach?
I'd prefer to do something without using math.h's ...
14
votes
1
answer
2k
views
Estimating onset time of a tone burst in noise?
What techniques might one use to estimate the onset time of a sinusoidal tone burst in a noisy signal?
Assume the tone burst has a known fixed frequency (but unknown phase) and a very sharp rise ...
13
votes
2
answers
3k
views
What Is the Algorithm Behind Photoshop's "Black and White" Adjustment Layer?
Can someone explain the algorithm behind the "Black and White" adjustment layer in photoshop?
I have to reproduce it using C++ for an application that emphasizes non-red/magenta(ish) pixels ...
11
votes
3
answers
1k
views
How to measure the agreement between to curves?
I have values (plotted below) of expected RSSI values over time that I would like to compare with my measured RSSI values. What I was looking for was a way to quantify it so I can change parameters ...
8
votes
3
answers
502
views
Best Approach to Rank Complex Magnitude Comparision Problem
This is in reference to the responses for an efficient algorithm for the comparison of bounded fixed point complex numbers at this post.
Efficient Magnitude Comparison for Complex Numbers
See the ...
6
votes
1
answer
4k
views
Voice Audio Detection algorithm
I have to detect speech intervals in large pre-recorded files in my project. I think, there won't be so much noise in the background (audio will be recordered in the room or even in the studio), but ...
6
votes
4
answers
16k
views
Simple and efficient algorithm to detect frequency and phase of a sine signal
I need an algorithm to detect frequency and phase of a pure sine signal. The frequency of the input signal changes between 0 and 100 Hz.
The value of the signal gets captured with a frequency of 20 ...
6
votes
2
answers
8k
views
Using the Kalman filter given acceleration to estimate position and velocity
I am reading data from an accelerometer. I want to use this data to estimate velocity and position. Originally, I performed a double integration of acceleration to read this data, and as confirmed by ...
5
votes
2
answers
3k
views
Using MFCC in spoken words recognition
We're trying to implement a "simple" speech recognition application in MATLAB (isolated words from a very limited dictionary). We've been trying the following methods:
Extract MFCC coefficients for ...
5
votes
2
answers
780
views
How to measure aliasing?
Aliasing is bad, and we want good filters when downsampling. While what qualifies as aliasing is well-defined mathematically, and we can manually design filters with various tradeoffs, how do we ...
5
votes
1
answer
714
views
One Too Many Non-Zero Eigenvalues in MUSIC DF Algorithm
I'm working on simulating the MUSIC algorithm in MATLAB to determine the azimuth angle of arrival of a simulated signal. My virtual antenna array consists of 4 antennas arranged in a plane.
While I ...
5
votes
1
answer
714
views
How to Use the Walsh Hadamard Transform to Filter 24 bit RGB Color Values in a Localized Spatial Region?
After reading this Signal processing Stack Exchange article tonight, What Is the Walsh Hadamard Transform? How Could One Use It in Image Processing?, I became interested in applying the Walsh-Hadamard ...
3
votes
1
answer
1k
views
Chirp z algorithm clarification
I am attempting to implement a chirp z algorithm to handle random sized DFTs, and I can not seem to obtain any meaningful results. I have gone over several write ups and "think" I have a handle on ...
2
votes
1
answer
457
views
How do audiobook players manage to quickly speedup/slowdown playback speed without using more memory?
Many audiobook player apps on Android have a reading speed slider which lets us choose the reading speed e.g. 0.5x 0.75x 1.00x 1.25x 1.50x. This is time-stretching ...
2
votes
1
answer
9k
views
Use Butterworth and Chebychev filters
I need to calculate frequency response, phase response and apply to signals the Butterworth, Chebychev1 and Chebychev2 band-pass filters.
I'm developing in C++ with Qt, and I'm looking for algorithms ...
2
votes
2
answers
2k
views
Q matrix and updating times in a Kalman filter
The context of the problem is that I have several robots located remotely which give their position (x,y coordinates) every x seconds and send it to a centralized remote server. The value of the ...
2
votes
1
answer
2k
views
Computational Complexity of Polyphase Resampling
does someone know the approximate computational complexity of a polyphase resampling algorithm?
I am trying to find a good argument to prefer a polyphase resampling of Scipy over the FFT resampling ...
1
vote
2
answers
800
views
Extending Goertzel algorithm to 24 kHz, 32 kHz and 48 kHz
I'm learning to implement Goertzel's algorithm to detect DTMF tones from recorded wave files. I got one implemented in python from here. It supports audio sampled at 8 kHz and 16 kHz. I would like to ...
1
vote
2
answers
2k
views
Understanding Voss-McCartney pink noise generation algorithm
I'm implementing the Voss-McCartney pink noise generation algorithm.
If you follow the link above, you can read:
from James McCartney 2 Sep 1999 21:00:30 -0600:
The top end of the ...
0
votes
2
answers
603
views
Digital Panning Effect
To get a panning effect I know that there is a need for a Circular Matrix.
The angle is can be set as a default or I can let the user to select the angle.
So if the angle is $\theta$, the circular ...
0
votes
1
answer
259
views
The selection of the amplitude of the signal, consisting of rectangular pulses, at different frequencies
I already asked a similar question, but did not receive an answer and did not find a solution, I want to make another attempt to get to the bottom of the truth.
There is a signal consisting of ...