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

K5 - Pro Grade Compressor (?)

Post any examples or modules that you want to share here

K5 - Pro Grade Compressor (?)

Postby Rocko » Sun Nov 06, 2016 1:15 pm

Hi,

I've been experimenting a lot with compressors and came by with this design - the 'K5'.
It was designed from scratch and I think it is miles ahead of the stock example.
It has some nice tricks under the hood and I would love to hear your opinion about it...

It is a feedforward design, with accurate Attack, Release, Ratio and Threshold settings.

Unique features are:
* Configurable 'Envelope follower' window time (Alpha)
* RMS or PEAK selection
[edit: Removed the peak detector for now - still in the works and testing]

Since the 'envelope follower' time constant can be configured, the same Compressor can be used for very fast 'snaps' or for more moderate 'classic' compression - all the way to 'slow'.

Again, would appreciate if you could experiment with it and open-discuss what you find...
before I add a GUI and stuff.
Once conclusions are made and it is final, I'll be happy to share the code itself.

http://www.filedropper.com/k5_1

Rocko
Last edited by Rocko on Wed Nov 23, 2016 12:47 pm, edited 1 time in total.
Rocko
 
Posts: 186
Joined: Tue May 15, 2012 12:42 pm

Re: K5 - Pro Grade Compressor (?)

Postby BobF » Wed Nov 09, 2016 11:38 pm

Hello Rocko,

I played with this for a few hours and even though I am no expert on compressors I like it far better than others I have used. The fast snap action is very powerful and a nice feature. I can hardly wait to see the insides, I really want to see your envelope followere design. Keep up the great work.

Later then, BobF.....
BobF
 
Posts: 598
Joined: Mon Apr 20, 2015 9:54 pm

Re: K5 - Pro Grade Compressor (?)

Postby Rocko » Thu Nov 10, 2016 7:39 pm

Hey...

Thanks for the great comments.
Can I bother you to explain in what way did you test it? i.e. musical source (single instrument, buss compression, etc.)
Did you run it 'hot' with deep compression, or 'cold' i.e. subtle ones?

I've sent it to a few studio owner friends for more feedback.
I'll update and open the insides once the design receives more remarks and is considered as 'stable' from my side.
Just to save a lot of blah blah. in case of everything needs to be changed...

8-)

Thanks,
Rocko
Rocko
 
Posts: 186
Joined: Tue May 15, 2012 12:42 pm

Re: K5 - Pro Grade Compressor (?)

Postby BobF » Thu Nov 10, 2016 11:54 pm

Hi again Rocko,

I used a single acoustic 6 string guitar through a Shure dynamic mic with hard compression then soft as my 1st test, then a friend singing through the same mic for the 2nd test.

Hope it helps!

Later then, BobF.....
BobF
 
Posts: 598
Joined: Mon Apr 20, 2015 9:54 pm

Re: K5 - Pro Grade Compressor (?)

Postby Rocko » Wed Nov 23, 2016 11:39 am

Hi,

I'd like to share and explain what was done here. Hopefully others can benefit from this design or from the discussion itself.

The K5 is a feed-forward compressor, designed for 'down-compression' i.e. lower the signal parts which are higher than the given threshold.
The 'side-chain' channel is the part which 'decides' how much to compress (at this stage it is based on the original signal, not 'side-chain' of a different channel in the DAW).
The Side chain is marked in red in the following image.

Image

Open the compressor main module (named: compressor) and see its inside.
The 'side-chain' channel is based on:
(ED - Energy Detector) --> (TF - Transfer Function) --> (EF - Envelope Follower).
Being a none-linear device, the order of processors is important.
Note that the TF and EF are based on 'logarithmic' calculation.

The TF and EF are pretty much straight forward.

TF
TF will process the signal only if it has passed the threshold. It also decides 'how much to process' based on the ratio. (input controls: Threshold and Ratio).

EF
EF will 'smooth' the signal by 'Attack' and 'release' times. (input controls: Attack and Release).
Notice that 'Attack' and 'Release' are symmetric and carry the same 'time constant' function, which is:
T = 1-exponent^(-1/Fs*T)
This is a 'by the book' calculation of time constants and might vary tremendously if compared to 'analog modelled' compressors or other proprietary solutions.

ED
Compressors vary much by the ED itself. After all this module will 'declare' the energy level of incoming signal for reference.
An RMS approach is used here, in which:

Code: Select all
E = x^2*a+(1-a)*En1
En1 = E


So, it is first order IIR filter like window with a 'weighting' function (a) which decides how much to rely on previous result Vs. incoming sample.
a is sometimes referred to as Alpha.
Alpha's time constant is similar to 'Attack' and 'Release'.

Using Alpha, attack and release, once can decide the full timing of the algorithm.

Stereo processing
Some thought has to be taken for stereo processing.
If one channel's input surpasses the threshold (and requires processing) - both channels (Left and Right) need to be processed simultaneously, to avoid the sound 'bouncing' from left to right.
So, the K5 first squares each of the inputs (L_sample and R_Sample) and then chooses the current maximal sample value.
Notice that one must first square the signal to avoid comparing a negative value (samples are originally bi-polar). This will reverse the meaning of 'maximum' of course.

Hope this contributes to the forum and friends... Any question/remarks please go ahead.

Rocko
Last edited by Rocko on Thu Nov 24, 2016 3:14 pm, edited 1 time in total.
Rocko
 
Posts: 186
Joined: Tue May 15, 2012 12:42 pm

Re: K5 - Pro Grade Compressor (?)

Postby Spogg » Wed Nov 23, 2016 5:16 pm

Hi Rocko

I can't open your schematic in FS 3.08.1 so I think it's made with a new beta.

However I note you mention squaring so you don't get a negative value. So maybe you could use an abs module. I've attached a schematic with a DSP and an ASM abs module (not by me!).

Cheers

Spogg
Attachments
2 stream absolute modules.fsm
one in DSP code, one in ASM...
(1.71 KiB) Downloaded 1143 times
User avatar
Spogg
 
Posts: 3327
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: K5 - Pro Grade Compressor (?)

Postby Wassaka » Wed Nov 23, 2016 7:42 pm

Rocko wrote:Hi,

I'd like to share and explain what was done here. Hopefully others can benefit from this design or from the discussion itself.

The K5 is a feed-forward compressor, designed for 'down-compression' i.e. lower the signal parts which are higher than the given threshold.
The 'side-chain' channel is the part which 'decides' how much to compress (at this stage it is based on the original signal, not 'side-chain' of a different channel in the DAW).
The Side chain is marked in red in the following image.

Image

Open the compressor main module (named: compressor) and see its inside.
The 'side-chain' channel is based on:
(ED - Energy Detector) --> (TF - Transfer Function) --> (EF - Envelope Follower).
Being a none-linear device, the order of processors is important.
Note that the TF and EF are based on 'logarithmic' calculation.

The TF and EF are pretty much straight forward.

TF
TF will process the signal only if it has passed the threshold. It also decides 'how much to process' based on the ratio. (input controls: Threshold and Ratio).

EF
EF will 'smooth' the signal by 'Attack' and 'release' times. (input controls: Attack and Release).
Notice that 'Attack' and 'Release' are symmetric and carry the same 'time constant' function, which is:
T = 1-exponent^(-1/Fs*T)
This is a 'by the book' calculation of time constants and might vary tremendously if compared to 'analog modelled' compressors or other proprietary solutions.

ED
Compressors vary much by the ED itself. After all this module will 'declare' the energy level of incoming signal for reference.
An RMS approach is used here, in which:

Code: Select all
E = x^2*a+(1-a)*En1
En1 = E


So, it is first order IIR filter like window with a 'weighting' function (a) which decides how much to rely on previous result Vs. incoming sample.
a is sometimes referred to as Alpha.
Alpha's time constant is similar to 'Attack' and 'Release'.

Using Alpha, attack and release, once can decide the full timing of the algorithm.

Stereo processing
Some thought has to be taken for stereo processing.
If one channel's input surpasses the threshold (and requires processing) - both channels (Left and Right) need to be processed simultaneously, to avoid the sound 'bouncing' from left to right.
So, the K5 first squares each of the inputs (L_sample and R_Sample) and then chooses the current maximal sample value.
Notice that one must first square the signal to avoid comparing a negative value (samples are originally bi-polar). This will reverse the meaning of 'maximum' of course.

Hope this contributes to the forum and friends... Any question/remarks please go ahead.

Rocko

Hi Rocko!, I need help... I downloaded your module (k5_RMS) and flowstone says that is for a newer version. I tryed to run it and it crash my flowstone... Now, when I try to open the flowstone in crashes automatically, leaving me unable to react.... Any solutions? :(
Wassaka
 
Posts: 85
Joined: Wed Dec 30, 2015 3:41 am

Re: K5 - Pro Grade Compressor (?)

Postby Rocko » Wed Nov 23, 2016 8:02 pm

Hi,

It was coded in the latest Beta version (3.0.9 -Beta2). You need that version to run it.

If you do not want to install two FS versions on one PC, I can try and re-write it in 3.0.8 latest stable version, if you are interested. But it'll take a few days.
Please mention if this is interesting for you.

rocko
Rocko
 
Posts: 186
Joined: Tue May 15, 2012 12:42 pm

Re: K5 - Pro Grade Compressor (?)

Postby Wassaka » Wed Nov 23, 2016 8:30 pm

Rocko wrote:Hi,

It was coded in the latest Beta version (3.0.9 -Beta2). You need that version to run it.

If you do not want to install two FS versions on one PC, I can try and re-write it in 3.0.8 latest stable version, if you are interested. But it'll take a few days.
Please mention if this is interesting for you.

rocko


Thanks,but is not necessary, it would be too much work for you. But what really worries me is that I can not run Flowstone as I normally do, It crashes automatically when I run flowstone for no reason!!. I don't know if you understand me, my problem is since I opened that file (k5_rms), the flowstone crashes when I run it ... It's a serious problem :o :( :oops:
Any solutions? Thanks!!
Wassaka
 
Posts: 85
Joined: Wed Dec 30, 2015 3:41 am

Re: K5 - Pro Grade Compressor (?)

Postby BobF » Wed Nov 23, 2016 8:47 pm

Hi Rocko,

Sorry to ask, but YES, if you could at least do it in 3.08. I do not believe many here on the forum have 3.09 yet. Remember it is NOT really released as yet. I'd say most of us have 3.07 and 3.08 or even some older. Maybe there is a way to copy and paste most of it from 3.09 to 3.08 then just make the needed changes.

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

Next

Return to User Examples

Who is online

Users browsing this forum: hoangyen33 and 22 guests