Design Engineer from Colorado focusing on low cost embedded systems. Primary focuses includes audio DSP, systems control and user experience.

I think this is kind of a tough question to answer. Technically, you could use 1 bit if your sample rate is sufficiently high, such as in super audio CDs. There...

Re: What is the maximum output amplitude of an IIR filter?

Reply posted 10 months ago (02/04/2021)
Honestly?  It was kind of a guess on my part that this would even work. But I figured it’s not like the internals are some random crazy thing, it’s just a delay...

Re: What is the maximum output amplitude of an IIR filter?

Reply posted 10 months ago (02/03/2021)
Say you used that impulse response as an FIR filter, would you know what to do then

Re: What is the maximum output amplitude of an IIR filter?

Reply posted 10 months ago (02/02/2021)
I suppose you could generate an impulse response for your IIR and do the same thing. 
Wow, you aren't kidding.  That is a very impressive CV.  The S6 is a beast of a board, like serious big boy stuff.  It's the kind of thing that if I walked into...
Sounds like you’ve had a long career with audio. Very very cool. I’d be curious to know what productions you’ve gotten to work on.  It sounds like you’ve...

Re: Design reverb filter

Reply posted 10 months ago (01/21/2021)
Or skip to the Stanford section on Freeverb Here. What you have there is a slap back delay, which isn’t really a reverb. You could use feedback instead of feed...
If you don’t already know about floating point math, it’s worth your while to look that up on Wikipedia. But to answer your question, digital sampling will always...
The meters in PT will clip indicate at 0dB. Audio inputs/outputs and recorded audio will all clip at 0dB. Plug-ins and busses clip at +(some big number)dB, such...
To be clear, ProTools does not soft clip anything. There are plug-ins to apply soft clipping, but it’s the user’s obligation to use them or not.Here’s an example....
What the meters show is left to Avid, but one thing you can trust is if they indicate clipping, than 0dB was exceeded, if they don’t than it wasn’t. That’s...
In ProTools, and most other DAWs, internal processing is done with floating point maths, either 32 or 64 bit.  So for plug-ins and bussing, clipping more/less doesn’t...

Re: Non-zero DFT components where zero is expected?

Reply posted 11 months ago (01/04/2021)
WRT the rounding precision:  FFTs also use radix stages to perform the butterfly operations. These stages use simple addition/subtraction/swapping where possible...

Re: Utility of Bit Reversal as (I)FFT Function Parameter

Reply posted 11 months ago (12/31/2020)
You are correct, there’s a pretty detailed explanation in that stackexchange link as well.  Basically, the CMSIS library uses natural input/reversed output for...

Re: Utility of Bit Reversal as (I)FFT Function Parameter

Reply posted 11 months ago (12/30/2020)
I was using single precision floating point, so it's unlikely that the input amplitude was the issue.  The twiddle factors are pre-computed.  In terms of generating...

Re: Utility of Bit Reversal as (I)FFT Function Parameter

Reply posted 11 months ago (12/30/2020)
Can confirm.  I fed in a 32 point single cycle complex sinusoid.  With bit reversal enabled, there's a single peak in frequency bin 1, and the output matches...

Re: Utility of Bit Reversal as (I)FFT Function Parameter

Reply posted 11 months ago (12/30/2020)
Howdy Fred, great to hear from you!  You are indeed correct.  However, with the CMSIS implementation, both the forward and inverse transforms are rearranged on...
As a follow up to a post I made on stackexchange [here][1].  In reference to the CMSIS/DSP Float32 FFT implementation, found [here][2], starting on line ```1162```....

Re: hardware FFT coefficients .vs. np.numpy.fft.rfft

Reply posted 11 months ago (12/14/2020)
Based on what you’ve posted, I’m leaning towards this as well. Given the same input data, any FFT damn well better have the same output, save possible scaling...

Re: Purity > 1?

Reply posted 12 months ago (12/08/2020)
Hi again. My apologies for not providing a more rigorous mathematical analysis, but I have to clock in here in a few minutes. I ran some tests in Python and I think...

Re: Purity > 1?

Reply posted 1 year ago (11/24/2020)
Maybe a dumb question, but are you using the same N for the Goerztel and signal energies?  If they were mismatched, it would mostly work on average, but it could...

Re: Purity > 1?

Reply posted 1 year ago (11/24/2020)
It’s pretty correct. OP is only calculating a single bin value. There would be an identical magnitude value at the negative bin, hence the factor of two

Re: DSP chip ??

Reply posted 1 year ago (07/11/2020)
Nucleo32 is a hair under 1.9cm. The L4s are nice little chips.  Never tried to do spectral processing with them, but gut feel is it would be doable.or this dude...

Re: FIR filtering vs linear convolution

Reply posted 2 years ago (02/28/2020)
X is not defined for negative indexes.  Using negative indexes brings shame to you ancestors.

Re: phase change

Reply posted 2 years ago (11/10/2019)
With a filter.

Re: Extract pitch of irregular signal ?

Reply posted 2 years ago (11/02/2019)
What is your audio sample rate?  How many samples in the source material? What kind of windowing are you using?  Would you be willing to share the results of your...

Re: Delta Sigma Modulator Decimation output

Reply posted 2 years ago (10/19/2019)
I’m a bit confused by your plot. CIC filters are low pass, but your plots all look like raw outputs from a delta sigma modulator. Aside from the fact that you...
The CMSIS library is hard to beat unless you know what you’re doing (I.e good knowledge of both target application and dsp theory).  Here is a link to a reference...

Re: FFT sub-band Analysis Pros / Cons

Reply posted 2 years ago (09/18/2019)
If your sample length didn’t change, then the resolution of the DFT didn’t change either.  Windowing in the time domain is mathematically equivalent to filtering...

Re: FFT sub-band Analysis Pros / Cons

Reply posted 2 years ago (09/17/2019)
For your application, a DFT is a 1D to 1D operation. Sub Band coding and filter banks, as I understand it, are 1D to 2D operations.  They give you a time-frequency...

Re: Average Impulse Response from multiple measurements

Reply posted 2 years ago (08/11/2019)
As stated, averaging is a type of filtering, so averaging in the time domain is equivalent to multiplication in the frequency domain. However, given that you are...
Awesome!  Thank you
Thank you for sharing this.  Would you be able to post an image of the generated plot as well?  I feel like it would be an illustrative example
Note that you created a complex sinusoid, y, but are only plotting the real part.  So you are plotting a real sinusoid, not a complex one. As has been stated, you...

Re: Problems extracting phase of dual FFT

Reply posted 2 years ago (07/04/2019)
I’m having hard time understanding what you are saying at the end.  Would you mind sharing images of the impulse/phase plots before and after you manually adjusted...

Re: Real to Complex conversion

Reply posted 2 years ago (06/28/2019)
They are absolutely not the same.  The first method gives you a complex number in the sense that adding 1j to your signal gives you a complex number.  It doesn’t...

Re: Window Impulse Response

Reply posted 2 years ago (06/27/2019)
A simple solution might be to allow the user to trim the impulse response and apply a fade in/out. It would be more or less equivalent to what you would do with...

Re: Window Impulse Response

Reply posted 2 years ago (06/26/2019)
...

Re: Window Impulse Response

Reply posted 2 years ago (06/25/2019)
Windowing is the correct thing to do.  Although I don’t totally follow your process exactly, I think a few points would be helpful.First, the impulse response...

Re: What's your favorite modern DSP chip?

Reply posted 3 years ago (05/06/2019)
See if you can find examples of how they use their FMC/FSMC to interface with external ram. Beyond that, sacrificing a modest number of samples worth of latency...

Re: Filter a rectified waveform?

Reply posted 3 years ago (02/23/2019)
Rectification is a non-linear operation, so it can increase the bandwidth of the signal.  In fact, proper rectification requires very high polynomials, so you can...
sounds like aliasing to me. What did you expect to see

Re: Down sampling an iq signal

Reply posted 3 years ago (10/07/2018)
I would advocate for a unity gain FFT as well, but it only applies a scalar and wouldn’t effect the shape

Re: Down sampling an iq signal

Reply posted 3 years ago (10/07/2018)
Aren't delta-sigma modulators entirely based on the idea of reshaping and filtering quantization noise?

Re: Down sampling an iq signal

Reply posted 3 years ago (10/07/2018)
Not to contradict your friend, but I would have to say yes and no.  To the best of my knowledge, "spectrum" is term that is widely treated as having a concrete...

Re: MCU signal processing PDM to PCM

Reply posted 3 years ago (10/03/2018)
I’d love to read more about this.  I can sort of picture it in my head, but don’t quite get it.  Thanks

Re: MCU signal processing PDM to PCM

Reply posted 3 years ago (10/03/2018)
Another point probably worth making is that ST provides libraries for interfacing with mems mics, here is an AN: https://www.st.com/content/ccc/resource/technical/document/application_note/ca/18/be/bb/f8/53/47/a5/DM00040808.pdf/files/DM00040808.pdf/jcr:content/translations/en.DM00040808.pdfIt...

Re: MCU signal processing PDM to PCM

Reply posted 3 years ago (10/02/2018)
Subtracting our the offset would probably work. However, you may find that you need to high pass for some other reason, in which case there’s no need to do the...

Re: MCU signal processing PDM to PCM

Reply posted 3 years ago (10/02/2018)
Do the bytes filled by the listen function contain either 0 or 1?  If that’s the case you’ll end up with a DC offset of about 0.5.  If you were calculating...
Yeah. When you spec a decimation filter, it’s not so much the ‘cutoff’ that we’re talking about.  Instead, we talk about the pass, transition and stop bands....
I don’t totally follow what your requirements are, but I’m happy to share what I know about it.  It sounds like you want to apply a filter to your signal, but...
If you low pass the signal in the right of your top figure you will get the desired output. 

Re: Multiband dynamic processing

Reply posted 3 years ago (08/25/2018)
Right on!  I’m glad you were able to make something out of it.  I’d love to hear a demo
If I’m not mistaken. I believe you would also need to apply a low pass filter to remove the mirrored image after the shift, if you shift after the ADC.
I mostly agree.  If the biquad has all its poles and zeroes inside the unit circle in the z-domain, it’s already minimum phase, so it’s true that there is nothing...
Not really.  If you put two of the same filter in parallel, it would be the same as one filter with the gain increased by a factor of two. If you arbitrarily combine...

Re: Tones in sigma delta modulator and dithering

Reply posted 3 years ago (07/26/2018)
You may want to start by doing some google searches of what delta sigma modulators are and how they work. A quantized signal is going to be equal to the input signal...

Re: Overlap-add in the frequency domain

Reply posted 3 years ago (07/22/2018)
You wouldn’t be overlap adding in the frequency domain. The equivalent operation would be to to interpolate in the frequency domain, phase shift the second set...
Here’s an article detailing an implementation: http://msp.ucsd.edu/techniques/v0.11/book-html/node115.htmlIt was the first hit in a google search.  I skimmed...
Could you elaborate on what you are trying to do?  When you say “delay line based method” it sounds like you are making a filter.  Filters do not use windowing...

Re: Fundamental frequency of a Guitar string

Reply posted 3 years ago (07/04/2018)
Good to hear you’re coming up with some clever trickery. Again, I would recommend doing more to condition the signal in the analog domain before converting it...

Re: Filter complex signal and get spectra

Reply posted 3 years ago (07/03/2018)
I apologize, but I am struggling a bit with your English (no offense intended, I only speak one language and am still prone to mistakes).  It seems like you are...

Re: Fundamental frequency of a Guitar string

Reply posted 3 years ago (07/03/2018)
Whoa now...  Let's ease up a little bit.  I'm a little surprised to see so many people advocating for such a heavy handed approach.  I think you are already on...

Re: Fundamental frequency of a Guitar string

Reply posted 3 years ago (07/02/2018)
https://en.m.wikipedia.org/wiki/Input_capturea very common MCU peripheral for measuring timing of digital waveforms.  The only way to attenuate the harmonic content...

Re: Fundamental frequency of a Guitar string

Reply posted 3 years ago (06/29/2018)
A guitar string is more of an acoustic system and the models representing it are more accurately modeled by a forced traveling wave, but it can be simplified by...

Re: Fundamental frequency of a Guitar string

Reply posted 3 years ago (06/29/2018)
Guitars do have a fair amount of harmonic content, not too much can be done about it. If you’re serious about it, when you tune you can put your guitar in the...

Re: Fundamental frequency of a Guitar string

Reply posted 3 years ago (06/29/2018)
Given your constraints, I’m not sure you have a ton of options. I’d start by adding a low pass or shelf filter to accentuate low frequencies
Analog Devices has some digitally controlled filters for RF applications if you haven’t looked there yet. I imagine other manufacturers have similar offerings...
When I was in college, I took a course in the physics of sound. We were taught that the exponential shape of the horn had more to do with the polar pattern, dispersing...

Re: I/Q sampling basics

Reply posted 4 years ago (04/23/2018)
Your issue is two fold.  First, you have chosen your f0 as the nyquist frequency at the lower sample rate. Second, you are not filtering out your images after the...
No worries. I’m sure I wouldn’t have been able to help if I hadn’t made the same error at some point. Glad I could help. Cheers
Thanks for the plots, I think I see where you are getting tripped up. You spec’d both i(t) and q(t) as real, but you have depicted their frequency transforms,...
Maybe think of it this way:  a purely real signal has a spectrum that is symmetrical on the real axis and anti symmetrical on the imaginary. A purely imaginary...
I’ll try my best to phrase it a little differently. Create a command line tool or other application on your PC that opens a wav file, processes it with your filter,...
That is not what I meant to say. Sorry I wasn’t able to help more effectively
I'm sorry to hear that you are still having troubles with your implementation.If you want to get your code working, I would strongly recommend creating a version...
It sounds to me like you are overflowing your output. Modern music is mastered to be really loud, and if you look closely at some waveforms, you’ll find instances...
A couple things. First your accumulators are still floating point, change them to 32 bit integers. Second, you are using 16 bits of precision for your coefficients....
Your code is very clearly using floating point math, so scaling the coefficients won’t change the results in a meaningful way.  You should really measure the...
Oh snap!  Great catch.  If I’m not mistaken, all the coefficients are between -1 and 1, so the negative coefficients round to -1 and the positive coefficients...
Pretty much yes, it’s a pretty easy test without having to overly complicate your implementation. Ideally, you’d be managing a double buffer and using DMA, but...
It’s an interrupt status bit, you can read it to check for errors. Refer to the MCU user guide for more detail.You might also try transmitting a zero before you...
It may be that the latency introduced by the filter execution is causing your transmit buffer to run dry.  On the cc5545, you could check the OUERRFL bit in the...
I deleted my last post because I didn’t understand that you were duplicating you delay buffer to get around the modulo addressing problem. That’s really clever.I...
I’m having trouble understanding what you’re trying to do, what troubles you’re having and what your comfort level with DSP mathematics is. I hope that answering...

Re: spectrum of rectangular pulse using two methods

Reply posted 4 years ago (03/03/2018)
Chapter 3 of the Engineers and Scientists Guide to DSP!  A fantastic (and free) publication. You are correct

Re: spectrum of rectangular pulse using two methods

Reply posted 4 years ago (03/03/2018)
Glad to hear you got it sorted!  Remember that sin(x) is approximately x when x is small.  That is why it mostly looks like a sinc function for small values and...

Re: spectrum of rectangular pulse using two methods

Reply posted 4 years ago (03/03/2018)
My apologies, a moving average filter is a rectangular pulse, so the mathematics of deriving the frequency response of the moving average filter are identical to...

Re: spectrum of rectangular pulse using two methods

Reply posted 4 years ago (03/03/2018)
Actually, on re-reading, it is probably merited to point out that the frequency content repeats infinitely.  This is why the z-domain is represented in polar coordinates....

Re: spectrum of rectangular pulse using two methods

Reply posted 4 years ago (03/03/2018)
That is true, but the sinc function would only be correct to use in continuous time, but we can still use it as a model for why we get a different result in discrete...

Re: spectrum of rectangular pulse using two methods

Reply posted 4 years ago (03/03/2018)
If I’m understanding correctly, that make intuitive sense. In continuous time, the Fourier transform of a rectangular pulse is a sinc function. If the sinc function...

Re: Understanding Subband Filtering?

Reply posted 4 years ago (02/19/2018)
Using Micheals (awesome, btw) example, 11.6ms is not enough data to discriminate the lower frequencies. This should make intuitive sense because the period of 10...
1: yes2: yes3: not exactly. Eq is a filter, so it is a scalar in the Fourier domain. A zero multiplied by any number is also zero. You would need to add data to...
It seems like you’ve got it right, although your terminology is a bit strange. As you know, if you convolve a signal and then deconvolve it you get the original...

Re: Artifacts in Time Varying IIR Filters

Reply posted 4 years ago (01/10/2018)
NI just posts books like this on their website?  How did I not know that!?  You are my hero, thank you thank you thank you

Re: Artifacts in Time Varying IIR Filters

Reply posted 4 years ago (01/07/2018)
Thank you everyone for the replies.  While I was planning on doing some tests this weekend, I have instead been going back to paper designs to establish what it...

Re: Artifacts in Time Varying IIR Filters

Reply posted 4 years ago (01/04/2018)
Rick (Dr Lyons?), indeed, I always appreciate the input on this forum. I actually came across your Streamlining book while searching the topic. Looks like it’s...

Re: Artifacts in Time Varying IIR Filters

Reply posted 4 years ago (01/04/2018)
The DSP Guide was actually the document that got me interested in DSP. I've read it cover to cover a couple of times, it's great.The whole notion of artifacts is...

Re: Artifacts in Time Varying IIR Filters

Reply posted 4 years ago (01/04/2018)
Thanks everyone for the responses so far, it is greatly appreciated.Unfortunately, I do not have an AES membership, so I’m still a bit on the fence about the cost...

Artifacts in Time Varying IIR Filters

New thread started 4 years ago
Hi everyone,I'm currently playing with some audio processing using LFO driven filters.  Right now, I have been using direct form I biquad filters as my basis for...
Fair enough. You mean trig functions aren’t free!?  I guess I was leaning towards precalculating, but since the sample rate isn’t divisible by the measured...
I thought you were implying that you were overlapping multiple instances of the filter to improve time domain resolution.  If that were the case, a complex multiply...
At risk of sounding naive, wouldn’t be about as efficient to do a multiply by the complex frequency to be detected, use a recursive moving average, the multiply...

Re: Real Time DSP - Conversion Time for Audio

Reply posted 4 years ago (11/23/2017)
If there’s too much latency, it will affect the performer. 10ms is about as much as I would expect to see, before it started to get obnoxious.There three sources...

Re: Noise Generation Confusion

Reply posted 4 years ago (11/22/2017)
How did you derive the value for np_watts?What did you think the power of (randn(1,L)+1i*randn(1,L)) should be?  And why?

Re: Problem of Input voltage for LM4862 audio amplifier

Reply posted 4 years ago (11/21/2017)
Don't "tie" either of the outputs to ground, it'll likely damage the part.

Re: SNR measurement with fixed-point FFT

Reply posted 4 years ago (09/24/2017)
It wouldn't be so much that you wanted to find spurs.  A short length will result in more variation in your SNR measurement.  Regardless, if you are using the...

Re: SNR measurement with fixed-point FFT

Reply posted 4 years ago (09/23/2017)
I just finished reading through the thread, I had a few questions. First, just to be clear, your input data is from an ADC, so I'm assuming the it's already quantized,...

Re: Typical filter orders for DSPs

Reply posted 4 years ago (08/05/2017)
As you increase the number of points you'll eventually run out of either RAM or processing power. 100s of points strikes me as a fairly middle of the road number....

Re: Writing DSP routines in C or assembly?

Reply posted 4 years ago (08/01/2017)
I agree with everyone else, but I would like to play devil's advocate. There is a school of thought that you shouldn't worry about performance until you have a metric...
Snap!  Fair enough
What kind of processor are you using?  To calculate abs(x) you need a pair of multiplies and an addition. If x is complex the divide is actually two divides. I...

Re: Energy and power

Reply posted 4 years ago (07/27/2017)
I am a huge fan of this topic and could probably say way too much about it, but I'll try and be brief.  In addition, I'd be curious to see if anyone else has a...

Re: Magnitude of frequency components

Reply posted 4 years ago (06/28/2017)
Seems like you're spot on with increasing the buffer length and utilizing a window. Because the bandwidth of each DFT output is going to be more narrow, just perform...

Re: Optimal Filter lineup selection

Reply posted 5 years ago (05/16/2017)
It seems like more and more, optimal means you used some matlab function to figure it out
You're very welcome. To be clear, I'm saying that if you compare the signals across a partial time domain, the function would not return the same value.Think of...

Re: Need Help In Interpreting Curves in a Chart

Reply posted 5 years ago (05/13/2017)
On the first point, I feel like "time/s" would be a measure of CPU efficiency.  As in the amount of time spent executing the algorithm every second, where the capacity...
Thanks for the clarification. Because you are designing a function that accepts two vectors and outputs a value, it makes the most sense to me to implement it using...
I can't answer you question, but I did want point something out.  If you are convolving two finite signals, the result should contain both a beginning and an end....

Re: DFT of a signal and system

Reply posted 5 years ago (05/05/2017)
the calculation would be the same, but there may be times when you would prefer to scale the result so that the data corresponds to a value you are trying to measure,...
I have no idea how one would draw that conclusion from such an experiment.
You need to make sure that your output is long enough to store the result of the convolutions.  Convolution of a signal length M and a signal length N results in...

Re: Subharmonic distortion?

Reply posted 5 years ago (04/28/2017)
Gold Star!  I didn't even think to try my sound card.  You just saved me an hour's travel time to/from the lab I've been using to perform experiments!I absolutely...

Re: Subharmonic distortion?

Reply posted 5 years ago (04/28/2017)
This is the audio guy coming out in me, but are [1] and [2] the same as Crossover Distortion and Asymmetrical Clipping?  If so, I don't understand how that could...

Re: Subharmonic distortion?

Reply posted 5 years ago (04/28/2017)
Rick, that's a great idea to try the undersampling to isolate the anomaly, I'll be sure to give it a try!  That's fascinating that the AD DDS could have a similar...

Re: Subharmonic distortion?

Reply posted 5 years ago (04/28/2017)
Thanks Tim!  I'll be sure to re-watch it, it's good of you to put these videos together.

Subharmonic distortion?

New thread started 5 years ago
So I measured something the other day that I couldn't quite get my head around.  I've convinced myself that I should be able to explain it, so I wasn't going to...

Re: sum of sinusoids

Reply posted 5 years ago (04/27/2017)
I'm picking up what you're putting down.

Re: sum of sinusoids

Reply posted 5 years ago (04/26/2017)
From a semantic stand point, I suppose it would be more correct to say that the addition of two sinusoids is mathematically equivalent to a third sinusoid whose...

Re: Back to back CIC filters

Reply posted 5 years ago (04/21/2017)
Totally, I think most of this discussion was posted while I was still typing!

Re: Back to back CIC filters

Reply posted 5 years ago (04/21/2017)
I may be in the minority here, but I don't see anything wrong with what you're suggesting (if I understand correctly).  I also mocked it up in a spreadsheet and...

Re: Multiband dynamic processing

Reply posted 5 years ago (04/18/2017)
With respect to using a DAW, an engineer is typically going to be looking at time delay and inversion on a waveform.  Similarly, the latency through your signal...

Re: Multiband dynamic processing

Reply posted 5 years ago (04/17/2017)
I'm certain you could get satisfactory results simply by using that source code library you linked to by setting the parallel filters with the correct parameters.The...

Re: Multi-Impulse Response Deconvolution

Reply posted 5 years ago (04/17/2017)
With regard to "trivial," I would say that anyone with a basic competency in signal processing should know that a convolution in the time domain is equivalent to...

Re: Multiband dynamic processing

Reply posted 5 years ago (04/14/2017)
I've not designed a multi-band compressor, but I have used them quite a bit, so take this with a certain level of skepticism.The kind of filter you use is entirely...

Use this form to contact dszabo

Before you can contact a member of the *Related Sites:

  • You must be logged in (register here)
  • You must confirm you email address