Hi Guys (and Gals),
I've been at this for hours and can't figure this out.
I have a hardware controller with a knob (like a volume knob) and a pitch slider.
My goal is to use the knob as a sensitivity value for the pitch slider.
My pitch range would stay the same (example 100).
The knob provides a value from 0.0 to 1.0 with 0.1 increments.
I've found these values by editting a skin and showing the value using "get_var pitchsense"
I tried to set this value as a variable "pitchsense" and use the vdjscript to alter the ammount of pitch control added/substracted.
slider1 is the pitch control slider
slider2 is the knob
key action
slider2 deck 1 set "pitchsense" (( this will range from 0.1-1 ))
slider1 deck 1 param_multiply 'get_var pitchsense' & pitch
However this doesnt work that way.
The pitch value range without multiplier (or 1) is 0-200 and using a multiplier this way gives strange, though expected results.
Setting the knob to 0.5 will set the pitch value to 0-100 aka half the total slider. Moving the slider now will only go half way (from top to center)
[|--------] [-----|-----]
The new center of the pitch control is 50, which is halfway between the top and center of the total pitch slider.
[--|------]
It doesnt "center" the value, aka you need to add 100.
The lower the knob value the lower the total range.
So a value of 0.25 would give a total pitch value of 0-50.
[|--------] top
[--|------] bottom
[-|-------] center
The solution should be easy, just add a value of X to the total value so the added value of the pitch is combined.
This cant be 100, because this wont allow for negative values. So it needs to be 100 - half of the param_mutiply pitch value.
Ex using 0.25 as multiply.
The total range will now be 0-50 with the center at 25 instead of 0-200 with the center at 100.
The value to add for a proper center is 75, not 100.
75+0 = lowest value
75+50 = highest value
75+1/2x50(=25)=center value
I've tried using param_add and some other trickery, but it just wont work.
I've made a schematic correlation and I can see there is a pattern, but I have no idea how to solve this.
knob range center value to add
1 0-200 100 0
0.5 0-100 50 50
0.25 0-50 25 75
0.1 0-20 10 90
If i use the param_add command with the values_to_add it wont work, because the values are relative to the pitch itself.
So param_add 0.75 would increase the value pitch with -25% ??
I feel the answer is close, but I've become blind....
I really need a scripting guru for this :-)
Your help is greatly appreciated !
I've been at this for hours and can't figure this out.
I have a hardware controller with a knob (like a volume knob) and a pitch slider.
My goal is to use the knob as a sensitivity value for the pitch slider.
My pitch range would stay the same (example 100).
The knob provides a value from 0.0 to 1.0 with 0.1 increments.
I've found these values by editting a skin and showing the value using "get_var pitchsense"
I tried to set this value as a variable "pitchsense" and use the vdjscript to alter the ammount of pitch control added/substracted.
slider1 is the pitch control slider
slider2 is the knob
key action
slider2 deck 1 set "pitchsense" (( this will range from 0.1-1 ))
slider1 deck 1 param_multiply 'get_var pitchsense' & pitch
However this doesnt work that way.
The pitch value range without multiplier (or 1) is 0-200 and using a multiplier this way gives strange, though expected results.
Setting the knob to 0.5 will set the pitch value to 0-100 aka half the total slider. Moving the slider now will only go half way (from top to center)
[|--------] [-----|-----]
The new center of the pitch control is 50, which is halfway between the top and center of the total pitch slider.
[--|------]
It doesnt "center" the value, aka you need to add 100.
The lower the knob value the lower the total range.
So a value of 0.25 would give a total pitch value of 0-50.
[|--------] top
[--|------] bottom
[-|-------] center
The solution should be easy, just add a value of X to the total value so the added value of the pitch is combined.
This cant be 100, because this wont allow for negative values. So it needs to be 100 - half of the param_mutiply pitch value.
Ex using 0.25 as multiply.
The total range will now be 0-50 with the center at 25 instead of 0-200 with the center at 100.
The value to add for a proper center is 75, not 100.
75+0 = lowest value
75+50 = highest value
75+1/2x50(=25)=center value
I've tried using param_add and some other trickery, but it just wont work.
I've made a schematic correlation and I can see there is a pattern, but I have no idea how to solve this.
knob range center value to add
1 0-200 100 0
0.5 0-100 50 50
0.25 0-50 25 75
0.1 0-20 10 90
If i use the param_add command with the values_to_add it wont work, because the values are relative to the pitch itself.
So param_add 0.75 would increase the value pitch with -25% ??
I feel the answer is close, but I've become blind....
I really need a scripting guru for this :-)
Your help is greatly appreciated !
Mensajes Sat 25 Jul 15 @ 9:48 am
I don't understand. How could the sensitivity be changed without affecting the range? The range is the sensitivity.
Put another way, the size (length from one end to the other) of the pitch slider is fixed. It can't get longer or shorter, so the only way to alter the amount of pitch change over a particular distance - the sensitivity - is to adjust the range.
Put another way, the size (length from one end to the other) of the pitch slider is fixed. It can't get longer or shorter, so the only way to alter the amount of pitch change over a particular distance - the sensitivity - is to adjust the range.
Mensajes Sat 25 Jul 15 @ 9:55 am
Thanks for your message.
I've tried playing around with pitch_range for this as my first attempt.
The reason for my question is to use be able to finetune the pitch after the inital pitch is set.
For example.
Track A needs to be pitched approx 17% to match Track B. You could set the pitch range to 25% and get close.
However given the steps in the slider you can never match the pitch 100%.
There will always be 0.2% difference. And yes this is correctable using pitch bending, but in reality I want to have a proper pitch, not something that is near.
So why don't you lower the range after the approximate initial pitch is set.
Because lowering the pitch range will make the slider go "out of bounds" and touching the slider will set a new value based on its position.
Thus if you had a pitch of 25% with the slider being all the way down (+25%) after changing the pitch range to 10 moving the pitch slider will give a max pitch of 10%.
And not relative to the previous value of 25%.
Yes I have tried the option "controllerTakeoverModePitch" absolute/pickup/gradual/relative, but all seem to work the same (??).
This is strange though, because it seems to me I should use gradual/relative with a lower pitchrange to achieve my goal.
However, once again, touching the slider will always set the value on the actual postion.
Using the VDJ script option pitch of pitch_relative also makes no difference.
Thats why my best option is to leave the pitch range alone and alter the amount the slider interacts with the values.
I'm really really stuck here and have been trying for 4-5 hours testing and diagnosing this :-\
I've tried playing around with pitch_range for this as my first attempt.
The reason for my question is to use be able to finetune the pitch after the inital pitch is set.
For example.
Track A needs to be pitched approx 17% to match Track B. You could set the pitch range to 25% and get close.
However given the steps in the slider you can never match the pitch 100%.
There will always be 0.2% difference. And yes this is correctable using pitch bending, but in reality I want to have a proper pitch, not something that is near.
So why don't you lower the range after the approximate initial pitch is set.
Because lowering the pitch range will make the slider go "out of bounds" and touching the slider will set a new value based on its position.
Thus if you had a pitch of 25% with the slider being all the way down (+25%) after changing the pitch range to 10 moving the pitch slider will give a max pitch of 10%.
And not relative to the previous value of 25%.
Yes I have tried the option "controllerTakeoverModePitch" absolute/pickup/gradual/relative, but all seem to work the same (??).
This is strange though, because it seems to me I should use gradual/relative with a lower pitchrange to achieve my goal.
However, once again, touching the slider will always set the value on the actual postion.
Using the VDJ script option pitch of pitch_relative also makes no difference.
Thats why my best option is to leave the pitch range alone and alter the amount the slider interacts with the values.
I'm really really stuck here and have been trying for 4-5 hours testing and diagnosing this :-\
Mensajes Sat 25 Jul 15 @ 10:17 am
Ok ok ok ok I have been so blind....
Apperantly I was not controlling the values trough the proper device xml.
I noticed the mapped named something like simplemapper-1234.xml
I changed a value PITCH in the xml and it still worked.
When I have a closer look the value in VDJ it shows SLIDER1. Thus I have been tinkering with the wrong stuff ....grrr
This will most likely be why the overtake modes in the software didnt work, they were beeing overrulled by MIDI commands.
When looking a bit further I noticed the device I was editting was indeed the wrong one, it had the same same, but its the MIDI version, not the HID version.
So I have to set the MIDI to ignore and use the HID.
Setting the disableBuildInDefininations disables all the controllers.
When enabling it wont load the external mapping, however I know there was a way to force the use of an external XML.
If I recall correctly it needed to be called _EXTERNAL or something... will figure this out :)
Apperantly I was not controlling the values trough the proper device xml.
I noticed the mapped named something like simplemapper-1234.xml
I changed a value PITCH in the xml and it still worked.
When I have a closer look the value in VDJ it shows SLIDER1. Thus I have been tinkering with the wrong stuff ....grrr
This will most likely be why the overtake modes in the software didnt work, they were beeing overrulled by MIDI commands.
When looking a bit further I noticed the device I was editting was indeed the wrong one, it had the same same, but its the MIDI version, not the HID version.
So I have to set the MIDI to ignore and use the HID.
Setting the disableBuildInDefininations disables all the controllers.
When enabling it wont load the external mapping, however I know there was a way to force the use of an external XML.
If I recall correctly it needed to be called _EXTERNAL or something... will figure this out :)
Mensajes Sat 25 Jul 15 @ 11:51 am
I knew I've been struggeling with this before :
http://www.virtualdj.com/forums/191084/Hardware_Technical_Support/Alternative_device_definition_fle_for_native_devices_VirtualDJ8.html
The force-filename.xml option works. I didn't have to disable to built in devices.
The device and mapper will overrule the internal devices, just as I wanted.
VDJ7 and VDJ8 now both work with my custom device and mapper.
With thanks to djdad.
Back to the drawing board !
http://www.virtualdj.com/forums/191084/Hardware_Technical_Support/Alternative_device_definition_fle_for_native_devices_VirtualDJ8.html
The force-filename.xml option works. I didn't have to disable to built in devices.
The device and mapper will overrule the internal devices, just as I wanted.
VDJ7 and VDJ8 now both work with my custom device and mapper.
With thanks to djdad.
Back to the drawing board !
Mensajes Sat 25 Jul 15 @ 11:54 am
It seems that the incorrect file was the sole reason for the takeover command not working properly.
Using the knob to set the pitch range in combination with controllertakeovermode relative and vdjscript pitch (not pitch_relative) seems to do what I want.
I can dial the knob to the right and get a quick near-pitch match and turn the knob left more more accurate pitching
AWESOME =)
Using the knob to set the pitch range in combination with controllertakeovermode relative and vdjscript pitch (not pitch_relative) seems to do what I want.
I can dial the knob to the right and get a quick near-pitch match and turn the knob left more more accurate pitching
AWESOME =)
Mensajes Sat 25 Jul 15 @ 12:24 pm