Skip to main content

Questions tagged [c++]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
27 views

Issue with cudafft library and fftshift on odd image dimensions

I'm facing with a code I'm implementing for an exam using the GPU. Specifically, the code I'm writing is in C++, and I'm using the CUFFT library to perform the Fast Fourier Transform (FFT). The ...
overflow''s user avatar
1 vote
0 answers
17 views

Help figuring out how to extract audio content correctly from a file that produces spiky waveform with audible hiss/noise

I'm trying to extract PCM wave sequences from different files (files that are NOT audio files but contain audio data, and other data all in one file), and while this code does extract the expected ...
GDN9's user avatar
  • 11
1 vote
0 answers
249 views

How to implement STFT for processing audio [closed]

I should start this off by saying I’m a hobbyist and by no means a student. I’ve been reading “The Audio Programming Book”, and attempting to implement STFT on the stm32 based Daisy platform. In order ...
Daniel Lawler's user avatar
0 votes
0 answers
166 views

Type 1 Chebyshev 3rd Order Lowpass Filter

I'm trying to implement a 3rd order Type 1 Chebyshev digital lowpass filter in C++. I've been having a lot of problems and I'm not sure why. I can plot the transfer function in MATLAB and see that it ...
a name's user avatar
  • 1
0 votes
0 answers
167 views

Phase Vocoder Pitch Shift Phase Artifacts (Embedded C++)

I'm working on a phase vocoder pitch shifter running in C++ on an embedded microcontroller platform. I've successfully written the phase vocoder using the optimized FFT library, and it appears to be ...
Emmett Palaima's user avatar
1 vote
0 answers
132 views

Several Low pass filters generate offset when applied on an embedded system on C++

I need to implement a real time butterworth low pass filter on some data, I have an already implemented and tested butterworth function, but when filtering data from one specific variable I get an ...
Isaac's user avatar
  • 11
1 vote
0 answers
66 views

Why filter-bank energies coefficients are same through the frame?

I am trying to implement MFCC's from scratch in C++. In each frame, I am processing real-valued data to construct MFCC vectors. Although I think that my implementation is correct, the testing result ...
Yalçın Cenik's user avatar
1 vote
3 answers
1k views

True Peak detection II

As a followup to my True Peak detection question, I'm trying to implement a detection method by following this documentation using the Catmull-Rom interpolation method. What I've done so far can be ...
Juha P's user avatar
  • 917
0 votes
0 answers
128 views

Biphase/Manchester floating-point decoder based on matched filter

I need to perform soft Viterbi decoding on a Manchester-encoded BPSK/QPSK signals. To that end, I need a floating point Manchester decoder. Most of the implementations I have seen operate on hard bits....
Moses Browne Mwakyanjala's user avatar
2 votes
0 answers
948 views

How to implement an easy to use IIR-Filter in C/C++

Edited: I know there are some IIR filter implementation guides on the World Wide Web, however I can't find a simple guide on how to link simple PCM values to a digital filter. Most approaches are over-...
Hannes Broschk's user avatar
3 votes
1 answer
2k views

Signal processing in Python vs C++ (band-pass filter)

I have implemented Python signal processing code using a butter bandpass filter and order 3. It is working pretty well. I am required to implement the same signal ...
user2129623's user avatar
2 votes
1 answer
265 views

Signal to noise ratio for time series audio data

I am writing some software to benchmark an audio noise filtering method using SNR as an evaluation metric. One software component generates noisey audio by taking a clean audio file and a noise source ...
Ross Gardiner's user avatar
0 votes
2 answers
504 views

BPF Filtering with DSP IIR Realtime C++ filter library

I am working with complex samples, I have a main signal at 630KHz, my Fs is 1.26MHz and BW is 12.6KHz. If I plot a frequency-magntitude spectrum it looks like this: As you can see along with my main ...
yarin Cohen's user avatar
2 votes
0 answers
231 views

Introducing Feedback to Miller Puckette's Time-Domain Pitch Shifting Algorithm without Discontinuities

I've implemented Miller Puckette's time-domain pitch shifting algorithm (http://msp.ucsd.edu/techniques/v0.11/book-html/node125.html) in PureData's help files in C++ (my code here: https://github.com/...
panthyon's user avatar
  • 1,133
1 vote
0 answers
469 views

implement bandpass filter on complex valued signal? (C++)

I want to filter out complex valued samples - Bandpass filter. I have 100 complex samples and I wish to filter out a range of frequencies from it, as you can see in the result of the FFT, there are 3 ...
yarin Cohen's user avatar
11 votes
6 answers
5k views

How can I work on DSP using C/C++?

I have been working on MATLAB for signal processing for a while. Many companies from DSP for a communication background has asked me whether I know C/C++ very well. I am confused as to why the ...
Sukshith Shetty's user avatar
0 votes
2 answers
275 views

Find the equivalent of this python remez specs in C++ remez or Matlab firpm

I want to start with that I am quite new in this community, so if this question does not belong here, please point me to the right place. Thank you! Background I am learning and writing a half-band ...
Yihan Hu's user avatar
2 votes
1 answer
75 views

Audio, estimate codec's compression ratio only by content

I am about music audios. These can be compressed by different formats with different degree. (I.e. I don't mean the dynamic compression). After being compressed by a large degree (say 96kbps mp3) the ...
User42's user avatar
  • 87
1 vote
1 answer
1k views

Moving average filter implementation in the floating point [closed]

I have following C++ implementation of the moving average digital filter. ...
Steve's user avatar
  • 397
0 votes
1 answer
51 views

Alg for identifying any temporal interfering signal

I'm a little bit on a loss at my search for an algorithm due to audio signals. I'm a sw-engineer with some basis knowledge in math here and there, know how to build and use FFT etc. but with no prof ...
User42's user avatar
  • 87
0 votes
1 answer
1k views

Discrete implementation of the PI controller

I have been implementing discrete PI controller in the incremental (velocity) form in C++. I have been looking for the anti-windup mechanism. One idea which I have can be described by following ...
Steve's user avatar
  • 397
0 votes
1 answer
51 views

FFT Frequency-Spectrum has noise

I am plotting a Frequency-Amplitude Graph using openGL for the graph and Rosetta FFT implementation for the FFT calculations, I generated a 2 waveform, applied Hanning window, applied FFT and ...
yarin Cohen's user avatar
0 votes
1 answer
226 views

getting different output when using FFTW3 Library than using Rosetta FFT

I have the following array containing sine waveform that I want to compute FFT: { 0.0, 0.114124, 0.370557, 0.0, -0.576201, -0.370557, 0.0, 0.0 }; When using FFTW3 ...
yarin Cohen's user avatar
0 votes
1 answer
749 views

What does Cooley–Tukey FFT algorithm calculates in order to compute DFT

0 I'm relative new to this subject, I've watched many videos explaining FFT and DFT and read some articles. I wanted to see how I could implement FFT in C++ and then I found this code, it works but I ...
yarin Cohen's user avatar
0 votes
1 answer
361 views

image processing find liquid level (only with images processing, no AI)

I want some ideas to get the level of a water/liquor in a cup. i tried many ideas (contours, edges,...) but nothings is working. So any ideas that i can explore.
Moooooooun's user avatar
0 votes
1 answer
199 views

What's wrong with my FFT implementation?

I am implementing radix-2 DIT FFT (real only) in C++. For input sizes > 8 I can't seem to match the output of FFTW. Here's my implementation of the FFT: ...
Devashish Jaiswal's user avatar
1 vote
0 answers
478 views

2D Deconvolution using a non-gaussian mask using C++

I am currently working on a project, where we record an electron beam profile using a target. The obtained image is a result of convolution of the actual beam profile and the aperture wherein the ...
user3198929's user avatar
-1 votes
1 answer
529 views

Frequency from mic Raspberry Pi

I am working on C++ project based on Raspberry Pi. I have to make program that recognize siren of emergency vehicle(sound capture by microphone). I made a huge internet research and stopped with small ...
Aerobird's user avatar
0 votes
1 answer
218 views

Generating a time domain signal using the fundamental frequencies

I currently have the power spectrum (in dB) of a signal through which I obtained the fundamental frequencies and amplitudes. My question is: how to generate a time domain signal using these amplitudes ...
William's user avatar
1 vote
0 answers
539 views

FIR filtering with C++ to a sinewave

I am translating my FIR filter script from python to C++. My problem is that I am following a workflow which in theory should work but I get weird results. 1st. I create a signal from 1 and 50 Hz sine ...
Gabriel Galeote-Checa's user avatar
0 votes
1 answer
181 views

gnuradio - flowgraph with cpp

I build a flowgraph in gnuradio, generated python code, change a little and run it using python. My question is, does building the flowgraph in cpp will provide better results (time)? (in other words ...
Omer Zchut's user avatar
0 votes
1 answer
330 views

Cascading first order digital filters in C++

In a related question a probable solution was given to build a first-order digital filter and then cascade three of them in order to turn white noise into pink. I have applied the C++ as follows but ...
Dave Chambers's user avatar
2 votes
2 answers
314 views

Fast algorithm for n-dimensional DCT

I need to implement an encoder which compresses a 5-dimensional structure of 10 bits values. Each dimension has between 4 and 12 elements. If a dimension ever has more than 12 elements, it is ...
Cristian Maruan Bosin's user avatar
0 votes
0 answers
258 views

FFTW audio artifacts when modifying magnitudes in frequency domain

I'm currently working with FFT (FFTW3) that I'm using to apply treatments on audio files frequencies. The Forward/Backward test is passed, since I can get the exact same soundfile when processing ...
Philiste's user avatar
1 vote
0 answers
220 views

(Newbie question) Calculation DC-offset and RMS

Being a newbie on this topic I beg you to be indulgent to me if my questions should be kind of "too" simple ;-) For doing automatic analysis on my audio material I started calculating the ...
User42's user avatar
  • 87
1 vote
3 answers
309 views

Sampling a low-frequency sound doesn't work at some sampling rates

When sampling a low-frequency sound (like a 55Hz sine wave) I hear an additional high frequency sound at certain sampling rates, but not at others. This happens in Audacity and in my own program. For ...
KTC's user avatar
  • 111
0 votes
1 answer
1k views

How does window length influence cut-off frequency of filter and group delay?

I'm attempting to interpret the following function. To my understanding, this aims to implement an FIR low-pass filter with a Nuttall window. Then, it filters the signal by a simple application of the ...
boomkin's user avatar
  • 107
0 votes
1 answer
164 views

How does this represent a low-pass filter?

I am faced with the following code snippet to get an understanding of a F0 estimation algorithm (DIO). Have a quick look below: ...
boomkin's user avatar
  • 107
1 vote
1 answer
292 views

Popping sound after using bandpass filter

I'm trying to create guitar Wah Wah effect (basically band pass filter with dynamic frequency range). I'm using Steinberg SDK for it. I refactored this code to work in real time and it looks like this:...
unknowed's user avatar
0 votes
1 answer
166 views

Understanding legacy code: Algorithm to remove radial lens distortion

The method below to remove lens distortion from a camera was written more than ten years ago and I am trying to understand how the approximation works. ...
tenminutemail's user avatar
-1 votes
1 answer
2k views

How to Find spectral Peaks from 2D array of Spectrogram? [closed]

I have computed a Spectrogram 2D array as : How to develop a spectrogram (2D array) from audio signal? Now, I want to find spectral peaks to find the respective temporal displacement. In python using ...
Khubaib Ahmad's user avatar
0 votes
2 answers
2k views

How to develop a spectrogram (2D array) from audio signal?

I have developed a spectrogram in Python using Scipy.Signal.Spectrogram. But I need a complete understanding of data. Here I am not asking about plotting and color ...
Khubaib Ahmad's user avatar
1 vote
1 answer
119 views

dB SPL readings differ from external sound level meter?

I'm trying to write a program that takes values from a MEMS microphone and calculates the dB of the incoming audio data. The microphone i'm using is this: https://www.mouser.es/datasheet/2/218/...
r0k1m's user avatar
  • 111
0 votes
1 answer
248 views

Detecting peak value on realtime IMU data stream

I'm using Qt C++, QCustomPlot to read and display realtime value from an IMU. This is how I set the realtimeDataSlot: ...
tcv's user avatar
  • 103
1 vote
1 answer
331 views

Is a "Spectral Tilt Filter" the best way to get an arbitrary slope and cutoff LPF?

I need an arbitrary slope audio LPF for which both the cutoff frequency and slope in dB/oct can be smoothly modulated in real time. Is the "Spectral Tilt Filter" described by Julius Smith the correct ...
mike's user avatar
  • 533
3 votes
1 answer
79 views

What did I do wrong with this simple filter build?

I tried to put everything I have learned from people here together to code my first filter from scratch. Unfortunately, it didn't go well and I'm not getting the expected output. The math/code became ...
mike's user avatar
  • 533
2 votes
0 answers
50 views

How to find location of minimum dimension of contour using opencv?

suppose this is our input image and now we have to detect the point of minimum dimension, which I show as the red dot in an output image
Akshay Kumawat's user avatar
0 votes
0 answers
94 views

SIFT between 1 image and dataset (2 images)

I use SIFT, and I want to find the angle of inclination of an image compared to two reference images, in short: I have 3 images : Image x: input image Two images 1 and 2, reference images that are ...
all.west's user avatar
1 vote
2 answers
4k views

I wish to create a GNU Radio program in C++ that doesn't need GRC or Python, is there a reference or template for this?

I want to create a functionally equivalent C++ file to the Python top_block.py file that is generated by GRC when executing a (blank example) flow chart. I know that C++ can be used to define blocks ...
madmissmolly's user avatar
0 votes
1 answer
95 views

How to synchronize audio and video streaming for not fixed FPS streaming?

It's a 3-stage process. In the first stage, a video (with audio) is recorded at a fixed 25 FPS rate. In the second stage, it's demuxed in two different channels and the video is processed. In the ...
Padfoot's user avatar
  • 103