C is a high level (i.e. not assembler) programming language often used to program DSPs and other embedded microprocessors as well as being used for systems programming. Features of the language make it especially suitable for programming hardware and writing device drivers.

learn more… | top users | synonyms

0
votes
3answers
69 views

3dB and 6dB Per Octave Rolloff Digital Filters / Generating Pink and Brown Noise

So I would like to have a design method for filters with 3dB and 6dB per octave roll off -- for generating pink and brown noise respectively. I know the following 'pinking' filters exist: Filter to ...
1
vote
0answers
19 views

The Rank Of Broadband LCMV Beamformer Constraint Matrix

So I am wondering why I keep seeing that the rank of the LCMV Broadband Constraint Matrix is equal to the number of constraints, when in practice, I find that the rank is only 1. This is precluding me ...
0
votes
0answers
25 views

Vein extraction from this image

I have this image: What methods should I use to extract the veins from this image. Thank you.
0
votes
2answers
27 views

Window functions and indexes larger than N/2

How does the n index for a window with $0 \le |n| \le N/2$ e.g the Bohman window function, get implemented when having a specific window size? ...
0
votes
0answers
15 views

Piecewise approximation of 3D surface

I've used general piecewise polynominal approximation schemes in the past for general function approximation with a single variable. I now have a problem where I need to approximate a 3D surface ...
1
vote
1answer
64 views

Fractional/Interpolating Delay Line still sounding glitchy

I'm trying to implement a simple digital delay line. I want it so that when the user changes the delay amount, it sounds smooth and not glitchy. Currently I'm implementing a fractional delay line but ...
0
votes
0answers
35 views

How do I decode(demodulation) and get original data from audio sample data

Here I'm talking about the less-than-ideal situations, in other words, the audio sample data may have burrs or error bits in it. Encode and decode theory: I am using FSK to encode my original binary ...
4
votes
1answer
354 views

Smoothed Square Wave

new here and probably pretty unexperienced compared to the rest of you. This should be simple enough but just wanted some clarification. I'm trying to model an analog square wave oscillator with C. ...
1
vote
1answer
31 views

How to perform sine generation (in C)?

I am interested in how should a listing for a program look like that will generate a sine of f=50hz, using the next arguments for any moment in time. ...
0
votes
2answers
150 views

Forward and backward filtering

I have an input sequence $x(n)$ and impulse sequence \begin{equation} h(n) = \begin{cases} 0 & \quad \text{when } n = 0 \\ .239052 & \quad \text{when } n = 1 \\1.3357\exp(-0.650286n) & ...
0
votes
1answer
72 views

Possible to implement simple IIR filter with greater than 6 db/octave slope?

I am using the following IIR code as a low-pass filter in a software project, and it works great. However, I would like the slope of the filter to be much steeper as the one here seems to be very ...
0
votes
0answers
31 views

Filter signal1 from evolving frequency response of signal2

I'm a composer (of music) starting out with signal processing. I'm also reasonably proficient in C at this point. I'm not even sure if what I'm trying to do is possible, because I can't yet find an ...
0
votes
1answer
89 views

How would I go about designing a difference equation for a given type of filter?

I have experience using design tools such as Xilinx's CoreGen and MatLab's DSP tool kit, but I have not really had much experience designing filters from the ground up. Reinventing the filter as it ...
0
votes
1answer
148 views

Help me understanding the super equalizer source code

Please forgive my bad English. Hello, I'm trying to understand Shibatch's super equalizer Winamp plugin source, but I'm not good at DSP and mathematics. It seems that super equalizer plugin uses ...
2
votes
2answers
667 views

Perform Convolution in Frequency Domain Using FFTW?

I'm trying to convolve two signals $x(n)$ and $h(n)$ in C by using the FFTW library's functions to perform a Fourier transform on each, multiply the appropriate complex components together, and take ...
0
votes
2answers
76 views

Playing back an audio file at an arbitrary rate with upsampling and downsampling

Background: My overall goal is to create an audio file player which can playback an audio file at an arbitrary rate. The rate can change continuously as the file plays. This means upsampling to ...
0
votes
1answer
39 views

How to manipulate attenuation in Parks MClellan algorithm?

I am using GNU Radio C++ source code in my app (pm_remez()) for generating FIR filters coefficients. Input parameters here are: ...
0
votes
1answer
39 views

Fast Fourier Transformation using parallel processing coding for image processing [closed]

I'm now working in parallel precessing -and i want a full code for fast Fourier transform(FFT) written parallel processing Code for any image processing application
0
votes
1answer
84 views

Kiss fft does not work after giving it more than 32 samples

I am trying to take data from an accelerometer and apply Kiss FFT to the samples. I'm using a Freescale Kinetis FRDM-K22F board. I want to use 64 samples, but when I run the program I get an error ...
1
vote
3answers
284 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 ...
0
votes
1answer
104 views

Beginner - use FFT to display spectrum/equalizer

At first, I want to say that I'm totally beginner in DSP and I don't have enough math education to understand Fast-Fourier transformation. I'm a programmer and I want to archieve something like ...
0
votes
3answers
2k views

How to implement a moving average in C without a buffer?

Is it possible to implement a moving average in C without the need for a window of samples? I've found that I can optimize a bit, by choosing a window size that's a power of two to allow for ...
4
votes
1answer
229 views

Denoise images with wavelets

I try to understand what following algorithm from this gimp plugin does to denoise an image: ...
0
votes
0answers
169 views

Well-regarded C/C++ General-purpose DSP libraries

I am looking to transition some of my MATLAB algorithms to C/C++ for deployment on target (PowerPC and/or ARM). Mostly 1D FIR/IIR filter in this instance. In other domains, there are well-regarded ...
-1
votes
1answer
89 views

Confusion when applying Hamming window to signal

I am writing some code which takes a signal of length $n$, and processes it in 20 ms chunks with 5 ms of overlap... So basically I have a buffer of 20 ms worth of sampled data, and I am trying to ...
1
vote
0answers
58 views

Direct Form I Filter from Direct Form II

I am looking a way to make outputs match. For len 160 wouldnt the error be significant? For 40 ? I have included some sample output showing the error. Direct Form 2 Original ...
0
votes
2answers
2k views

C/C++ library for digital modulation [closed]

Is there a library written in C/C++ that offers functions like QPSK modulation?
2
votes
1answer
381 views

Calculating the Power spectral density

I've already asked this question on SO, but didn't get an answer, I tqake a shot here. I am trying to get the PSD of a real data set by making use of fftw3 ...
4
votes
5answers
874 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 ...
2
votes
0answers
116 views

What is dynamic pulse-width modulation?

I'm working through exercises in a book called The Audio Programming Book and have been doing okay for nearly 300 pages, but have just got stuck. (I'm a musician, not programmer or audio specialist ...
0
votes
2answers
363 views

Confusion on using FFTW 3.3.4 (C version) for real and even data sets

I am using FFTW3 to transform the autocorrelation function of a particular function. I expect the transform to be real since the autocorrelation function is symmetric with respect to negative and ...
1
vote
2answers
517 views

Recommendations for DSP Hardware

I'm trying to figure out what a good DSP unit would be to try and learn how to do some embedded programming on? I would like something relatively inexpensive but that still has a decent amount of ...
0
votes
1answer
225 views

understanding complex fft results

i use this for complex fft. Output expected $fft[3].real= 32$ (peak at 3rd bin) $fft[61].real= 32$ ((peak at negative frequency pair of 3rd bin)) All other values negligibly small The input is ...
1
vote
2answers
326 views

problems calculating phase propagation (in C)

I'm coding a phase vocoder in C for time-stretching audio signals. The only piece that is currently not working is the phase propagation. I take overlapping frames from an input signal, apply a ...
0
votes
1answer
1k views

Equal power crossfade

I am working on an audio system where I need to implement an equal power crossfade between two signals over a specified number of samples. Initially I implemented a linear fade but this creates a dip ...
0
votes
2answers
413 views

Manipulating with frequencies through fftw

I'm using portaudio for I/O audio streaming, and I wanted to apply some equalization on audio input from microphone. I found that most people refer to fft for task like that, so I use FFTW library in ...
0
votes
1answer
2k views

Trouble Generating a Sine Wave in C/Matlab from Basics

this is a crosspost from stackoverflow as I figured there may be more who can help me here... I've been writing a basic C program to generate a sine wave and write it out to STDOUT for piping into a ...
0
votes
1answer
628 views

Implementation of FFT algorithm in C Programming [closed]

Does anyone know any FFT algorithm that can be implemented in C? I am trying to convert a built-in matlab FFT api to a function in C. Appreciate any help!
0
votes
1answer
100 views

Mat class of c++ in open cv [closed]

I am a beginner in opencv and have started learning it using visual studio 2012 and opencv 2.4.7 . But i got stuck at very beginning .I want to know about Mat used in Opencv .It is a class and an ...
0
votes
1answer
180 views

In voice recognition system, how to match digital input to a given word without seconds delay?

I've been looking around and found some great C/C++/Java libraries like CMU Sphinx or Windows SAPI. I did not like SAPI, and CMU Sphinx is way too complicated... would need months to understand how it ...
1
vote
2answers
5k views

Algorithm for implementing an IIR digital filter, Chebyshev type I low pass

I am trying to implement a Chebyshev type I low-pass IIR digital filter in C. I have got the SOS Matrix and scale values from Matlab. What is the direct equation or algorithm to implement such a ...
3
votes
1answer
2k views

Digital Distortion effect algorithm

I read the DAFX book by Udo Zoler about the distortion effect at pages 124-125 and it says that suitable simulation of the distortion is given by the function: ...
1
vote
1answer
343 views

Matlab SOS Filter in C++

I'm struggling to validate that my C++ implementation of a filter I designed in Matlab is correct. My first issue is to make sure I'm implementing the sections in the right order. This is the output ...
1
vote
1answer
52 views

Can I compute my IIR faster given limited possible input values?

I have an IIR routine in C++ I'm trying to speed up. Currently I'm using a DF2 implementation. Since my input signal will always be either 1.0 or -1.0 is it possible for me to optimize the algorithm, ...
3
votes
2answers
1k views

Discrete Fourier Transform for beginners

I want to make image processing programs which talk about homomorphic filter. But when I read some articles, I can't get it. Maybe can anyone help it. I very need this. Sorry about my english. I ...
2
votes
2answers
4k views

Bandpass Filter Implementation in C

I've been googling for a while and came across the audio cookbook and Bjorn's blog explaining it further Link Here. Background info: I've modified the rtl-sdr open source code to tune to a VOR ...
1
vote
4answers
12k views

Simplest way to implement FIR filter in C/C++

What's the simplest way to implement a FIR filter in C/C++ ? (I don't want to have to use a third-party software like Matlab or Octave in order to compute the coefficiens because I have to use ...
1
vote
1answer
98 views

How to use clustering file after training

I trained the data using BOG with SVM , i trained it , now i just want to open it through xml , i don't want to train it again and again on every run , I trained ...
1
vote
2answers
3k views

Algorithm to zero pad data before FFT

I've seen some other questions on here about zero padding (like this one) but I'm still a little confused about my situation. I'm attempting to zero pad my input time series data, so I get an ...
1
vote
1answer
188 views

Comparing two sound files in embedded-systems (C language)

what would be the most efficient ("cheap" in terms of system resources etc.) way to compare 2 sound files? Here is the scenario. Sound A comes as an input. There is sound B stored in memory. We need ...