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

ilyaorlov wrote: Mon May 06, 2019 3:33 pm It's possible to do with XY_ZOOM_SELECT_PAD tracking zoom changes! :)))
And we can even track right click checking zoom level!

And combined with another PNS_JOYSTICK we can get both click and dragging operations.
The disadvantage is that event happens on mouse release, so it's not fully versatile (yet don't know how to track mouse down event), but still good for some purposes.
It's indeed a way to get the info, but it would probably be much easier with generic mouse coordinates and mouse_down attributes :-).

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).

Post

ilyaorlov wrote: Thu May 09, 2019 6:19 pm IMHO it depends mainly on how you setup/route your output devices. Plug-n-Script has one MIDI output, though MIDI has 16 channels, so you can split your notes into 16 channels and send MIDI-output of PnS to each instrument (if your DAW supports it). Then you setup your instruments so that they react only to one of MIDI channels. This is one way to do it, probably there are more!
Yes, that's the way to go! 16 channels should be enough to control a couple of instruments!

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).
That's very cool! Waiting patiently :)

BTW: if REPEAT could use different separators like "\n" we could implement MULTILINE_TEXT template using REPEAT and regular TEXT elements.

It would be also nice to be able to reverse INVISIBLE_PARAM_MENU_BUTTON mouse behaviour without reversing list order (for example now scrolling up makes us go down the list which is sometimes a bit unnatural).

Post

Well, multi line text is a bit more complex than handling \n characters... But when build-time scripting is available, you would be able to do it anyway :-).

Regarding the menu button, I guess you mean being able to revert keys while keeping menu in order or vice versa?

Post

Regarding multiline text - yes, I understand :) But still could be an easy draft solution! REPEAT separators could be useful in many cases.

By reversing MENU_BUTTON behaviour I mean that: We have a list of enum_values that go down, but we have to scroll mouse up to go down (when used as mouse over). To illustrate - a gif.
You do not have the required permissions to view the files attached to this post.

Post

By the way, what does font_size_mode="character" means? Are there other modes?

Post

There are two modes for font size: because we had to keep backward compatibility, the default mode is "cell", which also includes the internal leading, whereas character mode sets the size of the characters only (that's the point size): it is more precise (because font sizes are rounded by the operating system), so it's better to use this mode.

More information about point vs cell font size on Microsoft.com

Post

Thank you again!
1) If we set CELL width to "100%" can we later (after skin loaded) change it to "auto" (like no width set at all?) And vice versa - set width to 100% on demand? (Using PARAM_LINK or scripting?)
2) Can you please explain "reflow" a bit, I still don't understand what it's supposed to be used for!

Post

(1) Once the width has been set, it is not possible to set it back to "auto".
(2) Reflow will reflow the elements just like a web browser does with text when changing the width of the window.

For example let's take a ROW of text elements (all X):

Code: Select all

<ROW spacing="2"><REPEAT count="8"><TEXT value="X"/></REPEAT></ROW>

Code: Select all

X X X X X X X X
When setting reflow=true with a specified width that it smaller than the sum of widths, you will get the following result:

Code: Select all

X X X X X X
X X
or

Code: Select all

X X X X X X
    X X
(depending on the specified internal alignment of the row cell).

Hope this clarifies!

Post

Thanks, sure it does!

Post

Hello!

I sometimes get an error message (see the attached pic) about the skin I'm making. I open Reaper project with PnS and sometimes it pops up. I reload it and no error :) Restart Reaper and no error again. Do something with the script, restart Reaper - again may popup, and may not. So it's difficult for me to find the reason why it happens, cause it's hardly repeatable. I see it's related to KUIML_WIDGET content I'm dynamically loading.

Hopefully by now I've already fixed that (by disabling link from string_param to kuiml_widget.innerKUIML and enabling it only after windows.loaded).

But still a few questions on that error:

1) What is "expression value" error usually related to? It's basically a syntax error in XML?
2) How to understand error positions (1:105), (1:217) in case of KUIML_WIDGET content?
3) Is there a way to reproduce such errors repeatedly? (If it's maybe related to JIT-compiling phase or something like that, which doesn't happen always?)
You do not have the required permissions to view the files attached to this post.

Post

This is indeed strange that you do not get the error everytime you load the skin. This looks like a race condition. Are you maybe using a timer?

The errors you get here are from a script inside the kuiml code. The "unrecognized token" is often caused by a KUIML variable used in a script and that has not been set (the script compiler will complain about the $ character).

Since you are using a string to set the inner content without any newline, the error is located on line 1, and the second number is the column. So First error is at the 105th character, second error at the 217th character.

Post

Thank you, things got clearer!

Post

Hello!

Please, help me with such case: I have Templates that use CANVAS, and inside CANVAS I have to give each CANVAS unique ID (to later access it's height and width). I use a VARIABLE incrementing each time this TEMPLATE is used to create a new ID each time. The problem arises when I use this TEMPLATE inside several KUIML_WIDGETs: seems like they increase this VARIABLE independently in each KUIML_WIDGET, so I get the same CANVAS IDs and errors because of that.

Maybe there's a nice way to generate unique ID for each CANVAS without much effort?

Post

I guess the best solution is to use a different prefix for your variable for each KUIML widget, or for the generated ID.

However, if the main skin is not using the template, there should not be any conflict between the KUIML widgets, as they all have their own internal model (but it imports parts of the parent skin data model).

Post Reply

Return to “Blue Cat Audio”