Button active only when value is selected
3 posters
Page 1 of 1
Button active only when value is selected
Hello :-)
I am trying your plugin with a VST instrument and your work is really great.
I wanted to know if it would be possible to have a behavior with the Push Button to handle the case where several buttons are assigned to the same CC command :
I would have preferred it to be enabled only in the case where the value of the controlled parameter is equal with the value of the button (only button "2" in the example below).
Do you think it is possible to achieve? Thank you.
I am trying your plugin with a VST instrument and your work is really great.
I wanted to know if it would be possible to have a behavior with the Push Button to handle the case where several buttons are assigned to the same CC command :
I would have preferred it to be enabled only in the case where the value of the controlled parameter is equal with the value of the button (only button "2" in the example below).
Do you think it is possible to achieve? Thank you.
Pinniouf- Posts : 5
Join date : 2021-01-30
Re: Button active only when value is selected
Hi, interesting question
The Note action has a Latch key functionality for similar purposes but since you are using CC that isn't available. It might be possible to achieve using translation files, I'll see if I can create something like that.
Just so I understand you correctly:
Is that correct?
The Note action has a Latch key functionality for similar purposes but since you are using CC that isn't available. It might be possible to achieve using translation files, I'll see if I can create something like that.
Just so I understand you correctly:
- All buttons use the same CC.
- When you press "1" you want "1" to be enabled and "2" to be disabled.
- When you press "2" you want "2" to be enabled and "1" to be disabled.
- When "1" or "2" is sent from your daw/device you want the corresponding button to be enabled and the other(s) to be disabled.
Is that correct?
Re: Button active only when value is selected
Hello :-)
Yes, it is correct (And the behavior is the same for as many buttons / values assigned to the same parameter).
Yes, it is correct (And the behavior is the same for as many buttons / values assigned to the same parameter).
Pinniouf- Posts : 5
Join date : 2021-01-30
Re: Button active only when value is selected
OK, here goes...
I think you can do it with translation files. It's a bit fiddly to set up but once configured it should work. You need to configure the buttons as Cycle buttons, and create one translation file for each button, see the attached zip where I created three files for CC1, value 1, 2 and 3. They looks like this:
The Default section:
The StepValues section:
This StepValues definition will cause the button to use the image from the active step when the button is pressed or when there is an exact match on an incoming midi message. All other incoming midi messages will "useclosestvalueonreceive" which always will be either the step before or the step after the active step. Different files for different buttons only need to differ in the step value attributes and (if you use it) the default display attribute.
I hope all this made sense...
PS. Please note that you must not define any image in the Stream Deck editor for the button. If you define an image in the Stream Deck editor, that image will always be displayed no matter what you define in the translation file. DS.
I think you can do it with translation files. It's a bit fiddly to set up but once configured it should work. You need to configure the buttons as Cycle buttons, and create one translation file for each button, see the attached zip where I created three files for CC1, value 1, 2 and 3. They looks like this:
- Code:
<MidiSteps version="1.1">
<Default send="no" receive="yes" display="1" image="%appdata%\Elgato\StreamDeck\Plugins\se.trevligaspel.midi.sdPlugin\Extras\Icons\Generic.png" displayonsend="yes" useclosestvalueonreceive="yes"/>
<StepValues>
<Step value="0" />
<Step value="1" send="yes" image="%appdata%\Elgato\StreamDeck\Plugins\se.trevligaspel.midi.sdPlugin\Extras\Icons\Generic_Active_Red_Fade.png"/>
<Step value="2" />
</StepValues>
</MidiSteps>
The Default section:
- send="no" means that nothing will be sent unless there is an explicit 'send="yes"' on a step, and you define that only for the value that the button should react to (this way, you "cycle" through a single value).
- receive="yes" means that everything will be received (it must be, so the button can evaluate if it should deactivate)
- display="something" is the value you want to display on the button. (you can skip this and define it in the Stream Deck editor instead if you wish since it's a static value)
- image="path to image" is the path to the deactivated image, this will be used for all values except the value the button should be activated for (see below)
- displayonsend="yes" just says that the active image should be displayed when you press the button.
- useclosestvalueonreceive="yes" makes it possible to restrict the value list to only the active value and the preceding and following values (see below)
The StepValues section:
- First add a step for the preceding value (unless it's value 0 that is the active value). The step can be empty and will use the definitions from the Default section.
- Next add a step for the active value for the button. This step must include "send" and "image" attributes that override the default values, this makes the button react differently to this value than all other values. The image attribute should define the path to the activated image.
- Finally add an empty step for the following value.
This StepValues definition will cause the button to use the image from the active step when the button is pressed or when there is an exact match on an incoming midi message. All other incoming midi messages will "useclosestvalueonreceive" which always will be either the step before or the step after the active step. Different files for different buttons only need to differ in the step value attributes and (if you use it) the default display attribute.
I hope all this made sense...
PS. Please note that you must not define any image in the Stream Deck editor for the button. If you define an image in the Stream Deck editor, that image will always be displayed no matter what you define in the translation file. DS.
- Attachments
Re: Button active only when value is selected
It works perfectly. Thank you for the feedback (and the explanations) and for your work.
Pinniouf- Posts : 5
Join date : 2021-01-30
Re: Button active only when value is selected
Hi There!
First of all thank you for the plugin, it is so useful.
I just wanted to add that I think "Button only active for value" should be a standard feature for the plugin, if you set abutton to be a controller with 2 values (one for button on and one for button off) then if those values come in the button should show that state, it is what you would expect surely ?
I have implemented the fix you mentioned above but I felt that I should put my vote in for this feature because it took me 3 hours to update this to work on my system (I have a Streamdeck Xl with 16 profiles where all buttons are Controlers but just with different numbers (each page/profile is one controller but the buttons all have 0 as their off value but different values for their on value) and each button has 2 seperate unique images (one for on, one for off)
To be honest, the thing that took the longest was typing the long paths for each button image for each of the 1024 different images.
Is there any way in the translation file to have the images for the states reference image 1 and image 2 that are already assigned to that button in the Streamdeck software ?
Best regards,
First of all thank you for the plugin, it is so useful.
I just wanted to add that I think "Button only active for value" should be a standard feature for the plugin, if you set abutton to be a controller with 2 values (one for button on and one for button off) then if those values come in the button should show that state, it is what you would expect surely ?
I have implemented the fix you mentioned above but I felt that I should put my vote in for this feature because it took me 3 hours to update this to work on my system (I have a Streamdeck Xl with 16 profiles where all buttons are Controlers but just with different numbers (each page/profile is one controller but the buttons all have 0 as their off value but different values for their on value) and each button has 2 seperate unique images (one for on, one for off)
To be honest, the thing that took the longest was typing the long paths for each button image for each of the 1024 different images.
Is there any way in the translation file to have the images for the states reference image 1 and image 2 that are already assigned to that button in the Streamdeck software ?
Best regards,
noodles2000- Posts : 5
Join date : 2021-03-14
Re: Button active only when value is selected
Hi,
I don't know if I misunderstand you, but "if you set a button to be a controller with 2 values (one for button on and one for button off) then if those values come in the button should show that state" is the default behavior of the plugin.
The button will show the off state for any received value below the on value and will show the on state for any received value equal to or above the on value.
The solution above is for the special case when you have multiple buttons working with the same CC and want to have each button display the "on" state only if a distinct value was received while all the other buttons listening to the same CC would go to the "off" state. Is that the behavior you think should be the default behavior?
It might be possible to handle that if I add a checkbox for "treat On value as distinct value" or something like that, changing it as default behavior would probably be a "breaking change".
/Gunnar
I don't know if I misunderstand you, but "if you set a button to be a controller with 2 values (one for button on and one for button off) then if those values come in the button should show that state" is the default behavior of the plugin.
The button will show the off state for any received value below the on value and will show the on state for any received value equal to or above the on value.
The solution above is for the special case when you have multiple buttons working with the same CC and want to have each button display the "on" state only if a distinct value was received while all the other buttons listening to the same CC would go to the "off" state. Is that the behavior you think should be the default behavior?
It might be possible to handle that if I add a checkbox for "treat On value as distinct value" or something like that, changing it as default behavior would probably be a "breaking change".
/Gunnar
Re: Button active only when value is selected
It's not such a bad idea... I could do something like this to have it react on only the On value and not "On or above":
Someone with English as native language: what is the best label for that checkbox? Distinct, Discrete, Exact? something else? (if something longer I must add a whole row for it and I try to keep the GUI as compact as possible)
Someone with English as native language: what is the best label for that checkbox? Distinct, Discrete, Exact? something else? (if something longer I must add a whole row for it and I try to keep the GUI as compact as possible)
Re: Button active only when value is selected
Hiya !
Thank you for the explanation, i now understand why I was getting what I thought was "Weird" behaviour with the images on my buttons, I would never have thought that "A vaue or any value above this value" would be a default behaviour for anything - especially in Midi where we are always dealig with distinct values. I understand that you always need to have a state for a button, but i think an unmatched state should always be the "Off" state rather than the "On" state.
Personally I don't think that the change to make it the default beaviour would be a "Breaking" change - but that is because I cannot think of any useful time where "This Value And Above" makes sense - but you have more experience with that.
If you don't make it default then I would probabluy suggest that you place the checkbox to the right of the "On" value and label it something like "And Above" and have it ticked by default - that way it clearly describes what is happening
Does that make sense ?
Thank you for the explanation, i now understand why I was getting what I thought was "Weird" behaviour with the images on my buttons, I would never have thought that "A vaue or any value above this value" would be a default behaviour for anything - especially in Midi where we are always dealig with distinct values. I understand that you always need to have a state for a button, but i think an unmatched state should always be the "Off" state rather than the "On" state.
Personally I don't think that the change to make it the default beaviour would be a "Breaking" change - but that is because I cannot think of any useful time where "This Value And Above" makes sense - but you have more experience with that.
If you don't make it default then I would probabluy suggest that you place the checkbox to the right of the "On" value and label it something like "And Above" and have it ticked by default - that way it clearly describes what is happening
Does that make sense ?
noodles2000- Posts : 5
Join date : 2021-03-14
Re: Button active only when value is selected
I wouldn't say I have more experience about that "This Value And Above" makes sense, it just happened to be that way
Though there are some situations where I think it is useful, e.g. when you want to indicate that a fader exceeds a threshold value. And since there are more than 14,000 users out there who have configured their Stream Decks according to the current rules, I am reluctant to change the default behavior.
The suggestion "And Above" for the checkbox is a good one, but it doesn't fit on one line. And if I have to add a line I can add some more text. I'll have to think about that.
Though there are some situations where I think it is useful, e.g. when you want to indicate that a fader exceeds a threshold value. And since there are more than 14,000 users out there who have configured their Stream Decks according to the current rules, I am reluctant to change the default behavior.
The suggestion "And Above" for the checkbox is a good one, but it doesn't fit on one line. And if I have to add a line I can add some more text. I'll have to think about that.
Re: Button active only when value is selected
Maybe I can do some hybrid solution.
If I keep the logic for Fader buttons and change for the other types I don't think I break anything, and if someone objects I can add the checkbox as a quickfix.
There's just such a massive amount of changes in the upcoming release so I'm a bit overwhelmed by verifying that everything works as expected and nothing is broken...
- Cycle buttons doesn't use the On value at all so they are not affected no matter the solution.
- Fader buttons doesn't use the On value when sending commands but have a valid use to signal that a threshold has been exceeded if the value is above the On value. I can keep that functionality.
- Push, Toggle and Hold buttons work with a single defined value and I agree that it makes sense to treat that single value as On and all other values as Off.
If I keep the logic for Fader buttons and change for the other types I don't think I break anything, and if someone objects I can add the checkbox as a quickfix.
There's just such a massive amount of changes in the upcoming release so I'm a bit overwhelmed by verifying that everything works as expected and nothing is broken...
Re: Button active only when value is selected
That sounds like a great solution. I very much look forward to it.
Happy to Beta Test if you need someone
Happy to Beta Test if you need someone
noodles2000- Posts : 5
Join date : 2021-03-14
Re: Button active only when value is selected
Hello :-)
For me, it's OK (but I'm not very objective ^^)
One change that I detect (but OK for me) is in the visual below. This is a generic screen that I implemented to manage the Dry / Wet of my effects. All the buttons are linked to the same CC message, the colored boxes in the middle allow me to go from one level to another very quickly (those are "Push" Button types). With the modification, only one of the buttons will be illuminated at the same time :
Ps : For the translation of terms in English I will not do better than google translate
For me, it's OK (but I'm not very objective ^^)
One change that I detect (but OK for me) is in the visual below. This is a generic screen that I implemented to manage the Dry / Wet of my effects. All the buttons are linked to the same CC message, the colored boxes in the middle allow me to go from one level to another very quickly (those are "Push" Button types). With the modification, only one of the buttons will be illuminated at the same time :
Ps : For the translation of terms in English I will not do better than google translate
Pinniouf- Posts : 5
Join date : 2021-01-30
Re: Button active only when value is selected
Yes, it's that kind of "threshold use" I'm afraid more users have implemented (and will miss) if/when I make that change...
Re: Button active only when value is selected
Some ideas to be able to have both solutions without taking up extra space in the editor. Which one do you feel most logical?
1. Keep the current solution where a value (like "64") in the On field is handled like "state is On for any value on or above that value", but add the possibility to register an equal sign to indicate "that value alone":
2. Change the default solution so that a single value in the On field means "that value alone" but add the possibility to register a plus sign to indicate "state is On for any value on or above that value"
...or am I just too afraid of polluting the editor with extra fields that hardly ever are used?
1. Keep the current solution where a value (like "64") in the On field is handled like "state is On for any value on or above that value", but add the possibility to register an equal sign to indicate "that value alone":
2. Change the default solution so that a single value in the On field means "that value alone" but add the possibility to register a plus sign to indicate "state is On for any value on or above that value"
...or am I just too afraid of polluting the editor with extra fields that hardly ever are used?
Re: Button active only when value is selected
I have toi say I love the idea of the Plus sign, it's simple and clear.
Of course there is always the issue that unless you know it's there you won't use it, so relies on people reading the manual (which they all do of course )
Of course there is always the issue that unless you know it's there you won't use it, so relies on people reading the manual (which they all do of course )
noodles2000- Posts : 5
Join date : 2021-03-14
Re: Button active only when value is selected
That shouldn't be a problem - everyone has a printed version of the documentation at hand...right?
But I agree that hidden features isn't a good idea. Either I'll add a tooltip explaining something or add an Explain button that opens a separate page that explains everything.
But I agree that hidden features isn't a good idea. Either I'll add a tooltip explaining something or add an Explain button that opens a separate page that explains everything.
Re: Button active only when value is selected
Hello :-)
With a few months late: I used the new version on different profiles for VST => it's great, this perfectly meets my initial request ! Thank you
With a few months late: I used the new version on different profiles for VST => it's great, this perfectly meets my initial request ! Thank you
Pinniouf- Posts : 5
Join date : 2021-01-30
Similar topics
» Active Span Indication: None
» Ensuring only one toggle is active in a profile
» Show selected channel
» Fader for the Selected track
» Selected Channel is not known! error
» Ensuring only one toggle is active in a profile
» Show selected channel
» Fader for the Selected track
» Selected Channel is not known! error
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum