new Noise Gate plugin

Discussion in 'Effects and the DSP' started by Russ, Mar 21, 2006.

  1. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    Due to some issues with the bundled Noise Gate plugins (i.e. dB scale is off, etc), and, because I wanted to have envelope settings based on time values, I created a new Noise Gate plugin.

    It uses more resources than I would like, but I have not optimised it as of yet. Because of some anomolies, and the nature of the code, it will take a bit of work to optimize it, without breaking it, so, I will probably hold off from doing that until I am sure there are no bugs, etc.

    There is a mono version and a semi-stereo version (inputs/outputs stereo, but the gate is controlled by whichever signal is greater, rather than processing both channels seperately (you can use 2 of the mono version, if you want seperate control of the left and right channels)).

    The parameters are as follows:

    ON:
    Range (0 to -96 dB)
    This is the dB level at which the gate begins to turn ON (no output until the signal is above this value).

    OFF:
    Range (0 to -96 dB)
    This is the dB level at which the gate begins to turn OFF.
    This should not be set above the ON threshold setting for normal use.

    Attack:
    Range (1 ms to 3 seconds)
    This setting controls how fast the volume reaches full level, (only) when the gate first turns ON (the volume level is incrementally increased).

    Hold:
    Range (0.1 ms to 3 seconds)
    This setting controls how long the gate will stay ON after the signal drops below the OFF threshold setting. (Helps to keep the gate from turning on/off due to momentary drops in the signal level.).

    Release:
    Range (1 ms to 3 seconds)
    This setting controls how quickly the volume goes to 0, after the gate has dropped below the OFF threshold, and has completed the hold time. (the volume is incrementally decreased).

    You can download the plugin (N-Gate) here.

    Let me know what you think, and/or if you find any bugs, etc.
    -Russ

    BTW: It is compiled for 3538j.
     
    Last edited: Nov 9, 2009
  2. thomasabarnes

    thomasabarnes Long Time ***** Friend

    Joined:
    Jan 7, 2003
    Messages:
    1,404
    Likes Received:
    13
    Trophy Points:
    48
    Cool Russ. Any chance of having this compatible with 3534f?
     
  3. Maddogg6

    Maddogg6 Tail Razer

    Joined:
    Jun 21, 2005
    Messages:
    4,027
    Likes Received:
    26
    Trophy Points:
    0
    Maybe it my system??
    2 things I'm noticing...

    Attack doesnt seem to work reliably.
    and sometimes - I get distorion.

    Circumstance in detail:

    Using my TV card input for a dynamic signal - peaks ~ -0.5db - no signal drops to ~-50db

    ON: -3db, Off: -6db, attack: 1 sec, hold: .00001, release: .5

    I hear 'popping' attacks... if I increase the HOLD (to about .4) - I can hear distortion at the attack and release times, but the popping disappears.

    In this circumstance - I would expect a 'breathing' effect... but its distorted.
     
  4. Maddogg6

    Maddogg6 Tail Razer

    Joined:
    Jun 21, 2005
    Messages:
    4,027
    Likes Received:
    26
    Trophy Points:
    0
    Add:

    It happens with both... identically.
     
  5. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    I did not really test using settings that high. I will take a look. Thanks for the report.
     
  6. Maddogg6

    Maddogg6 Tail Razer

    Joined:
    Jun 21, 2005
    Messages:
    4,027
    Likes Received:
    26
    Trophy Points:
    0
    No problem... I just stumbled on the popping - then noticed the distortion..

    It seems the HOLD is affecting the attack... ??
     
  7. Maddogg6

    Maddogg6 Tail Razer

    Joined:
    Jun 21, 2005
    Messages:
    4,027
    Likes Received:
    26
    Trophy Points:
    0
    The popping also happens when I set my source volume to peak @ -40 db w/ default ON/OFF - but same attack/release/hold as above..

    But, its hard to tell if its distorting because I have to add a gainHQ in order to hear such low signal, and its kinda distorted anyway at that point.

    If the intent is for guitar, the 3 sec attack/release would be impractical.
     
  8. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    The problem is that something is causing the starting level to be the ON level, so the attack setting does not effect it ,until it gets beyond that level. I will have to go through and and figure out where the problem is (some error in my conditional logic).

    It could be a while. :(

    As for guitar use, I have been mainly testing it using the default settings, and it seemed to work pretty good (i.e. why I made those settings the defaults).
     
  9. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    Ok, I found the problem with the attack, but it's late here, so I will probably wait until tomorrow to fix it (and do dome more testing).

    @thomasabarnes
    I want to try and make it as bug free as possible, before compiling it for other kX versions.
     
  10. Maddogg6

    Maddogg6 Tail Razer

    Joined:
    Jun 21, 2005
    Messages:
    4,027
    Likes Received:
    26
    Trophy Points:
    0
    I brought that up thinking that if you intend it for guitar use - I figured you could save some resources by lowering the range to 1 second... but for other uses the 3 seconds would be good.
     
  11. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    I updated the code (microcode should show version 1.1). The plugin only contains the mono version for the moment. I will update the stereo version when I am sure it is working right.

    @Maddogg6
    I am curious why you used those settings for TV? i.e. Not much dynamic range.
    Was it just for testing, or is that what you would normally use?
    In any case, let me know if there are still problems, etc.

    Thanks again,
    -Russ
     
    Last edited: Mar 22, 2006
  12. Maddogg6

    Maddogg6 Tail Razer

    Joined:
    Jun 21, 2005
    Messages:
    4,027
    Likes Received:
    26
    Trophy Points:
    0
    Well - Ill explain my actions...
    1) my TV was a convenient signal to use to test with... it does actually have a pretty descent dynamic range. For a cheapo TV USB deal anyway... and its pretty low noise too.
    Its not that I *needed* a noise gate for it, just a convenient signal to test with at the time.
    2) default settings made it next to impossible to tell if it was working - the volume levels are so low at that point. and it IS pretty low noise to begin with.
    3) So I played with the IN and OUT settings and quickly stumbled on a popping sound
    4) re-booted to make sure it wsnt something screwy on my system...but still happened.
    5) as I started playing with the attack and release settings, I could hear distortion durring the attack/release..

    After you posted that you didnt test at the settings I tried - I went back and played a bit more - noticed it still happened at the default IN/OUT -
    I had to add a GainHQ to be able to hear the lowered signals fed to the noisegate..it distorted a bit so it was difficult to tell if the distortion was still happening durring the attack/release - but with thse set lower... the popping was still happening.

    And, its no problem testing... its kinda fun... I know, Im wierd.
     
  13. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    Hehe, I figured it was something like that.
    I do not know if you saw my edit saying to wait (which I have since removed), but in any case, I made another small change (hopefully I didn't mess anything up doing so, lol). So, if you allready downloaded it, you will need to do so again.

    BTW: I did not mean that TV's do not have good dynamic range, I only meant that -3 to -6 dB wasn't very much (i.e. the gate would be going on and off very frequently).
     
  14. Maddogg6

    Maddogg6 Tail Razer

    Joined:
    Jun 21, 2005
    Messages:
    4,027
    Likes Received:
    26
    Trophy Points:
    0
    I understood - but that was my intent... to hear it work... or, em..not - lol - BUT, with attack/release and hold adjusted as I did - it shouldn't cycle AS much tho either. That just seemed logical for testing... or maybe more like stress testing.

    I used a 3db IN/OUT difference as I thought thats what the defaults had used. But I play around with it a bit too, and it just so happened to happen with those settings.

    I havent tried new one , but will right now... will report ASAP..
     
  15. Maddogg6

    Maddogg6 Tail Razer

    Joined:
    Jun 21, 2005
    Messages:
    4,027
    Likes Received:
    26
    Trophy Points:
    0
    Oh - should I use the unreg script on the first .??
     
  16. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    You should not need to use the un-reg script, but if you do not, then it will not remove N-Gate2, so do not forget that is not updated yet.
    <edit>
    (actually N-Gate2 will not be available anyway as it is not in the .dll, but it will still be in your plugin list if you do not use the unreg script).
    </edit>

    As for cycling on and off. Your hold time was very low (.0001), for a fairly large dynamic range like TV audio (where the volume constantly changes).
    For guitar, it is less liekly to dip below the threshold momentarily, thus the lower settings are ok.
    Also, with it going completley ON/OFF frequently, the attack/release is constantly being used, thus the signal is ramped up/down very frequentley, which may sound distorted.
     
    Last edited: Mar 22, 2006
  17. Maddogg6

    Maddogg6 Tail Razer

    Joined:
    Jun 21, 2005
    Messages:
    4,027
    Likes Received:
    26
    Trophy Points:
    0
    I unreged anyway...

    it IS improved - I can force it into breathing but it still distorts when hold is < ~.075

    Im still hearing a popping with attack/release/hold - .5/.3/.5 more intermittant tho.

    IN/OUT settings seem to make no difference.. (matching IN/OUT to the input level)

    it works fine for a more hard gating (like for a distorted guitar) - but for a clean guitar sound Im sure would introduce the popping..

    After listening for a while and playing... the distortion seems to be the popping happening really fast. - hope thats a clue for ya...
     
  18. Maddogg6

    Maddogg6 Tail Razer

    Joined:
    Jun 21, 2005
    Messages:
    4,027
    Likes Received:
    26
    Trophy Points:
    0
    Agreed - but, that setting should be able to set to 0 as I may not always want it held, for fast transients - the way Im setting it is more like acting like an envelope on a synth than a noise gate.
     
    Last edited: Mar 22, 2006
  19. Maddogg6

    Maddogg6 Tail Razer

    Joined:
    Jun 21, 2005
    Messages:
    4,027
    Likes Received:
    26
    Trophy Points:
    0
    Oh also... - 500 ms attack AND release shouldn't sound like distortion - its not THAT fast...

    update:

    If I set A/H/R - to 1sec/.2/1sec - I still hear pops - but breathes...
    If I ONLY set hold to min/0 - its distorted attack/release...

    Just so I understand correctly...

    the HOLD is the time (once the off threshold has been detected) before the release starts - as long as input is still > IN threshold - correct?
     
    Last edited: Mar 22, 2006
  20. Russ

    Russ Well-Known Member

    Joined:
    Jan 17, 2005
    Messages:
    5,722
    Likes Received:
    13
    Trophy Points:
    48
    Yes, it is the time before the release starts, but there is more to it than that.

    i.e.
    Say your ON threshold is -36, and your OFF threshold is -48.
    If the signal drops below -48, then the hold timer starts, but, if the signal goes back above -48 before the hold timer finishes, then it never goes into release (i.e. it does not have to go back up to -36 while the gate is still ON). Also, the attack is still in effect during hold, if it's counter has not timed out yet..
     

Share This Page

visited