] Peter:H [ Protoplug Corner - Lua / Catmull-Rom Spline based Volume-Shaper

VST, AU, etc. plug-in Virtual Effects discussion
User avatar
] Peter:H [
KVRian
1443 posts since 22 Sep, 2016

Post Sat Oct 16, 2021 8:39 am

Hi guys,

I recently discoverd much fun in writing my own effects in a script language called lua.
I use the realy amazing protoplug plugin for that - please definitely check it out if you are half musisian and half programmer like me: https://www.osar.fr/protoplug/

So if you like to check out my Volume Shaper then you first have to go and get protoplug.

Then you can go and check out my Code Repository on github. I point you to the script which you could copy and paste into protoplugs "code" page. Please afterwards press "compile".
--> Link to Code: https://raw.githubusercontent.com/huber ... litude.lua

Read about it here: https://github.com/huberp/ProtoplugScri ... /README.md

So it's not only a free plugin, but as well "free" source code where you can study how I did things... if you're a geek/nerd developer that code stuff might be interesting as well...

What can it - I call it AmplitudeKungFu - do?
  • Go to gui Tab of protoplug with my script loaded and compiled.
  • There's a green rectangle
  • double click in it to create you frist control point (red rectangle)
  • double click on this rectangle - it will go away again
  • you can as well drag a control point wherever you lie an drop it there...
  • the white line depicts the catmul-rom spline computet through your points
  • the blue line is the derived processing shape - tunred up side down for debugging purpose.
  • Now let's play a note ... you see the volume is shaped accrding to your processing shape.
  • Now let's go to parameters...
  • You can set the sync frame, i.e. 1/64,...,1/8, 1/4...1/1
  • And you can set the "power", i.e. how much influence the processor applies on you volume: 1- full, 0 - no affect
Please check the animated gif at the bottom of this post...

But what the heck are catmull-rom splines? Splines a curves that allow you to smoothley connect a number of control points whichout sharp edges at the control points. If you connect your control points only by point-to-point bezier curves you might get sharp edges - but not with splines.
That's why I chose to use splines for this.

What state is it in? It already does a lot of things, but some essential things are still missing, i.e. saving the state (available latest by the end of october). Currently it is therefore "ALPHA". Please keep this in mind.

The following picture shows: Red rectangular control points, in white the spline points, in blue the final volume processing shape (only turned up side down for debugging reason) and in red the unprocessed waveform going into the plugin and in green the processed waveform going out...
AmplitudeKungFu 003.png
--

Why I named this "] Peter:H [ Protoplug Corner". I have quite a few ideas and this I would like to implement with LUA. I think AmplitudeKungFu is ony the start. And I want to make it a work in progress continuous thread. Whenerver I do somehing new I will post it here, be it improvements or new stuff.
If you like the idea, please let me know. If you have any suggestions, please let me know as well.

] Peter:H [
AmplitudeKungFu_003.gif
You do not have the required permissions to view the files attached to this post.
Last edited by ] Peter:H [ on Mon Nov 01, 2021 5:14 am, edited 2 times in total.

User avatar
Tj Shredder
KVRAF
6395 posts since 6 Jan, 2017 from Outer Space

Post Sat Oct 16, 2021 8:30 pm

] Peter:H [ wrote:
Sat Oct 16, 2021 8:39 am
Then you can go and check out my Code Repository on github. I point you to the script which you could copy and paste into protoplugs "code" page.
Did I miss the link to github?

User avatar
] Peter:H [
KVRian

Topic Starter

1443 posts since 22 Sep, 2016

Post Sun Oct 17, 2021 1:05 am

Tj Shredder wrote:
Sat Oct 16, 2021 8:30 pm
] Peter:H [ wrote:
Sat Oct 16, 2021 8:39 am
Then you can go and check out my Code Repository on github. I point you to the script which you could copy and paste into protoplugs "code" page.
Did I miss the link to github?
Thanks Tj! I was a little muddle-headed... Added the link to the OP and here it is as well:
https://raw.githubusercontent.com/huber ... litude.lua

As I mentioned - Currently it is Alpha. Next thing I implement is state saving - currently it looses it's settings and in rare cases when modulating bpmto fiercely it crashes :-(

But anyways - let me know what you think.

User avatar
] Peter:H [
KVRian

Topic Starter

1443 posts since 22 Sep, 2016

Post Sun Oct 17, 2021 9:09 am

Next Version will come with "State Saving" one of the most pressing features that is missing: I have a first version working but I have to do some testing and may be some code clean up... (if you like it's here: https://raw.githubusercontent.com/huber ... litude.lua)

User avatar
] Peter:H [
KVRian

Topic Starter

1443 posts since 22 Sep, 2016

Post Mon Nov 01, 2021 5:27 am

Version 0.6.0-alpha
So here we are with the next version: https://github.com/huberp/ProtoplugScri ... .6.0-alpha

I have spend quite some time in doing performance improvements and removing bugs.
Most important feature is that State Saving works now, see blue box in the picture below.

Next Version v0.7.0-alpha will have a reworked form of the Catmull-Rome spline called "Centripetal" form which has some nice properties ... or in other words avoids some of the weird things of the current version.
AmplitudeKungFu 004 State Saving.png
You do not have the required permissions to view the files attached to this post.

Return to “Effects”