About the PARAM_TEXT_CONTROL and its text_color_disabled attribute...

Official support for: bluecataudio.com
Post Reply New Topic
RELATED
PRODUCTS

Post

Hello.
My own skin for the Blue Cat ParametrEQ3 plugin is almost finished but in the middle of the process i skipped something that didn't work as expected and i hope you guys maybe can tell me what is wrong with the code.
See this next simple example skin:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<SKIN name="ParamEQmono-test1" language_version="1.0" font_face="Tahoma" font_height="14" text_color="#FFFFFF" font_quality="no_anti_alias" background_color="#483D8B" v_margin="10" h_margin="20" pixel_range="4" layout_type="column">
	<!--EQ MID BAND 1-->
	<COLUMN spacing="15">
		<PARAM_TEXT param_id="input15" content="{name} {value}"/>
		<!--On/Off Button-->
		<IMAGE_PARAM_BUTTON param_id="input15" image="on_off_button.bmp" image_orientation="horizontal" cursor="system::cross" images_count="2"/>
		<!--Frequency Text of MidBand1-->
		<PARAM_TEXT_CONTROL param_id="input16" cursor="system::cross" mouse_sensitive="true" positions_count="19980" response_curve="linear" content="{value} {unit}" value_format="0005.0" text_color_pushed="#FF0000" text_color_disabled="#808080"/>
	</COLUMN>
</SKIN>
See the PARAM_TEXT_CONTROL at the bottom of the code. As you can see here the frequency MidBand1 color (dspinput16) will change to a red color when pushed, this atribute works as expected —clicking on it changes to red— so there's nothing to say about it —that attribute was added just as an example showing that the text_color_pushed works as expected—. Then i added the text_color_disabled attribute and there is where my problem is, it doesnt work, the color keeps white and it doesnt change to gray.
Previously as you can see i also added a IMAGE_PARAM_BUTTON to turn on/off the MidBand1 and based on that i think it's obvious that when this button is off the band1 is "disabled, this sound weird. The thing is that this state is not working so the question is When a given parameter is considered disabled?, In what scenario can this color attribute can be displayed? I have done several attempts to make the text_color_disabled attribute of the frequency and other band-parameters-related to show as gray color when the band is off but as i said before it's not working. What is wrong? Can this be done really or not?. I'm a new member of this forum. I hope you can understand me.
Best Regards. Thank you in advance.
ImageImage
This is how the previous example code looks like.
Here, the 1st pic shows Band 1 Active is "0.0" meaning that this band is OFF (disabled)
and the next pic shows the opposite i.e. when Band 1 Active is ON it shows "1.0" (enabled).
In the 1st pic the frequency color is supposed to be #808080 (grey) as coded and not #FFFFFF (white).

Post

Hi,

Thank you for posting in our forum. The issue here is that there is a misunderstanding about what the "disabled" status refers to. The status is considered disabled when the widget is disabled (not when the parameter reaches 0).

If you want to change the color based on the value of the parameter, you may want to use several text controls on top of each other and change the visible attribute of these depending on which one should be visible.

However, I am not sure that the TEXT_CONTROL is what you want: do you need the parameter to change when the text is clicked, or when dragged up/down like a slider? (the latter is what the text control does)

Post

Blue Cat Audio wrote:Hi,
Thank you for posting in our forum. The issue here is that there is a misunderstanding about what the "disabled" status refers to.
Yes, that's was i thought, "a guessing" that maybe would end up in a misunderstanding.
Blue Cat Audio wrote: The status is considered disabled when the widget is disabled (not when the parameter reaches 0).
I can't find that disabled status description on the SkinningLenguageManual v1.4.1. Does exist a "_disabled"/_enabled" attribute-basis for PARAM_TEXT_CONTROL or TEXT_CONTROL widgets?. The only PARAM_TEXT_CONTROL specific attributes i see over here are: "text_color_disabled", "text_color_hover", "text_color_focus", "text_color_pushed", "pixel_range", "orientation" and all the rest for common control widgets. Maybe im missing something.
Blue Cat Audio wrote: If you want to change the color based on the value of the parameter, you may want to use several text controls on top of each other and change the visible attribute of these depending on which one should be visible.
I just noticed that im working based on a different (older) version of the plugin engine (v1.4.3). Just in case i downloaded the SkinningLenguageManual v1.4.1 and i noticed that from upper engine versions there is a "display" attribute but as i can read that is for 3D Objects widgets. So, im thinking maybe i can simulate this just Layeringstacking different PARAM_TEXT_CONTROLs on top each others and maybe matching ones to the background color or something like that but i'm not sure how to acomplish this or link their values, etc, that task would be out of my still-learning-programming-skin-area.
Blue Cat Audio wrote: However, I am not sure that the TEXT_CONTROL is what you want: do you need the parameter to change when the text is clicked, or when dragged up/down like a slider? (the latter is what the text control does)
Actually i know how to make that behaviour and you are right, the PARAM_TEXT_CONTROL is which can make that possible, the PARAM_TEXT is just like an "informative" widget, it cant interact with mouse/keyboard. They both have similar names.

Finally the main question is:
Can in plugin engine v1.4.3 make a PARAM_TEXT or PARAM_TEXT_CONTROL that changes its color att based on something?.
In my case i just want to do this:
BAND EQ OFF=GRAY COLOR (for frequency, gain and bandwidth parameters),
BAND EQ ON =WHITE COLOR (for frequency, gain and bandwidth parameters).

I have been thinking in maybe just stacking a pic with some transparency on top of the whole band parameter area would be the last resource but i would have to solve how to "image_action" this.

Thank you for your reply.
The plugin skinning feature in your plugins is great, it requires some time and patience to learn though.

Post

You are right, the Parametr'EQ series have not been update for a long time, so the skinning engine is a bit outdated (we are working on it, though).

Even with this older version, and without using the display param, yu can do the following (pseudo code):

Code: Select all

<!-- Stack several widgets on top of each other (two text widgets with appropriate color + an invisible transparent button to control the parameter by click) -->
<LAYER_STACK>
   <PARAM_TEXT text_color="$GRAY_COLOR$" param_id="$band_param$" visible="false" id="gray_text"/>
   <PARAM_TEXT text_color="$WHITE_COLOR$" param_id="$band_param$" visible="false" id="white_text"/>
  <IMAGE_PARAM_BUTTON image="empty_image.bmp" image_mask="full_black_image.bmp" image_mouse_mask="full_white_image.bmp" width="100%" height="100%" param_id="$band_param$"/>
 <!-- Show/Hide text with appropriate color using the param value -->
 <PARAM_LINK from="$band_param$" to="gray_text.visible" reverse="true"/>
 <PARAM_LINK from="$band_param$" to="white_text.visible"/>
</LAYER_STACK>
Hope this helps!

Post

Blue Cat Audio wrote:Hope this helps!
:clap: :clap: :clap:
Wow man, the PARAM_LINK is the key element to make what i wanted. i'll have to learn more about that, there's a lot of possibilities.
I analized your code-reply and after my 2nd or 3rd test i got surprised, It worked perfect!!.
You know what, that visible —"unknown" for me 'till your replied-code— attribute for PARAM_TEXT widget is not mentionated in my SkinningManual.chm file, the 2008/02/07 V1.4.1 Language Versions History is the latest mentionated on this—. I just decided to add that visible attribute to one of my PARAM_TEXT_CONTROLs on my code and i had no problem, the engine read it. This att is great.
Now i'll update my almost-done-skin with all this new stuff but that's another story.

This next code example works very well based on the one you posted. Here i can click the central button to make the Eq Band title and its Freq change their colors atts. Thank You Very Much. :D

Code: Select all

<COLUMN spacing="15">
	<LAYER_STACK>
		<PARAM_TEXT content="{name} {value}" text_color="#808080" param_id="input15" visible="false" id="gray_text"/>
		<PARAM_TEXT content="{name} {value}" text_color="#FFFFFF" param_id="input15" visible="false" id="white_text"/>
		<!-- Show/Hide text with appropriate color using the param value -->
		<PARAM_LINK from="input15" to="gray_text.visible" reverse="true"/>
		<PARAM_LINK from="input15" to="white_text.visible"/>
	</LAYER_STACK>
	<!--On/Off Button-->
	<IMAGE_PARAM_BUTTON param_id="input15" image="on_off_button.bmp" image_orientation="horizontal" cursor="system::cross" images_count="2"/>
	<!--Frequency Text of MidBand1-->
	<LAYER_STACK>
		<PARAM_TEXT_CONTROL param_id="input16" cursor="system::size_v" mouse_sensitive="true" positions_count="19980" response_curve="linear" content="{value} {unit}" value_format="0005.0" visible="false" id="fgray_text" text_color="#808080"/>
		<PARAM_TEXT_CONTROL param_id="input16" cursor="system::size_v" mouse_sensitive="true" positions_count="19980" response_curve="linear" content="{value} {unit}" value_format="0005.0" visible="false" id="fwhite_text" text_color="#FFFFFF"/>
		<!-- Show/Hide text with appropriate color using the param value -->
		<PARAM_LINK from="input15" to="fgray_text.visible" reverse="true"/>
		<PARAM_LINK from="input15" to="fwhite_text.visible"/>
	</LAYER_STACK>
</COLUMN>

Post

Great! Thanks for posting the full code.

The " visible" attribute is actually inherited from the widget element:
http://www.bluecataudio.com/Vault/Skins ... dgets.html

It was indeed officially exposed in v1.6, but I guess it was already in testing phase in v1.4, that's why it does not appear in your version. Sorry for that!

We are working on changing the format of the documentation anyway to make it easier to read and maintain, so maybe it will help in the future!

Post

Blue Cat Audio wrote:You are right, the Parametr'EQ series have not been update for a long time, so the skinning engine is a bit outdated (we are working on it, though).
Good to know. If you update this ParamtricEQ perhaps It would be great a new feature like being able to see the audio spectrum "stacked" @ graph area :pray:, maybe with just 2 or 3 user-basic-editable-parameters for it and nothing else would be enough, nothing complex.
Blue Cat Audio wrote:Great! Thanks for posting the full code.
The " visible" attribute is actually inherited from the widget element:
http://www.bluecataudio.com/Vault/Skins ... dgets.html
Yeah, there it is.
Blue Cat Audio wrote:It was indeed officially exposed in v1.6, but I guess it was already in testing phase in v1.4, that's why it does not appear in your version. Sorry for that!
:tu: It's ok man.
Blue Cat Audio wrote:We are working on changing the format of the documentation anyway to make it easier to read and maintain, so maybe it will help in the future!
Good to know too.

Thanks again Blue Cat!!

Post Reply

Return to “Blue Cat Audio”