SynthMaker

Building a Limiter...

Archive · 2012 12 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

MDMA ·

Hi guys,

So I'm trying to understand how to go about building a limiter.

With the little knowledge I have, this is what I came up with:

As I start to increasse the limiter knob amount the output signal decreases but nasty digital distortion is introduced!

What am I doing wrong?

Thanks in advance.

Mo ·

-Min/max should be opposite; The lower value to Max and the higher to min. -Move the gain multiplier to before the clipper instead of after.

MDMA ·

Mo wrote: -Min/max should be opposite; The lower value to Max and the higher to min.

I tried doing that and get no sound???

Mo wrote: -Move the gain multiplier to before the clipper instead of after.

I was trying to create an "Make Up Gain" control, not an "Input" one.

Mo ·

MDMA wrote: I tried doing that and get no sound???

Maybe something with the code. Here's the ASM version:

streamin in; streamin high; streamin low; streamout out; movaps xmm0,in; minps xmm0,high; maxps xmm0,low; movaps out,xmm0;

MDMA wrote: I was trying to create an "Make Up Gain" control, not an "Input" one.

It is necessary to keep the output in the -1 to 1 range or it will make the distortion.

cyto ·

What you have works fine, but it is not what (in the audio world) is thought of as a "Limiter". Sure it limits the signal, but it is simply keeping each individual sample in a certain range. It is a "Hard Clipper". The distortion you hear is aliasing. If you're not familiar with aliasing, do a couple searches and you'll get to read all about wagon wheels 😉 .

If you want just to soften up the clipping, there are plenty of transfer curves floating around (tanh is very popular for this type of thing). Otherwise, to implement a traditional limiter design, you'll need some kind of envelope detector and a gain reduction algorithm. If this is more what you had in mind, start searching for compression examples (as a limiter is a compressor with an infinite ratio).

-cyto

MDMA ·

cyto wrote: What you have works fine, but it is not what (in the audio world) is thought of as a "Limiter". Sure it limits the signal, but it is simply keeping each individual sample in a certain range. It is a "Hard Clipper". The distortion you hear is aliasing. If you're not familiar with aliasing, do a couple searches and you'll get to read all about wagon wheels 😉 .

If you want just to soften up the clipping, there are plenty of transfer curves floating around (tanh is very popular for this type of thing). Otherwise, to implement a traditional limiter design, you'll need some kind of envelope detector and a gain reduction algorithm. If this is more what you had in mind, start searching for compression examples (as a limiter is a compressor with an infinite ratio).

-cyto

Thanks a lot bro, looks like I need to dive into compressors a lot more than I expected!

cyto ·

MDMA wrote: Thanks a lot bro, looks like I need to dive into compressors a lot more than I expected!

Good Luck 😉

It's not all that bad once you understand the basic principals. IMHO, the most critical part in any compressor/limiter design is the detection process. Unfortunately, most people spend a lot of time and effort getting these detection processes just right and don't want to reveal all their "secrets" to the public. So finding decent examples can sometimes be hard. There are a few floating around here on the forum if I remember correctly. Search for "RMS" or "peak detection" to get you going.

-cyto

MDMA ·

cyto wrote: MDMA wrote: Thanks a lot bro, looks like I need to dive into compressors a lot more than I expected!

Good Luck 😉

It's not all that bad once you understand the basic principals. IMHO, the most critical part in any compressor/limiter design is the detection process. Unfortunately, most people spend a lot of time and effort getting these detection processes just right and don't want to reveal all their "secrets" to the public. So finding decent examples can sometimes be hard. There are a few floating around here on the forum if I remember correctly. Search for "RMS" or "peak detection" to get you going.

-cyto

Thanks Cyto

bootsy ·

Here is a simple one as a starting point: Lightweight but decent limiter algo Towards a more sophisticated one you should investigate and experiment with: - lookahead techniques (thats the most straight forward approach in digital domain) - more intelligent release curve computation, especially with - mixing multiple release curves with different behaviour

aliasant ·

Here is my latest Limiter build as a VST plug.

Please test it.

It has an "intelligent" release system and some other secret ingredients and I think it sounds pretty good. I havnt dared comparing it to any of the industry standard limiters yet so please dont let me know if it sounds crap. Id like to keep on living in denial 😉

http://martin.rodensjo.se/assets/Limitations%20Alpha%20VST%20win.zip

Dell ·

aliasant, It performs very good! 🙂

I would only suggest making the preset manager fit the aesthetics of the GUI.

And put your moniker on your design.

Cheers!

aliasant ·

Dell wrote: aliasant, It performs very good! 🙂

I would only suggest making the preset manager fit the aesthetics of the GUI.

And put your moniker on your design.

Cheers!

nice 🙂 Thanx ! Glad it isnt horrible.

The Gui isnt really made yet and the preset manager is just the toolbox tossed in for testing with my Preset A/B system. Trying to decide if I should go for a vintage design or like what I have now. I might have decided in a year or two........

Not sure I should have uploaded it to this thread but at least it can provide an example of a limiter 🙂

BTW! The Dither I use is based on a design from DiscoSteve and it is on the forums somewere. Search for Dither. Brilliant stuff!

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.