Page 1 of 1

DSP Component: Level (DSP) with PPM + VU

Posted: Fri Nov 22, 2019 12:14 pm
by stefan.erni
Hi Ben

DSP Component for filter is working nice in my program. I filtered the signal before I show it in a OLED Display as a Bar Graph.

I like to expand it from 1Channel to 6 Channel

First question? Do I need 6 DSP System or can I use 2 DSP System with 4Channel and 2Channel?



I saw there is a DSP Level.

DSP Level only needs a input buffer.
The idea was to use it for 6 Channel

The DSP Level is a good solution but it's need a upgrad.....
To show an audiosignal on a meter it's better to use it in special way. In the profesional studios (and in many home studios)
the cal this PPM or VU meter.

What about to include it in DSP level?
Like as
input 16Bit sint or 24(32)Bit sint
output 1 Byte (for the segment)

With this Byte output it easy to show it as graf in a small or big Display or with SCADA on the computer.

In the picture you can see a Bargraph with a 200 Segment display and the same part in a studio.

For details I can help

regards

Stefan


https://www.soundonsound.com/sound-advi ... -vu-meters

b1.PNG
(444.91 KiB) Downloaded 1865 times
A980.PNG
(1.65 MiB) Downloaded 1865 times

Re: DSP Component: Level (DSP) with PPM + VU

Posted: Fri Nov 22, 2019 12:47 pm
by QMESAR
Stefan

Just curious are you using a PIC32MZ or a STM32 for this project ? :D

Re: DSP Component: Level (DSP) with PPM + VU

Posted: Mon Nov 25, 2019 12:58 pm
by Benj
Hello,
First question? Do I need 6 DSP System or can I use 2 DSP System with 4Channel and 2Channel?
A single DSP system component can host up to 8 individual dsp buffers, these can be completely independent. For more buffers add more DSP system components.

For the DSP level component, you can maybe use a 16-bit value in the buffer and then tale the value and right shift it by 8 to get an 8-bit value.

Reading = DSPLevel::Macro()
Reading = Reading >> 8

Interested as to how you get on so let us know.

Re: DSP Component: Level (DSP) with PPM + VU

Posted: Mon Nov 25, 2019 2:56 pm
by stefan.erni
Hi Ben, Hi Qmesar


For my 6 channel PPM Meter I used 6 DSP System's for filtering the signal.
and show it with a small program on an Oled Display. It's working fine with the PIC32MZ

I used the same display to show ECG (signal of a heart) in an older project

http://wwww.matrixmultimedia.com/mmforu ... hilit=oled


What I have to change is the way I programed the RMS value of sine wave.
For this I like to use DSP Level component with an upgrade.

In the DSP System's I used 2 of 6 Buffer. Buffer A for input, Buffer B for output . Can I use buffer B as input for the next DSP (Level) component?
Like to use DSP components in serie. If it's not possible, it's easy to copy Buffer B to Buffer C.

regards


Stefan

https://mechatrofice.com/circuits/recti ... -full-wave

Filter-6.PNG
(32.57 KiB) Downloaded 1843 times
Display.jpg
Display.jpg (185.04 KiB) Viewed 8096 times

Re: DSP Component: Level (DSP) with PPM + VU

Posted: Tue Nov 26, 2019 3:00 pm
by Benj
Can I use buffer B as input for the next DSP (Level) component?
Yes this should work. Let us know how you're getting on.

Re: DSP Component: Level (DSP) with PPM + VU

Posted: Wed Nov 27, 2019 11:27 am
by stefan.erni
Hi Ben, Hi Qmesar

It's a problem to use as Input 24(32)Bit sint for the DSP System.
Do you have a good idea how to use 24Bit signal with the DSP System?
Can you ad for input and output a LONG ?
What about to include it in DSP level?
Like as
input 16Bit sint or 24(32)Bit sint
output 1 Byte (for the segment)

Re: DSP Component: Level (DSP) with PPM + VU

Posted: Wed Nov 27, 2019 12:09 pm
by QMESAR
Hi Stefan.
I never had the need of using a 24 bit number ,I never thought about it ,I am afraid at the moment I have no idea that can help you :D
good luck professor Ben will have some idea I am sure :D

Re: DSP Component: Level (DSP) with PPM + VU

Posted: Wed Nov 27, 2019 1:57 pm
by Benj
Hi Guys,

Hmm 24-bit numbers :( :shock: :P

At the moment it's 8-bit or 16-bit. I will add 32-bit to the list for the upgrades I'm currently working through. I'll also have a quick look at how hard it would be to add 32-bit support for the current components. I think it will be a fairly big job but it's worth checking.

You can scale down from 24-bit to 16-bit using the scale component and the right shift macro but obviously you will loose precision doing this.

You could split the number up into say two 16-bit values and pass them through this way but this won't really work too well as the two halves of the number will be processed seperatley.

Re: DSP Component: Level (DSP) with PPM + VU

Posted: Wed Nov 27, 2019 2:02 pm
by QMESAR
Hi Ben.
:D
I will add 32-bit to the list for the upgrades I'm currently working through
This could be useful never thought about it in our last discussions regarding DSP Component but see the need from Stefan's post /needs

Re: DSP Component: Level (DSP) with PPM + VU

Posted: Wed Nov 27, 2019 5:03 pm
by stefan.erni
Hi Ben, Hi Qmesar

For all the Medicalsignal EEG, ECG, EOC are 24 Bit "normal"
For some audiosignal too.

That will be a big help, if it's working with 24bit. Even if I have to use a 32bit "long" for this.
And a little wish more.

Somewhere to add a properties for rectifier yes/no in the Level component. It's simple lineā€¦
SC.PNG
(8.94 KiB) Downloaded 1802 times
rectifier.PNG
(36.55 KiB) Downloaded 1802 times

Re: DSP Component: Level (DSP) with PPM + VU

Posted: Wed Nov 27, 2019 7:26 pm
by QMESAR
Hi Stepan.
For all the Medicalsignal EEG, ECG, EOC are 24 Bit "normal"
I did not know this my game is automotive :D thanks for telling us this

Re: DSP Component: Level (DSP) with PPM + VU

Posted: Fri Nov 29, 2019 2:16 pm
by stefan.erni
Hi Ben, Hi Qmesar

With a second filter on the same DSP System is working fine. It's need a second filterTick. Thats all....

For a logarithmic scale, I used this code:
And a little wish more.... Somewhere to add a properties for a logarithmic/linear scale in the DSP Level Component.

Code: Select all

// logarithmic scale
float1 = int2float (max_value_mittel_ch[.ch_display])
float2 = 20 * log10 (float1)
y_valuelimit = float2int (float2)

more_than_one.PNG
(14.33 KiB) Downloaded 1708 times
Filter-Tick.PNG
(13.64 KiB) Downloaded 1708 times

Re: DSP Component: Level (DSP) with PPM + VU

Posted: Thu Jan 16, 2020 9:29 am
by stefan.erni
Hi Ben

I use 12 filters at the same time and this works great. So far I've only used the filters for the display. Actually the filters work so well that I want to use them for storing the 24 bit data. So I would like to use a 32 bit filter (DSP component) version. What do you think?

At the moment it's 8-bit or 16-bit. I will add 32-bit to the list for the upgrades I'm currently working through. I'll also have a quick look at how hard it would be to add 32-bit support for the current components. I think it will be a fairly big job but it's worth checking.

regards

Stefan

Re: DSP Component: Level (DSP) with PPM + VU

Posted: Tue Jan 28, 2020 9:33 am
by stefan.erni
Hi Ben

Is there a way to have the DSP component (Filter) in 32 Bit instead of 16 Bit?


regards


Stefan

Re: DSP Component: Level (DSP) with PPM + VU

Posted: Tue Jan 28, 2020 11:03 am
by Benj
Hi Stefan,

I've sent you a PM regarding this.