12

Real-time low-latency partitioned convolution reverb with a long impulse response works by dividing the impulse response into unequally sized partitions. The shortest partitions (blocks) are at the beginning of the impulse response, and the partition length grows towards the end of the impulse response: Each partition length can be processed separately, ...


8

Your original differentiator, which should be $x(n)-x(n-1)$, is called a "first difference" differentiator. That differentiator amplifies high-frequency noise. As a next step I suggest you try what's called the "central difference" differentiator defined by: $$ \mathit{Diff} = \frac{x(n)-x(n-2)}{2} $$ which does not amplify high-frequency noise.


7

Nvidia seems to have published some white papers comparing DNN inference performance between high-powered CPUs and (of course) Nvidia GPUs. (one example) Ballpark seems to be that some systems can meet or exceed typical video frame rate thru-put for some class of DNN classification tasks. Whether those image sizes and/or DNN architectures and ...


6

Do I have to filter the whole (or at least a huge bit) of the signal every time a few new samples came in or is there a way (like the sliding DFT) where it is possible to efficiently determine the new part of the filtered signal? Digital filters don't work like that -- basically, classical FIR or IIR can work on every single new sample. You should really ...


5

You are confusing "processing time" with "latency". Real-time filters are able to generate output samples at the same rate as they receive inputs. They would however induce latency, meaning that the bulk of the energy generated for an input appears later in time with respect to that input. Consider for example the following input/output: time : 0 1 2 3 4 ...


5

It comes down to latency vs. complexity. If your filter is 10 seconds long, you need to store the audio data of the last ten seconds and then you are able to calculate the current output audio sample with a latency of basically zero (ignoring the time required for calculations here) simply by doing: $$y[0] = \sum_{k=0}^{l} x[-k] \dot h[k]$$ where $l$ is ...


5

In a 2003 paper in French, "Estimation par maximum de vraisemblance de la dérivée d’un signal bruité. Application à la caractérisation de vérins pneumatiques" (Maximum likelihood estimation of the derivative of a noisy signal. Application to the characterization of pneumatic cylinders) [from the early GRETSI french-speaking conference on signal and image ...


4

To add to jan's answer: Most commercial reverb effects (plug ins or hardware) are NOT based on convolution with an impulse response but are based parametric algorithms in some network configuration. This has a bunch of advantages: Less memory Less MIPS It's parametric, so different parameters like "room size", "reverb time" , "color", etc. can be adjusted ...


4

I think that, especially in the context of real-time DSP the terms are really talking about the same topic. Perhaps the most general Wikipedia reference about buffers would include both first-in-first-out (FIFO) and last-in-first-out (LIFO) but a LIFO buffer is usually called a "stack". If it's a FIFO buffer, we usually call it a "queue" and, particularly ...


3

If you are not doing this in low-latency real-time, you can work backwards from the stable portion of the pitch estimate to the transient attack portion of the waveform at the beginning. The sound of a plucked guitar string evolves in a possibly predictable pattern over time (e.g. more so than voice). If you can estimate the onset time and/or have ...


3

The fact is that if $x(t)$ is real and then $X(-j\omega) = X^*(j\omega)$ (it's easy to prove) and, because of duality, if $X(j\omega)$ is real, so also then $x(-t) = x^*(t)$. in your case, you have both $x(t)$ and $X(j\omega)$ being real. keep in mind that anything that is purely real is also equal to its complex conjugate. so you can say: "if $x(t)$ is ...


3

I'm sure you can implement a simple fuzz or overdrive effect on that board. Apply asymmetrical clipping to you your data, and filter the result with a biquad IIR filter. You'll need a lowpass filter to smooth out some of the nasty high frequencies after clipping (try a cut-off frequency $f_c\in [4..7]$kHz), and you might want a parametric EQ to boost some ...


3

'Real time' is a concept from computer engineering. A real time system is one that is guaranteed, by design, to execute a function or routine in a certain time T, or less. For example, a real-time avionics system is proven to react to signals coming from certain instruments in a time below a given threshold. In your case, a more precise description (IMHO) ...


3

Cross correlation should work. I think the problem is the waveform that you are using. A square wave has bad auto-correlation properties. If it is a periodic square wave it will have multiple peaks. It sounds like you are just using a single pulse which is better, but it will still have a gradual roll-off which is a problem. Instead, use a Barker code, ...


3

Similar to the preferred answer above (Jason S.), and also derived from the formula taken from Knut (Vol.2, p 232), one can also derive a formula to replace a value, i.e. remove and add a value in one step. According to my tests, replace delivers better precision than the two-step remove/add version. The code below is in Java, mean and s get updated ("...


3

Questions: First, am I right in my assumption that by keeping 12 bits for as long as I can, I'll get better results? Yes, you are correct. Second, is there a smarter way of turning those 12 bits into 8 bits than just shifting everything to the right four times? Sometimes. Signed shifting to the right four times is the safest way to go, because you are ...


3

The first thing I would enjoin you to do is to measure the actual accuracy of your ADC. The 12-bit performance announced by the manufacturer can often be reached only in ideal conditions, such as: Using an external precision voltage reference rather than the built-in one. Using a distinct power supply for the analog section of the MCU. Using all the ...


3

Once you get the basics covered (Jason has covered this pretty well), you will also want to research Integral Windup and filtering of the error signal and its estimated derivative. The former is very important if your control point changes discontinuously (i.e. you don't have a separate controller 'ramping' the control signal for your PID.) The latter is ...


3

it's in textbooks. you'll find that, for a sharp filter of given sharpness, that IIR filters will cost less than FIR. given it's IIR, you'll find that the Direct Form I and Direct Form II will have less computational cost than the State-Variable Filter, Lattice, Normalized Ladder, Gold-Rader, or Zölzer, or Harris-Brooking forms (and there are a zillion ...


3

For linear filters, binomial filters, which can be considered as FIR approximation to Gaussians, are very simple. Their coefficients are given by: $$ h_k=\frac{ \binom{n}{k}}{2^n} \,.$$ For instance, you can get $H_3 = [ \frac{1}{4},\frac{1}{2},\frac{1}{4}]$, or $H_5 = [ \frac{1}{16},\frac{1}{4},\frac{3}{8},\frac{1}{4},\frac{1}{16}]$. Since their ...


3

If the spectrum of your I/Q samples is centered at zero then you'll have to perform either AM or FM demodulation before routing any real-valued audio samples to a sound card. For AM demodulation you'll need to implement a complex-input "envelope detector" which produces a real-valued audio signal riding on a DC bias. (In a few days check the web page: www....


3

I'm replying to Oleg's recent comments here in an "Another Answer" block because the "add a comment" capability prevents me from providing a complete reply to Oleg. Here's my reply: You can indeed take the sqrt(I^2 + Q^2). (That is one step in one method of AM demodulation.) But you realize that if you do so all of your computed sqrt samples will be ...


3

Right now, I read the live ECG data into a 5 second buffer, and then perform the wavelet filter on the buffer (as described above). This seems rather inefficient, because I have to filter the entire buffer again when new data comes in. You cannot avoid the filtering / reconstruction steps over the buffer with this kind of processing. Is it possible to ...


3

My guess is that the currently popular and new and likely robust way to solve this detection problem is to feed a sequence of audio fingerprints (such as MFCCs) to an RNN machine learning algorithm that was trained on a large wide range of rhythm tracks mixed with increasing levels of realistic background noise. Feeding audio stream samples directly to a ...


3

Eventhough most engineering signals are continuous, not all are such. For example, statistics of many kinds provide discrete data such as daily stock market indicators, computer network stats, hourly number of customers in a queue, etc... Of course, audio signals are transmitted as acoustic pressure waves through air (typically) and pressure is a ...


3

Even though I'm not much of a wavelet expert, I can answer with a definitive YES!! Now, do you have any messy details to complain about, like the size of the box, the power that it consumes, or the number of frames of delay between the taking of the image and its display? Because that's your real problem. Take the particular wavelet transform you want to ...


3

The staple processor instruction of specialized DSP processors is a multiply-accumulate instruction. The vector multiplication and summation are performed in a single command fetch, it's a sort of SIMD (but not exactly). Only advanced MCU's have this instruction in their command set. Hence the advantage of DSP processors over general-purpose MCU's w.r.t. ALU ...


3

Real Time means having time-limit or time-constraint to complete assigned processing. For example : If you are using a DSP processor in the receive chain of a Communication system with certain Symbol Rate, then the processor must be able to process a symbol worth of data within a limited time-constraint in order to keep up with the received signal. If it ...


3

DSP algorithm implementations (software coding) are easiest when your microprocessor has an FPU hardware, but it's also possible with integer (fixed-point) ALUs too. This means that your microprocessor should either have a dedicated FPU, or it can use a (very inefficient) software emulation for FPU operations. Alternatively one can try a more difficult to ...


Only top voted, non community-wiki answers of a minimum length are eligible