implementing an algorithm using a digital signal processor

Thread Starter

Nostradamus2707

Joined Mar 13, 2022
2
How can I implement a signal processing algorithm (filtering, transformed) using simulation data (stored in a file) or acquired in real time? I want to do this on the Rasberry Pi 4. I have no idea how to do it, some examples like a low pass filter algorithm or FIR, IIR
Or a concrete example of the requirement, how can I implement an optimized algorithm on the DSP extension in Raspberry Pi to implement echo and reverb effects on an audio file containing voice
 

Ian0

Joined Aug 7, 2020
5,082
You'll find a lot of useful information on filters here:
https://www.earlevel.com/main/2021/09/02/biquad-calculator-v3/
or I can recommend Lane, Datta, Karley and Norwood DSP Filter Cookbook ISBN ‎ 978-0790612041
You can implement a first order IIR low-pass filter in ARM code in four instructions.
LDR R0,[Rx,<data>]
SUBS R0,R0,R0,ASR #n
ADDS R0,R0,R1
STR R0,[Rx,<data>]
where R1 is the new data, from the A/D or whereever.

For a reverb or echo, you need a implement circular buffer.
 

Ian0

Joined Aug 7, 2020
5,082
Thank you
I forgot a major aspect in the forms. The implementation must be done in C
C might be too slow.
By all means translate my assembly into C, so that your compiler can translate in back into assembly adding some pointless register transfers and subroutine calls in the process in order to slow it down and make it less efficient so you end up having to use a faster processor!
 
Top