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

Stereo Limiter

DSP related issues, mathematics, processing and techniques

Stereo Limiter

Postby Perfect Human Interface » Mon Jan 20, 2014 4:59 am

Hi all. I've grabbed this here Limiter module from the Developers Toolkit on the SM forums. It's simple and it does exactly what I need, with one exception. It has a single stream input/output, but I need it to process in stereo. Now I can run a mono4 through it just fine, but if I'm not mistaken, this will process the left and right signals independently (right?), which is not typical function for a limiter (it can throw off L/R balance). What I'm looking for is for gain reduction on both the left and right signals to be identical, while either the left or the right signal reaches the threshold.

So, logically, it could take two inputs, compare the two to find which is larger, and then base the gain reduction for both signals off of the larger value signal.

The problem is, I don't know the first thing about assembly code. It's completely foreign to me. So I guess this just amounts to a typical beg for help. :D Can anyone help out with stereoizing this baby?

Limiter.PNG
Limiter.PNG (2.68 KiB) Viewed 33862 times


Also, at what point should I feel bad for using everyone else's work in my work?
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Stereo Limiter

Postby KG_is_back » Mon Jan 20, 2014 2:36 pm

I can't get my hands on the limiter you are talking about, but try this one. It has zero attack time and adjustable release time. It treats mono4 as two stereo pairs (0-1 and 2-3) so it should do what you are looking for. If you need adjustable Threshold then replace
Code: Select all
float TH=0.99;

with
Code: Select all
streamin TH;
Attachments
limiter.fsm
(831 Bytes) Downloaded 1418 times
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Stereo Limiter

Postby martinvicanek » Mon Jan 20, 2014 8:03 pm

KG_is_back wrote:It treats mono4 as two stereo pairs (0-1 and 2-3)
In that case, should the third parameter of the shufps instruction not be 177 rather than 17?
shufps.png
shufps.png (24.92 KiB) Viewed 33833 times
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: Stereo Limiter

Postby KG_is_back » Mon Jan 20, 2014 10:09 pm

martinvicanek wrote:
KG_is_back wrote:It treats mono4 as two stereo pairs (0-1 and 2-3)
In that case, should the third parameter of the shufps instruction not be 177 rather than 17?
shufps.png


Yes :oops: you are right. A stupid mistake I've made.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Stereo Limiter

Postby Perfect Human Interface » Mon Jan 20, 2014 10:48 pm

Thank you very much, I'll give this a try.

Is assembler difficult to learn or is it pretty straightforward?
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Stereo Limiter

Postby Perfect Human Interface » Tue Jan 21, 2014 11:03 pm

Hey, so I've put it through the rounds and it does process both signals, though I notice the reduction isn't identical between left and right channels. For example I measure that the left channel is being reduced 12dB or more while the (lower) right channel is reduced by about 8dB. Is that correct functionality?

Also, the limiter I was using had a "Gain Reduction" output. Would it be possible to add that?

I'm uploading the original limiter module mentioned here; I think that will be okay.

(You're on the IOU list KG.)
Attachments
limiter 2.fsm
(2.99 KiB) Downloaded 1499 times
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Stereo Limiter

Postby alex111 » Wed Jan 29, 2014 12:41 pm

if we change the ports then what will be solution of this stereo limiter?????????????
alex111
 
Posts: 1
Joined: Wed Jan 29, 2014 12:31 pm

Re: Stereo Limiter

Postby KG_is_back » Wed Jan 29, 2014 1:59 pm

I have adjusted both so they work stereo and output the GR. they give the same result though.
Attachments
limiter 2.fsm
(5.67 KiB) Downloaded 1595 times
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Stereo Limiter

Postby Perfect Human Interface » Sat Feb 01, 2014 9:59 pm

Much thanks! I can see that the gain reduction readouts are identical. However I still measure a slight difference on my peak meters. For example a louder left channel is reduced around 10 dB while the right channel is reduced around 6. That's what my meters seem to show. I'm curious as to why this is, but this should be good enough for my purposes regardless.
Perfect Human Interface
 
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Stereo Limiter

Postby KG_is_back » Sat Feb 01, 2014 10:34 pm

Perfect Human Interface wrote:Much thanks! I can see that the gain reduction readouts are identical. However I still measure a slight difference on my peak meters. For example a louder left channel is reduced around 10 dB while the right channel is reduced around 6. That's what my meters seem to show. I'm curious as to why this is, but this should be good enough for my purposes regardless.


Then there must be something wrong with your readout. Both inputs are multiplied by the same GR so they both should be reduced by the same dB. How do you actually measure the GR?
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Next

Return to DSP

Who is online

Users browsing this forum: Google [Bot] and 26 guests

cron