Entra:     


Forum: General Discussion

Topic: how to scale a parameter with VDJ script?

Questo argomento è obsoleto e potrebbe contenere informazioni obsolete o errate.

I want the full rotation 0-127 of my encoder to map to 0% - 50% of a EQ, how can I achieve this using VDJ script. I know I have been to achieve this in other software with midipipe by changing the input of the midi messages but this won't work with virtual dj.
thanks!
 

Inviato Mon 01 Aug 11 @ 8:58 pm
This is your code (example for the mid eq) :

param_multiply 50% & eq_mid
 

thankyou apopsis for the quick reply!
For changing bpm values +0.5bpm and -0.5 bpm with buttons I have tried all different parameter combinations and none achieve this? Also for my pitch_reset I want this to trigger when both of my nudge bpm buttons are pushed I have tried this and I can't get each button to work independently from eachother.
Thanks!
 

Try something like

var 'reset2' ? deck 1 pitch_reset : deck 1 pitch +0.05 & set 'reset' while_pressed
var 'reset1' ? deck 1 pitch_reset : deck 1 pitch -0.05 & set 'reset2' while_pressed

you can change the 0.05 to make it more or less sensitive to pitch (bpm) changes. The way it should work is if you are bending the pitch you are setting a shift that the other button reacts to if activated, Untested so let me know if it doesn't work
 

I have just tried it here is what I have found:
I have 2 buttons for each deck (tempo nudges)
The right side buttons control deck 1.
The left side buttons control deck 1 (as intended)

The same with layer buttons actived (deck switch) the right side nudge buttons still control deck 1.
Is there a way to make this command independent to all 4 decks?

Also pitch_reset is too slow for my liking i have tried pitch_reset 10ms and it doesn't change the speed.
 

Is there any way to keep bpm values locked for either 0.5 or 1 values?
It seems like the parameter 0.05 will nudge 0.56 of the bpm value (either up or down)
I have found that the percentage 2.23% will nudge the bpm 0.5 up or down from 128bpm but when nudged from 130bpm it is not exact (eg 130.03 or 129.48).
 

shift
set 'finepitch' while pressed

left
var 'reset1' ? var 'finepitch' ? pitch_reset 5% : pitch 100% : var 'finepitch' ? pitch -0.001 & set 'reset2' while_pressed : pitch -0.005 & set 'reset2' while_pressed

right
var 'reset2' ? var 'finepitch' ? pitch_reset 5% : pitch 100% : var 'finepitch' ? pitch +0.001 & set 'reset1' while_pressed : pitch +0.005 & set 'reset1' while_pressed

try the above scripts, I changed it a little so you have four options at the cost of one more button, but you can change the name of 'finepitch' to whatever you like, if you already have a shift button I recommend using that instead.

how it works is, same as before but un shifted the pitch will reset instantly and you will have a coarse pitch adjustment, if however, you have shift pressed, the pitch reset will be reasonably quick at 5% but you can change the amount to suit (higher % = faster reset). When using the pitch bend buttons with shift active it will have a superfine adjustment of around +/- 0.05bpm so you can get it close, but don't know how to get it exact on 0.05 bpm it's probably adding a couple more decimal places not sure how to calculate it though

if the above does not work try these for a dual deck controller

shift
device_side "left" ? set 'finepitch' while pressed : set 'finepitch' while pressed

left
device_side "left" ? var 'reset1' ? var 'finepitch' ? pitch_reset 5% : pitch 100% : var 'finepitch' ? pitch -0.001 & set 'reset2' while_pressed : pitch -0.005 & set 'reset2' while_pressed : var 'reset1' ? var 'finepitch' ? pitch_reset 5% : pitch 100% : var 'finepitch' ? pitch -0.001 & set 'reset2' while_pressed : pitch -0.005 & set 'reset2' while_pressed

right
device_side "left" ? var 'reset2' ? var 'finepitch' ? pitch_reset 5% : pitch 100% : var 'finepitch' ? pitch +0.001 & set 'reset1' while_pressed : pitch +0.005 & set 'reset1' while_pressed : var 'reset2' ? var 'finepitch' ? pitch_reset 5% : pitch 100% : var 'finepitch' ? pitch +0.001 & set 'reset1' while_pressed : pitch +0.005 & set 'reset1' while_pressed

 

scratch that, if you set the pitch range at 6% the value +/= 0.001 will change the bpm 0.01, so 0.005 would change it 0.05, it must be relative to the pitch range, if you figure out all the movement amounts for the different pitch ranges I can add variables so the button will adjust the bpm exactly at any pitch range, I will need the ranges you use and the decimal values for moving 0.05 and 0.01 or whatever values you want probably 0.1 and 0.05 would be best.

here is the values at different pitch ranges that will move the bpm 0.01 but it doesn't work for 25, 50, 100 when it is multiplied to move the bbpm 0.05 or 0.1 so the numbers are probably incorrect, that's easy, but maths is definitely not a strong point with me

0.01bpm
6% - 0.001
8% - 0.0075
12% - 0.0005
24% - 0.00025
48% - 0.000125

10% - 0.0005533
25% - 0.00022132
50% - 0.00011066
100% - 0.00005533
 

alright I figured out the value for moving the pitch 0.01 bpm at 100% pitch range

100% - 0.0000390625
50% - 0.000078125
25% - 0.00015625
12% - 0.0032552083333333333333333333333333
6% - 0.0065104166666666666666666666666667

------------------------------------
edit Im gonna give up now, it depends on the bpm of the playing track, it was perfect for 128bpm but not for 140bpm, thats ghey I thought I had it LOL




 

Shift functions are more confusing to me then beneficial so I just kept the code as:

Pitch Bend -
var 'reset1' ? pitch 100% : pitch -0.001 & set 'reset2' while_pressed

Pitch Bend +
var 'reset2' ? pitch 100% : pitch +0.001 & set 'reset1' while_pressed

This seems to work for dual deck configuration off the bat but for 4 decks, it controls decks 3+4, I don't think device_side L or device_side 1/2/3/4 would help in this situation. I might be wrong.

For locking bpm values to 0.5 + 1 a query with the get bpm command followed by different pitch adjustment values dependent on which bpm each deck is currently at might work?

Thanks!
 

Also if the 2 buttons are held down for more then 2 seconds it will pitch_reset 5% (over time) if not it shall be pitch 100% (instant) would look like this?


L: holding 2000ms ? var 'reset1' ? pitch_reset 5% : var 'reset1' ? pitch 100% : pitch -0.001 & set 'reset2' while_pressed

R: holding 2000ms ? var 'reset2' ? pitch_reset 5% : var 'reset2' ? pitch 100% : pitch +0.001 & set 'reset1' while_pressed



 

smackmonkey wrote :
Shift functions are more confusing to me then beneficial so I just kept the code as:

Pitch Bend -
var 'reset1' ? pitch 100% : pitch -0.001 & set 'reset2' while_pressed

Pitch Bend +
var 'reset2' ? pitch 100% : pitch +0.001 & set 'reset1' while_pressed

For locking bpm values to 0.5 + 1 a query with the get bpm command followed by different pitch adjustment values dependent on which bpm each deck is currently at might work?

Thanks!


 

smackmonkey wrote :
Shift functions are more confusing to me then beneficial so I just kept the code as:

Pitch Bend -
var 'reset1' ? pitch 100% : pitch -0.001 & set 'reset2' while_pressed

Pitch Bend +
var 'reset2' ? pitch 100% : pitch +0.001 & set 'reset1' while_pressed

This seems to work for dual deck configuration off the bat but for 4 decks, it controls decks 3+4, I don't think device_side L or device_side 1/2/3/4 would help in this situation. I might be wrong. EDIT it seems now they work do work for all 4 decks when I activate layer. Nevermind ! lol


For locking bpm values to 0.5 + 1 a query with the get bpm command followed by different pitch adjustment values dependent on which bpm each deck is currently at might work?

Thanks!


 

Ignore the last 2 posts. I meant to EDIT them but QUOTED them instead.
Need Coffee...
 

you were on the right track with holding, It was just in the wrong spot. This is assigned to deck left and right

left
device_side "left" ? var 'reset1' ? holding 2000ms ? deck left pitch_reset 5% : deck left pitch 100% : deck left pitch -0.001 & set 'reset2' while_pressed : var 'reset1' ? holding 2000ms ? deck right pitch_reset 5% : deck right pitch 100% : deck right pitch -0.001 & set 'reset2' while_pressed

right
device_side "left" ? var 'reset2' ? holding 2000ms ? deck left pitch_reset 5% : deck left pitch 100% : deck left pitch +0.001 & set 'reset1' while_pressed : ? var 'reset2' ? holding 2000ms ? deck right pitch_reset 5% : deck right pitch 100% : deck right pitch +0.001 & set 'reset1' while_pressed
 

ah, that worked.

Is it possible to make commands depending on the different results of a query for example using the get bpm command then specify a different nudge value for each bpm value returned?

This would be a way of keeping the bpm values locked to either 0.5 or 1.


 

nah, you can't query the bpm, I tried a couple of weeks ago with no luck
 

thats a shame. i guess this will never work then.
Thanks for the help!
 



(Vecchi argomenti e forum sono automaticamente chiusi)