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
0answers
16 views

Testing whether instantaneous phase algorithm works 2D

I need to calculate the instantaneous phase $\phi$ of a 2D wave field $U$ in C which can be derived by one of two 1D Hilbert transforms $H$: $$ q(x,z) = H_1[U(x,z)] = 1/\pi \int_R U(x-\zeta,z) ...
0
votes
2answers
72 views

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

Is there a library written in C/C++ that offers functions like QPSK modulation?
1
vote
1answer
77 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 ...
3
votes
5answers
560 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
54 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
71 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
117 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
95 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
198 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
160 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
205 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
580 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
193 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
69 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
103 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
993 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
358 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
142 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
267 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
1k 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
4k 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
64 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
804 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
116 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 ...
2
votes
1answer
73 views

Embedded Correlation Function

I'm trying to write a correlation function on an embedded device. Because its embedded, I need to make sure that the memory/CPU usage is minimum. Here's the deal: - I have a saved waveform sampled ...
1
vote
1answer
628 views

What is the most efficient type of software bandpass filter?

I'm writing a C++ application to extract four modulated carrier signals at four separate frequencies, from a single input signal. I've designed four FIR filters at t-filter.appspot.com but they run ...
2
votes
3answers
4k views

How does a low-pass filter programmatically work?

I have been working on a simple low pass filter for < 100 Hz metering in my application. But so far, I am struggling with the theory behind it all. It's cool that I got it working, but I'd really ...
0
votes
0answers
152 views

How to implement Hilbert-Huang transform in finding image splicing?

I have some programming experiences but am really new to these kind of algorithms. I can find a few source code about implementing HHT, and most of them are written with matlab. What I am trying to ...
0
votes
1answer
232 views

DSP library compatible with QT? [closed]

I have checked this and this Question in this site very much similar to my question. But I want to know are they Qt compatible? I want to start learn developing DSP application in Qt framework so I ...
0
votes
2answers
146 views

FFT Data Array Indexing [closed]

I've been Googling "FIR filters" and "FFT convolution" etc. and I ran across something interesting. Array Index vs. Pointers: http://www.bores.com/courses/intro/program/7_array.htm ...
0
votes
1answer
138 views

Dynamic time warping in percentage

I'd like to compare 2 speech similarity and show it in terms of 0-100%. Here's my approach: 1: Convert 2 audio waveform into audio spectrum by Fast Fourier Transform (FFT) 2: Use Dynamic Time Warping ...
9
votes
0answers
377 views

Real-valued ringing when zero-padding odd-length FFT

So I'm trying to write a frequency-domain interpolator that zero-pads the frequency response of a signal and inverse transforms. There's two cases I have to deal with: Even-length response - have ...
8
votes
2answers
2k views

Add odd/even harmonics to signal?

How do I add odd or even harmonics to a floating point signal? Do I have to use tanh or sin? What I'm trying to do is achieve some very simple distortion effects, but I'm having a hard time finding ...
1
vote
1answer
2k views

Using FFT to convert to frequency domain, then IFFT back to time domain C++

I've posted the same question on stackoverflow.com with little success, so I thought I would try here! I'm using C++/C to perform forwards and reverse FFT on some data which is supposed to be the ...
1
vote
2answers
483 views

Blob detection in C

I am trying to do my own blob detection. My program will receive a real time video, and try to detect a white paper sheet, even if something is written on the paper. I need to detect the paper and ...
3
votes
2answers
1k views

Output of KISS FFT interpretation

I'm receiving PCM data trough socket connection in packets containing 320 samples. Sample rate of sound is 8000 samples per second. I am doing with it something like this: ...
4
votes
2answers
2k views

Design of the low pass filter when decimating

I am filtering an audio signal into various sub-bands in C and would like to decimate the signal by 2 in the lower frequency bands to reduce processing overhead. I get that this involves low-pass ...