Ingreso rápido:  

Forum: VirtualDJ Skins

Tema: How can I create this action? - Page: 1

Esta parte del tópico es antigua y puede contener información incorrecta para la nueva versión.

Hi

sry for that stupid topic name. I am new there and is it possible that my question is not last...

I am trying to create this:
https://www.youtube.com/watch?v=u3q91cWj120

I am using a radial fader with "pitch" action but I need to create some "on release" action after I remove a finger from the fader and call "Pitch reset" action. Can anybody help me with that?

 

Mensajes Mon 22 Jul 19 @ 9:25 pm
NicotuxHome userMember since 2014
maybe add an action when the fader button is released
up ? pitch_reset 2% : .....your actual fader action
 

Mensajes Tue 23 Jul 19 @ 12:41 am
locoDogPRO InfinityModeratorMember since 2013
You could have a variable set to 1 when touched, 0 when released then oninit of your skin have a repeat_start watching and saving the pitch when the variable == 0.
when touched have the repeat_start set another variable to know it has been touched, then variable 2 == 1 && variable 1 == 0 ? reset pitch and reset variable 2 to 0
 

Mensajes Tue 23 Jul 19 @ 7:34 am
Thx guys I think that I have a basic point but of course, I must look at documentation about details about variables...
 

Mensajes Tue 23 Jul 19 @ 6:29 pm
locoDogPRO InfinityModeratorMember since 2013
Give me a day, I'll replicate it with a hardware slider and share the script
 

Mensajes Tue 23 Jul 19 @ 7:04 pm
Hi, any news about script? :D
 

Mensajes Thu 25 Jul 19 @ 5:23 pm
locoDogPRO InfinityModeratorMember since 2013
Sorry, was dealing with my project, i think i did some tests before I got distracted, it's hard to test here (No touch screen) but I think i can bodge together something.

You said reset pitch, reset to zero or reset to last value?
 

Mensajes Thu 25 Jul 19 @ 9:36 pm
NicotuxHome userMember since 2014
It looks much more complicated as it initially seems, touch screen does not handle holding a button, it rightclick instead and does not handle rightclick holding
If you test hold too short/fast, driver still take touch in consideration aand does not have send click yet, if you test hold too slow/long driver already detected a rightclick
 

Mensajes Thu 25 Jul 19 @ 10:11 pm
After some iterations I created this design:

https://drive.google.com/open?id=1ru8j2Z-zb9huLZKa6Fsga6yj4qraDAc9

But the principle is the same. My vision is to simulate CD player/vinyl. Pitch on the left side is a normal pitch and +/- button increase or decrease pitch by 0,5 % (or different value, I will test it). But the second pitch on the right side simulates a job wheal and is there for much finer pitch control.

Pitch will be increase or decrease depending on how far away from the center the button is held. When the button is released, the pitch returns to the original level. For the final pitch correction, you must use the pitch fader on the left side.

Maybe is there a smarter way to do this. And I will be happy for any ideas. But my vision is to create a skin with a greate "analog" experience and vinyl mode.

Right now I am in the script exploring process. And it is ok but definitely, don't have enough experience to solve this. I will be happy for any help.
 

Mensajes Thu 25 Jul 19 @ 11:47 pm
Hi, I am trying to create touchable waveform like this:

https://drive.google.com/open?id=1hZAr-fAID-CEJ4BjMAdKiY9L_IOiLN9l

First I created a scratch waveform but there is a problem with volume. When volume is down waveform width is reduced to the 0.
So I try to use a rhythmzone but I don't know how to rotate it vertically. Is there any solution? Thx for help.
 

Mensajes Fri 26 Jul 19 @ 6:47 pm
NicotuxHome userMember since 2014
You may use some extra options i.e. orientation="vertical" and direction="up"

I know it works with vumeters, sliders, scratchwaves, textzone, visuals

<scratchwave deck="right" orientation="vertical">

but does not seems to work with rhythmzone

however volume does not change width of wave in a scratchwave but gain does
 

Mensajes Fri 26 Jul 19 @ 8:21 pm
Greate, my fold I used gain action... I replaced it with volume and now it works fine. But there are another two smaller think which I dont know how to solve.

<scratchwave deck="left" orientation="vertical" color="#FFB300" color2="#FFB300">
You can see that the waveform has two colors or some white yelow gradient. I dont know hot to set color to single fill color. Is that possible?

https://drive.google.com/open?id=13iWtKYlk98U1q_pWdcBgf7wFv88h0loi

And the second thing is the backspin. Is it possible to enable this function? Because you can scratch but this function doesn't work...
 

Mensajes Fri 26 Jul 19 @ 8:50 pm
Hi

I am trying to understand set and get action syntax and work with variables, and of course, I felt immediately...

For start, I tried set variable to the 2 after pressing button and print that value in textzone:

I suppose that this code creates and set variable myvar=2

<button deck="left" action="set %myvar 2" >
<pos x="53+100" y="228" />
<size width="60" height="60" />
<up x="420" y="1920" />
</button>

and I don't know how looks correct syntax for print that value:
<textzone>
<pos x="80" y="+15"/>
<size width="36" height="17"/>
<text size="16" color="#FFFFFF" align="center" weight="bold" format="get_text '%get_myvar'"/>
</textzone>

Thx for answer
 

Mensajes Sun 28 Jul 19 @ 1:31 pm
NicotuxHome userMember since 2014
"I suppose that this code creates and set variable myvar=2"
You are wrong

<button deck="left" action="set %myvar 2" >

stores 2 in the variable '%myvar'
but avoid using ponctuation in variable names

<text size="16" color="#FFFFFF" align="center" weight="bold" format="get_text '%get_myvar'"/>
1- format is somehow obsolete - forget about it - better use action or query for that purpose
2- % is an escape char in format
3- %get_myvar is not a recognised escaped reserved word for format

<text size="16" color="#FFFFFF" align="center" weight="bold" action="get_var '%myvar' & param_cast text"/>
would work

finally:

<button deck="left" action="set myvar 2" >
<pos x="53+100" y="228" />
<size width="60" height="60" />
<up x="420" y="1920" />
</button>

<textzone>
<pos x="80" y="+15"/>
<size width="36" height="17"/>
<text size="16" color="#FFFFFF" align="center" weight="bold" action="get_var 'myvar'"/>
</textzone>

In a way to test with variables and cast and actions out of the skin itself you may want to use button or pad

i.e. create the pad page my_tests
edit pâd page my_tests
pad 1 in action write the script

set myvar 2

in name field set what to display encote action in back cotes - note if you ommit "Myvar =" the leading space is needed

Myvar = `get var myvar`

exit editor
Pad 1 must be name "Myvar = 0"
Press Pad 1, its name is now "Myvar = 2"

 

Mensajes Sun 28 Jul 19 @ 3:42 pm
Thx a lot!

I have another question. I really tried to find a solution in the documentation but without success.
How can I define hold and released action for a button or slider?

For example, I need to change the pitch range from 12% to 5% when the button is pressed (and hold) and after button release change pitch range back to 12%. How can I do that?
 

Mensajes Sun 28 Jul 19 @ 5:58 pm
AdionPRO InfinityCTOMember since 2006
Nicotux wrote :
stores 2 in the variable '%myvar'
but avoid using ponctuation in variable names

You might want to read a bit more about variable naming.
% is not just punctuation, but has an actual meaning when used with variable names.
https://www.virtualdj.com/wiki/VDJscript.html
 

Mensajes Sun 28 Jul 19 @ 6:01 pm
NicotuxHome userMember since 2014
I apologize, I totally forgot about this one

while in wiki refs :
@Holodroid

https://www.virtualdj.com/wiki/VDJscript.html
the command syntax : while_pressed
pitch_range 5% while_pressed
will keep pitch range to 5% as long as button is pressed, and restore it to whatever it was before - potentially not 12%

https://www.virtualdj.com/wiki/VDJscript_verbs_v8.html
under "flow" section : up
up ? pitch_range 12% : pitch_range 5%
will keep setting pitch to 5% as long as button is pressed and set it to 12% when release

or combination of the 2 above
pitch_range 5% & up ? pitch_range 12% while_pressed
which constantly put pitch_range to 5% and test whenever the key was release to set it to 12%

NOTE: while_pressed is not a verb, it is part of the command
pitch_range 12% & pitch_range 5% while_pressed
will not work, because while_pressed apply to all the previous line part : pitch_range 12% & pitch_range 5%
it would only ends by a fast fast switching pitch_range from 12% to 5% during the press and ends with 5%

you may also find some other solutions
 

Mensajes Sun 28 Jul 19 @ 6:54 pm
NicotuxHome userMember since 2014
By the way, this make me find a very simple way to make your "elastic pitch slider" working with touch screen
whenever the design is round or linear vertical or horizontal
<slider action="pitch while_pressed" frommiddle="1" direction="down"/>

you may control it by using a variable instead of the pitch function itself
 

Mensajes Sun 28 Jul 19 @ 8:38 pm
OMG Nicotux! You are a Harry Potter. I expect that this will be a super painful process to create that elastic pitch fader. And it is done with one line of code. Just amazing. Thx! Now I hope that with while_pressed will be possible to create two-pitch faders with different pitch range for one deck...
 

Mensajes Sun 28 Jul 19 @ 10:06 pm
NicotuxHome userMember since 2014
yes it is possible

https://gofile.io/?c=c4raL5

sorry for the quality... it's a self VDJ recored grabscreen of a small part of VDJ itself
 

Mensajes Sun 28 Jul 19 @ 10:10 pm
39%