Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Crazy look ahead limiter.

DSP related issues, mathematics, processing and techniques

Crazy look ahead limiter.

Postby Iainmf » Thu May 25, 2017 11:29 am

Hi All,

I am new here and trying to get familiar with Flowstone.

One of my projects is this Frankenstein's monster of limiters. I figured that if you can do very quick gain changes when the signal is at or very close to zero it would be quite transparent. So I have created a limiter that measures the peak between zero crossing points, or for each half cycle. So I needed to know what 'future' peaks are going to be so the is a substantial delay introduced (100ms at the moment). To find each cycle's peak at the preceding zero crossing point I read a buffer backwards to reverse the signal, do a peak hold with resets when the signal crosses the zero point, and then reverse it back. I also do the same type of peak hold in the forwards direction. By delaying the main signal I get everything to match up.

It turns out that limiting based on every cycle's peak is not as transparent as I hoped so I hold the peak for 20ms and then hold it until the next zero crossing. This is much better especially when there is a lot of high-frequency content that gives you a zero crossing every several samples.

Much of this had been butchered from examples posted here. So thanks to those who have posted those.

I'm sure there is much to improve. (eg I have different code modules joined together that could be contained in one if I could figure it out). Anyway have a look and let me know what you think.

Cheers.
Attachments
backwards buffer 06.fsm
(45.97 KiB) Downloaded 1359 times
Iainmf
 
Posts: 10
Joined: Fri May 01, 2015 7:17 am

Re: Crazy look ahead limiter.

Postby BobF » Fri May 26, 2017 9:12 pm

Hello Iainmf,

Very clever and already working quite well. Keep up the great work and can not wait to see the finished product. Also hope to lots more cool stuff from you in the future.

Take care, BobF.....
BobF
 
Posts: 598
Joined: Mon Apr 20, 2015 9:54 pm

Re: Crazy look ahead limiter.

Postby Iainmf » Tue Jun 06, 2017 11:27 am

BobF wrote:Hello Iainmf,

Very clever and already working quite well. Keep up the great work and can not wait to see the finished product. Also hope to lots more cool stuff from you in the future.

Take care, BobF.....


Thanks.

I made some improvements but there was a fundamental problem with detecting the appropriate zero crossing point. When there was both low and very high frequencies present, there would be several zero crossings very very quickly. I filtered out the high frequencies to limit this but then peaks could slip through every so often, which is not what a limiter should do.

Instead, I have taken a slightly different approach. I still try to create a 'peak envelope' (imagine drawing a line connecting each peak in the waveform) to determine levels for calculating gain reduction. That the red line in the graph. I'm pretty happy with the limiter overall.


One problem I am having is that the running average that I got from

viewtopic.php?f=57&t=368

Is not stable and causes problems in the level detection if you change the size of the average. I did my best to mitigate this by trying to get it to reset and muting the input when the knob is used but sometimes you still need to wiggle the knob to get it back to normal.

Any help would be appreciated.
Attachments
Peak envelope mark III 03.fsm
(107.53 KiB) Downloaded 1380 times
Iainmf
 
Posts: 10
Joined: Fri May 01, 2015 7:17 am

Re: Crazy look ahead limiter.

Postby martinvicanek » Tue Jun 06, 2017 7:59 pm

Hi there,
here ya go, stable running average. BTW you'd get better response if you tidy up your schematic before posting, ;)
Attachments
Running Average MV.fsm
(1.2 KiB) Downloaded 1357 times
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: Crazy look ahead limiter.

Postby Iainmf » Tue Jun 13, 2017 4:08 am

martinvicanek wrote:Hi there,
here ya go, stable running average. BTW you'd get better response if you tidy up your schematic before posting, ;)


Thanks!

And you are quite right I should have tidied up my schematic. Sorry about that everybody.

Here is the latest version of my limiter. Nice and tidy this time.
Attachments
Peak envelope mark III 07 gain envelope.fsm
(186.63 KiB) Downloaded 1462 times
Iainmf
 
Posts: 10
Joined: Fri May 01, 2015 7:17 am


Return to DSP

Who is online

Users browsing this forum: No registered users and 17 guests