DSP Component: Level (DSP) with PPM + VU

Moderator: Benj

Post Reply
stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

DSP Component: Level (DSP) with PPM + VU

Post 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

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

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

Post by QMESAR »

Stefan

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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

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

Post 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.

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

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

Post 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 7634 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

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

Post 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.

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

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

Post 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)

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

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

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

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

Post 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.

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

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

Post 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

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

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

Post 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

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

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

Post 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

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

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

Post 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

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

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

Post 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

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

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

Post by stefan.erni »

Hi Ben

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


regards


Stefan

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

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

Post by Benj »

Hi Stefan,

I've sent you a PM regarding this.

Post Reply