Hello,
I want to active a button if the level of the deck 1 = 0 and then level deck 2 = 0 or if the master level = 0
I tried this :
deck 1 level 0% ? deck 2 level 0% ? on : master_volume 0% ? on : off
or
deck 1 level 0% ? deck 2 level 0% ? on : master_volume 0% ? on : off : off
but it don't work ...
I want to active a button if the level of the deck 1 = 0 and then level deck 2 = 0 or if the master level = 0
I tried this :
deck 1 level 0% ? deck 2 level 0% ? on : master_volume 0% ? on : off
or
deck 1 level 0% ? deck 2 level 0% ? on : master_volume 0% ? on : off : off
but it don't work ...
Mensajes Thu 03 Oct 13 @ 8:20 pm
you could try something like
controller independent led
deck 1 get level & param_cast 'percentage' & param_equal 0% ? on : deck 2 get level & param_cast 'percentage' & param_equal 0% ? on : get level & param_cast 'percentage' & param_equal 0% ? on : off
led
The theory of it is that you are getting the string that would be shown on a skin in a textzone or a visual element, then you cast that string into a value you can use with VDJ Script, in this case a 'percentage', but you could probably use 'float' as well. Then finally you ask if the value returned is equal to 0 'off'. If it works it should be independent of any physical control and instead work with the volume of the music displayed on the skin. If you specifically want to know when your volume sliders are down you could add a variable to your controls eg.
controls
volume & param_smaller 4% ? set 'noVol' 1 : set 'noVol' 0
master_volume & param_smaller 4% ? set '$noVol' 1 : set '$noVol' 0
if using independent leds
var 'noVol' ? on : off
var '$noVol' ? on : off
if only using a single led
var '$noVol' ? on : var 'noVol' ? on : off
I made it 4% as you probably won't be able to hear anything below 3% and it will give it a little room for error, if you want it to be 0 either change it to 1% or write param_equal 0%. Also this is independent on both sides. If you only have one led on the controller you want to use make user you make the volume variables global eg. '$noVol'
controller independent led
deck 1 get level & param_cast 'percentage' & param_equal 0% ? on : deck 2 get level & param_cast 'percentage' & param_equal 0% ? on : get level & param_cast 'percentage' & param_equal 0% ? on : off
led
The theory of it is that you are getting the string that would be shown on a skin in a textzone or a visual element, then you cast that string into a value you can use with VDJ Script, in this case a 'percentage', but you could probably use 'float' as well. Then finally you ask if the value returned is equal to 0 'off'. If it works it should be independent of any physical control and instead work with the volume of the music displayed on the skin. If you specifically want to know when your volume sliders are down you could add a variable to your controls eg.
controls
volume & param_smaller 4% ? set 'noVol' 1 : set 'noVol' 0
master_volume & param_smaller 4% ? set '$noVol' 1 : set '$noVol' 0
if using independent leds
var 'noVol' ? on : off
var '$noVol' ? on : off
if only using a single led
var '$noVol' ? on : var 'noVol' ? on : off
I made it 4% as you probably won't be able to hear anything below 3% and it will give it a little room for error, if you want it to be 0 either change it to 1% or write param_equal 0%. Also this is independent on both sides. If you only have one led on the controller you want to use make user you make the volume variables global eg. '$noVol'
Mensajes Thu 03 Oct 13 @ 11:13 pm
Sorry, I misspoke, I just want a button illuminates when the volumes are at 0. This button is like a Led in my skin, it is useless otherwise.
<button pannel="options" action="deck 1 level 0% ? deck 2 level 0% ? on : master_volume 0% ? on : off : off">
<size width="54" height="3"/>
<pos x="706" y="265"/>
<selected x="1" y="1821"/>
<down x="1" y="1821"/>
<up x="706" y="1823"/>
</button>
It must be on if :
Level 1 = 0 and Level 2 = 0 or Level Master = 0
(sorry for my english, I'am french)
<button pannel="options" action="deck 1 level 0% ? deck 2 level 0% ? on : master_volume 0% ? on : off : off">
<size width="54" height="3"/>
<pos x="706" y="265"/>
<selected x="1" y="1821"/>
<down x="1" y="1821"/>
<up x="706" y="1823"/>
</button>
It must be on if :
Level 1 = 0 and Level 2 = 0 or Level Master = 0
(sorry for my english, I'am french)
Mensajes Fri 04 Oct 13 @ 7:47 am
master_volume 0% ? on : deck 1 level 0% ? deck 2 level 0% ? on : off : off
PS. I suppose you need to create a button/led to indicate if there is any sound in the Output (OnAir). Have in mind, that this will only provide the correct information, if Master is present in the Sound Setup. For Setup with external mixers, this will not provide the info you need, so i find it rather useless to show that on a skin, unless you build a skin specifically for a midi controller.
PS. I suppose you need to create a button/led to indicate if there is any sound in the Output (OnAir). Have in mind, that this will only provide the correct information, if Master is present in the Sound Setup. For Setup with external mixers, this will not provide the info you need, so i find it rather useless to show that on a skin, unless you build a skin specifically for a midi controller.
Mensajes Fri 04 Oct 13 @ 8:18 am
Sorry Dodge, I didn't realize this was in the skins forum.
Mensajes Fri 04 Oct 13 @ 8:52 am
synthet1c wrote :
Sorry Dodge, I didn't realize this was in the skins forum.
And I, who do not understand English very well, it gives quite a mess .... ;)
djdad wrote :
master_volume 0% ? on : deck 1 level 0% ? deck 2 level 0% ? on : off : off
it's work very well, thank you DJDad !!!!
djdad wrote :
PS. I suppose you need to create a button/led to indicate if there is any sound in the Output (OnAir). Have in mind, that this will only provide the correct information, if Master is present in the Sound Setup. For Setup with external mixers, this will not provide the info you need, so i find it rather useless to show that on a skin, unless you build a skin specifically for a midi controller.
It's something like that. I'm just looking for a way to beautify the design, nothing techique.
[EDIT]
I tried an another instruction :
<visual source="deck 1 get vu_meter & param_smaller 0.01 ? deck 2 get vu_meter & param_smaller 0.01 ? on : off : off" type="">
If the out level is < 1% the "led" go on. I must use < 1% because when lower volumes, there are still few percent ... I do not know why ..
it also works and it allowed me to test the code "get vu_meter"
Mensajes Fri 04 Oct 13 @ 9:51 am
Its a known Skin Engine bug. All you need to do is to extend the height of the visual a bit longer. E.g. if the graphics for the visual start from 100 and end at 200, instead of height="101" have height="104" or maybe a bit less or more. Dont have to add any complex scripting for that
Mensajes Fri 04 Oct 13 @ 11:12 am
ok, thank you
Mensajes Sat 05 Oct 13 @ 8:37 am