Create VST, VST3 and Audio Units with Plug'n Script 3.1

Official support for: bluecataudio.com
Post Reply New Topic
RELATED
PRODUCTS
Plug'n Script

Post

The "realistic" sliders support basic light properties to draw shadows depending on thumb position.
You do not have the required permissions to view the files attached to this post.
Last edited by ilyaorlov on Tue Aug 27, 2019 12:14 pm, edited 2 times in total.

Post

The CanvasObject can have different shapes and rotations.
You do not have the required permissions to view the files attached to this post.

Post

Hopefully someday these elements will be possible to use in real-world skins.

Right now I'm using canvas and over it
<IMAGE_PARAM_SLIDER opacity="0" image="empty.png" image_scaling="$image_scaling$" ... thumb_image="" />

"empty.png" is 1x1px empty image, image scaling depends on slider size.

It would be nice if we could get rid of "empty.png" and fully turn off rendering of this element. leaving only mouse/keyboard behaviour.
Last edited by ilyaorlov on Wed Aug 28, 2019 10:20 am, edited 2 times in total.

Post

I would like to better understand how to optimize scripts using CANVAS, to lower CPU usage.

As I see now when element (for example IMAGE_PARAM_SLIDER) changes, all the underlying elements are also "invalidated" and so to be re-rendered, right? I see they are "re-rendered" in bounds of this element.

After that I trigger CANVAS invalidation on param.value_change, so the whole CANVAS re-renders once again. It could be nice to remove need to rerender piece under IMAGE_PARAM_SLIDER, cause IMAGE_PARAM_SLIDER is set with opacity="0". If it wouldn't trigger underlying canvas invalidation, the render function will be called less times = less CPU usage, right?

Post

Very nice! We are getting close to the release, including full documentation for CANVAS. (ignore missing fonts option in LOAD_FONT has been added by the way).

Code: Select all

By the way, is there any way to make a "blur"-style effect using CANVAS or svg? To blur a shadow or create a "shine" behind something
You could implement a blur at the bitmap level but it will probably take a bit of CPU, so maybe it is more clever to just design the SVG with gradients etc. to simulate it.

Regarding invalidation, I'll have to double check, but if opacity is set to 0, it should be the same as when the widget is not visible, so it should not re-trigger a full update. Anyway an invsibible slider element (with just the behavior and no visuals) should avoid the problem in the future. You can also avoid triggering the invalidation on parameter changes if it is already forced by the slider on top of it.

Post

Blue Cat Audio wrote: Wed Aug 28, 2019 3:51 pm We are getting close to the release, including full documentation for CANVAS. (ignore missing fonts option in LOAD_FONT has been added by the way).
That's great!
Considering CANVAS I think it would be nice to have an option to align text somehow. Or to find out the size of the path made with Text() to be able to calculate where to start it to center it. It would be nice for custom text graphics, for example to display param values on CANVAS centered (or right-aligned) to some point.

Regarding blur I couldn't resolve how to use bitmap-style PatternFilters on non-bitmaps. So I came up with another way - to redraw the same shadow with changing opacity several times slightly changing it's size. It gives a kind of blurry effect, though opacities sum up. Gradients were also in mind, but it's hard to make a proper gradient for blurring edges of rectangle, for example (or I don't see yet how to overlap several gradients properly).

Thanks for your work and explanations!

Regarding invalidation, I have a CANVAS bigger than SLIDER element (to allow longer shadows), so I had to "turn off" rendering when slider changes, and leave only when param.value_changed, so that the whole CANVAS updates simultaneously. Still SLIDER triggers update inside its bounds, but it redraws with previous state of param and later full CANVAS redraws with new value of param.

Post

BTW, I know than AngelScript is not very fast with arrays. But is there any more efficient way to keep a bunch of data to access it later? Is something like keeping data in object vars and keeping object in Directory more efficient?

Post

Text measurement is something that will have to be implemented for the graphics context at some point - it still an experimental API at the moment.

Angelscript arrays are indeed slower than native C/C++ arrays. However while it makes a difference on the DSP side when called 44100 times or more per second, in the GUI it is usually completely negligible compared to other operations such as drawing.

Post

It has not been officially announced yet, but Plug'n Script 3.2 is now available. As you can see there are a couple of new features and improvements!

You can check out the updated KUIML 2.6 GUI programming language documentation here.

Enjoy!

Post

Ugh!!! It's been a long time I was so excited :)) Trying to keep calm and look through new features!
Thanks a lot! Will be testing it with a new skin and hopefully prepare it for publication as well.

Post

ilyaorlov wrote: Fri Aug 30, 2019 2:16 pm Ugh!!! It's been a long time I was so excited :)) Trying to keep calm and look through new features!
Thanks a lot! Will be testing it with a new skin and hopefully prepare it for publication as well.
Now I am excited!!! Looking forward to it!

Hopefully most of your enhancement requests have been implemented here :-).

Post

Yeeeea :)) I'm looking at Oscilloscope and imagine new stuff that can be made! :)
Many many good things appeared in PnS! Will be testing them soon.
Thanks a lot again!!! :tu: :tu: :tu: :party:

Post

:tu:

Post

Blue Cat Audio wrote: Fri May 10, 2019 6:27 pm There is a "pushed" attribute for many control widgets when the mouse is down, but in the current version it does not work for Joysticks and XY pads (it has been fixed for the next update).
Hello! I'm testing ".pushed" attribute and it seems to be working now with JOYSTICK, but not with XY_PARAM_PAD / XY_ZOOM_SELECT_PAD. Should it?

I get error "xy_zoom_select_pad.pushed.value_changed: Unknown identifier".

Post

I don't think these widgets can be pushed (even though the mouse has to get down to use them), so it is not surprising that they do not have a pushed attribute at this point.

Post Reply

Return to “Blue Cat Audio”