Blue Cat's Plug'n Script 3.3 Released - DSP DIY Summer?

Official support for: bluecataudio.com
RELATED
PRODUCTS
Crafters Pack Plug'n Script

Post

So, the new plugin made with Plug'n Script is out! :party:
Huge response, and huge thanks to Blue Cat Audio for making such a cool framework and for support!
https://letimix.com/gainmatch

https://www.youtube.com/watch?v=cMZm4n4IDAw

Post

I've got a question about CPU load with PnS, trying to get as low as possible.
With 32 instances of BC Gain I'm getting ~2% of load in Reaper, the same with FreeG plugin.
However with gain plugin made with PnS (I'm using factory binary with gain in %) I get approximately 4% of CPU. If I disable meters, I get ~2.5%, but still not as low as BC Gain or FreeG. Can something else be done on my side to get the lowest CPU usage possible?

Post

ilyaorlov wrote: Fri Oct 09, 2020 12:30 pm I've got a question about CPU load with PnS, trying to get as low as possible.
With 32 instances of BC Gain I'm getting ~2% of load in Reaper, the same with FreeG plugin.
However with gain plugin made with PnS (I'm using factory binary with gain in %) I get approximately 4% of CPU. If I disable meters, I get ~2.5%, but still not as low as BC Gain or FreeG. Can something else be done on my side to get the lowest CPU usage possible?
PnS itself (when used in native mode, without any metering) does not have any overhead, so I am guessing that it could be either the way processing is written, or the compiler optimizations. Also, for such a low cpu thing, it's hard to get very precise measurements.

Also, you can definitely get better performance using the processBlock function, as the compiler can inline most of the code in the inner samples loop (which is not the case when using the processSample method).

Post

I just wrote a limiter plugin, specifically to tame drum transients without killing the tone too much. It started off as a dual threshold scaling scheme, but I found it sounded best with the upper threshold at maximum anyways, so it was simplified. Basically an instantaneous compressor with no envelope. It generates odd harmonics and the attendant aliasing, but it makes drums sound right.

http://www.ericbridenbaker.com/dl/DT.Li ... MacOSX.zip
http://www.ericbridenbaker.com/dl/DT.Li ... in-x64.zip
Last edited by ericbridenbaker on Mon Oct 26, 2020 11:38 am, edited 1 time in total.

Post

I've discovered that this limiter is generating even harmonics as well, maybe that's part of what I like about the sound. I have the DC filter working now.

I think the variable values for the dc filter were holding over, cross-contaminating left and right channels while using the for(uint channel=0;channel<audioInputsCount;channel++) technique. I've experienced this before on recursive IIR loops. It's probably just an initialization that needs to be to placed in the input count loop. When I spelled out the left and right channels discretely using two sets of variables, it worked perfectly.

Post

I've been thinking about oversampling. This limiter plugin talks nicely with DDMF Metaplugin, but I can't say that the 8x oversampling there sounds any better. Aliasing and drum hits were never really a problem for me, 1x sounds more impactful to me tbh unless you're going for a really distorted sound.
Last edited by ericbridenbaker on Mon Oct 26, 2020 12:19 pm, edited 1 time in total.

Post

ericbridenbaker wrote: Mon Oct 26, 2020 12:05 pm I've been thinking about oversampling. This limiter plugin talks nicely with DDMF Metaplugin, but I can't say that the 8x oversampling there sounds any better. Aliasing and drum hits were never really a problem for me, 1x sounds more impactful to me tbh.
The effect of aliasing is less obvious on percussions, because their spectrum is already inharmonic. If you want to hear the difference, you can use a high frequency sine wave: you will see on a spectrum analyzer (and hear) the aliasing on higher harmonics that get back into the spectrum as non-multiple of the root frequency.

Post

Blue Cat Audio wrote: Mon Oct 26, 2020 12:19 pm
ericbridenbaker wrote: Mon Oct 26, 2020 12:05 pm I've been thinking about oversampling. This limiter plugin talks nicely with DDMF Metaplugin, but I can't say that the 8x oversampling there sounds any better. Aliasing and drum hits were never really a problem for me, 1x sounds more impactful to me tbh.
The effect of aliasing is less obvious on percussions, because their spectrum is already inharmonic. If you want to hear the difference, you can use a high frequency sine wave: you will see on a spectrum analyzer (and hear) the aliasing on higher harmonics that get back into the spectrum as non-multiple of the root frequency.
Indeed! The inharmonicity of drum sounds in my opinion can actually benefit from aliasing, if the overall sound isn't too small or clouded. I think about old synths like the DX7, or old samplers and the aliasing is such a part of the tone, it's some of the only help an otherwise impossibly thin sound could get.

I do run sine tones, sweeps and noise through whatever I'm trying to work on, that's when I found that this limiter is generating even harmonics. Makes sense as the gain reduction is independent between positive and negative values for the incoming samples. In fact, sine sweeps through this plugin can be made to sound like a video game! But if it's not pushed into deliberately audible distortion, it sits really well, sounds cohesive.


Post

Do you have a simple example how to add a combo box on the UI and how you receive notification when a selection is made.

Post

ValliSoftware wrote: Tue Nov 03, 2020 8:33 pm Do you have a simple example how to add a combo box on the UI and how you receive notification when a selection is made.
It depends on what you want to do: dropdown menus can be used either to select a parameter value directly or to trigger different actions on each menu element. KUIML is model-driven so you will usually attach actions or data model objects to widgets instead of using events and callbacks (but you can hook scripts with events too). Can you maybe tell us more about what you are trying to do?

Post

Blue Cat Audio wrote: Wed Nov 04, 2020 8:29 am It depends on what you want to do: dropdown menus can be used either to select a parameter value directly or to trigger different actions on each menu element. KUIML is model-driven so you will usually attach actions or data model objects to widgets instead of using events and callbacks (but you can hook scripts with events too). Can you maybe tell us more about what you are trying to do?
Put a combobox on the UI so I can select different values.
You do not have the required permissions to view the files attached to this post.

Post

ValliSoftware wrote: Wed Nov 04, 2020 8:54 am
Blue Cat Audio wrote: Wed Nov 04, 2020 8:29 am It depends on what you want to do: dropdown menus can be used either to select a parameter value directly or to trigger different actions on each menu element. KUIML is model-driven so you will usually attach actions or data model objects to widgets instead of using events and callbacks (but you can hook scripts with events too). Can you maybe tell us more about what you are trying to do?
Put a combobox on the UI so I can select different values.
Hey, Valli!

Here's an example for you:

Code: Select all

<ROW>
		
  <!-- our test param -->
  <PARAM id="my_color" type="enumeration" enum_values="red;green;blue" />

  <!-- action to execute when param has changed -->
  <ACTION_TRIGGER event_id="my_color.value_changed" script="
      int val = my_color;
      /* do something with param value */
    " requires="my_color" />

  <!-- first way to make a simple popup menu to select param value -->
  <PARAM_TEXT param_id="my_color" content="simple menu: {text_value}">
    <INVISIBLE_PARAM_MENU_BUTTON param_id="my_color" cursor="system::hand" width="100%" height="100%" />
  </PARAM_TEXT>

  <!-- second way to make a popup menu with actions and checked_param_id (can be much more complex and customizeable -->
  <ACTION id="act_red" type="Script" script="my_color = 0;" name="Make red" />
  <ACTION id="act_green" type="Script" script="my_color = 1;" name="Make green" />
  <ACTION id="act_blue" type="Script" script="my_color = 2;" name="Make blue" />
  <FORMULA_PARAM id="color_is_red" formula="my_color = 0" />
  <FORMULA_PARAM id="color_is_green" formula="my_color = 1" />
  <FORMULA_PARAM id="color_is_blue" formula="my_color = 2" />

  <POPUP_MENU id="my_menu">
    <MENU_ITEM action_id="act_red" checked_param_id="color_is_red" />
    <MENU_ITEM action_id="act_green" checked_param_id="color_is_green" />
    <MENU_ITEM action_id="act_blue" checked_param_id="color_is_blue" />
    <MENU_ITEM name="submenu">
      <MENU_ITEM name="can make complex menus this way">
        <MENU_ITEM action_id="act_red" checked_param_id="color_is_red" />
        <MENU_ITEM action_id="act_green" checked_param_id="color_is_green" />
        <MENU_ITEM action_id="act_blue" checked_param_id="color_is_blue" />
      </MENU_ITEM>
    </MENU_ITEM>
  </POPUP_MENU>

  <PARAM_TEXT param_id="my_color" content=" | complex menu: {text_value}">
    <INVISIBLE_ACTION_BUTTON action_id="my_menu.Popup" cursor="system::hand" width="100%" height="100%" />
  </PARAM_TEXT>

</ROW>

Post

ilyaorlov wrote: Fri Nov 06, 2020 5:10 pm
Hey, Valli!

Here's an example for you:
Thanks for this.
Wow, this is pretty cool because I can break down the scales by Alphabet.
ScaleList.png
Thanks for getting me started, now I'll reference the manual. :D
You do not have the required permissions to view the files attached to this post.

Post

You're welcome! Good luck with your project!

Post Reply

Return to “Blue Cat Audio”